mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Merge pull request #8064 from d3athrow/Full-Retard-Turfs-List
Make maps 500x500x6
This commit is contained in:
@@ -105,6 +105,7 @@ Class Procs:
|
||||
|
||||
for(var/turf/simulated/S in turfs)
|
||||
simulated_turf_count++
|
||||
if(!(simulated_turf_count % 50000)) sleep(world.tick_lag)
|
||||
S.update_air_properties()
|
||||
|
||||
to_chat(world, {"<font color='red'><b>Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</b>
|
||||
|
||||
@@ -103,23 +103,24 @@ In short:
|
||||
tcheck(80,1)
|
||||
|
||||
/datum/universal_state/hell/OverlayAndAmbientSet()
|
||||
var/count = 0
|
||||
for(var/turf/T in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if(istype(T, /turf/space))
|
||||
T.overlays += "hell01"
|
||||
else
|
||||
if(!T.holy && prob(1))
|
||||
new /obj/effect/gateway/active/cult(T)
|
||||
T.underlays += "hell01"
|
||||
tcheck(85,1)
|
||||
|
||||
for(var/atom/movable/lighting_overlay/L in all_lighting_overlays)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
L.update_lumcount(0.5, 0, 0)
|
||||
tcheck(80,1)
|
||||
|
||||
/datum/universal_state/hell/proc/MiscSet()
|
||||
for(var/turf/simulated/floor/T in turfs)
|
||||
if(!T.holy && prob(1))
|
||||
new /obj/effect/gateway/active/cult(T)
|
||||
tcheck(80,1)
|
||||
|
||||
for (var/obj/machinery/firealarm/alm in machines)
|
||||
if (!(alm.stat & BROKEN))
|
||||
alm.ex_act(2)
|
||||
|
||||
@@ -144,7 +144,10 @@ The access requirements on the Asteroid Shuttles' consoles have now been revoked
|
||||
tcheck(80,1)
|
||||
|
||||
/datum/universal_state/supermatter_cascade/OverlayAndAmbientSet()
|
||||
var/count = 0
|
||||
for(var/turf/T in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if(istype(T, /turf/space))
|
||||
T.overlays += "end01"
|
||||
else
|
||||
@@ -153,6 +156,8 @@ The access requirements on the Asteroid Shuttles' consoles have now been revoked
|
||||
tcheck(80,1)
|
||||
|
||||
for(var/atom/movable/lighting_overlay/L in all_lighting_overlays)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if(L.z != map.zCentcomm)
|
||||
L.update_lumcount(0.15, 0.5, 0)
|
||||
tcheck(80,1)
|
||||
|
||||
@@ -2681,13 +2681,17 @@
|
||||
floorIsLava = 1
|
||||
|
||||
message_admins("[key_name_admin(usr)] made the floor LAVA! It'll last [length] seconds and it will deal [damage] damage to everyone.", 1)
|
||||
|
||||
var/count = 0
|
||||
var/list/lavaturfs = list()
|
||||
for(var/turf/simulated/floor/F in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if(F.z == 1)
|
||||
F.name = "lava"
|
||||
F.desc = "The floor is LAVA!"
|
||||
F.overlays += "lava"
|
||||
F.lava = 1
|
||||
lavaturfs += F
|
||||
|
||||
spawn(0)
|
||||
for(var/i = i, i < length, i++) // 180 = 3 minutes
|
||||
@@ -2707,7 +2711,7 @@
|
||||
|
||||
sleep(10)
|
||||
|
||||
for(var/turf/simulated/floor/F in turfs) // Reset everything.
|
||||
for(var/turf/simulated/floor/F in lavaturfs) // Reset everything.
|
||||
if(F.z == 1)
|
||||
F.name = initial(F.name)
|
||||
F.desc = initial(F.desc)
|
||||
|
||||
@@ -161,7 +161,10 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
var/count = 0
|
||||
for(var/turf/A in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if (A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -195,7 +198,10 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
var/count = 0
|
||||
for(var/turf/A in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if ( istype(A , O.type) )
|
||||
if(variable == "light_color")
|
||||
A.set_light(l_color = new_value)
|
||||
@@ -219,7 +225,10 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
var/count = 0
|
||||
for(var/turf/A in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if (A.type == O.type)
|
||||
if(variable == "light_color")
|
||||
A.set_light(l_color = new_value)
|
||||
@@ -260,7 +269,10 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
var/count = 0
|
||||
for(var/turf/A in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if ( istype(A , O.type) )
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
@@ -291,7 +303,10 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
var/count = 0
|
||||
for(var/turf/A in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if (A.type == O.type)
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
@@ -317,7 +332,10 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
var/count = 0
|
||||
for(var/turf/A in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if ( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else
|
||||
@@ -332,7 +350,10 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
var/count = 0
|
||||
for(var/turf/A in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if (A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -353,7 +374,10 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O.type, /turf))
|
||||
var/count = 0
|
||||
for(var/turf/A in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if ( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else
|
||||
@@ -368,7 +392,10 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O.type, /turf))
|
||||
var/count = 0
|
||||
for(var/turf/A in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if (A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -388,7 +415,10 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
var/count = 0
|
||||
for(var/turf/A in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if ( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -404,7 +434,10 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
var/count = 0
|
||||
for(var/turf/A in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if (A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
/var/list/lighting_update_lights = list() // List of light sources queued for update.
|
||||
/var/list/lighting_update_overlays = list() // List of ligting overlays queued for update.
|
||||
/var/list/all_lighting_overlays = list() // Global list of lighting overlays.
|
||||
/var/list/all_lighting_overlays = list()// Global list of lighting overlays.
|
||||
|
||||
/area/var/lighting_use_dynamic = 1 // Disabling this variable on an area disables dynamic lighting.
|
||||
|
||||
// Duplicates lots of code, but this proc needs to be as fast as possible.
|
||||
/proc/create_lighting_overlays(zlevel = 0)
|
||||
var/area/A
|
||||
var/count = 0
|
||||
if(zlevel == 0) // populate all zlevels
|
||||
for(var/turf/T in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if(T.dynamic_lighting)
|
||||
A = T.loc // Get the area.
|
||||
if(A.lighting_use_dynamic && !T.lighting_overlay)
|
||||
@@ -19,10 +21,12 @@
|
||||
else
|
||||
for(var/x = 1; x <= world.maxx; x++)
|
||||
for(var/y = 1; y <= world.maxy; y++)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
var/turf/T = locate(x, y, zlevel)
|
||||
if(T.dynamic_lighting)
|
||||
A = T.loc // Get the area.
|
||||
if(A.lighting_use_dynamic && !T.lighting_overlay)
|
||||
var/atom/movable/lighting_overlay/O = getFromPool(/atom/movable/lighting_overlay, T)
|
||||
all_lighting_overlays |= O
|
||||
all_lighting_overlays[count] = O
|
||||
T.lighting_overlay = O
|
||||
|
||||
@@ -135,9 +135,9 @@ var/savefile/panicfile
|
||||
master_controller = new /datum/controller/game_controller()
|
||||
|
||||
spawn(1)
|
||||
for(var/turf/T in world)
|
||||
T.initialize()
|
||||
turfs += T
|
||||
turfs = new/list(maxx*maxy*maxz)
|
||||
world.log << "DEBUG: TURFS LIST LENGTH [turfs.len]"
|
||||
build_turfs_list()
|
||||
|
||||
processScheduler.deferSetupFor(/datum/controller/process/ticker)
|
||||
processScheduler.setup()
|
||||
@@ -475,3 +475,11 @@ proc/establish_old_db_connection()
|
||||
return 1
|
||||
|
||||
#undef FAILED_DB_CONNECTION_CUTOFF
|
||||
/world/proc/build_turfs_list()
|
||||
var/count = 0
|
||||
for(var/Z = 1 to world.maxz)
|
||||
for(var/turf/T in block(locate(1,1,Z), locate(world.maxx, world.maxy, Z)))
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
count++
|
||||
T.initialize()
|
||||
turfs[count] = T
|
||||
@@ -148,7 +148,10 @@ proc/get_base_turf(var/z)
|
||||
|
||||
proc/change_base_turf(var/choice,var/new_base_path,var/update_old_base = 0)
|
||||
if(update_old_base)
|
||||
var/count = 0
|
||||
for(var/turf/T in turfs)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if(T.type == get_base_turf(choice) && T.z == choice)
|
||||
T.ChangeTurf(new_base_path)
|
||||
var/datum/zLevel/L = map.zLevels[choice]
|
||||
|
||||
24611
maps/defficiency.dmm
24611
maps/defficiency.dmm
File diff suppressed because it is too large
Load Diff
24427
maps/metaclub.dmm
24427
maps/metaclub.dmm
File diff suppressed because it is too large
Load Diff
19611
maps/taxistation.dmm
19611
maps/taxistation.dmm
File diff suppressed because it is too large
Load Diff
6297
maps/tgstation.dmm
6297
maps/tgstation.dmm
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user