mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 07:32:02 +00:00
Miscellaneous Tweaks (#1720)
changes: Refactored footstep sounds to use less operations & only calculate for human-types. Improved the logging detail of the lighting profiler. Fixed some shuttle corners that weren't correctly working with parallax space. Converted get_turf() into a compiler macro. Solars are now dynamically lit. Silenced warning from lighting overlays pooling themselves when updated on a space tile. Fixed a bug where securing a girder was instant when it was supposed to have a delay.
This commit is contained in:
@@ -59,12 +59,14 @@
|
||||
|
||||
update()
|
||||
|
||||
lprof_write(src, "source_new")
|
||||
L_PROF(source_atom, "source_new")
|
||||
|
||||
return ..()
|
||||
|
||||
// Kill ourselves.
|
||||
/datum/light_source/proc/destroy(var/no_update = FALSE)
|
||||
L_PROF(source_atom, "source_destroy")
|
||||
|
||||
destroyed = TRUE
|
||||
if (!no_update)
|
||||
force_update()
|
||||
@@ -121,19 +123,20 @@
|
||||
|
||||
top_atom.light_sources += src // Add ourselves to the light sources of our new top atom.
|
||||
|
||||
lprof_write(src, "source_update")
|
||||
L_PROF(source_atom, "source_update")
|
||||
|
||||
INTELLIGENT_UPDATE
|
||||
|
||||
// Will force an update without checking if it's actually needed.
|
||||
/datum/light_source/proc/force_update()
|
||||
lprof_write(src, "source_forceupdate")
|
||||
L_PROF(source_atom, "source_forceupdate")
|
||||
force_update = 1
|
||||
|
||||
INTELLIGENT_UPDATE
|
||||
|
||||
// Will cause the light source to recalculate turfs that were removed or added to visibility only.
|
||||
/datum/light_source/proc/vis_update()
|
||||
L_PROF(source_atom, "source_visupdate")
|
||||
vis_update = 1
|
||||
|
||||
INTELLIGENT_UPDATE
|
||||
@@ -285,6 +288,7 @@
|
||||
APPLY_CORNER(C,now)
|
||||
|
||||
/datum/light_source/proc/smart_vis_update(var/now = FALSE)
|
||||
L_PROF(source_atom, "source_smartvisupdate")
|
||||
var/list/datum/lighting_corner/corners = list()
|
||||
var/list/turf/turfs = list()
|
||||
FOR_DVIEW(var/turf/T, light_range, source_turf, 0)
|
||||
|
||||
Reference in New Issue
Block a user