From c30e4b36db29fd0599768767aed7fb8bda8ce7ec Mon Sep 17 00:00:00 2001 From: Lamrr <96937466+Lamrr@users.noreply.github.com> Date: Sun, 30 Jan 2022 15:47:12 +1100 Subject: [PATCH] Adds dog bed and bed construction. (#6263) --- .../Entities/Structures/Furniture/beds.yml | 48 +++++++++++++++--- .../Construction/Graphs/furniture/bed.yml | 44 ++++++++++++++++ .../Recipes/Construction/furniture.yml | 35 +++++++++++++ .../Furniture/furniture.rsi/dogbed.png | Bin 0 -> 527 bytes .../Furniture/furniture.rsi/meta.json | 5 +- 5 files changed, 124 insertions(+), 8 deletions(-) create mode 100644 Resources/Prototypes/Recipes/Construction/Graphs/furniture/bed.yml create mode 100644 Resources/Textures/Structures/Furniture/furniture.rsi/dogbed.png diff --git a/Resources/Prototypes/Entities/Structures/Furniture/beds.yml b/Resources/Prototypes/Entities/Structures/Furniture/beds.yml index af96ea4b12..cd79f90461 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/beds.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/beds.yml @@ -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 diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/furniture/bed.yml b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/bed.yml new file mode 100644 index 0000000000..fbeb329c7b --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/bed.yml @@ -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 diff --git a/Resources/Prototypes/Recipes/Construction/furniture.yml b/Resources/Prototypes/Recipes/Construction/furniture.yml index 1c40088225..8ebb32697e 100644 --- a/Resources/Prototypes/Recipes/Construction/furniture.yml +++ b/Resources/Prototypes/Recipes/Construction/furniture.yml @@ -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 diff --git a/Resources/Textures/Structures/Furniture/furniture.rsi/dogbed.png b/Resources/Textures/Structures/Furniture/furniture.rsi/dogbed.png new file mode 100644 index 0000000000000000000000000000000000000000..d0f77d358c249efe009deb44e9627ef1dac7c289 GIT binary patch literal 527 zcmV+q0`UEbP)xoT?a$RJw?RrGtxGAxrJ(QgF%CvCww#pVXl(bnN7qrDM?{(9K0q%n-VW zA81N-5)|xE?&H2^Y9lRl$ysu}zMFIIx$nIIAwq-*5h6s0e})!x;mgD2YMU3IT|H{Q z5}*>c-5~&AzE~o<8xb)_bT=Y$g`>kjg0xM<&2CS6F@JIa^xH2tUo0gtst`>j=cK&j zxBmN9vpv|~TXTh+;UYAZoOi=XFRpL467Y0?C*n*xAvwfFMEr`0SS8J6Qvd+(V-7tY z6)^zl@uEuqFl`5 z+3uiPv)3JHc6%rp$4Kfi(Uscq#G9@WaDi0I>!^`(F)ubYVTXch&DI9v8QSg;PQwzG za&SWWpN~LY%X6<*4b5&3gYiss@4E-)i{;muw`x-U9A9;lec zDw9q~=e}@s2t9u)Hlb><8awU?UaJoENWb;prS7E>@KN}kd9PI$c9Zpf