Skip to content

Commit

Permalink
[MIRROR] Constructs now reuse the victim's mind instead of just movin…
Browse files Browse the repository at this point in the history
…g their client (#1157)

* 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 <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Feb 26, 2024
1 parent 747f07b commit 4b8ffc3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
48 changes: 24 additions & 24 deletions code/modules/antagonists/wizard/equipment/soulstone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -456,63 +456,63 @@
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)
playsound(newstruct, 'sound/effects/constructform.ogg', 50)
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, "<b>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.</b>")
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, "<b>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.</b>")
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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/power/singularity/narsie.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 4b8ffc3

Please sign in to comment.