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

bedrolls #2332

Merged
merged 11 commits into from
Nov 1, 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
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
offset: 0.1,0.1
- type: ThrowingAngle
angle: 0

- type: entity
id: BaseBoltProjectile
parent: BaseItem
Expand Down Expand Up @@ -236,8 +236,7 @@
- state: rod
color: "#959595"
- state: tip
color: "#65b9e9"
alpha: 0.8
color: "#65b9e9cc"
- state: solution1
map: ["enum.SolutionContainerLayers.Fill"]
visible: false
Expand Down
176 changes: 176 additions & 0 deletions Resources/Prototypes/_NF/Entities/Structures/Furniture/bedroll.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
- type: entity
id: NFBedroll
parent: [BaseItem, BaseDeployFoldable, RecyclableItemClothBasic]
name: bedroll
description: When there's nowhere else to sleep, you'll want to bring at least one thing of comfort. The tag on it states to unfold it before rest, but who needs rules anyway, right?
components:
- type: PlaceableSurface # For bedsheets
placeCentered: true
positionOffset: 0, -0.001 # Make sure the bed is placed behind the blanket
- type: HealOnBuckle # Regular bed values, plus bonus cold recovery
damage:
types:
Poison: -0.1
Blunt: -0.1
Cold: -0.1
- type: Transform
noRot: true
- type: Item
size: Small
- type: Sprite
sprite: _NF/Structures/Furniture/bedroll.rsi
noRot: true
layers:
- state: bedroll01
map: ["unfoldedLayer"]
- state: bedroll01_folded
map: ["foldedLayer"]
visible: false
- type: MovedByPressure
- type: DamageOnHighSpeedImpact
soundHit:
collection: MetalThud
- type: InteractionOutline
- type: Physics
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeCircle
radius: 0.35
density: 40
mask:
- MobMask
- type: Damageable
damageModifierSet: Inflatable
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 50
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:SpawnEntitiesBehavior
spawn:
MaterialCloth1:
min: 1
max: 2
- type: Pullable
- type: Strap
position: Down
rotation: -90
buckleOffset: "0,-0.15"
#buckleOnInteractHand: False
- type: Appearance
- type: StaticPrice
price: 20
- type: Construction
graph: GraphNFBedrollFolded
node: NFBedrollFolded

- type: entity
parent: NFBedroll
id: NFBedrollFolded
suffix: folded
components:
- type: Foldable
folded: true
- type: Strap
enabled: False

- type: entity
id: NFBedrollAlt
parent: NFBedroll
suffix: alt
components:
- type: Sprite
noRot: true
layers:
- state: bedroll02
map: ["unfoldedLayer"]
- state: bedroll02_folded
map: ["foldedLayer"]
visible: false
- type: Appearance
- type: Construction
graph: GraphNFBedrollFolded
node: NFBedrollAltFolded

- type: entity
parent: NFBedrollAlt
id: NFBedrollAltFolded
suffix: folded, alt
components:
- type: Foldable
folded: true
- type: Strap
enabled: False

- type: entity # McHobo special
id: NFBedrollStained
parent: NFBedroll
description: Glamping used to look different back in my days.
suffix: Stained
components:
- type: Sprite
layers:
- state: bedroll01
map: ["unfoldedLayer"]
- state: bedroll01_folded
map: ["foldedLayer"]
visible: false
- state: overlay_stain_01
map: ["bedrollStain"]
visible: true
- type: Appearance
- type: GenericVisualizer
visuals:
enum.FoldedVisuals.State: # Copypasta from BaseFoldable b/c collections don't merge when overriding component prototypes.
foldedLayer:
True: {visible: true}
False: {visible: false}
unfoldedLayer:
True: {visible: false}
False: {visible: true}
bedrollStain:
True: {visible: false}
False: {visible: true}
- type: RandomSprite
available:
- unfoldedLayer:
bedroll01: ""
bedroll02: ""
bedrollStain:
overlay_stain_01: LiquidsBiological
overlay_stain_02: LiquidsBiological
overlay_stain_03: LiquidsBiological
overlay_stain_04: LiquidsBiological

- type: entity # McHobo bed spawner
id: McHoboBedsRandom
name: stained bedroll spawner
suffix: Random
parent: MarkerBase
components:
- type: Sprite
layers:
- state: green
- sprite: _NF/Structures/Furniture/bedroll.rsi
state: bedroll01_folded
- type: RandomSpawner
prototypes:
- NFBedrollStained
- Mattress
chance: 1

- type: entity
parent: NFBedrollStained
id: NFBedrollStainedFolded
suffix: folded, stained
categories: [ HideSpawnMenu ]
components:
- type: Foldable
folded: true
- type: Strap
enabled: False
14 changes: 14 additions & 0 deletions Resources/Prototypes/_NF/Palettes/liquids.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

- type: palette
id: LiquidsBiological
name: biological liquids
colors:
humanblood: "#800000cc"
humanbloodalt: "#a11818cc"
spiderblood: "#162581cc"
goblinblood: "#364500cc"
sap: "#cd7314cc"
ichor: "#f4692ecc"
vomit: "#87ab08cc"
fat: "#d8d8b0cc"
yellow: "#ceda8bcc"
23 changes: 23 additions & 0 deletions Resources/Prototypes/_NF/Recipes/Crafting/Graphs/bedroll_graph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- type: constructionGraph
id: GraphNFBedrollFolded
start: start
graph:
- node: start
edges:
- to: NFBedrollFolded
steps:
- material: Cloth
amount: 4
doAfter: 3

- to: NFBedrollAltFolded
steps:
- material: Cloth
amount: 4
doAfter: 3

- node: NFBedrollFolded
entity: NFBedrollFolded

- node: NFBedrollAltFolded
entity: NFBedrollAltFolded
25 changes: 25 additions & 0 deletions Resources/Prototypes/_NF/Recipes/Crafting/bedroll.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
- type: construction
name: bedroll
id: NFBedrollCrafting
graph: GraphNFBedrollFolded
startNode: start
targetNode: NFBedrollFolded
category: construction-category-utilities
objectType: Item
description: When there's nowhere else to sleep, you'll want to bring at least one thing of comfort.
icon:
sprite: _NF/Structures/Furniture/bedroll.rsi
state: bedroll01

- type: construction
name: bedroll
id: NFBedrollAltFoldedCrafting
graph: GraphNFBedrollFolded
startNode: start
targetNode: NFBedrollAltFolded
category: construction-category-utilities
objectType: Item
description: When there's nowhere else to sleep, you'll want to bring at least one thing of comfort.
icon:
sprite: _NF/Structures/Furniture/bedroll.rsi
state: bedroll02
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
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.
35 changes: 35 additions & 0 deletions Resources/Textures/_NF/Structures/Furniture/bedroll.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Original sprites by Releasethesea (github) were taken from cmss13-devs at https://github.com/cmss13-devs/cmss13/commit/22c3480dff8930c29f652d7630af341f7533ceaf | Sprites for folded state and stains edited by erhardsteinhauer (github/discord)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "bedroll01"
},
{
"name": "bedroll01_folded"
},
{
"name": "bedroll02"
},
{
"name": "bedroll02_folded"
},
{
"name": "overlay_stain_01"
},
{
"name": "overlay_stain_02"
},
{
"name": "overlay_stain_03"
},
{
"name": "overlay_stain_04"
}
]
}
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
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