remove the sub-area system

Removes area/list/related and area/master.
They were only used by the old lighting subarea system.

Signed-off-by: Mloc <colmohici@gmail.com>
This commit is contained in:
Mloc
2015-05-09 23:00:26 +01:00
parent 18209f9d78
commit e602a7e286
31 changed files with 153 additions and 228 deletions
+4 -5
View File
@@ -1253,11 +1253,10 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on)
if( cell && cell.charge>=20)
cell.use(20);
spawn(0)
for(var/area/A in area.related)
for(var/obj/machinery/light/L in A)
L.on = 1
L.broken()
sleep(1)
for(var/obj/machinery/light/L in area)
L.on = 1
L.broken()
sleep(1)
/obj/machinery/power/apc/proc/setsubsystem(val)
if(cell && cell.charge > 0)
+4 -4
View File
@@ -50,8 +50,8 @@
for(var/area/A in range(src,effectiverange))
if(A.name == "Space")
continue // No (de)gravitizing space.
if(A.master && !( A.master in localareas) )
localareas += A.master
if(!(A in localareas))
localareas += A
/obj/machinery/computer/gravity_control_computer/proc/findgenerator()
var/obj/machinery/gravity_generator/foundgenerator = null
@@ -125,7 +125,7 @@
for(var/area/A in gravity_generator:localareas)
var/obj/machinery/gravity_generator/G
for(G in machines)
if((A.master in G.localareas) && (G.on))
if((A in G.localareas) && (G.on))
break
if(!G)
A.gravitychange(0,A)
@@ -137,4 +137,4 @@
A.gravitychange(1,A)
src.updateUsrDialog()
return
return
+1 -2
View File
@@ -441,7 +441,7 @@
// true if area has power and lightswitch is on
/obj/machinery/light/proc/has_power()
var/area/A = src.loc.loc
return A.master.lightswitch && A.master.power_light
return A.lightswitch && A.power_light
/obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
if(flickering) return
@@ -613,7 +613,6 @@
/obj/machinery/light/power_change()
spawn(10)
var/area/A = src.loc.loc
A = A.master
seton(A.lightswitch && A.power_light)
// called when on fire
+4 -4
View File
@@ -69,20 +69,20 @@
// return 1
var/area/A = src.loc.loc // make sure it's in an area
if(!A || !isarea(A) || !A.master)
if(!A || !isarea(A))
return 0 // if not, then not powered
if(chan == -1)
chan = power_channel
return A.master.powered(chan) // return power status of the area
return A.powered(chan) // return power status of the area
// 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) || !A.master)
if(!A || !isarea(A))
return
if(chan == -1)
chan = power_channel
A.master.use_power(amount, chan)
A.use_power(amount, chan)
/obj/machinery/proc/power_change() // called whenever the power settings of the containing area change
// by default, check equipment channel & set flag
+3 -4
View File
@@ -150,7 +150,6 @@
return null
/area/proc/get_apc()
for(var/area/RA in src.related)
var/obj/machinery/power/apc/FINDME = locate() in RA
if (FINDME)
return FINDME
var/obj/machinery/power/apc/FINDME = locate() in src
if (FINDME)
return FINDME