diff --git a/Content.Server/GameObjects/Components/Power/LightBulbComponent.cs b/Content.Server/GameObjects/Components/Power/LightBulbComponent.cs index d5f56baaea..d7ab69e8c8 100644 --- a/Content.Server/GameObjects/Components/Power/LightBulbComponent.cs +++ b/Content.Server/GameObjects/Components/Power/LightBulbComponent.cs @@ -16,6 +16,7 @@ namespace Content.Server.GameObjects.Components.Power public enum LightBulbType { + Bulb, Tube, } diff --git a/Content.Server/GameObjects/Components/Power/PoweredLightComponent.cs b/Content.Server/GameObjects/Components/Power/PoweredLightComponent.cs index 555ab4ea2b..e93ab3089e 100644 --- a/Content.Server/GameObjects/Components/Power/PoweredLightComponent.cs +++ b/Content.Server/GameObjects/Components/Power/PoweredLightComponent.cs @@ -187,7 +187,15 @@ namespace Content.Server.GameObjects.Components.Power if (!existed) // Insert a light tube if there wasn't any. { - _lightBulbContainer.Insert(Owner.EntityManager.SpawnEntity("LightTube")); + switch (BulbType) + { + case LightBulbType.Tube: + _lightBulbContainer.Insert(Owner.EntityManager.SpawnEntity("LightTube")); + break; + case LightBulbType.Bulb: + _lightBulbContainer.Insert(Owner.EntityManager.SpawnEntity("LightBulb")); + break; + } } } } diff --git a/Resources/Maps/stationstation.yml b/Resources/Maps/stationstation.yml index b0924ee8e8..07c5f87532 100644 --- a/Resources/Maps/stationstation.yml +++ b/Resources/Maps/stationstation.yml @@ -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: diff --git a/Resources/Prototypes/Entities/Lights.yml b/Resources/Prototypes/Entities/Lights.yml index c93e9463e3..fbcf4e8ac2 100644 --- a/Resources/Prototypes/Entities/Lights.yml +++ b/Resources/Prototypes/Entities/Lights.yml @@ -46,6 +46,32 @@ - type: PoweredLight 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 @@ -68,4 +94,20 @@ - 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 \ No newline at end of file diff --git a/Resources/Textures/Buildings/light_small.rsi/broken.png b/Resources/Textures/Buildings/light_small.rsi/broken.png new file mode 100644 index 0000000000..cb77054e03 Binary files /dev/null and b/Resources/Textures/Buildings/light_small.rsi/broken.png differ diff --git a/Resources/Textures/Buildings/light_small.rsi/burned.png b/Resources/Textures/Buildings/light_small.rsi/burned.png new file mode 100644 index 0000000000..7a65e4e83d Binary files /dev/null and b/Resources/Textures/Buildings/light_small.rsi/burned.png differ diff --git a/Resources/Textures/Buildings/light_small.rsi/empty.png b/Resources/Textures/Buildings/light_small.rsi/empty.png new file mode 100644 index 0000000000..3ca0505a9b Binary files /dev/null and b/Resources/Textures/Buildings/light_small.rsi/empty.png differ diff --git a/Resources/Textures/Buildings/light_small.rsi/meta.json b/Resources/Textures/Buildings/light_small.rsi/meta.json new file mode 100644 index 0000000000..93bb6510da --- /dev/null +++ b/Resources/Textures/Buildings/light_small.rsi/meta.json @@ -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]]}]} \ No newline at end of file diff --git a/Resources/Textures/Buildings/light_small.rsi/off.png b/Resources/Textures/Buildings/light_small.rsi/off.png new file mode 100644 index 0000000000..884262b5ab Binary files /dev/null and b/Resources/Textures/Buildings/light_small.rsi/off.png differ diff --git a/Resources/Textures/Buildings/light_small.rsi/on.png b/Resources/Textures/Buildings/light_small.rsi/on.png new file mode 100644 index 0000000000..558b9ab5cb Binary files /dev/null and b/Resources/Textures/Buildings/light_small.rsi/on.png differ diff --git a/Resources/Textures/Objects/light_bulb.rsi/broken.png b/Resources/Textures/Objects/light_bulb.rsi/broken.png new file mode 100644 index 0000000000..f9383a51ad Binary files /dev/null and b/Resources/Textures/Objects/light_bulb.rsi/broken.png differ diff --git a/Resources/Textures/Objects/light_bulb.rsi/burned.png b/Resources/Textures/Objects/light_bulb.rsi/burned.png new file mode 100644 index 0000000000..7f193b6011 Binary files /dev/null and b/Resources/Textures/Objects/light_bulb.rsi/burned.png differ diff --git a/Resources/Textures/Objects/light_bulb.rsi/meta.json b/Resources/Textures/Objects/light_bulb.rsi/meta.json new file mode 100644 index 0000000000..e5ffb23a14 --- /dev/null +++ b/Resources/Textures/Objects/light_bulb.rsi/meta.json @@ -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 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/light_bulb.rsi/normal.png b/Resources/Textures/Objects/light_bulb.rsi/normal.png new file mode 100644 index 0000000000..71a2ea3721 Binary files /dev/null and b/Resources/Textures/Objects/light_bulb.rsi/normal.png differ