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.
This commit is contained in:
ktccd
2017-03-26 12:32:51 +02:00
committed by TalkingCactus
parent a8d181c00c
commit 6db6e99830
2 changed files with 11 additions and 1 deletions
+7 -1
View File
@@ -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()
@@ -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)