Skip to content

Commit

Permalink
Tad console visual fix (#13589)
Browse files Browse the repository at this point in the history
* visible tad damage

* tad console visual fix
  • Loading branch information
Lumipharon authored Jul 27, 2023
1 parent b03d28f commit d214eaf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
13 changes: 4 additions & 9 deletions code/game/objects/machinery/computer/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions code/modules/shuttle/mini_dropship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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()

Expand All @@ -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 ..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/tgui/states/dropship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit d214eaf

Please sign in to comment.