From cdf16a2170c3c5de473ccff589fb539b0f2252bc Mon Sep 17 00:00:00 2001 From: necromanceranne <40847847+necromanceranne@users.noreply.github.com> Date: Wed, 6 Jan 2021 20:43:21 +1100 Subject: [PATCH] Makes the monkey mutation remember your species through transformations (#55844) * Makes the monkey mutation remember your species through transformations * Implements suggestions by ghommie --- code/datums/mutations/body.dm | 6 +++++- code/modules/mob/transform_procs.dm | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index 9281ecc27eb..908dccd5cd6 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -173,18 +173,22 @@ /datum/mutation/human/race name = "Monkified" desc = "A strange genome, believing to be what differentiates monkeys from humans." + text_gain_indication = "You feel unusually monkey-like." + text_lose_indication = "You feel like your old self." quality = NEGATIVE time_coeff = 2 locked = TRUE //Species specific, keep out of actual gene pool + var/datum/species/original_species = /datum/species/human /datum/mutation/human/race/on_acquiring(mob/living/carbon/human/owner) if(..()) return + original_species = owner.dna.species.type . = owner.monkeyize() /datum/mutation/human/race/on_losing(mob/living/carbon/human/owner) if(owner && owner.stat != DEAD && (owner.dna.mutations.Remove(src)) && ismonkey(owner)) - . = owner.humanize() + . = owner.humanize(original_species) /datum/mutation/human/glow name = "Glowy" diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 901651d6980..c16e033fe24 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -30,7 +30,7 @@ ////////////////////////// Humanize ////////////////////////////// //Could probably be merged with monkeyize but other transformations got their own procs, too -/mob/living/carbon/proc/humanize() +/mob/living/carbon/proc/humanize(species = /datum/species/human) if (notransform || transformation_timer) return @@ -45,15 +45,15 @@ invisibility = INVISIBILITY_MAXIMUM new /obj/effect/temp_visual/monkeyify/humanify(loc) - transformation_timer = addtimer(CALLBACK(src, .proc/finish_humanize), TRANSFORMATION_DURATION, TIMER_UNIQUE) + transformation_timer = addtimer(CALLBACK(src, .proc/finish_humanize, species), TRANSFORMATION_DURATION, TIMER_UNIQUE) -/mob/living/carbon/proc/finish_humanize() +/mob/living/carbon/proc/finish_humanize(species = /datum/species/human) transformation_timer = null to_chat(src, "You are now a human.") notransform = FALSE icon = initial(icon) invisibility = 0 - set_species(/datum/species/human) + set_species(species) return src /mob/living/carbon/human/AIize(transfer_after = TRUE, client/preference_source)