From 6db6e99830bfd0e905420a651abb9859d211837d Mon Sep 17 00:00:00 2001 From: ktccd Date: Sun, 26 Mar 2017 12:32:51 +0200 Subject: [PATCH] Ghost-role arousal fix (#283) * Ghost-role arousal fix Fixes it so ghost role spawners respect arousal preferences of the ghost. * Arousal should respect species traits This is *currently* having no effect, as no species at the time of writing uses NOGENITALS species trait. But good for future species I think. * Arousal-fix-fixed Made on_species_gain do the arousal check and apply it properly. Moved equip to happen AFTER the ckey is assigned, as I couldn't check the clients prefs before that and it just defaulted to TRUE. Problem: Human ghost-roles are already human and would not use on_species_gain. I had 2 fixes for this: Either I made them do so anyway, doing set_species with human. This is probably redundant and might break things in some unexpected way.... 2nd possible fix is what I am pushing now, just making an else statement for that situation. --- code/modules/awaymissions/corpse.dm | 8 +++++++- code/modules/mob/living/carbon/human/species.dm | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 620633d6dc..9679631169 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -67,7 +67,6 @@ M.adjustOxyLoss(oxy_damage) M.adjustBruteLoss(brute_damage) - equip(M) if(ckey) M.ckey = ckey @@ -78,6 +77,7 @@ MM.objectives += new/datum/objective(objective) special(M) MM.name = M.real_name + equip(M) if(uses > 0) uses-- if(!permanent && !uses) @@ -115,6 +115,12 @@ /obj/effect/mob_spawn/human/equip(mob/living/carbon/human/H) if(mob_species) H.set_species(mob_species) + else + //If we're a human, we still need to handle our snowflake code anyway I guess. + if (NOAROUSAL in H.dna.species.species_traits) + H.canbearoused = FALSE + else + H.canbearoused = H.client.prefs.arousable if(husk) H.Drain() diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 0127debeeb..f46364ae46 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -159,6 +159,10 @@ species_traits += DIGITIGRADE if(DIGITIGRADE in species_traits) C.Digitigrade_Leg_Swap(FALSE) + if(NOAROUSAL in species_traits) + C.canbearoused = FALSE + else + C.canbearoused = C.client.prefs.arousable /datum/species/proc/on_species_loss(mob/living/carbon/C) if(C.dna.species.exotic_bloodtype)