Added a new mode: anti-revolution

This commit is contained in:
cib
2012-10-19 10:00:54 -07:00
parent 172c974111
commit bf83e5c3ba
4 changed files with 327 additions and 4 deletions
+33
View File
@@ -55,6 +55,9 @@ datum/mind
var/rev_cooldown = 0
// the world.time since the mob has been brigged, or -1 if not at all
var/brigged_since = -1
New(var/key)
src.key = key
@@ -1081,6 +1084,36 @@ datum/mind
fail |= !ticker.mode.equip_revolutionary(current)
// check whether this mind's mob has been brigged for the given duration
// have to call this periodically for the duration to work properly
proc/is_brigged(duration)
var/turf/T = current.loc
if(!istype(T))
brigged_since = -1
return 0
var/is_currently_brigged = 1
if(istype(T.loc,/area/security/brig))
for(var/obj/item/weapon/card/id/card in current)
is_currently_brigged = 0
break // if they still have ID they're not brigged
for(var/obj/item/device/pda/P in current)
if(P.id)
is_currently_brigged = 0
break // if they still have ID they're not brigged
if(!is_currently_brigged)
brigged_since = -1
return 0
if(brigged_since == -1)
brigged_since = world.time
return (duration <= world.time - brigged_since)
//Initialisation procs
/mob/living/proc/mind_initialize()