Say(T as text)
players << "<font color = '[usr.team ? usr.team.colour : null]'>[usr]: [T]"
//TONS OF TYPE CHECKS
world << "usr.team"
world << "mob.team"
if(usr.team && mob.team && (usr.team == mob.team))
world << "usr.team == mob.team"
if(usr == src)
world << "usr == src"
world << "usr != src"
if(usr == mob)
world << "usr == mob"
world << "usr != mob"
if(src == mob)
world << "src == mob"
world << "src != mob"
if(key in admins)
players << "[src] connects."
players << "[src] disconnects."
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.