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 18:46:39 +02:00
committed by skull132
parent ed6dbee896
commit bc441ab9d6
20 changed files with 122 additions and 77 deletions
+4 -3
View File
@@ -14,7 +14,7 @@
// The proc you should always use to set the light of this atom.
/atom/proc/set_light(var/l_range, var/l_power, var/l_color = NONSENSICAL_VALUE, var/uv = NONSENSICAL_VALUE, var/no_update = FALSE)
lprof_write(src, "atom_setlight")
L_PROF(src, "atom_setlight")
if(l_range > 0 && l_range < MINIMUM_USEFUL_LIGHT_RANGE)
l_range = MINIMUM_USEFUL_LIGHT_RANGE //Brings the range up to 1.4, which is just barely brighter than the soft lighting that surrounds players.
@@ -38,6 +38,7 @@
#undef NONSENSICAL_VALUE
/atom/proc/set_uv(var/intensity, var/no_update)
L_PROF(src, "atom_setuv")
if (intensity < 0 || intensity > 255)
intensity = min(max(intensity, 255), 0)
@@ -55,7 +56,7 @@
if (gcDestroyed)
return
lprof_write(src, "atom_update")
L_PROF(src, "atom_update")
if (!light_power || !light_range) // We won't emit light anyways, destroy the light source.
if(light)
@@ -104,7 +105,7 @@
if (new_opacity == opacity)
return
lprof_write(src, "atom_setopacity")
L_PROF(src, "atom_setopacity")
opacity = new_opacity
var/turf/T = loc