mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 00:53:23 +01:00
Don't use get_area proc, introduce myArea variable.
Conflicts: code/modules/power/power.dm
This commit is contained in:
@@ -54,12 +54,16 @@
|
||||
|
||||
// increment the power usage stats for an area
|
||||
|
||||
/obj/machinery/proc/use_power(var/amount, var/chan = -1, var/autocalled = 0) // defaults to power_channel
|
||||
var/area/A = src.loc.loc // make sure it's in an area
|
||||
|
||||
/obj/machinery/proc/use_power(var/amount, var/chan = -1, var/autocalled = 0) // defaults to power_channel) // defaults to power_channel
|
||||
var/area/A = src.myArea
|
||||
|
||||
if(!A || !isarea(A) || !A.master)
|
||||
return
|
||||
|
||||
if(chan == -1)
|
||||
chan = power_channel
|
||||
|
||||
A.master.use_power(amount, chan)
|
||||
if(!autocalled)
|
||||
A.master.powerupdate = 2 // Decremented by 2 each GC tick, since it's not auto power change we're going to update power twice.
|
||||
|
||||
Reference in New Issue
Block a user