diff --git a/code/datums/wires/apc.dm b/code/datums/wires/apc.dm
index 02d71f18e75..860cb37e086 100644
--- a/code/datums/wires/apc.dm
+++ b/code/datums/wires/apc.dm
@@ -11,7 +11,7 @@
/datum/wires/apc/interactable(mob/user)
var/obj/machinery/power/apc/A = holder
- if(A.wiresexposed)
+ if(A.panel_open && !A.opened)
return TRUE
/datum/wires/apc/get_status()
diff --git a/code/game/machinery/airalarm.dm b/code/game/machinery/airalarm.dm
index f5da2d1927c..5ebd2c32747 100644
--- a/code/game/machinery/airalarm.dm
+++ b/code/game/machinery/airalarm.dm
@@ -165,13 +165,12 @@
return 1
return 0
-/obj/machinery/airalarm/interact(mob/user)
- if(user.has_unlimited_silicon_privilege && src.aidisabled)
- user << "AI control for this Air Alarm interface has been disabled."
- return
-
- if(!shorted)
- ui_interact(user)
+/obj/machinery/airalarm/ui_status(mob/user)
+ if(user.has_unlimited_silicon_privilege && aidisabled)
+ user << "AI control has been disabled."
+ else if(!shorted)
+ return ..()
+ return UI_CLOSE
/obj/machinery/airalarm/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index e6b230f5994..e8541a532ce 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -101,15 +101,15 @@
if(exchange_parts(user, O))
return
- if (panel_open)
+ if(panel_open)
if(istype(O, /obj/item/weapon/crowbar))
materials.retrieve_all()
default_deconstruction_crowbar(O)
return 1
- else
- attack_hand(user)
+ else if(is_wire_tool(O))
+ wires.interact(user)
return 1
- if (stat)
+ if(stat)
return 1
var/material_amount = materials.get_item_material_amount(O)
@@ -140,16 +140,6 @@
busy = 0
src.updateUsrDialog()
-/obj/machinery/autolathe/attack_paw(mob/user)
- return attack_hand(user)
-
-/obj/machinery/autolathe/attack_hand(mob/user)
- if(panel_open && !isAI(user))
- return wires.interact(user)
- if(..(user, 0))
- return
- interact(user)
-
/obj/machinery/autolathe/Topic(href, href_list)
if(..())
return
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 0dc5e500513..f4a6f69f91f 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -72,7 +72,6 @@
var/lastused_environ = 0
var/lastused_total = 0
var/main_status = 0
- var/wiresexposed = 0
powernet = 0 // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :(
var/malfhack = 0 //New var for my changes to AI malf. --NeoFite
var/mob/living/silicon/ai/malfai = null //See above --NeoFite
@@ -302,7 +301,7 @@
update_state |= UPSTATE_OPENED2
else if(emagged || malfai)
update_state |= UPSTATE_BLUESCREEN
- else if(wiresexposed)
+ else if(panel_open)
update_state |= UPSTATE_WIREEXP
if(update_state <= 1)
update_state |= UPSTATE_ALLGOOD
@@ -439,8 +438,8 @@
else if(emagged)
user << "The interface is broken!"
else
- wiresexposed = !wiresexposed
- user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
+ panel_open = !panel_open
+ user << "The wires have been [panel_open ? "exposed" : "unexposed"]"
update_icon()
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
@@ -448,7 +447,7 @@
user << "The interface is broken!"
else if(opened)
user << "You must close the cover to swipe an ID card!"
- else if(wiresexposed)
+ else if(panel_open)
user << "You must close the panel!"
else if(stat & (BROKEN|MAINT))
user << "Nothing happens!"
@@ -546,10 +545,9 @@
opened = 1
update_icon()
else
- if(!opened && wiresexposed && is_wire_tool(W))
- return attack_hand(user)
- ..()
- if( ((stat & BROKEN) || malfhack) && !opened && W.force >= 5 && W.w_class >= 3 && prob(20) )
+ if(panel_open && !opened && is_wire_tool(W))
+ wires.interact(user)
+ if(((stat & BROKEN) || malfhack) && !opened && W.force >= 5 && W.w_class >= 3 && prob(20))
opened = 2
user.visible_message("[user.name] has knocked down the APC cover with the [W.name].", \
"You knock down the APC cover with your [W.name]!", \
@@ -560,7 +558,7 @@
if(!emagged && !malfhack)
if(opened)
user << "You must close the cover to swipe an ID card!"
- else if(wiresexposed)
+ else if(panel_open)
user << "You must close the panel first!"
else if(stat & (BROKEN|MAINT))
user << "Nothing happens!"
@@ -599,12 +597,12 @@
user.visible_message("[user.name] slashes at the [src.name]!", "You slash at the [src.name]!")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
- if(beenhit >= pick(3, 4) && wiresexposed != 1)
- wiresexposed = 1
+ if(beenhit >= pick(3, 4) && panel_open != 1)
+ panel_open = 1
update_icon()
visible_message("The [src.name]'s cover flies open, exposing the wires!")
- else if(wiresexposed == 1 && !wires.is_all_cut())
+ else if(panel_open == 1 && !wires.is_all_cut())
wires.cut_all()
update_icon()
visible_message("The [src.name]'s wires are shredded!")
@@ -612,13 +610,6 @@
beenhit += 1
return
-
-/obj/machinery/power/apc/interact(mob/user)
- if(wiresexposed && !istype(user, /mob/living/silicon/ai))
- wires.interact(user)
- else
- ui_interact(user)
-
/obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
@@ -723,7 +714,7 @@
) \
)
if(!loud)
- user << "\The [src] has AI control disabled!"
+ user << "\The [src] has eee disabled!"
return FALSE
return TRUE