mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
[MIRROR] Opacity refactor (#405)
* Opacity refactor (#52881) Moves all opacity var manipulation to a proc which sends a signal. light_blocker element for movable opaque atoms made, which tracks its movement and updates the affected turfs for proper lighting updates. has_opaque_atom boolean replaced by the opacity_sources lazylist to keep track of the sources, and a directional_opacity which serves a similar function but also allows for future expansion with on-border opaque objects (not yet implemented). Some opacity-related sight procs optimized as a result of this. Some variables moved to the object's definition. A define or two added into the mix for clarity. Some code cleaning, like turning booleans into their defines. One file renamed for clarity. Changelog cl balance: Mechs no longer block sight. It's a non-trivial cost for the lighting system with little to no gain. /cl * Opacity refactor Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/obj/effect/particle_effect/expl_particles
|
||||
name = "fire"
|
||||
icon_state = "explosion_particle"
|
||||
opacity = 1
|
||||
opacity = TRUE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/effect/particle_effect/expl_particles/Initialize()
|
||||
@@ -27,7 +27,7 @@
|
||||
name = "fire"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "explosion"
|
||||
opacity = 1
|
||||
opacity = TRUE
|
||||
anchored = TRUE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
pixel_x = -32
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/obj/effect/particle_effect/foam
|
||||
name = "foam"
|
||||
icon_state = "foam"
|
||||
opacity = 0
|
||||
opacity = FALSE
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
layer = EDGED_TURF_LAYER
|
||||
@@ -257,7 +257,7 @@
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "metalfoam"
|
||||
density = TRUE
|
||||
opacity = 1 // changed in New()
|
||||
opacity = TRUE // changed in New()
|
||||
anchored = TRUE
|
||||
layer = EDGED_TURF_LAYER
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
icon_state = "smoke"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
opacity = 0
|
||||
opacity = FALSE
|
||||
layer = FLY_LAYER
|
||||
anchored = TRUE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
Reference in New Issue
Block a user