mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Revert "Faster Startup"
This commit is contained in:
@@ -9,8 +9,7 @@
|
|||||||
/datum/controller/process/lighting/setup()
|
/datum/controller/process/lighting/setup()
|
||||||
name = "lighting"
|
name = "lighting"
|
||||||
|
|
||||||
spawn(20)
|
create_lighting_overlays()
|
||||||
create_lighting_overlays()
|
|
||||||
|
|
||||||
/datum/controller/process/lighting/doWork()
|
/datum/controller/process/lighting/doWork()
|
||||||
// Counters
|
// Counters
|
||||||
|
|||||||
@@ -189,9 +189,6 @@ datum/controller/game_controller/proc/cachedamageicons()
|
|||||||
// last_init_type = object.type
|
// last_init_type = object.type
|
||||||
object.initialize()
|
object.initialize()
|
||||||
count++
|
count++
|
||||||
for(var/turf/T in world)
|
|
||||||
T.initialize()
|
|
||||||
turfs += T
|
|
||||||
log_startup_progress(" Initialized [count] objects in [stop_watch(watch)]s.")
|
log_startup_progress(" Initialized [count] objects in [stop_watch(watch)]s.")
|
||||||
|
|
||||||
watch = start_watch()
|
watch = start_watch()
|
||||||
|
|||||||
@@ -79,14 +79,12 @@
|
|||||||
spawn( 0 )
|
spawn( 0 )
|
||||||
src.Entered(AM)
|
src.Entered(AM)
|
||||||
return
|
return
|
||||||
|
turfs |= src
|
||||||
|
|
||||||
var/area/A = loc
|
var/area/A = loc
|
||||||
if(!dynamic_lighting || !A.lighting_use_dynamic)
|
if(!dynamic_lighting || !A.lighting_use_dynamic)
|
||||||
luminosity = 1
|
luminosity = 1
|
||||||
|
|
||||||
/turf/proc/initialize()
|
|
||||||
return
|
|
||||||
|
|
||||||
/turf/DblClick()
|
/turf/DblClick()
|
||||||
if(istype(usr, /mob/living/silicon/ai))
|
if(istype(usr, /mob/living/silicon/ai))
|
||||||
return move_camera_by_click()
|
return move_camera_by_click()
|
||||||
|
|||||||
@@ -52,10 +52,6 @@
|
|||||||
if(isfile(file))
|
if(isfile(file))
|
||||||
maploader.load_map(file)
|
maploader.load_map(file)
|
||||||
|
|
||||||
for(var/x = 1 to world.maxx)
|
|
||||||
for(var/y = 1 to world.maxy)
|
|
||||||
turfs += locate(x,y,world.maxz)
|
|
||||||
|
|
||||||
for(var/obj/effect/landmark/L in landmarks_list)
|
for(var/obj/effect/landmark/L in landmarks_list)
|
||||||
if (L.name != "awaystart")
|
if (L.name != "awaystart")
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/var/list/lighting_update_lights = list() // List of light sources queued for update.
|
/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/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.
|
/area/var/lighting_use_dynamic = 1 // Disabling this variable on an area disables dynamic lighting.
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
for(var/turf/T in turfs)
|
for(var/turf/T in turfs)
|
||||||
if(T.dynamic_lighting)
|
if(T.dynamic_lighting)
|
||||||
A = T.loc // Get the area.
|
A = T.loc // Get the area.
|
||||||
if(A.lighting_use_dynamic && !T.lighting_overlay)
|
if(A.lighting_use_dynamic)
|
||||||
var/atom/movable/lighting_overlay/O = getFromPool(/atom/movable/lighting_overlay, T)
|
var/atom/movable/lighting_overlay/O = getFromPool(/atom/movable/lighting_overlay, T)
|
||||||
all_lighting_overlays |= O
|
all_lighting_overlays |= O
|
||||||
T.lighting_overlay = O
|
T.lighting_overlay = O
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
var/turf/T = locate(x, y, zlevel)
|
var/turf/T = locate(x, y, zlevel)
|
||||||
if(T.dynamic_lighting)
|
if(T.dynamic_lighting)
|
||||||
A = T.loc // Get the area.
|
A = T.loc // Get the area.
|
||||||
if(A.lighting_use_dynamic && !T.lighting_overlay)
|
if(A.lighting_use_dynamic)
|
||||||
var/atom/movable/lighting_overlay/O = getFromPool(/atom/movable/lighting_overlay, T)
|
var/atom/movable/lighting_overlay/O = getFromPool(/atom/movable/lighting_overlay, T)
|
||||||
all_lighting_overlays |= O
|
all_lighting_overlays |= O
|
||||||
T.lighting_overlay = O
|
T.lighting_overlay = O
|
||||||
|
|||||||
@@ -33,10 +33,7 @@
|
|||||||
/turf/unsimulated/mineral/New()
|
/turf/unsimulated/mineral/New()
|
||||||
. = ..()
|
. = ..()
|
||||||
MineralSpread()
|
MineralSpread()
|
||||||
if(ticker)
|
|
||||||
initialize()
|
|
||||||
|
|
||||||
/turf/unsimulated/mineral/initialize()
|
|
||||||
spawn(1)
|
spawn(1)
|
||||||
var/turf/T
|
var/turf/T
|
||||||
if((istype(get_step(src, NORTH), /turf/simulated/floor)) || (istype(get_step(src, NORTH), /turf/space)) || (istype(get_step(src, NORTH), /turf/simulated/shuttle/floor)))
|
if((istype(get_step(src, NORTH), /turf/simulated/floor)) || (istype(get_step(src, NORTH), /turf/space)) || (istype(get_step(src, NORTH), /turf/simulated/shuttle/floor)))
|
||||||
@@ -502,10 +499,6 @@
|
|||||||
|
|
||||||
if(prob(20))
|
if(prob(20))
|
||||||
icon_state = "asteroid[rand(0,12)]"
|
icon_state = "asteroid[rand(0,12)]"
|
||||||
if(ticker)
|
|
||||||
initialize()
|
|
||||||
|
|
||||||
/turf/unsimulated/floor/asteroid/initialize()
|
|
||||||
updateMineralOverlays()
|
updateMineralOverlays()
|
||||||
|
|
||||||
/turf/unsimulated/floor/asteroid/ex_act(severity)
|
/turf/unsimulated/floor/asteroid/ex_act(severity)
|
||||||
@@ -564,18 +557,15 @@
|
|||||||
|
|
||||||
/turf/unsimulated/floor/asteroid/proc/updateMineralOverlays()
|
/turf/unsimulated/floor/asteroid/proc/updateMineralOverlays()
|
||||||
src.overlays.len = 0
|
src.overlays.len = 0
|
||||||
spawn(1)
|
|
||||||
for(var/dir in cardinal)
|
if(istype(get_step(src, NORTH), /turf/unsimulated/mineral))
|
||||||
if(istype(get_step(src,dir), /turf/unsimulated/mineral))
|
src.overlays += image('icons/turf/walls.dmi', "rock_side_n")
|
||||||
switch(dir)
|
if(istype(get_step(src, SOUTH), /turf/unsimulated/mineral))
|
||||||
if(NORTH)
|
src.overlays += image('icons/turf/walls.dmi', "rock_side_s", layer=6)
|
||||||
src.overlays += image('icons/turf/walls.dmi', "rock_side_n")
|
if(istype(get_step(src, EAST), /turf/unsimulated/mineral))
|
||||||
if(SOUTH)
|
src.overlays += image('icons/turf/walls.dmi', "rock_side_e", layer=6)
|
||||||
src.overlays += image('icons/turf/walls.dmi', "rock_side_s", layer=6)
|
if(istype(get_step(src, WEST), /turf/unsimulated/mineral))
|
||||||
if(EAST)
|
src.overlays += image('icons/turf/walls.dmi', "rock_side_w", layer=6)
|
||||||
src.overlays += image('icons/turf/walls.dmi', "rock_side_e", layer=6)
|
|
||||||
if(WEST)
|
|
||||||
src.overlays += image('icons/turf/walls.dmi', "rock_side_w", layer=6)
|
|
||||||
|
|
||||||
/turf/unsimulated/floor/asteroid/proc/fullUpdateMineralOverlays()
|
/turf/unsimulated/floor/asteroid/proc/fullUpdateMineralOverlays()
|
||||||
var/turf/unsimulated/floor/asteroid/A
|
var/turf/unsimulated/floor/asteroid/A
|
||||||
@@ -1008,7 +998,6 @@
|
|||||||
// We can't go a full loop though
|
// We can't go a full loop though
|
||||||
next_angle = -next_angle
|
next_angle = -next_angle
|
||||||
dir = angle2dir(dir2angle(dir) + next_angle)
|
dir = angle2dir(dir2angle(dir) + next_angle)
|
||||||
|
|
||||||
/turf/unsimulated/floor/asteroid/cave/proc/SpawnFloor(var/turf/T)
|
/turf/unsimulated/floor/asteroid/cave/proc/SpawnFloor(var/turf/T)
|
||||||
for(var/turf/S in range(2,T))
|
for(var/turf/S in range(2,T))
|
||||||
if(istype(S, /turf/space) || istype(S.loc, /area/mine/explored))
|
if(istype(S, /turf/space) || istype(S.loc, /area/mine/explored))
|
||||||
@@ -1057,4 +1046,4 @@
|
|||||||
return BUILD_IGNORE
|
return BUILD_IGNORE
|
||||||
if(locate(/obj/structure/lattice) in contents)
|
if(locate(/obj/structure/lattice) in contents)
|
||||||
return BUILD_SUCCESS
|
return BUILD_SUCCESS
|
||||||
return BUILD_FAILURE
|
return BUILD_FAILURE
|
||||||
|
|||||||
Reference in New Issue
Block a user