From 6891dc68a6f90edd4662ec3d623ca1e98557aa53 Mon Sep 17 00:00:00 2001 From: SteelSlayer Date: Mon, 20 Jul 2020 11:36:18 -0500 Subject: [PATCH] farie changes --- code/game/gamemodes/malfunction/Malf_Modules.dm | 3 +-- code/game/machinery/transformer.dm | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 1a344a7e7be..16342c294ca 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -592,8 +592,7 @@ active = FALSE return var/turf/T = get_turf(owner_AI.eyeobj) - var/obj/machinery/transformer/TR = new(T) - TR.masterAI = owner_AI + new /obj/machinery/transformer(T, owner_AI) playsound(T, 'sound/effects/phasein.ogg', 100, 1) owner_AI.can_shunt = FALSE to_chat(owner, "You are no longer able to shunt your core to APCs.") diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index 0d2d571c2a5..b7defa3d55b 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -11,7 +11,7 @@ /// TRUE if the mob can be standing and still be transformed. var/transform_standing = TRUE /// Cooldown between each transformation, in deciseconds. - var/cooldown_duration = 600 + var/cooldown_duration = 600 // 1 MINUTE. /// If the factory is currently on cooldown from its last transformation. var/is_on_cooldown = FALSE /// The type of cell that newly created borgs get. @@ -21,8 +21,10 @@ /// The AI who placed this factory. var/mob/living/silicon/ai/masterAI -/obj/machinery/transformer/New() +/obj/machinery/transformer/Initialize(mapload, mob/living/silicon/ai/_ai = null) . = ..() + if(_ai) + masterAI = _ai initialize_belts() /// Used to create all of the belts the transformer will be using. All belts should be pushing `WEST`. @@ -105,7 +107,7 @@ if(R.mind && !R.client && !R.grab_ghost()) // Make sure this is an actual player first and not just a humanized monkey or something. message_admins("[key_name_admin(R)] was just transformed by a borg factory, but they were SSD. Polling ghosts for a replacement.") var/list/candidates = pollCandidates("Do you want to play as a malfunctioning cyborg?", ROLE_TRAITOR, poll_time = 15 SECONDS) - if(!LAZYLEN(candidates)) + if(!length(candidates)) return var/mob/dead/observer/O = pick(candidates) R.key= O.key