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 0000000000..d0f77d358c Binary files /dev/null and b/Resources/Textures/Structures/Furniture/furniture.rsi/dogbed.png differ diff --git a/Resources/Textures/Structures/Furniture/furniture.rsi/meta.json b/Resources/Textures/Structures/Furniture/furniture.rsi/meta.json index 3484714552..113b36f087 100644 --- a/Resources/Textures/Structures/Furniture/furniture.rsi/meta.json +++ b/Resources/Textures/Structures/Furniture/furniture.rsi/meta.json @@ -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" },