Code:
CustomSword
name = src.swordname
icon_state = src.swordname
description = "None"
overlay_state = src.swordname
overlay_layer = 1
map_state = "[src.swordname]-map"
slot = MAIN_HAND
equipped(mob/m)
m.overlay(src)
unequipped(mob/m)
m.remove(src)
The item itself is an /obj
The player has a variable named "swordname" however I always thought src referred to the player's mob.
I can post more examples of my code here if needed but if anyone can refer me to the documentation on this or some sample code, the help would be much appreciated.
Thank you!
src actually means 'whatever object this comes from'
usr means 'whatever initiated this'
Example:
Outputs: "This is an Apple" to the player which called Examine().
Examine is defined under Apple. So src = Apple
The verb is initated when a player calls it. So usr = the player's mob.