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:
Lohikar
2017-02-07 10:46:39 -06:00
committed by skull132
parent ed6dbee896
commit bc441ab9d6
20 changed files with 122 additions and 77 deletions

View File

@@ -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)