From c343693b587b25fd203d4de59f5d35ff22bf40c2 Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Mon, 28 Oct 2024 07:52:08 -0400 Subject: [PATCH] holy fucking shit this sucks rocks (#27139) --- code/datums/wires/robot_wires.dm | 2 +- code/modules/mob/living/silicon/robot/robot_death.dm | 2 +- code/modules/mob/living/silicon/robot/robot_life.dm | 6 ++---- code/modules/mob/living/silicon/robot/robot_mob.dm | 2 +- .../modules/mob/living/silicon/robot/robot_update_status.dm | 3 +++ 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/code/datums/wires/robot_wires.dm b/code/datums/wires/robot_wires.dm index cde2d653a7c..85242dff520 100644 --- a/code/datums/wires/robot_wires.dm +++ b/code/datums/wires/robot_wires.dm @@ -36,7 +36,7 @@ if(WIRE_BORG_CAMERA) if(!isnull(R.camera) && !R.scrambledcodes) - R.camera.status = mend + R.camera.status = !mend //If we are mending, we set the status to false, and toggle cam. Otherwise, we set it to true, and cut. It's silly, I know R.camera.toggle_cam(usr, 0) // Will kick anyone who is watching the Cyborg's camera. if(WIRE_BORG_LOCKED) diff --git a/code/modules/mob/living/silicon/robot/robot_death.dm b/code/modules/mob/living/silicon/robot/robot_death.dm index 78e6bfb9ca8..15d400000b0 100644 --- a/code/modules/mob/living/silicon/robot/robot_death.dm +++ b/code/modules/mob/living/silicon/robot/robot_death.dm @@ -58,7 +58,7 @@ diag_hud_set_status() diag_hud_set_health() if(camera) - camera.status = FALSE + camera.turn_off(src, FALSE) update_headlamp(1) //So borg lights are disabled when killed. if(in_contents_of(/obj/machinery/recharge_station))//exit the recharge station diff --git a/code/modules/mob/living/silicon/robot/robot_life.dm b/code/modules/mob/living/silicon/robot/robot_life.dm index c25b202e3f2..515bc757829 100644 --- a/code/modules/mob/living/silicon/robot/robot_life.dm +++ b/code/modules/mob/living/silicon/robot/robot_life.dm @@ -45,11 +45,9 @@ handle_no_power() /mob/living/silicon/robot/proc/handle_equipment() - if(camera && !scrambledcodes) + if(camera && camera.status && !scrambledcodes) //Don't turn off cameras already off if(stat == DEAD || wires.is_cut(WIRE_BORG_CAMERA)) - camera.status = FALSE - else - camera.status = TRUE + camera.turn_off(src, FALSE) //update the state of modules and components here if(stat != CONSCIOUS) diff --git a/code/modules/mob/living/silicon/robot/robot_mob.dm b/code/modules/mob/living/silicon/robot/robot_mob.dm index c82b29c377f..1e02b8dd18c 100644 --- a/code/modules/mob/living/silicon/robot/robot_mob.dm +++ b/code/modules/mob/living/silicon/robot/robot_mob.dm @@ -185,7 +185,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( camera.c_tag = real_name camera.network = list("SS13","Robots") if(wires.is_cut(WIRE_BORG_CAMERA)) // 5 = BORG CAMERA - camera.status = FALSE + camera.turn_off(src, FALSE) if(mmi == null) mmi = new /obj/item/mmi/robotic_brain(src) //Give the borg an MMI if he spawns without for some reason. (probably not the correct way to spawn a robotic brain, but it works) diff --git a/code/modules/mob/living/silicon/robot/robot_update_status.dm b/code/modules/mob/living/silicon/robot/robot_update_status.dm index a152d926235..26e3e0b3b2f 100644 --- a/code/modules/mob/living/silicon/robot/robot_update_status.dm +++ b/code/modules/mob/living/silicon/robot/robot_update_status.dm @@ -25,6 +25,9 @@ else if(health > 0 && !suiciding && has_power_source()) update_revive() + if(camera) + if(!wires.is_cut(WIRE_BORG_CAMERA)) + camera.turn_on(src, FALSE) var/mob/dead/observer/ghost = get_ghost() if(ghost) to_chat(ghost, "Your cyborg shell has been repaired and repowered, re-enter if you want to continue! (Verbs -> Ghost -> Re-enter corpse)")