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:
![image](https://user-images.githubusercontent.com/6766154/54878560-d9242e80-4e2e-11e9-8fde-39ae082f34b0.png)
![image](https://user-images.githubusercontent.com/6766154/54878572-f3f6a300-4e2e-11e9-95a1-253a5504922f.png)
This commit is contained in:
Víctor Aguilera Puerto
2019-03-24 18:05:32 +01:00
committed by Pieter-Jan Briers
parent 03856b79b4
commit d9ff72c907
14 changed files with 101 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ namespace Content.Server.GameObjects.Components.Power
public enum LightBulbType
{
Bulb,
Tube,
}

View File

@@ -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;
}
}
}
}

View File

@@ -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:

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

View 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]]}]}

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

View 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
]
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B