Added simple grilles with construction, deconstruction and destruction. (#4801)

This commit is contained in:
Vera Aguilera Puerto
2021-10-09 10:54:56 +02:00
committed by GitHub
parent f635909d4e
commit 09d40b386a
11 changed files with 171 additions and 0 deletions

View File

@@ -8,6 +8,15 @@
flatReductions:
Blunt: 5
# Like metallic, but without flat reduction so it can be damaged with fists.
- type: damageModifierSet
id: FlimsyMetallic
coefficients:
Blunt: 0.7
Slash: 0.5
Piercing: 0.7
Shock: 1.2
- type: damageModifierSet
id: Inflatable
coefficients:

View File

@@ -0,0 +1,72 @@
- type: entity
id: Grille
parent: BaseStructure
name: grille
description: A flimsy framework of iron rods.
components:
- type: Sprite
netsync: false
drawdepth: Walls
sprite: Structures/Walls/grille.rsi
state: grille
- type: Icon
sprite: Structures/Walls/grille.rsi
state: grille
- type: RCDDeconstructWhitelist
- type: Construction
graph: grille
node: grille
deconstructionTarget: start
- type: Damageable
damageContainer: Inorganic
damageModifierSet: FlimsyMetallic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 20
behaviors:
- !type:ChangeConstructionNodeBehavior
node: grilleBroken
- !type:DoActsBehavior
acts: ["Breakage"]
- type: entity
id: GrilleBroken
parent: Grille
name: grille
description: A flimsy framework of iron rods. It has seen better days.
components:
- type: Sprite
netsync: false
drawdepth: Walls
sprite: Structures/Walls/grille.rsi
state: grille_broken
- type: Icon
sprite: Structures/Walls/grille.rsi
state: grille_broken
- type: RCDDeconstructWhitelist
- type: Construction
graph: grille
node: grilleBroken
deconstructionTarget: start
- type: Physics
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.45,-0.45,0.45,0.45"
mass: 50
layer:
- Passable
mask:
- Passable
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 10
behaviors:
- !type:ChangeConstructionNodeBehavior
node: start
- !type:DoActsBehavior
acts: ["Destruction"]

View File

@@ -0,0 +1,44 @@
- type: constructionGraph
id: grille
start: start
graph:
- node: start
edges:
- to: grille
completed:
- !type:SnapToGrid
southRotation: true
steps:
- material: MetalRod
amount: 2
doAfter: 1
- node: grille
entity: Grille
edges:
- to: start
completed:
- !type:SpawnPrototype
prototype: PartRodMetal1
amount: 2
- !type:DeleteEntity
steps:
- tool: Cutting
doAfter: 0.25
- node: grilleBroken
entity: GrilleBroken
edges:
- to: start
completed:
- !type:SpawnPrototype
prototype: PartRodMetal1
amount: 1
- !type:DeleteEntity
steps:
- tool: Cutting
- to: grille
steps:
- material: MetalRod
amount: 1
doAfter: 0.5

View File

@@ -70,6 +70,23 @@
placementMode: SnapgridCenter
canRotate: false
- type: construction
name: grille
id: Grille
graph: grille
startNode: start
targetNode: grille
category: Structures
description: A flimsy framework of iron rods.
conditions:
- !type:TileNotBlocked
icon:
sprite: Structures/Walls/grille.rsi
state: grille
objectType: Structure
placementMode: SnapgridCenter
canRotate: false
- type: construction
name: window
id: Window

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

View File

@@ -0,0 +1,29 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from https://github.com/tgstation/tgstation at commit 17c603f1d037f22081d446b9a3f3ae8d41f52e86",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "grille"
},
{
"name": "grille_broken"
},
{
"name": "grille_damaged_0"
},
{
"name": "grille_damaged_1"
},
{
"name": "grille_damaged_2"
},
{
"name": "grille_damaged_3"
}
]
}