mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Chemmaster and chemdispenser UI disables if the machine is not operable (#20101)
Chemmaster and chemdispenser UI disables if the machine is not operable. Turned a comment into a DMDoc. Fixes #19825
This commit is contained in:
@@ -28,10 +28,13 @@ This is /obj/machinery level code to properly manage power usage from the area.
|
||||
chan = power_channel
|
||||
return check_area.powered(chan) // return power status of the area
|
||||
|
||||
// called whenever the power settings of the containing area change
|
||||
// by default, check equipment channel & set flag can override if needed
|
||||
// This is NOT for when the machine's own status changes; update_use_power for that.
|
||||
/// called whenever the power settings of the containing area change
|
||||
/// by default, check equipment channel & set flag can override if needed
|
||||
/// This is NOT for when the machine's own status changes; update_use_power for that.
|
||||
/obj/machinery/proc/power_change()
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
|
||||
var/oldstat = stat
|
||||
|
||||
if(powered(power_channel))
|
||||
|
||||
@@ -299,6 +299,11 @@
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_master/ui_status(mob/user, datum/ui_state/state)
|
||||
if(!operable())
|
||||
return UI_DISABLED
|
||||
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/machinery/chem_master/Topic(href, href_list)
|
||||
|
||||
@@ -202,6 +202,12 @@
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/chemical_dispenser/ui_status(mob/user, datum/ui_state/state)
|
||||
if(!operable())
|
||||
return UI_DISABLED
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/chemical_dispenser/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user