From c4d59070f6907d163c2ed5ddf80c11a7bfab458a Mon Sep 17 00:00:00 2001 From: Krausus Date: Mon, 11 May 2015 08:17:08 -0400 Subject: [PATCH] Fixes camera upgrades not working properly Important updates were being done in the malf AI's Upgrade Camera proc, instead of in the actual upgrade procs --- code/game/gamemodes/malfunction/Malf_Modules.dm | 4 ---- code/game/machinery/camera/presets.dm | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index cf9d5a04eab..d27cb3d4162 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -359,8 +359,6 @@ rcd light flash thingy on matter drain if(!C.isXRay()) C.upgradeXRay() - //Update what it can see. - cameranet.updateVisibility(C, 0) upgraded = 1 if(!C.isEmpProof()) @@ -370,8 +368,6 @@ rcd light flash thingy on matter drain if(!C.isMotion()) C.upgradeMotion() upgraded = 1 - // Add it to machines that process - machines |= C if(upgraded) UC.uses -- diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index 84ec6734e1b..4f5565fdf77 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -73,11 +73,15 @@ /obj/machinery/camera/proc/upgradeXRay() assembly.upgrades.Add(new /obj/item/device/analyzer(assembly)) setPowerUsage() + //Update what it can see. + cameranet.updateVisibility(src, 0) // If you are upgrading Motion, and it isn't in the camera's New(), add it to the machines list. /obj/machinery/camera/proc/upgradeMotion() assembly.upgrades.Add(new /obj/item/device/assembly/prox_sensor(assembly)) setPowerUsage() + // Add it to machines that process + machines |= src /obj/machinery/camera/proc/setPowerUsage() var/mult = 1