Files
Bubberstation/code/game/objects/effects/forcefields.dm
SkyratBot 72c69368b6 [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>
2020-08-19 04:48:14 +02:00

39 lines
899 B
Plaintext

/obj/effect/forcefield
desc = "A space wizard's magic wall."
name = "FORCEWALL"
icon_state = "m_shield"
anchored = TRUE
opacity = FALSE
density = TRUE
CanAtmosPass = ATMOS_PASS_DENSITY
var/timeleft = 300 //Set to 0 for permanent forcefields (ugh)
/obj/effect/forcefield/Initialize()
. = ..()
if(timeleft)
QDEL_IN(src, timeleft)
/obj/effect/forcefield/singularity_pull()
return
/obj/effect/forcefield/cult
desc = "An unholy shield that blocks all attacks."
name = "glowing wall"
icon = 'icons/effects/cult_effects.dmi'
icon_state = "cultshield"
CanAtmosPass = ATMOS_PASS_NO
timeleft = 200
///////////Mimewalls///////////
/obj/effect/forcefield/mime
icon_state = "nothing"
name = "invisible wall"
desc = "You have a bad feeling about this."
alpha = 0
/obj/effect/forcefield/mime/advanced
name = "invisible blockade"
desc = "You're gonna be here awhile."
timeleft = 600