mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-12 08:27:13 +01:00
94d92803b4
Depends on #21458. Ports https://github.com/cmss13-devs/cmss13/pull/4229, with the original authors as: - https://github.com/tgstation/TerraGov-Marine-Corps/pull/1964 for the lighting controller (A-lexa) - https://github.com/tgstation/TerraGov-Marine-Corps/pull/4747 and https://github.com/tgstation/TerraGov-Marine-Corps/pull/7263 for the lighting (TiviPlus) - https://github.com/tgstation/tgstation/pull/54520 for the dir lighting component - https://github.com/tgstation/tgstation/pull/75018 for the out of bounds fix in lighting - https://github.com/tgstation/TerraGov-Marine-Corps/pull/6678 for the emissives (TiviPlus) The main driving reason behind this is that current lighting consumes way too much processing power, especially for things like odysseys/away sites where a billion light sources are processing/moving at once and the game slows down to a crawl. Hopefully this improves the situation by a good margin, but we will need some testmerging to confirm that. <img width="1349" height="1349" alt="image" src="https://github.com/user-attachments/assets/1059ba2b-c0c5-495a-9c76-2d75d0c42bf2" /> <img width="1349" height="1349" alt="image" src="https://github.com/user-attachments/assets/9704b0f6-4cf6-4dfd-a6cb-5702ad07d677" /> - [x] Resolve todos - [x] Look into open space fuckery (border objects) --------- Co-authored-by: Matt Atlas <liermattia@gmail.com> Co-authored-by: JohnWildkins <john.wildkins@gmail.com>
23 lines
1.0 KiB
Plaintext
23 lines
1.0 KiB
Plaintext
/// Generates a real, honest to god new z level. Will create the actual space, and also generate a datum that holds info about the new plot of land
|
|
/// Accepts the name, traits list, datum type, and if we should manage the turfs we create
|
|
/datum/controller/subsystem/mapping/proc/add_new_zlevel(name, traits = list(), z_type = /datum/space_level, contain_turfs = TRUE)
|
|
UNTIL(!adding_new_zlevel)
|
|
adding_new_zlevel = TRUE
|
|
var/new_z = z_list.len + 1
|
|
if (world.maxz < new_z)
|
|
world.incrementMaxZ()
|
|
CHECK_TICK
|
|
// TODO: sleep here if the Z level needs to be cleared
|
|
var/datum/space_level/S = new z_type(new_z, name, traits)
|
|
manage_z_level(S, filled_with_space = TRUE, contain_turfs = contain_turfs)
|
|
generate_linkages_for_z_level(new_z)
|
|
adding_new_zlevel = FALSE
|
|
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_NEW_Z, S)
|
|
SSzcopy.calculate_zstack_limits()
|
|
return S
|
|
|
|
/datum/controller/subsystem/mapping/proc/get_level(z)
|
|
if (z_list && z >= 1 && z <= z_list.len)
|
|
return z_list[z]
|
|
CRASH("Unmanaged z-level [z]! maxz = [world.maxz], z_list.len = [z_list ? z_list.len : "null"]")
|