From 63a2ba006a2226521fbe54912ae4a9963d833b82 Mon Sep 17 00:00:00 2001 From: 1080pCat <96908085+1080pCat@users.noreply.github.com> Date: Wed, 30 Oct 2024 03:25:57 +1000 Subject: [PATCH] Morphs that have a perfected form can no longer be seen via health huds. And if a morph mimics a non dense object(like a cigarette) the morph will become non dense (#27018) * Two morph buffs, and a fix. * bah woops * Update code/datums/spells/mimic.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> --------- Signed-off-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --- code/datums/spells/mimic.dm | 5 +++++ code/game/gamemodes/miniantags/morph/morph.dm | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/code/datums/spells/mimic.dm b/code/datums/spells/mimic.dm index 10795b832f7..6bad1845fc9 100644 --- a/code/datums/spells/mimic.dm +++ b/code/datums/spells/mimic.dm @@ -120,6 +120,7 @@ user.pixel_y = initial(user.pixel_y) user.pixel_x = initial(user.pixel_x) user.layer = MOB_LAYER // Avoids weirdness when mimicing something below the vent layer + user.density = form.density playsound(user, "bonebreak", 75, TRUE) show_change_form_message(user, old_name, "[user]") @@ -145,6 +146,7 @@ user.cut_overlays() user.icon = initial(user.icon) user.icon_state = initial(user.icon_state) + user.density = initial(user.density) if(ishuman(user)) var/mob/living/carbon/human/H = user H.name_override = null @@ -193,11 +195,14 @@ var/examine_text /// What the name of the form is var/name + /// If the form has density + var/density /datum/mimic_form/New(atom/movable/form, mob/user) appearance = form.appearance examine_text = form.examine(user) name = form.name + density = form.density /datum/spell/mimic/morph action_background_icon_state = "bg_morph" diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm index 4a7f8b1ac5b..1379ec4abfe 100644 --- a/code/game/gamemodes/miniantags/morph/morph.dm +++ b/code/game/gamemodes/miniantags/morph/morph.dm @@ -188,19 +188,20 @@ mimic_spell.perfect_disguise = FALSE // Reset the perfect disguise remove_status_effect(/datum/status_effect/morph_ambush) UnregisterSignal(src, COMSIG_MOVABLE_MOVED) + add_to_all_human_data_huds() /mob/living/simple_animal/hostile/morph/proc/perfect_ambush() mimic_spell.perfect_disguise = TRUE // Reset the perfect disguise to_chat(src, "You've perfected your disguise. Making you indistinguishable from the real form!") - + remove_from_all_data_huds() /mob/living/simple_animal/hostile/morph/proc/on_move() failed_ambush() to_chat(src, "You moved out of your ambush spot!") - /mob/living/simple_animal/hostile/morph/death(gibbed) . = ..() + add_to_all_human_data_huds() if(stat == DEAD && gibbed) for(var/atom/movable/AM in src) AM.forceMove(loc) @@ -273,9 +274,11 @@ . = ..() if(. && !morphed) var/list/things = list() - for(var/atom/movable/A in view(src)) + for(var/atom/movable/A in oview(src)) if(mimic_spell.valid_target(A, src)) things += A + if(!length(things)) + return var/atom/movable/T = pick(things) mimic_spell.take_form(new /datum/mimic_form(T, src), src) prepare_ambush() // They cheat okay