Adds small lights and small light bulbs. (#156)
In the future, someone might want to edit the sprites so the bulb is white and not yellow. Here's some screenshots:  
@@ -16,6 +16,7 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
|
||||
public enum LightBulbType
|
||||
{
|
||||
Bulb,
|
||||
Tube,
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,15 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
|
||||
if (!existed) // Insert a light tube if there wasn't any.
|
||||
{
|
||||
switch (BulbType)
|
||||
{
|
||||
case LightBulbType.Tube:
|
||||
_lightBulbContainer.Insert(Owner.EntityManager.SpawnEntity("LightTube"));
|
||||
break;
|
||||
case LightBulbType.Bulb:
|
||||
_lightBulbContainer.Insert(Owner.EntityManager.SpawnEntity("LightBulb"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -950,17 +950,17 @@ entities:
|
||||
pos: 4.5,-9.5
|
||||
rot: -1.570796 rad
|
||||
type: Transform
|
||||
- type: poweredlight
|
||||
- type: poweredsmalllight
|
||||
components:
|
||||
- grid: 0
|
||||
pos: -4,-7
|
||||
rot: -1.5707963267949 rad
|
||||
rot: 1.5707963267949 rad
|
||||
type: Transform
|
||||
- type: poweredlight
|
||||
- type: poweredsmalllight
|
||||
components:
|
||||
- grid: 0
|
||||
pos: 3,-7
|
||||
rot: -1.5707963267949 rad
|
||||
rot: 1.5707963267949 rad
|
||||
type: Transform
|
||||
- type: poweredlight
|
||||
components:
|
||||
|
||||
@@ -47,6 +47,32 @@
|
||||
load: 40
|
||||
bulb: Tube
|
||||
|
||||
- type: entity
|
||||
name: Small Light
|
||||
id: poweredsmalllight
|
||||
parent: wall_light
|
||||
components:
|
||||
- type: Clickable
|
||||
- type: BoundingBox
|
||||
- type: Sprite
|
||||
sprite: Buildings/light_small.rsi
|
||||
state: off
|
||||
|
||||
- type: Icon
|
||||
sprite: Buildings/light_small.rsi
|
||||
state: off
|
||||
|
||||
- type: PointLight
|
||||
energy: 1.0
|
||||
state: Off
|
||||
|
||||
- type: PowerDevice
|
||||
priority: Low
|
||||
|
||||
- type: PoweredLight
|
||||
load: 40
|
||||
bulb: Bulb
|
||||
|
||||
- type: entity
|
||||
parent: BaseItem
|
||||
name: BaseLightbulb
|
||||
@@ -69,3 +95,19 @@
|
||||
- type: Icon
|
||||
sprite: Objects/light_tube.rsi
|
||||
state: normal
|
||||
|
||||
- type: entity
|
||||
parent: BaseLightbulb
|
||||
name: Light Bulb
|
||||
id: LightBulb
|
||||
components:
|
||||
- type: LightBulb
|
||||
bulb: Bulb
|
||||
|
||||
- type: Sprite
|
||||
sprite: Objects/light_bulb.rsi
|
||||
state: normal
|
||||
|
||||
- type: Icon
|
||||
sprite: Objects/light_bulb.rsi
|
||||
state: normal
|
||||
BIN
Resources/Textures/Buildings/light_small.rsi/broken.png
Normal file
|
After Width: | Height: | Size: 446 B |
BIN
Resources/Textures/Buildings/light_small.rsi/burned.png
Normal file
|
After Width: | Height: | Size: 625 B |
BIN
Resources/Textures/Buildings/light_small.rsi/empty.png
Normal file
|
After Width: | Height: | Size: 319 B |
1
Resources/Textures/Buildings/light_small.rsi/meta.json
Normal file
@@ -0,0 +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, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "burned", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "empty", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "off", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "on", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}]}
|
||||
BIN
Resources/Textures/Buildings/light_small.rsi/off.png
Normal file
|
After Width: | Height: | Size: 478 B |
BIN
Resources/Textures/Buildings/light_small.rsi/on.png
Normal file
|
After Width: | Height: | Size: 556 B |
BIN
Resources/Textures/Objects/light_bulb.rsi/broken.png
Normal file
|
After Width: | Height: | Size: 222 B |
BIN
Resources/Textures/Objects/light_bulb.rsi/burned.png
Normal file
|
After Width: | Height: | Size: 354 B |
44
Resources/Textures/Objects/light_bulb.rsi/meta.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"version": 1,
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "Taken from https://github.com/discordia-space/CEV-Eris at commit ad7c8621e5567b1b3b2b609f699b3b80cca785f2",
|
||||
"states": [
|
||||
{
|
||||
"name": "normal",
|
||||
"select": [],
|
||||
"flags": {},
|
||||
"directions": 1,
|
||||
"delays": [
|
||||
[
|
||||
1.0
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "burned",
|
||||
"select": [],
|
||||
"flags": {},
|
||||
"directions": 1,
|
||||
"delays": [
|
||||
[
|
||||
1.0
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "broken",
|
||||
"select": [],
|
||||
"flags": {},
|
||||
"directions": 1,
|
||||
"delays": [
|
||||
[
|
||||
1.0
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
Resources/Textures/Objects/light_bulb.rsi/normal.png
Normal file
|
After Width: | Height: | Size: 224 B |