Adds minor roundstart traits! (ala CDDA, etc.)
This commit is contained in:
committed by
CitadelStationBot
parent
3690cf3309
commit
0a449af83e
@@ -146,10 +146,23 @@
|
||||
else
|
||||
status_traits[trait] |= list(source)
|
||||
|
||||
/mob/living/proc/remove_trait(trait, list/sources)
|
||||
/mob/living/proc/add_trait_datum(trait) //separate proc due to the way these ones are handled
|
||||
if(has_trait(trait))
|
||||
return
|
||||
if(!SStraits || !SStraits.traits[trait])
|
||||
return
|
||||
var/datum/trait/T = SStraits.traits[trait]
|
||||
new T (src)
|
||||
return TRUE
|
||||
|
||||
/mob/living/proc/remove_trait(trait, list/sources, force)
|
||||
|
||||
if(!status_traits[trait])
|
||||
return
|
||||
|
||||
if(locate(ROUNDSTART_TRAIT) in status_traits[trait] && !force) //mob traits applied through roundstart cannot normally be removed
|
||||
return
|
||||
|
||||
if(!sources) // No defined source cures the trait entirely.
|
||||
status_traits -= trait
|
||||
return
|
||||
@@ -167,6 +180,12 @@
|
||||
if(!LAZYLEN(status_traits[trait]))
|
||||
status_traits -= trait
|
||||
|
||||
/mob/living/proc/remove_trait_datum(trait)
|
||||
var/datum/trait/T = roundstart_traits[trait]
|
||||
if(T)
|
||||
qdel(T)
|
||||
return TRUE
|
||||
|
||||
/mob/living/proc/has_trait(trait, list/sources)
|
||||
if(!status_traits[trait])
|
||||
return FALSE
|
||||
@@ -181,6 +200,9 @@
|
||||
if(LAZYLEN(status_traits[trait]))
|
||||
return TRUE
|
||||
|
||||
/mob/living/proc/has_trait_datum(trait)
|
||||
return roundstart_traits[trait]
|
||||
|
||||
/mob/living/proc/remove_all_traits()
|
||||
status_traits = list()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user