Unpowered lights and new ground light structure (#6566)

This commit is contained in:
Peptide90
2022-02-09 00:47:33 +00:00
committed by GitHub
parent 7bea452f7e
commit b79b84cc02
7 changed files with 202 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

@@ -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"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B