From 0638eb2a66259e4691ede5b27bd2b47e77eb3ff8 Mon Sep 17 00:00:00 2001 From: Krausus Date: Fri, 5 Jun 2015 02:41:48 -0400 Subject: [PATCH] Fixes changeling monkey issues Fixes taking DNA from monkeys, not being able to leave lesser form, and being able to use all stings in lesser form. --- code/game/gamemodes/changeling/changeling.dm | 2 +- .../gamemodes/changeling/changeling_power.dm | 2 +- .../gamemodes/changeling/evolution_menu.dm | 2 +- .../gamemodes/changeling/powers/humanform.dm | 53 ++++--------------- .../gamemodes/changeling/powers/lesserform.dm | 2 +- 5 files changed, 14 insertions(+), 47 deletions(-) diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index f9f5f309e03..00c199d7332 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -288,7 +288,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" return var/mob/living/carbon/human/T = target - if(!istype(T)) + if(!istype(T) || issmall(T)) user << "[T] is not compatible with our biology." return diff --git a/code/game/gamemodes/changeling/changeling_power.dm b/code/game/gamemodes/changeling/changeling_power.dm index 27bba094711..496688835bb 100644 --- a/code/game/gamemodes/changeling/changeling_power.dm +++ b/code/game/gamemodes/changeling/changeling_power.dm @@ -49,7 +49,7 @@ /obj/effect/proc_holder/changeling/proc/can_sting(var/mob/user, var/mob/target) if(!ishuman(user)) //typecast everything from mob to carbon from this point onwards return 0 - if(req_human && !ishuman(user)) + if(req_human && (!ishuman(user) || issmall(user))) user << "We cannot do that in this form!" return 0 var/datum/changeling/c = user.mind.changeling diff --git a/code/game/gamemodes/changeling/evolution_menu.dm b/code/game/gamemodes/changeling/evolution_menu.dm index 9077dee6bfb..0ffce0ba172 100644 --- a/code/game/gamemodes/changeling/evolution_menu.dm +++ b/code/game/gamemodes/changeling/evolution_menu.dm @@ -336,7 +336,7 @@ var/list/sting_paths //Reselect powers /datum/changeling/proc/lingRespec(var/mob/user) - if(!ishuman(user)) + if(!ishuman(user) || issmall(user)) user << "We can't remove our evolutions in this form!" return if(canrespec) diff --git a/code/game/gamemodes/changeling/powers/humanform.dm b/code/game/gamemodes/changeling/powers/humanform.dm index 42e0bb3dad1..77a200c907d 100644 --- a/code/game/gamemodes/changeling/powers/humanform.dm +++ b/code/game/gamemodes/changeling/powers/humanform.dm @@ -8,7 +8,7 @@ //Transform into a human. -/obj/effect/proc_holder/changeling/humanform/sting_action(var/mob/living/carbon/user) +/obj/effect/proc_holder/changeling/humanform/sting_action(var/mob/living/carbon/human/user) var/datum/changeling/changeling = user.mind.changeling var/list/names = list() for(var/datum/dna/DNA in (changeling.absorbed_dna+changeling.protected_dna)) @@ -24,51 +24,18 @@ if(!user) return 0 user << "We transform our appearance." + user.dna.SetSEState(MONKEYBLOCK,0) + domutcheck(user, null) // Do a pre-mutcheck to cleanly switch from monkey form. user.dna = chosen_dna + user.real_name = chosen_dna.real_name + user.flavor_text = "" + if(ishuman(user)) + user.set_species() + user.UpdateAppearance() + domutcheck(user, null) - var/list/implants = list() - for (var/obj/item/weapon/implant/I in user) //Still preserving implants - implants += I - - for(var/obj/item/W in src) - user.unEquip(W) - if (user.client) - user.client.screen -= W - if (W) - W.loc = user.loc - W.dropped(user) - W.layer = initial(W.layer) - - var/mob/living/carbon/human/O = new /mob/living/carbon/human( user, delay_ready_dna=1 ) - if (user.dna.GetUIState(DNA_UI_GENDER)) - O.gender = FEMALE - else - O.gender = MALE - O.dna = user.dna.Clone() - user.dna = null - O.real_name = chosen_dna.real_name - O.set_species() - for(var/obj/T in user) - del(T) - - O.loc = user.loc - - O.UpdateAppearance() - domutcheck(O, null) - O.setToxLoss(user.getToxLoss()) - O.adjustBruteLoss(user.getBruteLoss()) - O.setOxyLoss(user.getOxyLoss()) - O.adjustFireLoss(user.getFireLoss()) - O.stat = user.stat - for (var/obj/item/weapon/implant/I in implants) - I.loc = O - I.implanted = O - - user.mind.transfer_to(O) - O.changeling_update_languages(changeling.absorbed_languages) - O.mind.changeling.purchasedpowers -= src + changeling.purchasedpowers -= src //O.mind.changeling.purchasedpowers += new /obj/effect/proc_holder/changeling/lesserform(null) feedback_add_details("changeling_powers","LFT") - qdel(user) return 1 diff --git a/code/game/gamemodes/changeling/powers/lesserform.dm b/code/game/gamemodes/changeling/powers/lesserform.dm index 44aae09ae9f..8a80af6707e 100644 --- a/code/game/gamemodes/changeling/powers/lesserform.dm +++ b/code/game/gamemodes/changeling/powers/lesserform.dm @@ -14,7 +14,6 @@ if(user.has_brain_worms()) user << "We cannot perform this ability at the present time!" return - user << "Our genes cry out!" var/mob/living/carbon/human/H = user @@ -29,5 +28,6 @@ for(var/obj/item/weapon/implant/W in H) implants += W H.monkeyize() + changeling.purchasedpowers += new /obj/effect/proc_holder/changeling/humanform(null) feedback_add_details("changeling_powers","LF") return 1 \ No newline at end of file