diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index bb3d2609010..67dd9b55312 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -84,6 +84,7 @@ var/single_gib_type = /obj/effect/decal/cleanable/blood/gibs var/remains_type = /obj/effect/decal/remains/human //What sort of remains is left behind when the species dusts var/base_color //Used when setting species. + var/list/inherent_factions //Used in icon caching. var/race_key = 0 @@ -285,11 +286,19 @@ H.hud_used.update_locked_slots() H.ventcrawler = ventcrawler + if(inherent_factions) + for(var/i in inherent_factions) + H.faction += i //Using +=/-= for this in case you also gain the faction from a different source. + /datum/species/proc/on_species_loss(mob/living/carbon/human/H) if(H.butcher_results) //clear it out so we don't butcher a actual human. H.butcher_results = null H.ventcrawler = initial(H.ventcrawler) + if(inherent_factions) + for(var/i in inherent_factions) + H.faction -= i + /datum/species/proc/updatespeciescolor(mob/living/carbon/human/H) //Handles changing icobase for species that have multiple skin colors. return diff --git a/code/modules/mob/living/carbon/human/species/diona.dm b/code/modules/mob/living/carbon/human/species/diona.dm index 22edf961270..a8639a1a948 100644 --- a/code/modules/mob/living/carbon/human/species/diona.dm +++ b/code/modules/mob/living/carbon/human/species/diona.dm @@ -108,13 +108,4 @@ /datum/species/diona/pod //Same name and everything; we want the same limitations on them; we just want their regeneration to kick in at all times and them to have special factions pod = TRUE - -/datum/species/diona/pod/on_species_gain(mob/living/carbon/C, datum/species/old_species) - . = ..() - C.faction |= "plants" - C.faction |= "vines" - -/datum/species/diona/pod/on_species_loss(mob/living/carbon/C) - . = ..() - C.faction -= "plants" - C.faction -= "vines" + inherent_factions = list("plants", "vines") diff --git a/code/modules/mob/living/carbon/human/species/shadow.dm b/code/modules/mob/living/carbon/human/species/shadow.dm index 7d1d4c26a61..63f062b8bc8 100644 --- a/code/modules/mob/living/carbon/human/species/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/shadow.dm @@ -5,6 +5,7 @@ icobase = 'icons/mob/human_races/r_shadow.dmi' deform = 'icons/mob/human_races/r_shadow.dmi' dangerous_existence = TRUE + inherent_factions = list("faithless") unarmed_type = /datum/unarmed_attack/claws @@ -49,14 +50,12 @@ if(grant_vision_toggle) vision_toggle = new vision_toggle.Grant(H) - H.faction |= "faithless" /datum/species/shadow/on_species_loss(mob/living/carbon/human/H) ..() if(grant_vision_toggle && vision_toggle) H.vision_type = null vision_toggle.Remove(H) - H.faction -= "faithless" /datum/species/shadow/handle_life(mob/living/carbon/human/H) var/light_amount = 0 diff --git a/code/modules/mob/living/carbon/human/species/slime.dm b/code/modules/mob/living/carbon/human/species/slime.dm index 3a3f4c3d3ac..0a708db223f 100644 --- a/code/modules/mob/living/carbon/human/species/slime.dm +++ b/code/modules/mob/living/carbon/human/species/slime.dm @@ -13,6 +13,7 @@ icobase = 'icons/mob/human_races/r_slime.dmi' deform = 'icons/mob/human_races/r_slime.dmi' remains_type = /obj/effect/decal/remains/slime + inherent_factions = list("slime") // More sensitive to the cold cold_level_1 = 280 diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm index d03e7ada419..4e1aee2c822 100644 --- a/code/modules/mob/living/simple_animal/slime/life.dm +++ b/code/modules/mob/living/simple_animal/slime/life.dm @@ -314,7 +314,7 @@ for(var/mob/living/L in view(7,src)) - if(isslime(L) || L.stat == DEAD) // Ignore other slimes and dead mobs + if(L.stat == DEAD) // Ignore dead mobs continue if(L in Friends) // No eating friends!