Files
tbd-station-14/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs
Centronias ef506006b3 Toggleable flashlight (#106)
Fixes second half of #92 

Regarding the first half, Digitalis explained in discord that when an entity is picked up, visible components are made invisible by making the entire Godot scene node for the entity (based on the GodotTransformComponent) not visible. It's probably possible to exempt the pointlight from that invisibility, but that seems hacky and it seems like something that should be covered by a generic "items equipped in hands are visible" design.

Adds:
- Handheld light component for toggling light activation
- Lantern sprite with on and off layers
- Lantern prototype updates

Known issues:
- When light is on and on the ground, hovering over it with the cursor does not produce the outline effect. I'm not sure, but I think this is caused by the way I implemented the illuminated layer as an entire sprite rather than just the illuminated part. The outline only works on the first layer maybe? I checked it against the welder in its on state and it doesn't seem to outline the flame.
- Illuminated sprite (layer 1) is an entire flashlight, so to make it look okay, the whole first layer is turned off. Would be better / more correct to follow the example of the welder and just create an illuminated "cap" to overlay on the dark extinguished layer. I'd whip up some coder art myself, but I don't have the right tools to handle transparency.
- Illuminated sprite is slightly different from the extinguished sprite, so turning on the light makes it a little bit shorter.
2018-08-28 17:39:20 +02:00

2.2 KiB