mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Lighting Optimizations (#13593)
* Lighting Optimizations * styling * styling * welp
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
icon = LIGHTING_ICON
|
||||
icon_state = "transparent"
|
||||
color = LIGHTING_BASE_MATRIX
|
||||
color = null //we manually set color in init instead
|
||||
plane = LIGHTING_PLANE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
layer = LIGHTING_LAYER
|
||||
@@ -18,6 +18,9 @@
|
||||
/atom/movable/lighting_object/Initialize(mapload)
|
||||
. = ..()
|
||||
verbs.Cut()
|
||||
//We avoid setting this in the base as if we do then the parent atom handling will add_atom_color it and that
|
||||
//is totally unsuitable for this object, as we are always changing it's colour manually
|
||||
color = LIGHTING_BASE_MATRIX
|
||||
|
||||
myturf = loc
|
||||
if(myturf.lighting_object)
|
||||
@@ -29,11 +32,11 @@
|
||||
S.update_starlight()
|
||||
|
||||
needs_update = TRUE
|
||||
GLOB.lighting_update_objects += src
|
||||
SSlighting.objects_queue += src
|
||||
|
||||
/atom/movable/lighting_object/Destroy(var/force)
|
||||
/atom/movable/lighting_object/Destroy(force)
|
||||
if(force)
|
||||
GLOB.lighting_update_objects -= src
|
||||
SSlighting.objects_queue -= src
|
||||
if(loc != myturf)
|
||||
var/turf/oldturf = get_turf(myturf)
|
||||
var/turf/newturf = get_turf(loc)
|
||||
@@ -143,6 +146,6 @@
|
||||
return
|
||||
|
||||
// Override here to prevent things accidentally moving around overlays.
|
||||
/atom/movable/lighting_object/forceMove(atom/destination, var/no_tp=FALSE, var/harderforce = FALSE)
|
||||
/atom/movable/lighting_object/forceMove(atom/destination, no_tp = FALSE, harderforce = FALSE)
|
||||
if(harderforce)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user