Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bedroll rework #551

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Resources/Maps/N14/MercerIslandSurface.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44397,7 +44397,7 @@ entities:
- type: Transform
pos: 24.5,100.5
parent: 2
- proto: N14BedrollItem
- proto: N14BedrollFolded
entities:
- uid: 1251
components:
Expand Down
2 changes: 1 addition & 1 deletion Resources/Maps/N14/SunnyvaleSurface.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407379,7 +407379,7 @@ entities:
- type: Transform
pos: 200.5,55.5
parent: 1
- proto: N14BedrollItem
- proto: N14BedrollFolded
entities:
- uid: 12893
components:
Expand Down
115 changes: 61 additions & 54 deletions Resources/Prototypes/_Nuclear14/Entities/Structures/Furniture/beds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,64 +35,71 @@

# TODO: Reduce the healing rate of all these at some point compared to a proper bed.
- type: entity
parent: N14Bed
id: N14Bedroll
name: Bedroll
description: A bed roll good for caravaning with. Not very comfy.
parent: RollerBed
name: bedroll
description: A bedroll for sleeping on the road. Not very comfy.
components:
- type: Sprite
state: bedroll_unrolled
- type: Construction
graph: N14Bed
node: bedroll
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 10
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:SpawnEntitiesBehavior
spawn:
N14BedrollItem:
min: 1
max: 1
- trigger:
!type:DamageTrigger
damage: 50
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:SpawnEntitiesBehavior
spawn:
MaterialCloth1:
min: 0
max: 2

- type: HealOnBuckle
damage:
types:
Poison: -0.05
Blunt: -0.05
- type: Sprite
sprite: _Nuclear14/Structures/Furniture/bedsandchairs.rsi
noRot: true
layers:
- state: bedroll_unrolled
map: ["unfoldedLayer"]
- state: bedroll_rolled
map: ["foldedLayer"]
- state: bedroll_unrolled
map: ["buckledLayer"]
visible: false
- type: Appearance
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeCircle
radius: 0.2
density: 100
mask:
- TableMask
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 50
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:SpawnEntitiesBehavior
spawn:
MaterialCloth1:
min: 0
max: 2
- type: Strap
position: Down
rotation: -90
buckleOffset: "0.05,-0.10"
- type: Construction
graph: N14Bed
node: bedroll

- type: entity
parent: BaseItem
id: N14BedrollItem
name: Bedroll
description: A rolled up bed for travelling light. Lay it down somewhere to rest.
parent: N14Bedroll
id: N14BedrollFolded
suffix: rolled
components:
- type: Sprite
sprite: _Nuclear14/Structures/Furniture/bedsandchairs.rsi
state: bedroll_rolled
- type: Construction
graph: N14BedrollItem
node: bedroll
- type: Tag
tags:
- Bedroll
- type: Item
size: Huge
- type: Foldable
folded: true

- type: entity
parent: N14Bed
id: N14BedMattress0
name: Mattress
description: A matress on the floor. Better than nothing.
description: A mattress on the floor. Better than nothing.
components:
- type: Sprite
state: mattress0
Expand All @@ -104,7 +111,7 @@
parent: N14Bed
id: N14BedMattressDirty1
name: Mattress
description: A matress on the floor. A little rough.
description: A mattress on the floor. A little rough.
components:
- type: Sprite
state: mattress1
Expand All @@ -114,7 +121,7 @@
parent: N14BedMattressDirty1
id: N14BedMattressDirty2
name: Mattress
description: A matress on the floor. Filthy.
description: A mattress on the floor. Filthy.
components:
- type: Sprite
state: mattress2
Expand All @@ -123,7 +130,7 @@
parent: N14BedMattressDirty1
id: N14BedMattressDirty3
name: Mattress
description: A matress on the floor. Is that blood?
description: A mattress on the floor. Is that blood?
components:
- type: Sprite
state: mattress3
Expand All @@ -132,7 +139,7 @@
parent: N14BedMattressDirty1
id: N14BedMattressDirty4
name: Mattress
description: A matress on the floor. That's definitely blood.
description: A mattress on the floor. That's definitely blood.
components:
- type: Sprite
state: mattress4
Expand All @@ -142,7 +149,7 @@
id: N14BedMattressDirty5
suffix: mouldy
name: Mattress
description: A matress on the floor. I'm not sleeping on that.
description: A mattress on the floor. I'm not sleeping on that.
components:
- type: Sprite
state: mattress5
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@
completed:
- !type:SnapToGrid { }
steps:
- tag: Bedroll
name: a bedroll
icon:
sprite: _Nuclear14/Structures/Furniture/bedsandchairs.rsi
state: bedroll_rolled
doAfter: 1
- material: Cloth
amount: 3
doAfter: 2
- to: mattress
completed:
- !type:SnapToGrid { }
Expand Down Expand Up @@ -104,7 +101,7 @@
prototype: MaterialCloth1
amount: 3
steps:
- tool: Cutting
- tool: Slicing
doAfter: 1
- node: mattress
entity: N14BedMattress0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@

- type: construction
id: N14Bedroll
name: bed roll
description: A basic cloth bedroll for sleeping in while travelling. Make one using the rolled up crafting recipe.
name: bedroll
description: A bedroll for sleeping on the road. Not very comfy.
graph: N14Bed
startNode: start
targetNode: bedroll
Expand Down
46 changes: 23 additions & 23 deletions Resources/Prototypes/_Nuclear14/Recipes/Crafting/Graphs/items.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
- type: constructionGraph
id: N14BedrollItem
start: start
graph:
- node: start
edges:
- to: bedroll
steps:
- material: Cloth
amount: 3
doAfter: 3
# - type: constructionGraph
# id: N14BedrollFolded
# start: start
# graph:
# - node: start
# edges:
# - to: bedroll
# steps:
# - material: Cloth
# amount: 3
# doAfter: 3

- node: bedroll
entity: N14BedrollItem
edges:
- to: start
steps:
- tool: Cutting
doAfter: 3
completed:
- !type:SpawnPrototype
prototype: MaterialCloth1
amount: 2
- !type:DeleteEntity
# - node: bedroll
# entity: N14BedrollFolded
# edges:
# - to: start
# steps:
# - tool: Cutting
# doAfter: 3
# completed:
# - !type:SpawnPrototype
# prototype: MaterialCloth1
# amount: 2
# - !type:DeleteEntity
26 changes: 13 additions & 13 deletions Resources/Prototypes/_Nuclear14/Recipes/Crafting/items.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Bedroll
- type: construction
name: bedroll
id: N14BedrollItem
graph: N14BedrollItem
startNode: start
targetNode: bedroll
category: construction-category-furniture
description: A bedroll for sleeping in. Place it with construction.
hide: false
icon:
sprite: _Nuclear14/Structures/Furniture/bedsandchairs.rsi
state: bedroll_rolled
objectType: Item
#- type: construction
# name: bedroll
# id: N14BedrollFolded
# graph: N14BedrollFolded
# startNode: start
# targetNode: bedroll
# category: construction-category-furniture
# description: A bedroll for sleeping in. Place it with construction.
# hide: false
# icon:
# sprite: _Nuclear14/Structures/Furniture/bedsandchairs.rsi
# state: bedroll_rolled
# objectType: Item
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading