Adds dog bed and bed construction. (#6263)

This commit is contained in:
Lamrr
2022-01-30 15:47:12 +11:00
committed by GitHub
parent d11f7ca8ca
commit c30e4b36db
5 changed files with 124 additions and 8 deletions

View File

@@ -4,10 +4,6 @@
parent: BaseStructure
description: This is used to lie in, sleep in or strap on.
components:
# So that you can put bedsheets on beds again. Would be cool to have a tag
# for this so that only bedsheets can be placed.
- type: PlaceableSurface
placeCentered: true
- type: Physics
bodyType: Static
- type: Fixtures
@@ -24,6 +20,14 @@
- type: Strap
position: Down
rotation: -90
# Construction has to be before PlaceableSurface or you'll place things onto the entity instead of deconstructing it.
- type: Construction
graph: bed
node: bed
# So that you can put bedsheets on beds again. Would be cool to have a tag
# for this so that only bedsheets can be placed.
- type: PlaceableSurface
placeCentered: true
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Metallic
@@ -39,7 +43,37 @@
spawn:
SheetSteel1:
min: 1
max: 1
MaterialCloth1:
max: 2
- type: entity
parent: Bed
id: DogBed
name: dog bed
description: A comfy-looking dog bed. You can even strap your pet in, in case the gravity turns off.
components:
- type: Sprite
state: dogbed
- type: Strap
position: Stand
rotation: 0
- type: Construction
graph: bed
node: dogbed
- type: Damageable
damageModifierSet: Wood
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 75
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
sound:
path: /Audio/Effects/woodhit.ogg
- !type:SpawnEntitiesBehavior
spawn:
MaterialWoodPlank:
min: 1
max: 1
max: 5

View File

@@ -0,0 +1,44 @@
- type: constructionGraph
id: bed
start: start
graph:
- node: start
actions:
- !type:DestroyEntity {}
edges:
- to: bed
completed:
- !type:SnapToGrid { }
steps:
- material: Steel
amount: 2
doAfter: 1
- to: dogbed
completed:
- !type:SnapToGrid { }
steps:
- material: WoodPlank
amount: 10
doAfter: 1
- node: bed
entity: Bed
edges:
- to: start
completed:
- !type:SpawnPrototype
prototype: SheetSteel1
amount: 2
steps:
- tool: Screwing
doAfter: 1
- node: dogbed
entity: DogBed
edges:
- to: start
completed:
- !type:SpawnPrototype
prototype: MaterialWoodPlank1
amount: 10
steps:
- tool: Screwing
doAfter: 1

View File

@@ -272,3 +272,38 @@
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
#beds
- type: construction
id: Bed
name: bed
description: This is used to lie in, sleep in or strap on.
graph: bed
startNode: start
targetNode: bed
category: Furniture
icon:
sprite: Structures/Furniture/furniture.rsi
state: bed
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- type: construction
id: DogBed
name: dog bed
description: A comfy-looking dog bed. You can even strap your pet in, in case the gravity turns off.
graph: bed
startNode: start
targetNode: dogbed
category: Furniture
icon:
sprite: Structures/Furniture/furniture.rsi
state: dogbed
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

View File

@@ -1,7 +1,7 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/11402f6ae62facc2e8bcfa1f8ef5353b26663278",
"copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/d5cb4288ec5f7cb9fb5b6f6e798f4c64cd82cd09",
"size": {
"x": 32,
"y": 32
@@ -10,6 +10,9 @@
{
"name": "bed"
},
{
"name": "dogbed"
},
{
"name": "mattress"
},