* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
46 lines
841 B
Plaintext
46 lines
841 B
Plaintext
GLOBAL_LIST(mentor_datums)
|
|
|
|
/datum/mentors
|
|
var/client/owner = null
|
|
var/following = null
|
|
|
|
/datum/mentors/New(ckey)
|
|
if(!ckey)
|
|
del(src)
|
|
return
|
|
GLOB.mentor_datums[ckey] = src
|
|
|
|
/datum/mentors/proc/associate(client/C)
|
|
if(istype(C))
|
|
owner = C
|
|
GLOB.mentors |= C
|
|
|
|
/datum/mentors/proc/disassociate()
|
|
if(owner)
|
|
GLOB.mentors -= owner
|
|
owner = null
|
|
|
|
/client/proc/dementor()
|
|
var/mentor = GLOB.mentor_datums[ckey]
|
|
GLOB.mentor_datums -= ckey
|
|
qdel(mentor)
|
|
|
|
return 1
|
|
|
|
/proc/check_mentor()
|
|
if(usr && usr.client)
|
|
var/mentor = GLOB.mentor_datums[usr.client.ckey]
|
|
if(mentor || check_rights(R_ADMIN,0))
|
|
return 1
|
|
|
|
return 0
|
|
|
|
/proc/check_mentor_other(var/client/C)
|
|
if(C)
|
|
var/mentor = GLOB.mentor_datums[C.ckey]
|
|
if(C.holder && C.holder.rank)
|
|
if(C.holder.rank.rights & R_ADMIN)
|
|
return 1
|
|
else if(mentor)
|
|
return 1
|
|
return 0 |