mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 05:51:56 +01:00
Refactored the machinery operable procs (#19274)
Refactored the machinery operable procs into a single one, DMDoc'd, SDMM marked, made more readable. Fixed suspension field generator not being able to be used as it was not checking the power cell for operability. Fixes #19249
This commit is contained in:
@@ -921,7 +921,7 @@
|
||||
return wires.is_cut(wireIndex)
|
||||
|
||||
/obj/machinery/power/apc/proc/can_use(mob/user, var/loud = 0) //used by attack_hand() and Topic()
|
||||
if(inoperable())
|
||||
if(!operable())
|
||||
return FALSE
|
||||
var/use_flags = issilicon(user) && USE_ALLOW_NON_ADJACENT // AIs and borgs can use it at range
|
||||
use_flags |= (check_rights(R_ADMIN, FALSE, user) && USE_ALLOW_NONLIVING) // admins can use the UI when ghosting
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/obj/machinery/fusion_fuel_injector/process()
|
||||
if(injecting)
|
||||
if(inoperable())
|
||||
if(!operable())
|
||||
StopInjecting()
|
||||
else
|
||||
Inject()
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
harvesting.Cut()
|
||||
|
||||
/obj/machinery/kinetic_harvester/update_icon()
|
||||
if(inoperable())
|
||||
if(!operable())
|
||||
icon_state = "broken"
|
||||
else if(use_power >= POWER_USE_ACTIVE)
|
||||
icon_state = "on"
|
||||
|
||||
Reference in New Issue
Block a user