mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
Fix All Exoplanet Atmosphere Lag (#22924)
Y'know, probably. It certainly seems to work locally! changes: - code_imp: "Exoplanets now cache their main outdoor atmospheric region instead of trying to search their entire map once per second." - code_imp: "Exoplanet atmospheric calculations now run only when necessary using new update_revision counter." - code_imp: "Exoplanet atmospheres now wait until all random ruins have been placed before trying to resolve the air everywhere." - admin: "Adds new admin debug verb, 'Toggle Non-Horizon Temperature Graphics', which toggles all off-ship gas temp graphics to address lag in a pinch, if still necessary, without removing actual environmental hazard."
This commit is contained in:
+7
-1
@@ -6,7 +6,13 @@
|
||||
|
||||
/turf/simulated/proc/update_graphic(list/graphic_add = null, list/graphic_remove = null)
|
||||
if(graphic_add && LAZYLEN(graphic_add))
|
||||
add_vis_contents(graphic_add)
|
||||
if(SSair.suppress_nonhorizon_temperature_graphics && !is_station_level(z))
|
||||
for(var/obj/gas_overlay/graphic in graphic_add)
|
||||
if(graphic.gas_id == GAS_HEAT || graphic.gas_id == GAS_COLD)
|
||||
continue
|
||||
add_vis_contents(graphic)
|
||||
else
|
||||
add_vis_contents(graphic_add)
|
||||
if(graphic_remove && LAZYLEN(graphic_remove))
|
||||
remove_vis_contents(graphic_remove)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ Class Vars:
|
||||
name - A name of the format "Zone [#]", used for debugging.
|
||||
invalid - True if the zone has been erased and is no longer eligible for processing.
|
||||
needs_update - True if the zone has been added to the update list.
|
||||
update_revision - Incremented when needs_update flips on, and retained after needs_update is cleared.
|
||||
edges - A list of edges that connect to this zone.
|
||||
air - The gas mixture that any turfs in this zone will return. Values are per-tile with a group multiplier.
|
||||
|
||||
@@ -47,6 +48,8 @@ Class Procs:
|
||||
var/list/fire_tiles
|
||||
|
||||
var/needs_update = 0
|
||||
/// Counter incremented when zone is dirtied for processing.
|
||||
var/update_revision = 0
|
||||
|
||||
var/list/connection_edge/edges
|
||||
|
||||
@@ -172,6 +175,7 @@ Class Procs:
|
||||
to_chat(M, "P: [XGM_PRESSURE(air)] kPa V: [air.volume]L T: [air.temperature]�K ([air.temperature - T0C]�C)")
|
||||
to_chat(M, "O2 per N2: [(air.gas[GAS_NITROGEN] ? air.gas[GAS_OXYGEN]/air.gas[GAS_NITROGEN] : "N/A")] Moles: [air.total_moles]")
|
||||
to_chat(M, "Simulated: [contents.len] ([air.group_multiplier])")
|
||||
to_chat(M, "Update Revision: [update_revision]")
|
||||
//to_chat(M, "Unsimulated: [unsimulated_contents.len]")
|
||||
//to_chat(M, "Edges: [LAZYLEN(edges)]")
|
||||
if(invalid) to_chat(M, "Invalid!")
|
||||
|
||||
Reference in New Issue
Block a user