Glowy lights - light fixtures now actually glow (#23428)
* glowy lights - makes light fixtures actually physically glow when active * serviced the lights * ya sure
@@ -30,6 +30,9 @@ public sealed class PoweredLightVisualizerSystem : VisualizerSystem<PoweredLight
|
|||||||
if (comp.SpriteStateMap.TryGetValue(state, out var spriteState))
|
if (comp.SpriteStateMap.TryGetValue(state, out var spriteState))
|
||||||
args.Sprite.LayerSetState(PoweredLightLayers.Base, spriteState);
|
args.Sprite.LayerSetState(PoweredLightLayers.Base, spriteState);
|
||||||
|
|
||||||
|
if (args.Sprite.LayerExists(PoweredLightLayers.Glow))
|
||||||
|
args.Sprite.LayerSetVisible(PoweredLightLayers.Glow, state == PoweredLightState.On);
|
||||||
|
|
||||||
SetBlinkingAnimation(
|
SetBlinkingAnimation(
|
||||||
uid,
|
uid,
|
||||||
state == PoweredLightState.On
|
state == PoweredLightState.On
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ namespace Content.Shared.Light
|
|||||||
|
|
||||||
public enum PoweredLightLayers : byte
|
public enum PoweredLightLayers : byte
|
||||||
{
|
{
|
||||||
Base
|
Base,
|
||||||
|
Glow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,9 +26,12 @@
|
|||||||
sprite: Structures/Wallmounts/Lighting/light_tube.rsi
|
sprite: Structures/Wallmounts/Lighting/light_tube.rsi
|
||||||
drawdepth: WallMountedItems
|
drawdepth: WallMountedItems
|
||||||
layers:
|
layers:
|
||||||
- state: on
|
- map: ["enum.PoweredLightLayers.Base"]
|
||||||
map: ["enum.PoweredLightLayers.Base"]
|
state: base
|
||||||
state: on
|
- map: ["enum.PoweredLightLayers.Glow"]
|
||||||
|
state: glow
|
||||||
|
shader: unshaded
|
||||||
|
state: base
|
||||||
- type: PointLight
|
- type: PointLight
|
||||||
radius: 10
|
radius: 10
|
||||||
energy: 0.8
|
energy: 0.8
|
||||||
@@ -98,6 +101,12 @@
|
|||||||
- type: PoweredLightVisuals
|
- type: PoweredLightVisuals
|
||||||
blinkingSound:
|
blinkingSound:
|
||||||
path: "/Audio/Machines/light_tube_on.ogg"
|
path: "/Audio/Machines/light_tube_on.ogg"
|
||||||
|
spriteStateMap:
|
||||||
|
empty: empty
|
||||||
|
off: base
|
||||||
|
on: base
|
||||||
|
broken: broken
|
||||||
|
burned: burned
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: Poweredlight
|
id: Poweredlight
|
||||||
@@ -106,7 +115,7 @@
|
|||||||
parent: PoweredlightEmpty
|
parent: PoweredlightEmpty
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
state: off
|
state: base
|
||||||
- type: PointLight
|
- type: PointLight
|
||||||
enabled: true
|
enabled: true
|
||||||
- type: PoweredLight
|
- type: PoweredLight
|
||||||
@@ -208,7 +217,7 @@
|
|||||||
path: /Audio/Ambience/Objects/light_hum.ogg
|
path: /Audio/Ambience/Objects/light_hum.ogg
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Structures/Wallmounts/Lighting/light_small.rsi
|
sprite: Structures/Wallmounts/Lighting/light_small.rsi
|
||||||
state: on
|
state: base
|
||||||
- type: PointLight
|
- type: PointLight
|
||||||
energy: 1.0
|
energy: 1.0
|
||||||
radius: 6
|
radius: 6
|
||||||
@@ -272,6 +281,12 @@
|
|||||||
range: 200
|
range: 200
|
||||||
- type: Appearance
|
- type: Appearance
|
||||||
- type: PoweredLightVisuals
|
- type: PoweredLightVisuals
|
||||||
|
spriteStateMap:
|
||||||
|
empty: empty
|
||||||
|
off: base
|
||||||
|
on: base
|
||||||
|
broken: broken
|
||||||
|
burned: burned
|
||||||
- type: DeviceLinkSink
|
- type: DeviceLinkSink
|
||||||
ports:
|
ports:
|
||||||
- On
|
- On
|
||||||
@@ -284,7 +299,7 @@
|
|||||||
parent: PoweredSmallLightEmpty
|
parent: PoweredSmallLightEmpty
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
state: off
|
state: base
|
||||||
- type: PointLight
|
- type: PointLight
|
||||||
enabled: true
|
enabled: true
|
||||||
- type: PoweredLight
|
- type: PoweredLight
|
||||||
|
|||||||
@@ -8,9 +8,12 @@
|
|||||||
sprite: Structures/Wallmounts/service_light.rsi
|
sprite: Structures/Wallmounts/service_light.rsi
|
||||||
drawdepth: WallMountedItems
|
drawdepth: WallMountedItems
|
||||||
layers:
|
layers:
|
||||||
- state: off
|
- map: ["enum.PoweredLightLayers.Base"]
|
||||||
map: ["enum.PoweredLightLayers.Base"]
|
state: base
|
||||||
state: off
|
- map: ["enum.PoweredLightLayers.Glow"]
|
||||||
|
state: glow
|
||||||
|
shader: unshaded
|
||||||
|
state: base
|
||||||
- type: PointLight
|
- type: PointLight
|
||||||
radius: 1
|
radius: 1
|
||||||
energy: 1
|
energy: 1
|
||||||
|
|||||||
@@ -1045,7 +1045,7 @@
|
|||||||
description: A wall light fixture. Use light tubes.
|
description: A wall light fixture. Use light tubes.
|
||||||
icon:
|
icon:
|
||||||
sprite: Structures/Wallmounts/Lighting/light_tube.rsi
|
sprite: Structures/Wallmounts/Lighting/light_tube.rsi
|
||||||
state: off
|
state: base
|
||||||
objectType: Structure
|
objectType: Structure
|
||||||
placementMode: SnapgridCenter
|
placementMode: SnapgridCenter
|
||||||
canRotate: true
|
canRotate: true
|
||||||
@@ -1065,7 +1065,7 @@
|
|||||||
description: A wall light fixture. Use light bulbs.
|
description: A wall light fixture. Use light bulbs.
|
||||||
icon:
|
icon:
|
||||||
sprite: Structures/Wallmounts/Lighting/light_small.rsi
|
sprite: Structures/Wallmounts/Lighting/light_small.rsi
|
||||||
state: off
|
state: base
|
||||||
objectType: Structure
|
objectType: Structure
|
||||||
placementMode: SnapgridCenter
|
placementMode: SnapgridCenter
|
||||||
canRotate: true
|
canRotate: true
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 618 B |
|
After Width: | Height: | Size: 9.2 KiB |
@@ -1 +1 @@
|
|||||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/blob/2b969adc2dfd3e9621bf3597c5cbffeb3ac8c9f0/icons/obj/lighting.dmi", "states": [{"name": "broken", "directions": 4}, {"name": "burned", "directions": 4}, {"name": "empty", "directions": 4}, {"name": "off", "directions": 4}, {"name": "on", "directions": 4}]}
|
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/blob/2b969adc2dfd3e9621bf3597c5cbffeb3ac8c9f0/icons/obj/lighting.dmi", "states": [{"name": "broken", "directions": 4}, {"name": "burned", "directions": 4}, {"name": "empty", "directions": 4}, {"name": "base", "directions": 4}, {"name": "glow", "directions": 4}]}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 694 B |
|
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 679 B |
|
After Width: | Height: | Size: 9.1 KiB |
@@ -62,7 +62,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "off",
|
"name": "base",
|
||||||
"directions": 4,
|
"directions": 4,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
@@ -80,22 +80,8 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "on",
|
"name": "glow",
|
||||||
"directions": 4,
|
"directions": 4
|
||||||
"delays": [
|
|
||||||
[
|
|
||||||
1
|
|
||||||
],
|
|
||||||
[
|
|
||||||
1
|
|
||||||
],
|
|
||||||
[
|
|
||||||
1
|
|
||||||
],
|
|
||||||
[
|
|
||||||
1
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 864 B |
|
Before Width: | Height: | Size: 765 B After Width: | Height: | Size: 765 B |
|
After Width: | Height: | Size: 9.2 KiB |
@@ -20,11 +20,11 @@
|
|||||||
"directions": 4
|
"directions": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "off",
|
"name": "base",
|
||||||
"directions": 4
|
"directions": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "on",
|
"name": "glow",
|
||||||
"directions": 4,
|
"directions": 4,
|
||||||
"delays": [
|
"delays": [
|
||||||
[
|
[
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.1 KiB |