mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
refactors global lists.
This commit is contained in:
@@ -161,7 +161,7 @@
|
||||
if(building==0)
|
||||
init()
|
||||
else
|
||||
area = src.loc.loc
|
||||
area = get_area(src)
|
||||
area.apc |= src
|
||||
opened = 1
|
||||
operating = 0
|
||||
@@ -1068,7 +1068,6 @@
|
||||
if(prob(3))
|
||||
src.locked = 1
|
||||
if(src.cell.charge > 0)
|
||||
// to_chat(world, "<span class='warning'>blew APC in [src.loc.loc]</span>")
|
||||
src.cell.charge = 0
|
||||
cell.corrupt()
|
||||
src.malfhack = 1
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
// returns whether this light has power
|
||||
// true if area has power and lightswitch is on
|
||||
/obj/machinery/light/proc/has_power()
|
||||
var/area/A = src.loc.loc
|
||||
var/area/A = get_area(src)
|
||||
return A.lightswitch && A.power_light
|
||||
|
||||
/obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
|
||||
@@ -584,8 +584,9 @@
|
||||
|
||||
// called when area power state changes
|
||||
/obj/machinery/light/power_change()
|
||||
var/area/A = get_area_master(src)
|
||||
if(A) seton(A.lightswitch && A.power_light)
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
seton(A.lightswitch && A.power_light)
|
||||
|
||||
// called when on fire
|
||||
|
||||
|
||||
@@ -59,11 +59,13 @@
|
||||
// defaults to power_channel
|
||||
/obj/machinery/proc/powered(var/chan = -1) // defaults to power_channel
|
||||
|
||||
if(!src.loc)
|
||||
if(!loc)
|
||||
return 0
|
||||
if(!use_power)
|
||||
return 1
|
||||
|
||||
var/area/A = src.loc.loc // make sure it's in an area
|
||||
if(!A || !isarea(A))
|
||||
var/area/A = get_area(src) // make sure it's in an area
|
||||
if(!A)
|
||||
return 0 // if not, then not powered
|
||||
if(chan == -1)
|
||||
chan = power_channel
|
||||
@@ -72,7 +74,7 @@
|
||||
// increment the power usage stats for an area
|
||||
/obj/machinery/proc/use_power(var/amount, var/chan = -1) // defaults to power_channel
|
||||
var/area/A = get_area(src) // make sure it's in an area
|
||||
if(!A || !isarea(A))
|
||||
if(!A)
|
||||
return
|
||||
if(chan == -1)
|
||||
chan = power_channel
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
narsie_spawn_animation()
|
||||
|
||||
sleep(70)
|
||||
shuttle_master.emergency.request(null, 0.3) // Cannot recall
|
||||
shuttle_master.emergency.canRecall = FALSE
|
||||
SSshuttle.emergency.request(null, 0.3) // Cannot recall
|
||||
SSshuttle.emergency.canRecall = FALSE
|
||||
|
||||
/obj/singularity/narsie/large/attack_ghost(mob/dead/observer/user as mob)
|
||||
makeNewConstruct(/mob/living/simple_animal/hostile/construct/harvester, user, null, 1)
|
||||
|
||||
Reference in New Issue
Block a user