From d214eafab6067dd5ba2cd97be3d7e2f68460141a Mon Sep 17 00:00:00 2001 From: Lumipharon Date: Fri, 28 Jul 2023 03:09:52 +1200 Subject: [PATCH] Tad console visual fix (#13589) * visible tad damage * tad console visual fix --- code/game/objects/machinery/computer/computer.dm | 13 ++++--------- code/modules/shuttle/mini_dropship.dm | 8 +++----- code/modules/tgui/states/dropship.dm | 2 +- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/code/game/objects/machinery/computer/computer.dm b/code/game/objects/machinery/computer/computer.dm index 641c721151aa8..2c92a3fe13d75 100644 --- a/code/game/objects/machinery/computer/computer.dm +++ b/code/game/objects/machinery/computer/computer.dm @@ -79,18 +79,13 @@ ..() return 1 -/obj/machinery/computer/update_icon() - ..() - icon_state = initial(icon_state) - - // Broken +/obj/machinery/computer/update_icon_state() if(machine_stat & (BROKEN|DISABLED)) - icon_state += "b" - - // Powered + icon_state = "[initial(icon_state)]b" else if(machine_stat & NOPOWER) + icon_state = "[initial(icon_state)]0" + else icon_state = initial(icon_state) - icon_state += "0" /obj/machinery/computer/proc/set_broken() machine_stat |= BROKEN diff --git a/code/modules/shuttle/mini_dropship.dm b/code/modules/shuttle/mini_dropship.dm index 18af0c161f39e..a1c38a6a3b9a6 100755 --- a/code/modules/shuttle/mini_dropship.dm +++ b/code/modules/shuttle/mini_dropship.dm @@ -42,8 +42,6 @@ var/origin_port_id = SHUTTLE_TADPOLE /// The user of the ui var/mob/living/ui_user - /// If this computer was damaged by a xeno - var/damaged = FALSE /// How long before you can launch tadpole after a landing var/launching_delay = 10 SECONDS ///Minimap for use while in landing cam mode @@ -168,7 +166,7 @@ /obj/machinery/computer/camera_advanced/shuttle_docker/minidropship/attack_alien(mob/living/carbon/xenomorph/X, damage_amount, damage_type, damage_flag, effects, armor_penetration, isrightclick) . = ..() - if(damaged) + if(machine_stat & BROKEN) return if(X.status_flags & INCORPOREAL) return @@ -189,7 +187,7 @@ var/datum/effect_system/spark_spread/s2 = new /datum/effect_system/spark_spread s2.set_up(3, 1, src) s2.start() - damaged = TRUE + set_broken() open_prompt = FALSE clean_ui_user() @@ -206,7 +204,7 @@ visible_message("Autopilot detects loss of helm control. Halting take off!") /obj/machinery/computer/camera_advanced/shuttle_docker/minidropship/can_interact(mob/user) - if(damaged) + if(machine_stat & BROKEN) to_chat(user, span_warning("The [src] blinks and lets out a crackling noise. Its broken!")) return return ..() diff --git a/code/modules/tgui/states/dropship.dm b/code/modules/tgui/states/dropship.dm index e2f4d32c5ff84..2e28aa0150c7f 100644 --- a/code/modules/tgui/states/dropship.dm +++ b/code/modules/tgui/states/dropship.dm @@ -7,7 +7,7 @@ GLOBAL_DATUM_INIT(dropship_state, /datum/ui_state/dropship_state, new) /datum/ui_state/dropship_state/can_use_topic(src_object, mob/user) var/obj/machinery/computer/camera_advanced/shuttle_docker/minidropship/shuttle_computer = src_object - if(shuttle_computer.damaged) + if(shuttle_computer.machine_stat & BROKEN) return UI_CLOSE return user.dropship_can_use_topic(src_object)