From b79b84cc02cbefdc61d31ea4073ab85041aa2c44 Mon Sep 17 00:00:00 2001 From: Peptide90 <78795277+Peptide90@users.noreply.github.com> Date: Wed, 9 Feb 2022 00:47:33 +0000 Subject: [PATCH] Unpowered lights and new ground light structure (#6566) --- .../Structures/Wallmounts/lighting.yml | 33 +++++ .../Entities/Structures/lighting_ground.yml | 113 ++++++++++++++++++ .../Graphs/structures/lighting.yml | 21 ++++ .../Recipes/Construction/structures.yml | 18 +++ .../LightPosts/small_light_post.rsi/meta.json | 17 +++ .../LightPosts/small_light_post.rsi/off.png | Bin 0 -> 323 bytes .../LightPosts/small_light_post.rsi/on.png | Bin 0 -> 330 bytes 7 files changed, 202 insertions(+) create mode 100644 Resources/Prototypes/Entities/Structures/lighting_ground.yml create mode 100644 Resources/Textures/Structures/Decoration/LightPosts/small_light_post.rsi/meta.json create mode 100644 Resources/Textures/Structures/Decoration/LightPosts/small_light_post.rsi/off.png create mode 100644 Resources/Textures/Structures/Decoration/LightPosts/small_light_post.rsi/on.png diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml index d560133c17..a5b05972c3 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml @@ -114,6 +114,17 @@ damage: types: Heat: 20 + +- type: entity + parent: WallLight + id: UnpoweredLightLED + suffix: Unpowered, LED + components: + - type: PointLight + radius: 10 + energy: 2.5 + softness: 0.9 + color: "#EEEEFF" - type: entity id: PoweredlightExterior @@ -127,6 +138,17 @@ types: Heat: 20 +- type: entity + parent: WallLight + id: UnpoweredLightExterior + suffix: Unpowered, Exterior + components: + - type: PointLight + radius: 12 + energy: 4.5 + softness: 0.5 + color: "#B4FCF0" + - type: entity id: PoweredlightSodium description: "A light fixture. Draws power and produces light when equipped with a light tube." @@ -138,6 +160,17 @@ damage: types: Heat: 20 + +- type: entity + parent: WallLight + id: UnpoweredLightSodium + suffix: Unpowered, Sodium + components: + - type: PointLight + radius: 10 + energy: 4 + softness: 0.5 + color: "#FFAF38" - type: entity name: small light diff --git a/Resources/Prototypes/Entities/Structures/lighting_ground.yml b/Resources/Prototypes/Entities/Structures/lighting_ground.yml new file mode 100644 index 0000000000..2b2536bdc1 --- /dev/null +++ b/Resources/Prototypes/Entities/Structures/lighting_ground.yml @@ -0,0 +1,113 @@ +- type: entity + abstract: true + parent: BaseStructure + id: BaseLightStructure + components: + - type: Fixtures + fixtures: + - shape: + !type:PhysShapeAabb + bounds: "0.17,0.25,-0.17,-0.30" + mass: 25 + layer: + - MobImpassable + mask: + - Impassable + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Metallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] + - !type:SpawnEntitiesBehavior + spawn: + SheetSteel1: + min: 2 + max: 4 + - !type:EmptyAllContainersBehaviour + - !type:PlaySoundBehavior + sound: + path: /Audio/Effects/metalbreak.ogg + - type: SignalReceiver + inputs: + - name: state + type: bool + - type: UserInterface + interfaces: + - key: enum.SignalReceiverUiKey.Key + type: SignalPortSelectorBoundUserInterface + + +- type: entity + parent: BaseLightStructure + id: LightPostSmall + name: post light + description: "An unpowered light." + suffix: Unpowered + components: + - type: Construction + graph: LightFixture + node: tubeLight + - type: Sprite + sprite: Structures/Decoration/LightPosts/small_light_post.rsi + layers: + - state: on + map: ["enum.PoweredLightLayers.Base"] + state: on + - type: PointLight + radius: 10 + energy: 0.8 + softness: 1 + offset: "0, -0.5" + + +- type: entity + id: PoweredLightPostSmallEmpty + name: post light + description: "A small light post." + suffix: Empty, Powered + parent: BaseLightStructure + components: + - type: Sprite + sprite: Structures/Decoration/LightPosts/small_light_post.rsi + state: off + - type: PointLight + enabled: false + - type: PoweredLight + bulb: Tube + damage: + types: + Heat: 20 + - type: ApcPowerReceiver + - type: ExtensionCableReceiver + - type: DeviceNetworkComponent + deviceNetId: Apc + - type: ApcNetworkConnection + - type: Construction + graph: LightFixture + node: groundLight + - type: Appearance + visuals: + - type: PoweredLightVisualizer + blinkingSound: + path: "/Audio/Machines/light_tube_on.ogg" + +- type: entity + id: PoweredLightPostSmall + name: post light + description: "A light fixture. Draws power and produces light when equipped with a light tube." + suffix: Powered + parent: PoweredLightPostSmallEmpty + components: + - type: Sprite + state: off + - type: PoweredLight + hasLampOnSpawn: LightTube + damage: + types: + Heat: 20 \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/lighting.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/lighting.yml index e8c174ba4f..583a189960 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/lighting.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/lighting.yml @@ -14,6 +14,11 @@ - material: Steel amount: 2 doAfter: 2.0 + - to: groundLight + steps: + - material: Steel + amount: 5 + doAfter: 2.0 - node: tubeLight entity: PoweredlightEmpty edges: @@ -44,6 +49,22 @@ prototype: SheetSteel1 amount: 1 - !type:DeleteEntity {} + - node: groundLight + entity: PoweredLightPostSmallEmpty + edges: + - to: start + conditions: + - !type:ContainerEmpty + container: "light_bulb" + steps: + - tool: Screwing + doAfter: 4.0 + completed: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 5 + - !type:DeleteEntity {} + - type: constructionGraph id: LightSwitch diff --git a/Resources/Prototypes/Recipes/Construction/structures.yml b/Resources/Prototypes/Recipes/Construction/structures.yml index 575d99cdc3..f05fb8bfb1 100644 --- a/Resources/Prototypes/Recipes/Construction/structures.yml +++ b/Resources/Prototypes/Recipes/Construction/structures.yml @@ -450,6 +450,24 @@ conditions: # Same here. - 20kdc - !type:TileNotBlocked + +- type: construction + name: ground light post + id: LightGroundFixture + graph: LightFixture + startNode: start + targetNode: groundLight + category: Structures + description: A ground light fixture. Use light bulbs. + icon: + sprite: Structures/Decoration/LightPosts/small_light_post.rsi + state: off + objectType: Structure + placementMode: SnapgridCenter + canRotate: false + canBuildInImpassable: false + conditions: + - !type:TileNotBlocked - type: construction name: light switch diff --git a/Resources/Textures/Structures/Decoration/LightPosts/small_light_post.rsi/meta.json b/Resources/Textures/Structures/Decoration/LightPosts/small_light_post.rsi/meta.json new file mode 100644 index 0000000000..1a05278b0a --- /dev/null +++ b/Resources/Textures/Structures/Decoration/LightPosts/small_light_post.rsi/meta.json @@ -0,0 +1,17 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "By Peptide90 for SS14", + "states": [ + { + "name": "off" + }, + { + "name": "on" + } + ] +} diff --git a/Resources/Textures/Structures/Decoration/LightPosts/small_light_post.rsi/off.png b/Resources/Textures/Structures/Decoration/LightPosts/small_light_post.rsi/off.png new file mode 100644 index 0000000000000000000000000000000000000000..b227174466180bc094ea98323e9c5ddac0fa2082 GIT binary patch literal 323 zcmV-J0lfZ+P)Px#{YgYYR9J=Wl)*}cKoo|*LQ&9#+l1CP=s|oRAH?_ZA%a>2wQ&>F#)S)oBOd53 zE=AV8w>jXnX}*=t{2sn>&I|+sfk5EDb72YBb^Y#=YnsNnZe$SvNRs62{5;R5dS(HD zIF65wFUw-CWfmyQa`m3)`RDUEj(!EIsv=EOilP7@%Q66_X#!vv21LXpaA`_=APAUx zpl#b#(|yN#69R|`B0?0cKULKqV=ipI1?T?Ip9okn30PORxquH$0@hn@a{(Wi1XT6c zjP))s34A^0A2O=yBzCfPx$1W80eR9J=Wl)Y-hFcgJPgM}9pyvESYkU-wf58}~pRcMAn1I9}sSv(ly;Tl~? zhR_nH`OztHGeqBHOV@`_)|CK{$K&xlJ1I0Kzc5I^Xv_l}8Hz zfHCImxV4tfq6Ly98N5eP^z+udI6mj!GOFq%b}^GFetTbGxtQZ?vpqZin#}O=xgJlTu4@2uR8@6R c;85ev9-{F}5IkVr1poj507*qoM6N<$f-K32Hvj+t literal 0 HcmV?d00001