From b89fea4d5e31f736152d8f31b077571adbfce2e4 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 26 Feb 2024 21:31:04 +0100 Subject: [PATCH] [MIRROR] Constructs now reuse the victim's mind instead of just moving their client (#26652) * Constructs now reuse the victim's mind instead of just moving their client (#81665) ## About The Pull Request This makes it so when someone becomes a construct, their _mind_ is transferred, rather than just their ckey. ## Why It's Good For The Game It's the same soul after all. Plus, this prevents clogging up the roundend report. ## Testing Evidence ![2024-02-24 (1708802154) ~ dreamseeker](https://github.com/tgstation/tgstation/assets/65794972/5a33c1eb-55d4-4386-99ea-0c16f5efec3c) ![2024-02-24 (1708802162) ~ dreamseeker](https://github.com/tgstation/tgstation/assets/65794972/10429beb-4d54-4fb2-884b-42569802e0ee) ![2024-02-24 (1708802171) ~ dreamseeker](https://github.com/tgstation/tgstation/assets/65794972/967d99ac-d460-46a9-b7c9-f0c7c6c187d3) ## Changelog :cl: qol: Constructs now reuse the victim's mind instead of just moving their client /:cl: * Constructs now reuse the victim's mind instead of just moving their client --------- Co-authored-by: Lucy --- .../antagonists/wizard/equipment/soulstone.dm | 48 +++++++++---------- code/modules/mob/living/living_defense.dm | 2 +- code/modules/power/singularity/narsie.dm | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm index 9ced62cb4f6..5f3cdae2026 100644 --- a/code/modules/antagonists/wizard/equipment/soulstone.dm +++ b/code/modules/antagonists/wizard/equipment/soulstone.dm @@ -456,42 +456,42 @@ switch(construct_class) if(CONSTRUCT_JUGGERNAUT) if(IS_CULTIST(creator)) - makeNewConstruct(/mob/living/basic/construct/juggernaut, target, creator, cultoverride, loc_override) // ignore themes, the actual giving of cult info is in the makeNewConstruct proc + make_new_construct(/mob/living/basic/construct/juggernaut, target, creator, cultoverride, loc_override) // ignore themes, the actual giving of cult info is in the make_new_construct proc return switch(theme) if(THEME_WIZARD) - makeNewConstruct(/mob/living/basic/construct/juggernaut/mystic, target, creator, cultoverride, loc_override) + make_new_construct(/mob/living/basic/construct/juggernaut/mystic, target, creator, cultoverride, loc_override) if(THEME_HOLY) - makeNewConstruct(/mob/living/basic/construct/juggernaut/angelic, target, creator, cultoverride, loc_override) + make_new_construct(/mob/living/basic/construct/juggernaut/angelic, target, creator, cultoverride, loc_override) if(THEME_CULT) - makeNewConstruct(/mob/living/basic/construct/juggernaut, target, creator, cultoverride, loc_override) + make_new_construct(/mob/living/basic/construct/juggernaut, target, creator, cultoverride, loc_override) if(CONSTRUCT_WRAITH) if(IS_CULTIST(creator)) - makeNewConstruct(/mob/living/basic/construct/wraith, target, creator, cultoverride, loc_override) // ignore themes, the actual giving of cult info is in the makeNewConstruct proc + make_new_construct(/mob/living/basic/construct/wraith, target, creator, cultoverride, loc_override) // ignore themes, the actual giving of cult info is in the make_new_construct proc return switch(theme) if(THEME_WIZARD) - makeNewConstruct(/mob/living/basic/construct/wraith/mystic, target, creator, cultoverride, loc_override) + make_new_construct(/mob/living/basic/construct/wraith/mystic, target, creator, cultoverride, loc_override) if(THEME_HOLY) - makeNewConstruct(/mob/living/basic/construct/wraith/angelic, target, creator, cultoverride, loc_override) + make_new_construct(/mob/living/basic/construct/wraith/angelic, target, creator, cultoverride, loc_override) if(THEME_CULT) - makeNewConstruct(/mob/living/basic/construct/wraith, target, creator, cultoverride, loc_override) + make_new_construct(/mob/living/basic/construct/wraith, target, creator, cultoverride, loc_override) if(CONSTRUCT_ARTIFICER) if(IS_CULTIST(creator)) - makeNewConstruct(/mob/living/basic/construct/artificer, target, creator, cultoverride, loc_override) // ignore themes, the actual giving of cult info is in the makeNewConstruct proc + make_new_construct(/mob/living/basic/construct/artificer, target, creator, cultoverride, loc_override) // ignore themes, the actual giving of cult info is in the make_new_construct proc return switch(theme) if(THEME_WIZARD) - makeNewConstruct(/mob/living/basic/construct/artificer/mystic, target, creator, cultoverride, loc_override) + make_new_construct(/mob/living/basic/construct/artificer/mystic, target, creator, cultoverride, loc_override) if(THEME_HOLY) - makeNewConstruct(/mob/living/basic/construct/artificer/angelic, target, creator, cultoverride, loc_override) + make_new_construct(/mob/living/basic/construct/artificer/angelic, target, creator, cultoverride, loc_override) if(THEME_CULT) - makeNewConstruct(/mob/living/basic/construct/artificer/noncult, target, creator, cultoverride, loc_override) + make_new_construct(/mob/living/basic/construct/artificer/noncult, target, creator, cultoverride, loc_override) -/proc/makeNewConstruct(mob/living/basic/construct/ctype, mob/target, mob/stoner = null, cultoverride = FALSE, loc_override = null) +/proc/make_new_construct(mob/living/basic/construct/ctype, mob/target, mob/stoner = null, cultoverride = FALSE, loc_override = null) if(QDELETED(target)) return - var/mob/living/basic/construct/newstruct = new ctype((loc_override) ? (loc_override) : (get_turf(target))) + var/mob/living/basic/construct/newstruct = new ctype(loc_override || get_turf(target)) var/makeicon = newstruct.icon_state var/theme = newstruct.theme flick("make_[makeicon][theme]", newstruct) @@ -499,20 +499,20 @@ if(stoner) newstruct.faction |= "[REF(stoner)]" newstruct.master = stoner - var/datum/action/innate/seek_master/SM = new() - SM.Grant(newstruct) - newstruct.key = target.key - var/atom/movable/screen/alert/bloodsense/BS - if(newstruct.mind && ((stoner && IS_CULTIST(stoner)) || cultoverride) && SSticker.HasRoundStarted()) + var/datum/action/innate/seek_master/seek_master = new + seek_master.Grant(newstruct) + target.mind?.transfer_to(newstruct, force_key_move = TRUE) + var/atom/movable/screen/alert/bloodsense/sense_alert + if(newstruct.mind && !IS_CULTIST(newstruct) && ((stoner && IS_CULTIST(stoner)) || cultoverride) && SSticker.HasRoundStarted()) newstruct.mind.add_antag_datum(/datum/antagonist/cult/construct) if(IS_CULTIST(stoner) || cultoverride) - to_chat(newstruct, "You are still bound to serve the cult[stoner ? " and [stoner]":""], follow [stoner ? stoner.p_their() : "their"] orders and help [stoner ? stoner.p_them() : "them"] complete [stoner ? stoner.p_their() : "their"] goals at all costs.") + to_chat(newstruct, span_cultbold("You are still bound to serve the cult[stoner ? " and [stoner]" : ""], follow [stoner?.p_their() || "their"] orders and help [stoner?.p_them() || "them"] complete [stoner?.p_their() || "their"] goals at all costs.")) else if(stoner) - to_chat(newstruct, "You are still bound to serve your creator, [stoner], follow [stoner.p_their()] orders and help [stoner.p_them()] complete [stoner.p_their()] goals at all costs.") + to_chat(newstruct, span_boldwarning("You are still bound to serve your creator, [stoner], follow [stoner.p_their()] orders and help [stoner.p_them()] complete [stoner.p_their()] goals at all costs.")) newstruct.clear_alert("bloodsense") - BS = newstruct.throw_alert("bloodsense", /atom/movable/screen/alert/bloodsense) - if(BS) - BS.Cviewer = newstruct + sense_alert = newstruct.throw_alert("bloodsense", /atom/movable/screen/alert/bloodsense) + if(sense_alert) + sense_alert.Cviewer = newstruct newstruct.cancel_camera() /obj/item/soulstone/anybody diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index fd40e0d8aa5..bb39ab60663 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -559,7 +559,7 @@ addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(cult_ending_helper), CULT_VICTORY_MASS_CONVERSION), 120) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(ending_helper)), 270) if(client) - makeNewConstruct(/mob/living/basic/construct/harvester, src, cultoverride = TRUE) + make_new_construct(/mob/living/basic/construct/harvester, src, cultoverride = TRUE) else switch(rand(1, 4)) if(1) diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index 89833bee343..b719b93d98c 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -147,7 +147,7 @@ start_ending_the_round() /obj/narsie/attack_ghost(mob/user) - makeNewConstruct(/mob/living/basic/construct/harvester, user, cultoverride = TRUE, loc_override = loc) + make_new_construct(/mob/living/basic/construct/harvester, user, cultoverride = TRUE, loc_override = loc) /obj/narsie/process() var/datum/component/singularity/singularity_component = singularity.resolve()