Fixes Adminorazine killing ash lizards (#37872)

* Fixes Adminorazine killing ash lizards

* this should do it...
This commit is contained in:
ShizCalev
2018-05-17 11:24:48 -04:00
committed by yogstation13-bot
parent 9b59c55bb4
commit fc6c1b882e
3 changed files with 22 additions and 4 deletions

View File

@@ -68,6 +68,7 @@
#define MAGIC_TRAIT "magic"
#define TRAUMA_TRAIT "trauma"
#define SPECIES_TRAIT "species"
#define ORGAN_TRAIT "organ"
#define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention
// unique trait sources, still defines

View File

@@ -272,10 +272,10 @@
/obj/item/organ/heart/gland/electric/Insert(mob/living/carbon/M, special = 0)
..()
owner.add_trait(TRAIT_SHOCKIMMUNE, "abductor_gland")
owner.add_trait(TRAIT_SHOCKIMMUNE, ORGAN_TRAIT)
/obj/item/organ/heart/gland/electric/Remove(mob/living/carbon/M, special = 0)
owner.remove_trait(TRAIT_SHOCKIMMUNE, "abductor_gland")
owner.remove_trait(TRAIT_SHOCKIMMUNE, ORGAN_TRAIT)
..()
/obj/item/organ/heart/gland/electric/activate()

View File

@@ -204,8 +204,25 @@
/mob/living/proc/has_quirk(quirk)
return roundstart_quirks[quirk]
/mob/living/proc/remove_all_traits()
status_traits = list()
/mob/living/proc/remove_all_traits(remove_species_traits = FALSE, remove_organ_traits = FALSE, remove_quirks = FALSE)
var/list/blacklisted_sources = list()
if(!remove_species_traits)
blacklisted_sources += SPECIES_TRAIT
if(!remove_organ_traits)
blacklisted_sources += ORGAN_TRAIT
if(!remove_quirks)
blacklisted_sources += ROUNDSTART_TRAIT
for(var/kebab in status_traits)
var/skip
for(var/S in blacklisted_sources)
if(S in status_traits[kebab])
skip = TRUE
break
if(!skip)
remove_trait(kebab, null, TRUE)
CHECK_TICK
/////////////////////////////////// TRAIT PROCS ////////////////////////////////////