mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] Overlay lighting component (#469)
* Overlay lighting component (#52413) Sparks no longer lag, projectile beams move super smoothly, same with mobs and whatnot. This also allows for easy expansion into directional lights, field-of-view, wee-woo rotating lights or whatever. It does have a downside: things right-clicked or checked through the alt+click tab will show the light overlay: This is a BYOND limitation, very well worth it IMO. 🆑 add: Smooth movable lighting system implemented. Projectiles, sparks, thrown flashlights or moving mobs with lights should be much smoother and less laggy. balance: Light sources no longer stack in range, though they still do in intensity. /🆑 * Overlay lighting component Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
@@ -20,8 +20,9 @@
|
||||
name = "sparks"
|
||||
icon_state = "sparks"
|
||||
anchored = TRUE
|
||||
light_power = 1.3
|
||||
light_range = MINIMUM_USEFUL_LIGHT_RANGE
|
||||
light_system = MOVABLE_LIGHT
|
||||
light_range = 2
|
||||
light_power = 0.5
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
|
||||
/obj/effect/particle_effect/sparks/Initialize()
|
||||
|
||||
@@ -75,13 +75,19 @@
|
||||
name = "lighting fx obj"
|
||||
desc = "Tell a coder if you're seeing this."
|
||||
icon_state = "nothing"
|
||||
light_system = MOVABLE_LIGHT
|
||||
light_range = MINIMUM_USEFUL_LIGHT_RANGE
|
||||
light_color = COLOR_WHITE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/effect/dummy/lighting_obj/Initialize(mapload, _color, _range, _power, _duration)
|
||||
/obj/effect/dummy/lighting_obj/Initialize(mapload, _range, _power, _color, _duration)
|
||||
. = ..()
|
||||
set_light(_range ? _range : light_range, _power ? _power : light_power, _color ? _color : light_color)
|
||||
if(!isnull(_range))
|
||||
set_light_range(_range)
|
||||
if(!isnull(_power))
|
||||
set_light_power(_power)
|
||||
if(!isnull(_color))
|
||||
set_light_color(_color)
|
||||
if(_duration)
|
||||
QDEL_IN(src, _duration)
|
||||
|
||||
|
||||
@@ -64,3 +64,14 @@
|
||||
|
||||
layer = ATMOS_GROUP_LAYER
|
||||
plane = ATMOS_GROUP_PLANE
|
||||
|
||||
/obj/effect/overlay/light_visible
|
||||
name = ""
|
||||
icon = 'icons/effects/light_overlays/light_32.dmi'
|
||||
icon_state = "light"
|
||||
layer = O_LIGHTING_VISUAL_LAYER
|
||||
plane = O_LIGHTING_VISUAL_PLANE
|
||||
appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
alpha = 0
|
||||
vis_flags = NONE
|
||||
|
||||
Reference in New Issue
Block a user