mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Fix cable coil dupe and APC icon oddity (#27921)
* Fix APCs creating terminal on cut cable connection * Fix missing icon state for empty APCs * Make the wire panel inaccesable for empty APCs * Make the ui inaccessable for empty APCs * Redo this a different way so it performs correctly * Update apc.dm
This commit is contained in:
@@ -99,8 +99,6 @@
|
||||
/obj/machinery/power/apc/connect_to_network()
|
||||
//Override because the APC does not directly connect to the network; it goes through a terminal.
|
||||
//The terminal is what the power computer looks for anyway.
|
||||
if(!terminal)
|
||||
make_terminal()
|
||||
if(terminal)
|
||||
terminal.connect_to_network()
|
||||
|
||||
@@ -241,6 +239,8 @@
|
||||
icon_state = "apcemag"
|
||||
else if(update_state & UPSTATE_WIREEXP)
|
||||
icon_state = "apcewires"
|
||||
else if(update_state & UPSTATE_MAINT)
|
||||
icon_state = "apc0"
|
||||
|
||||
if(!(update_state & UPSTATE_ALLGOOD))
|
||||
cut_overlays()
|
||||
@@ -448,6 +448,8 @@
|
||||
update_icon()
|
||||
else if(emagged)
|
||||
to_chat(user, "<span class='warning'>The interface is broken!</span>")
|
||||
else if((stat & MAINT) && !opened)
|
||||
..() //its an empty closed frame... theres no wires to expose!
|
||||
else
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"]")
|
||||
@@ -630,6 +632,8 @@
|
||||
charging = 0
|
||||
src.update_icon()
|
||||
return
|
||||
if((stat & MAINT) && !opened) //no board; no interface
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
|
||||
Reference in New Issue
Block a user