Chain link fencing (#18956)

This commit is contained in:
Kara
2023-08-10 07:16:25 -07:00
committed by GitHub
parent c10b01c465
commit baddcf1b26
21 changed files with 587 additions and 4 deletions

View File

@@ -0,0 +1,327 @@
- type: entity
parent: BaseStructure
id: BaseFenceMetal
name: chain link fence
description: A metal piece of fencing cordoning off something likely very important.
abstract: true
components:
- type: MeleeSound
soundGroups:
Brute:
path:
"/Audio/Weapons/grille_hit.ogg"
- type: Tag
tags:
- RCDDeconstructWhitelist
- type: Sprite
sprite: Structures/Walls/fence.rsi
drawdepth: WallTops
- type: Physics
bodyType: Static
- type: Transform
anchored: true
- type: Damageable
damageContainer: Inorganic
damageModifierSet: FlimsyMetallic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 200
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 150
behaviors:
- !type:PlaySoundBehavior
sound:
path: /Audio/Effects/metalbreak.ogg
- !type:SpawnEntitiesBehavior
spawn:
PartRodMetal1:
min: 3
max: 5
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Climbable
delay: 5.0
startClimbSound:
collection: FenceRattle
finishClimbSound:
collection: FenceRattle
- type: PowerConsumer
showInMonitor: false
- type: Electrified
requirePower: true
noWindowInTile: true
highVoltageNode: high
mediumVoltageNode: medium
lowVoltageNode: low
- type: NodeContainer
nodes:
high:
!type:CableDeviceNode
nodeGroupID: HVPower
medium:
!type:CableDeviceNode
nodeGroupID: MVPower
low:
!type:CableDeviceNode
nodeGroupID: Apc
- type: Appearance
- type: GenericVisualizer
visuals:
enum.ElectrifiedVisuals.IsPowered:
enum.ElectrifiedLayers.Powered:
True: { visible: True }
False: { visible: False }
- type: AnimationPlayer
- type: entity
parent: BaseFenceMetal
id: FenceMetalBroken
name: broken chain link fence
description: Someone got real mad at an inanimate object.
components:
- type: Sprite
layers:
- state: straight_broken
- state: electrified
sprite: Effects/electricity.rsi
map: ["enum.ElectrifiedLayers.Powered"]
shader: unshaded
visible: false
- type: Physics
canCollide: false
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.10,-0.5,0.10,0.5"
density: 1000
mask:
- FullTileMask
layer:
- TableLayer
- type: InteractionPopup
interactSuccessString: fence-rattle-success
messagePerceivedByOthers: fence-rattle-success
interactSuccessSound:
collection: FenceRattle
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 50
behaviors:
- !type:PlaySoundBehavior
sound:
path: /Audio/Effects/metalbreak.ogg
- !type:SpawnEntitiesBehavior
spawn:
PartRodMetal1:
min: 1
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Construction
graph: FenceMetal
node: broken
- type: entity
parent: BaseFenceMetal
id: FenceMetalStraight
suffix: Straight
components:
- type: Icon
sprite: Structures/Walls/fence.rsi
state: icon_straight
- type: Sprite
layers:
- state: straight
- state: electrified
sprite: Effects/electricity.rsi
map: ["enum.ElectrifiedLayers.Powered"]
shader: unshaded
visible: false
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.10,-0.5,0.10,0.5"
density: 1000
mask:
- FullTileMask
layer:
- TableLayer
- type: InteractionPopup
interactSuccessString: fence-rattle-success
messagePerceivedByOthers: fence-rattle-success
interactSuccessSound:
collection: FenceRattle
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 200
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:PlaySoundBehavior
sound:
path: /Audio/Items/wirecutter.ogg
- !type:SpawnEntitiesBehavior
spawn:
PartRodMetal1:
min: 2
max: 4
- !type:ChangeConstructionNodeBehavior
node: broken
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Construction
graph: FenceMetal
node: straight
- type: entity
parent: BaseFenceMetal
id: FenceMetalCorner
suffix: Corner
components:
- type: Sprite
layers:
- state: corner
- state: electrified
sprite: Effects/electricity.rsi
map: ["enum.ElectrifiedLayers.Powered"]
shader: unshaded
visible: false
- type: Fixtures
fixtures:
# needs two shapes to properly handle a triangle corner without weirdness
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.1,-0.1,0.1,0.5"
density: 1000
mask:
- TableMask
layer:
- TableLayer
fix2:
shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.1,-0.1,0.1"
density: 1000
mask:
- TableMask
layer:
- TableLayer
- type: InteractionPopup
interactSuccessString: fence-rattle-success
messagePerceivedByOthers: fence-rattle-success
interactSuccessSound:
collection: FenceRattle
- type: Construction
graph: FenceMetal
node: corner
- type: entity
parent: BaseFenceMetal
id: FenceMetalEnd
suffix: End
components:
- type: Icon
sprite: Structures/Walls/fence.rsi
state: icon_end
- type: Sprite
layers:
- state: end
- state: electrified
sprite: Effects/electricity.rsi
map: ["enum.ElectrifiedLayers.Powered"]
shader: unshaded
visible: false
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.1,-0.5,0.1,0.0"
density: 1000
mask:
- TableMask
layer:
- TableLayer
- type: InteractionPopup
interactSuccessString: fence-rattle-success
messagePerceivedByOthers: fence-rattle-success
interactSuccessSound:
collection: FenceRattle
- type: Construction
graph: FenceMetal
node: end
- type: entity
parent: BaseFenceMetal
id: FenceMetalGate
name: chain link fence gate
description: You could use the door instead of vaulting over--if you're a COWARD, that is.
components:
- type: Sprite
layers:
- state: end
map: ["enum.DoorVisualLayers.Base"]
- state: electrified
sprite: Effects/electricity.rsi
map: [ "enum.ElectrifiedLayers.Powered" ]
shader: unshaded
visible: false
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.1,0.5,0.1"
density: 1000
mask:
- TableMask
layer:
- TableLayer
- type: InteractionOutline
- type: Door
openSpriteState: door_opened
closedSpriteState: door_closed
canPry: false
occludes: false
changeAirtight: false
bumpOpen: false
clickOpen: true
canCrush: false
closeTimeOne: 0
closeTimeTwo: 0
openTimeOne: 0
openTimeTwo: 0
openingAnimationTime: 0
closingAnimationTime: 0
openSound:
path: /Audio/Effects/door_open.ogg
closeSound:
path: /Audio/Effects/door_close.ogg
- type: Construction
graph: FenceMetal
node: gate

View File

@@ -0,0 +1,112 @@
- type: constructionGraph
id: FenceMetal
start: start
graph:
- node: start
actions:
- !type:DeleteEntity { }
edges:
- to: straight
completed:
- !type:SnapToGrid
southRotation: true
steps:
- material: MetalRod
amount: 5
doAfter: 6
- to: corner
completed:
- !type:SnapToGrid
southRotation: true
steps:
- material: MetalRod
amount: 5
doAfter: 6
- to: end
completed:
- !type:SnapToGrid
southRotation: true
steps:
- material: MetalRod
amount: 5
doAfter: 6
- to: gate
completed:
- !type:SnapToGrid
southRotation: true
steps:
- material: MetalRod
amount: 5
doAfter: 6
- node: straight
entity: FenceMetalStraight
edges:
- to: broken
completed:
- !type:SpawnPrototype
prototype: PartRodMetal1
amount: 1
steps:
- tool: Welding
doAfter: 4.0
- tool: Cutting
doAfter: 1.0
- node: corner
entity: FenceMetalCorner
edges:
- to: start
completed:
- !type:SpawnPrototype
prototype: PartRodMetal1
amount: 5
- !type:DeleteEntity
steps:
- tool: Welding
doAfter: 4.0
- tool: Cutting
doAfter: 2.0
- node: end
entity: FenceMetalEnd
edges:
- to: start
completed:
- !type:SpawnPrototype
prototype: PartRodMetal1
amount: 5
- !type:DeleteEntity
steps:
- tool: Welding
doAfter: 4.0
- tool: Cutting
doAfter: 2.0
- node: gate
entity: FenceMetalGate
edges:
- to: start
completed:
- !type:SpawnPrototype
prototype: PartRodMetal1
amount: 5
- !type:DeleteEntity
steps:
- tool: Welding
doAfter: 4.0
- tool: Cutting
doAfter: 2.0
- node: broken
entity: FenceMetalBroken
edges:
- to: start
completed:
- !type:SpawnPrototype
prototype: PartRodMetal1
amount: 1
- !type:DeleteEntity
steps:
- tool: Cutting
doAfter: 1.0

View File

@@ -627,6 +627,75 @@
conditions:
- !type:TileNotBlocked
# Chain link fencing
- type: construction
name: chain link fence
id: FenceMetal
graph: FenceMetal
startNode: start
targetNode: straight
category: construction-category-structures
description: Part of a chain link fence meant to cordon off areas.
icon:
sprite: Structures/Walls/fence.rsi
state: straight
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- type: construction
name: chain link fence corner
id: FenceMetalCorner
graph: FenceMetal
startNode: start
targetNode: corner
category: construction-category-structures
description: Part of a chain link fence meant to cordon off areas.
icon:
sprite: Structures/Walls/fence.rsi
state: corner
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- type: construction
name: chain link fence end-piece
id: FenceMetalEnd
graph: FenceMetal
startNode: start
targetNode: end
category: construction-category-structures
description: Part of a chain link fence meant to cordon off areas.
icon:
sprite: Structures/Walls/fence.rsi
state: end
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- type: construction
name: chain link fence gate
id: FenceMetalGate
graph: FenceMetal
startNode: start
targetNode: gate
category: construction-category-structures
description: An easy way to get through a chain link fence.
icon:
sprite: Structures/Walls/fence.rsi
state: door_closed
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- type: construction
name: airlock
id: Airlock

View File

@@ -0,0 +1,6 @@
- type: soundCollection
id: FenceRattle
files:
- /Audio/Effects/fence_rattle1.ogg
- /Audio/Effects/fence_rattle2.ogg
- /Audio/Effects/fence_rattle3.ogg