mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 22:12:58 +01:00
Improve asteroid generation performance
This commit is contained in:
@@ -81,6 +81,7 @@ datum/controller/game_controller/proc/setup_objects()
|
||||
admin_notice(span("danger", "Done."))
|
||||
|
||||
if(config.generate_asteroid)
|
||||
var/time = world.time
|
||||
// These values determine the specific area that the map is applied to.
|
||||
// If you do not use the official Baycode moonbase map, you will need to change them.
|
||||
//Create the mining Z-level.
|
||||
@@ -92,12 +93,9 @@ datum/controller/game_controller/proc/setup_objects()
|
||||
new /datum/random_map/noise/ore(null, 0, 0, 5, 64, 64)
|
||||
new /datum/random_map/noise/ore(null, 0, 0, 4, 64, 64)
|
||||
new /datum/random_map/noise/ore(null, 0, 0, 3, 64, 64)
|
||||
// Update all turfs to ensure everything looks good post-generation. Yes,
|
||||
// it's brute-forcey, but frankly the alternative is a mine turf rewrite.
|
||||
for(var/turf/simulated/mineral/M in world) // Ugh.
|
||||
M.updateMineralOverlays()
|
||||
for(var/turf/simulated/floor/asteroid/M in world) // Uuuuuugh.
|
||||
M.updateMineralOverlays()
|
||||
var/msg = "Asteroid generation completed in [(world.time - time) / 10] seconds."
|
||||
admin_notice(span("danger", msg))
|
||||
game_log("ASGEN", msg)
|
||||
|
||||
admin_notice(span("danger", "Setting up lighting."))
|
||||
initialize_lighting()
|
||||
|
||||
Reference in New Issue
Block a user