Files
Bubberstation/code/modules/wiremod/shell/server.dm
LemonInTheDark 70651816c2 Fixes complex lights not handling moving well, renames lighting defines (#81423)
## About The Pull Request

[Fixes static lights not
moving](ffef43c05a)

Worked fine when the owner moved, but if the owner was inside something
else, it would try and trigger an update on the PARENT's lights, which
are obviously not us.

[Renames MOVABLE_LIGHT and STATIC_LIGHT to better describe what they
do](de73a63bd4)

People keep trying to change the lighting system of lamps and it makes
me mad.
I choose OVERLAY_LIGHT and COMPLEX_LIGHT here, I couldn't figure out a
better name for turf matrix lighting. Suggestions welcome

## Why It's Good For The Game

Closes #80005
Hopefully improves understanding of lighting at a glance
## Changelog
🆑
fix: Fixes fancy lights not updating their source location when picked
up and moved
/🆑
2024-02-12 20:50:20 +01:00

25 lines
628 B
Plaintext

/**
* # Server
*
* Immobile (but not dense) shells that can interact with
* world.
*/
/obj/structure/server
name = "server"
icon = 'icons/obj/science/circuits.dmi'
icon_state = "setup_stationary"
density = TRUE
light_system = OVERLAY_LIGHT
light_on = FALSE
/obj/structure/server/Initialize(mapload)
. = ..()
AddComponent(/datum/component/shell, null, SHELL_CAPACITY_VERY_LARGE, SHELL_FLAG_REQUIRE_ANCHOR|SHELL_FLAG_USB_PORT)
/obj/structure/server/wrench_act(mob/living/user, obj/item/tool)
set_anchored(!anchored)
tool.play_tool_sound(src)
balloon_alert(user, anchored ? "secured" : "unsecured")
return TRUE