Adds minor roundstart traits! (ala CDDA, etc.)

This commit is contained in:
Ashe Higgs
2018-03-01 19:39:44 -05:00
committed by CitadelStationBot
parent 3690cf3309
commit 0a449af83e
36 changed files with 825 additions and 52 deletions
+23 -1
View File
@@ -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()