mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Removed a bunch of tag variables from the map. I hate whoever added those.
Final parts to ZAS. Works 100% (Or very near such) now.
This commit is contained in:
@@ -11,6 +11,8 @@ connection
|
||||
zone
|
||||
zone_A
|
||||
zone_B
|
||||
ref_A
|
||||
ref_B
|
||||
indirect = 0 //If the connection is purely indirect, the zones should not join.
|
||||
last_updated //The tick at which this was last updated.
|
||||
no_zone_count = 0
|
||||
@@ -21,27 +23,29 @@ connection
|
||||
if(!A.zone.connections) A.zone.connections = list()
|
||||
A.zone.connections += src
|
||||
zone_A = A.zone
|
||||
ref_A = "\ref[A]"
|
||||
|
||||
if(!B.zone.connections) B.zone.connections = list()
|
||||
B.zone.connections += src
|
||||
zone_B = B.zone
|
||||
ref_B = "\ref[B]"
|
||||
|
||||
if(!air_master.tiles_with_connections)
|
||||
air_master.tiles_with_connections = list()
|
||||
|
||||
if(air_master.tiles_with_connections[A])
|
||||
var/list/A_connections = air_master.tiles_with_connections[A]
|
||||
if(air_master.tiles_with_connections[ref_A])
|
||||
var/list/A_connections = air_master.tiles_with_connections[ref_A]
|
||||
A_connections |= src
|
||||
else
|
||||
var/list/A_connections = list(src)
|
||||
air_master.tiles_with_connections[A] = A_connections
|
||||
air_master.tiles_with_connections[ref_A] = A_connections
|
||||
|
||||
if(air_master.tiles_with_connections[B])
|
||||
var/list/B_connections = air_master.tiles_with_connections[B]
|
||||
if(air_master.tiles_with_connections[ref_B])
|
||||
var/list/B_connections = air_master.tiles_with_connections[ref_B]
|
||||
B_connections |= src
|
||||
else
|
||||
var/list/B_connections = list(src)
|
||||
air_master.tiles_with_connections[B] = B_connections
|
||||
air_master.tiles_with_connections[ref_B] = B_connections
|
||||
|
||||
if(!A.zone.connected_zones)
|
||||
A.zone.connected_zones = list()
|
||||
@@ -68,23 +72,23 @@ connection
|
||||
A.zone.connections.Remove(src)
|
||||
if(!A.zone.connections.len)
|
||||
del A.zone.connections
|
||||
if(A in air_master.tiles_with_connections)
|
||||
var/list/A_connections = air_master.tiles_with_connections[A]
|
||||
if(ref_A in air_master.tiles_with_connections)
|
||||
var/list/A_connections = air_master.tiles_with_connections[ref_A]
|
||||
A_connections -= src
|
||||
if(A_connections && !A_connections.len)
|
||||
del A_connections
|
||||
air_master.tiles_with_connections.Remove(A)
|
||||
air_master.tiles_with_connections.Remove(ref_A)
|
||||
if(B)
|
||||
if(B.zone && B.zone.connections)
|
||||
B.zone.connections.Remove(src)
|
||||
if(!B.zone.connections.len)
|
||||
del B.zone.connections
|
||||
if(B in air_master.tiles_with_connections)
|
||||
var/list/B_connections = air_master.tiles_with_connections[B]
|
||||
if(ref_B in air_master.tiles_with_connections)
|
||||
var/list/B_connections = air_master.tiles_with_connections[ref_B]
|
||||
B_connections -= src
|
||||
if(B_connections && !B_connections.len)
|
||||
del B_connections
|
||||
air_master.tiles_with_connections.Remove(B)
|
||||
air_master.tiles_with_connections.Remove(ref_B)
|
||||
if(zone_A)
|
||||
if(zone_A && zone_A.connections)
|
||||
zone_A.connections.Remove(src)
|
||||
@@ -173,6 +177,8 @@ connection
|
||||
if(A.zone == B.zone)
|
||||
//world.log << "Connection removed: Zones now merged."
|
||||
del src
|
||||
if(ref_A != "\ref[A]" || ref_B != "\ref[B]")
|
||||
del src
|
||||
if((A.zone && A.zone != zone_A) || (B.zone && B.zone != zone_B))
|
||||
Sanitize()
|
||||
if(!A.zone || !B.zone)
|
||||
@@ -190,11 +196,8 @@ connection
|
||||
del src
|
||||
|
||||
if(A.zone == zone_B && B.zone == zone_A)
|
||||
var/turf/Temp = B
|
||||
B = A
|
||||
A = Temp
|
||||
zone_B = B.zone
|
||||
zone_A = A.zone
|
||||
del src
|
||||
|
||||
return
|
||||
|
||||
if(zone_A)
|
||||
@@ -252,6 +255,7 @@ connection
|
||||
|
||||
zone_A = A.zone
|
||||
|
||||
|
||||
else if(A.zone && A.zone != zone_A)
|
||||
if(zone_A)
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ zone
|
||||
|
||||
//Change all the zone vars of the turfs, check for space to be added to space_tiles.
|
||||
for(var/turf/T in contents)
|
||||
if(T.zone)
|
||||
T.zone.RemoveTurf(T)
|
||||
T.zone = src
|
||||
if(istype(T,/turf/space))
|
||||
AddSpace(T)
|
||||
@@ -30,8 +32,14 @@ zone
|
||||
|
||||
Del()
|
||||
//Ensuring the zone list doesn't get clogged with null values.
|
||||
for(var/turf/simulated/T in contents)
|
||||
if(T.zone && T.zone == src)
|
||||
T.zone = null
|
||||
for(var/zone/Z in connected_zones)
|
||||
if(src in Z.connected_zones)
|
||||
Z.connected_zones.Remove(src)
|
||||
for(var/connection/C in connections)
|
||||
del(C)
|
||||
C.Cleanup()
|
||||
zones -= src
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -184,9 +184,10 @@ turf
|
||||
if(!zone) //No zone found, new zone!
|
||||
new/zone(src)
|
||||
|
||||
if(!CanPass(null, src, 0, 0)) //Can't pass, and was updated. Delete zone connections involving this turf.
|
||||
if(air_master.tiles_with_connections[src])
|
||||
for(var/connection/C in air_master.tiles_with_connections[src])
|
||||
if(!CanPass(null, src, 0, 0) && !CanPass(null, src, 1.5, 1)) //Can't pass, and was updated. Delete zone connections involving this turf.
|
||||
if(air_master.tiles_with_connections["\ref[src]"])
|
||||
var/list/connections = air_master.tiles_with_connections["\ref[src]"]
|
||||
for(var/connection/C in connections)
|
||||
del C
|
||||
|
||||
update_zone_properties() //Update self zone and adjacent zones.
|
||||
@@ -211,9 +212,11 @@ turf
|
||||
var/turf/simulated/NT = get_step(src, direction2)
|
||||
if(NT && NT.zone && NT.zone == T.zone)
|
||||
T.zone.rebuild = 1
|
||||
else if((!T.CanPass(null, src, 1.5, 1) && T.CanPass(null, src, 0, 0)) || (!CanPass(null, T, 1.5, 1) && CanPass(null, T, 0, 0)))
|
||||
if(T.zone != zone)
|
||||
ZConnect(src,T)
|
||||
else if(zone && !zone.rebuild)
|
||||
for(var/direction2 in cardinal - reverse_direction(direction)) //Check all other directions for air that might be connected.
|
||||
var/turf/simulated/NT = get_step(T, direction2)
|
||||
if(NT && NT.zone && NT.zone == zone)
|
||||
zone.rebuild = 1
|
||||
T.check_connections()
|
||||
@@ -3,6 +3,8 @@
|
||||
//Adds the turf to contents, increases the size of the zone, and sets the zone var.
|
||||
if(T in contents)
|
||||
return
|
||||
if(T.zone)
|
||||
T.zone.RemoveTurf(T)
|
||||
contents += T
|
||||
air.group_multiplier++
|
||||
T.zone = src
|
||||
@@ -119,7 +121,9 @@ proc/ZConnect(turf/A,turf/B)
|
||||
return ZMerge(A.zone, B.zone)
|
||||
|
||||
//Ensure the connection isn't already made.
|
||||
for(var/connection/C in air_master.tiles_with_connections[A])
|
||||
if(air_master.tiles_with_connections["\ref[A]"])
|
||||
var/list/connections = air_master.tiles_with_connections["\ref[A]"]
|
||||
for(var/connection/C in connections)
|
||||
C.Cleanup()
|
||||
if(C.B == B || C.A == B)
|
||||
return
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
var/explosion_halt = 0
|
||||
var/zone_share_percent = 3.5
|
||||
zone/proc/process()
|
||||
//Does rebuilding stuff. Not sure if used.
|
||||
if(rebuild)
|
||||
//Deletes zone if empty.
|
||||
if(!contents.len)
|
||||
del src
|
||||
return 0
|
||||
//Does rebuilding stuff. Not sure if used.
|
||||
if(rebuild)
|
||||
|
||||
//Choose a random turf and regenerate the zone from it.
|
||||
var
|
||||
@@ -21,7 +21,7 @@ zone/proc/process()
|
||||
contents.Remove(null) //I can't believe this is needed.
|
||||
do
|
||||
sample = pick(contents) //Nor this.
|
||||
while(!istype(sample))
|
||||
while(!istype(sample) || !sample.CanPass(null, sample, 1.5, 1))
|
||||
new_contents = FloodFill(sample)
|
||||
|
||||
for(var/turf/space/S in new_contents)
|
||||
@@ -33,23 +33,25 @@ zone/proc/process()
|
||||
for(var/turf/T in contents)
|
||||
if(!(T in new_contents))
|
||||
problem = 1
|
||||
break
|
||||
T.zone = null
|
||||
|
||||
if(problem)
|
||||
//Build some new zones for stuff that wasn't included.
|
||||
var/list/rebuild_turfs = list()
|
||||
for(var/turf/T in contents - new_contents)
|
||||
contents -= T
|
||||
rebuild_turfs += T
|
||||
T.zone = null
|
||||
var/list/turf/simulated/rebuild_turfs = contents - new_contents
|
||||
var/list/turf/simulated/reconsider_turfs = list()
|
||||
contents = new_contents
|
||||
for(var/turf/T in rebuild_turfs)
|
||||
if(istype(T,/turf/space))
|
||||
air_master.tiles_to_update |= T
|
||||
else if(!T.zone && T.CanPass(null, T, 1.5, 1))
|
||||
var/zone/Z = new /zone(T)
|
||||
Z.air.copy_from(air)
|
||||
else
|
||||
reconsider_turfs |= T
|
||||
for(var/turf/T in reconsider_turfs)
|
||||
if(!T.zone)
|
||||
var/zone/Z = new /zone(T)
|
||||
Z.air.copy_from(air)
|
||||
if(istype(T,/turf/space))
|
||||
if(!T.zone.space_tiles)
|
||||
T.zone.space_tiles = list()
|
||||
T.zone.space_tiles |= T
|
||||
rebuild = 0
|
||||
|
||||
//Sometimes explosions will cause the air to be deleted for some reason.
|
||||
|
||||
@@ -1013,10 +1013,10 @@ table tr:first-child th:first-child { border: none;}
|
||||
if (alarm_area.atmosalert(new_area_danger_level)) //if area was in normal state or if area was in alert state
|
||||
post_alert(new_area_danger_level)
|
||||
|
||||
if(danger_level > 1)
|
||||
air_doors_close(0)
|
||||
else
|
||||
air_doors_open(0)
|
||||
// if(danger_level > 1)
|
||||
// air_doors_close(0)
|
||||
// else
|
||||
// air_doors_open(0)
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -343,8 +343,6 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
icon_state = "door_locked"
|
||||
else
|
||||
icon_state = "door_closed"
|
||||
else
|
||||
icon_state = "door_open"
|
||||
if(p_open || welded || air_locked)
|
||||
overlays = list()
|
||||
if(p_open)
|
||||
@@ -353,6 +351,8 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
overlays += image(icon, "welded")
|
||||
if(air_locked)
|
||||
overlays += image('Door1.dmi', "air")
|
||||
else
|
||||
icon_state = "door_open"
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -98,7 +98,21 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
lst[i] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
|
||||
|
||||
if("reference")
|
||||
lst[i] = input("Select reference:","Reference",src) as mob|obj|turf|area in world
|
||||
switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search"))
|
||||
if("Specifc UID (Hexadecimal number)")
|
||||
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
|
||||
if(!UID) return
|
||||
var/temp_variable = locate("\[0x[UID]\]")
|
||||
if(!temp_variable)
|
||||
usr << "ERROR. Could not locate referenced object."
|
||||
return
|
||||
switch(alert("You have chosen [temp_variable], in [get_area(temp_variable)]. Are you sure?","You sure?","Yes","NONOCANCEL!"))
|
||||
if("Yes")
|
||||
lst[i] = temp_variable
|
||||
if("NONOCANCEL!")
|
||||
return
|
||||
if("Search")
|
||||
lst[i] = input("Select reference:","Reference") as null|mob|obj|turf|area in world
|
||||
|
||||
if("mob reference")
|
||||
lst[i] = input("Select reference:","Reference",usr) as mob in world
|
||||
@@ -171,8 +185,6 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if("Specifc UID (Hexadecimal number)")
|
||||
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
|
||||
if(!UID) return
|
||||
if(length(UID) != 7)
|
||||
usr << "ERROR. UID must be 7 digits"
|
||||
var/temp_variable = locate("\[0x[UID]\]")
|
||||
if(!temp_variable)
|
||||
usr << "ERROR. Could not locate referenced object."
|
||||
@@ -239,8 +251,6 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if("Specifc UID (Hexadecimal number)")
|
||||
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
|
||||
if(!UID) return
|
||||
if(length(UID) != 7)
|
||||
usr << "ERROR. UID must be 7 digits"
|
||||
var/temp_variable = locate("\[0x[UID]\]")
|
||||
if(!temp_variable)
|
||||
usr << "ERROR. Could not locate referenced object."
|
||||
|
||||
@@ -66,8 +66,6 @@ var/list/forbidden_varedit_object_types = list(
|
||||
if("Specifc UID (Hexadecimal number)")
|
||||
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
|
||||
if(!UID) return
|
||||
if(length(UID) != 7)
|
||||
usr << "ERROR. UID must be 7 digits"
|
||||
var/temp_variable = locate("\[0x[UID]\]")
|
||||
if(!temp_variable)
|
||||
usr << "ERROR. Could not locate referenced object."
|
||||
@@ -131,8 +129,6 @@ var/list/forbidden_varedit_object_types = list(
|
||||
if("Specifc UID (Hexadecimal number)")
|
||||
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
|
||||
if(!UID) return
|
||||
if(length(UID) != 7)
|
||||
usr << "ERROR. UID must be 7 digits"
|
||||
var/temp_variable = locate("\[0x[UID]\]")
|
||||
if(!temp_variable)
|
||||
usr << "ERROR. Could not locate referenced object."
|
||||
@@ -308,8 +304,6 @@ var/list/forbidden_varedit_object_types = list(
|
||||
if("Specifc UID (Hexadecimal number)")
|
||||
var/UID = input("Type in UID, without the leading 0x","Type in UID") as null|text
|
||||
if(!UID) return
|
||||
if(length(UID) != 7)
|
||||
usr << "ERROR. UID must be 7 digits"
|
||||
var/temp_variable = locate("\[0x[UID]\]")
|
||||
if(!temp_variable)
|
||||
usr << "ERROR. Could not locate referenced object."
|
||||
@@ -554,8 +548,6 @@ var/list/forbidden_varedit_object_types = list(
|
||||
if("Specifc UID (Hexadecimal number)")
|
||||
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
|
||||
if(!UID) return
|
||||
if(length(UID) != 7)
|
||||
usr << "ERROR. UID must be 7 digits"
|
||||
var/temp_variable = locate("\[0x[UID]\]")
|
||||
if(!temp_variable)
|
||||
usr << "ERROR. Could not locate referenced object."
|
||||
|
||||
@@ -82,7 +82,6 @@
|
||||
|
||||
for(var/L = 1 to netcount)
|
||||
var/datum/powernet/PN = new()
|
||||
//PN.tag = "powernet #[L]"
|
||||
powernets += PN
|
||||
PN.number = L
|
||||
|
||||
@@ -287,7 +286,6 @@
|
||||
// not looped, so make a new powernet
|
||||
|
||||
var/datum/powernet/PN = new()
|
||||
//PN.tag = "powernet #[L]"
|
||||
powernets += PN
|
||||
PN.number = powernets.len
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user