client
verb
Say(T as text)
if(T)
players << "<font color = '[usr.team ? usr.team.colour : null]'>[usr]: [T]"
//TONS OF TYPE CHECKS
if(usr.team)
world << "usr.team"
if(mob.team)
world << "mob.team"
if(usr.team && mob.team && (usr.team == mob.team))
world << "usr.team == mob.team"
if(usr == src)
world << "usr == src"
else
world << "usr != src"
if(usr == mob)
world << "usr == mob"
else
world << "usr != mob"
if(src == mob)
world << "src == mob"
else
world << "src != mob"
New()
if(key in admins)
verbs.Add(typesof(/admin/verb))
players.Add(src)
players << "[src] connects."
return ..()
Del()
players.Remove(src)
players << "[src] disconnects."
return ..()
var
list
admins = list("LordAndrew", "Guest-3550777048")
players = list()
team is a variable that mobs have (mob/var/team).
Here is the output from joining the server and using Say.
LordAndrew connects. LordAndrew: TEST usr != src usr == mob src != mob LordAndrew joins Crimson Scarlets. LordAndrew: TEST WITH A TEAM usr.team mob.team usr.team == mob.team usr != src usr == mob src != mob
The code works as intended, but I'm wanting to double-check with someone that I'm not abusing usr/doing something entirely wrong. From the above code I would surmise (based on the type checks) that usr and mob are interchangable in the context they were used, but I'm honestly not knowledgable on the subject.
And you are correct, in this case 'usr' and 'mob' (client's) will point to the same /mob.