From 9b1f99abb9e06c270389d2bd74cd8d5f698a45df Mon Sep 17 00:00:00 2001 From: Coxswain Date: Mon, 3 Mar 2025 09:52:03 -0600 Subject: [PATCH 1/2] Nobody Is Improvements --- code/__HELPERS/icons.dm | 51 +++++++++++++++++++ .../abnormality/aleph/nobody_is.dm | 19 +++---- lobotomy-corp13.dme | 2 +- 3 files changed, 62 insertions(+), 10 deletions(-) diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index 5fe7391be3cc..c840edaa3ac7 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -1328,3 +1328,54 @@ GLOBAL_LIST_EMPTY(transformation_animation_objects) final_color_code[2] = FLOOR(final_color_code[2]/total, 1) final_color_code[3] = FLOOR(final_color_code[3]/total, 1) return "#[num2hex(final_color_code[1], 2)][num2hex(final_color_code[2], 2)][num2hex(final_color_code[3], 2)]" + +/* + * Make a copy of a human and copy their appearance without copying any special overlays. Notice that this currently doesn't include held items! + */ +/mob/proc/CopyHumanAppearance(mob/target) + if(!istype(target)) + return + + var/mob/living/carbon/human/copycat = new(get_turf(src)) + copycat.status_flags = GODMODE + copycat.stat = DEAD // prevents the copycat from getting fear effects, attacks, etc that could add overlays. + + if(iscarbon(target)) + var/mob/living/carbon/carbon_target = target + carbon_target.dna.transfer_identity(copycat, transfer_SE = TRUE) + + if(ishuman(target)) + var/mob/living/carbon/human/human_target = target + human_target.copy_clothing_prefs(copycat) + copycat.gender = human_target.gender + copycat.body_type = human_target.body_type + copycat.real_name = human_target.real_name + copycat.name = human_target.name + copycat.skin_tone = human_target.skin_tone + copycat.hairstyle = human_target.hairstyle + copycat.facial_hairstyle = human_target.facial_hairstyle + copycat.hair_color = human_target.hair_color + copycat.facial_hair_color = human_target.facial_hair_color + copycat.eye_color = human_target.eye_color + copycat.regenerate_icons() + + //We're just stealing their clothes + for(var/obj/item/slotitem in human_target.get_all_slots()) + if(istype(slotitem, /obj/item/clothing/suit/armor/ego_gear)) + var/obj/item/clothing/suit/armor/ego_gear/equippable_gear = new slotitem.type(get_turf(copycat)) + equippable_gear.equip_slowdown = 0 + equippable_gear.attribute_requirements = list() + copycat.equip_to_appropriate_slot(equippable_gear, TRUE) + else + var/obj/item/itemcopy = new slotitem.type(get_turf(copycat)) + copycat.equip_to_appropriate_slot(itemcopy, TRUE) + + else + //even if target isn't a carbon, if they have a client we can make the + //dummy look like what their human would look like based on their prefs + + target?.client?.prefs?.copy_to(copycat, icon_updates=TRUE, roundstart_checks=FALSE, character_setup=TRUE) + SLEEP_CHECK_DEATH(1) + appearance = copycat.appearance + qdel(copycat) + return diff --git a/code/modules/mob/living/simple_animal/abnormality/aleph/nobody_is.dm b/code/modules/mob/living/simple_animal/abnormality/aleph/nobody_is.dm index c3eaa4b13ad3..008ac22d3037 100644 --- a/code/modules/mob/living/simple_animal/abnormality/aleph/nobody_is.dm +++ b/code/modules/mob/living/simple_animal/abnormality/aleph/nobody_is.dm @@ -436,6 +436,8 @@ //Attacks /mob/living/simple_animal/hostile/abnormality/nobody_is/proc/WhipAttack(target) + if(!target) //target deleted or something + return if(whip_attack_cooldown > world.time) return whip_attack_cooldown = world.time + whip_attack_cooldown_time @@ -576,7 +578,7 @@ grab_victim.deal_damage(strangle_damage, BLACK_DAMAGE) else //Apply ramping damage playsound(get_turf(src), 'sound/effects/wounds/crackandbleed.ogg', 200, 0, 7) - grab_victim.deal_damage((strangle_damage * (3 - count)), BLACK_DAMAGE) + grab_victim.deal_damage((strangle_damage * (count - 3)), BLACK_DAMAGE) count += 1 if(grab_victim.sanity_lost) //This should prevent weird things like panics running away halfway through grab_victim.Stun(10) //Immobilize does not stop AI controllers from moving, for some reason. @@ -675,7 +677,6 @@ return //We screwed up or the player successfully committed self-delete. Try again next time! SetOccupiedTiles() offsets_pixel_x = list("south" = 0, "north" = 0, "west" = 0, "east" = 0) - //UnregisterSignal(src, COMSIG_ATOM_DIR_CHANGE) for(var/turf/open/T in view(2, src)) var/obj/effect/temp_visual/flesh/pinkflesh = new(T) pinkflesh.color = COLOR_PINK @@ -698,8 +699,6 @@ if(M.back) M.dropItemToGround(M.back) M.update_inv_back() - M.set_lying_angle(0) - M.set_body_position(STANDING_UP) M.forceMove(src) // Hide them for examine message to work adjustBruteLoss(-maxHealth, forced = TRUE) Transform(M) @@ -711,9 +710,10 @@ return //We screwed up or the player successfully committed self-delete. Try again next time! disguise = M shelled = TRUE + CopyHumanAppearance(M) add_overlay(mutable_appearance('icons/effects/effects.dmi', "nobody_overlay", SUIT_LAYER)) add_overlay(mutable_appearance('icons/effects/effects.dmi', "nobody_overlay_face", GLASSES_LAYER)) - appearance = M.appearance + SLEEP_CHECK_DEATH(2) if(target) LoseTarget(target) M.gib() @@ -779,16 +779,17 @@ //A simple test function to force oberon to happen without killing the reflected -/mob/living/simple_animal/hostile/abnormality/nobody_is/proc/Transform_No_Kill(mob/living/carbon/human/M) +/mob/living/simple_animal/hostile/abnormality/nobody_is/proc/TransformNoKill(mob/living/carbon/human/M) set waitfor = FALSE SLEEP_CHECK_DEATH(5) if(!M || QDELETED(M)) return //We screwed up or the player successfully committed self-delete. Try again next time! disguise = M shelled = TRUE + CopyHumanAppearance(M) add_overlay(mutable_appearance('icons/effects/effects.dmi', "nobody_overlay", SUIT_LAYER)) add_overlay(mutable_appearance('icons/effects/effects.dmi', "nobody_overlay_face", GLASSES_LAYER)) - appearance = M.appearance + SLEEP_CHECK_DEATH(2) if(target) LoseTarget(target) attack_verb_continuous = "strikes" @@ -810,10 +811,10 @@ if(status_flags & GODMODE) // Still contained ZeroQliphoth() -/mob/living/simple_animal/hostile/abnormality/nobody_is/proc/Quick_Oberon_Spawn() +/mob/living/simple_animal/hostile/abnormality/nobody_is/proc/QuickOberonSpawn() if(!chosen || oberon_mode)//makes sure it doesn't continue if its already oberon or if there's no chosen.) return - Transform_No_Kill(chosen) + TransformNoKill(chosen) oberon_mode = TRUE name = "Oberon" var/mob/living/simple_animal/hostile/abnormality/titania/T = new(get_turf(src)) diff --git a/lobotomy-corp13.dme b/lobotomy-corp13.dme index 379f82cd21cb..f3d35e1353ee 100644 --- a/lobotomy-corp13.dme +++ b/lobotomy-corp13.dme @@ -3923,8 +3923,8 @@ #include "interface\stylesheet.dm" #include "interface\skin.dmf" #include "ModularTegustation\chair_override.dm" -#include "ModularTegustation\delivery_doors.dm" #include "ModularTegustation\danteh_head.dm" +#include "ModularTegustation\delivery_doors.dm" #include "ModularTegustation\engineering_bounties.dm" #include "ModularTegustation\harvestable_gardens.dm" #include "ModularTegustation\languagebooks.dm" From efc2368a01ecda3ec48bc14149d9ab58e79039d8 Mon Sep 17 00:00:00 2001 From: Coxswain <35991533+Coxswain-Navigator@users.noreply.github.com> Date: Sat, 8 Mar 2025 10:15:10 -0600 Subject: [PATCH 2/2] Update code/__HELPERS/icons.dm Co-authored-by: Gboster-0 <82319946+Gboster-0@users.noreply.github.com> --- code/__HELPERS/icons.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index c840edaa3ac7..e6770c0e1bc0 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -1378,4 +1378,3 @@ GLOBAL_LIST_EMPTY(transformation_animation_objects) SLEEP_CHECK_DEATH(1) appearance = copycat.appearance qdel(copycat) - return