Skip to content

Commit

Permalink
Merge pull request Fansana#267 from Fansana/sleeping-bag
Browse files Browse the repository at this point in the history
Sleeping bag
  • Loading branch information
Fansana authored Oct 19, 2024
2 parents 3b34e78 + 5030cf6 commit 26e753b
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
- type: entity
id: SleepingBag
parent: BaseFoldable
name: sleeping bag
description: A warm cocoon, cradling you under the stars as the night passes. Has enough space for two.
components:
- type: HealOnBuckle
damage:
types:
Poison: -0.1
Blunt: -0.1
- type: Construction
graph: SleepingBag
node: sleepingbag
- type: Item
size: Normal
- type: Sprite
drawdepth: SmallObjects # I guess body bags need appear above a coroner's table?
sprite: Floof/Structures/sleepingbag.rsi
layers:
- state: closed
map: ["unfoldedLayer", "enum.StorageVisualLayers.Base"]
- map: ["foldedLayer"]
state: folded
visible: false
- state: open
map: [ "enum.StorageVisualLayers.Door" ]
- type: Icon
sprite: Floof/Structures/sleepingbag.rsi
state: closed
- type: EntityStorageVisuals
stateDoorOpen: open
- type: Tag
tags:
- BodyBag
- type: Clickable
- type: InteractionOutline
- type: MovedByPressure
- type: Physics
bodyType: Dynamic
- type: Strap
position: Down
rotation: -90
- type: Transform
noRot: true
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.25,-0.4,0.25,0.1"
density: 20
mask:
- Impassable
- type: EntityStorageLayingDownOverride
- type: Appearance
- type: GenericVisualizer
visuals:
enum.FoldedVisuals.State:
foldedLayer:
True: {visible: true}
False: {visible: false}
unfoldedLayer:
True: {visible: false}
False: {visible: true}
- type: Pullable
- type: ContainerContainer
containers:
entity_storage: !type:Container
- type: EntityStorage
airtight: false
capacity: 2
isCollidableWhenOpen: true
closeSound:
path: /Audio/Misc/zip.ogg
openSound:
path: /Audio/Misc/zip.ogg

- type: entity
id: SleepingBagFolded
name: sleeping bag
description: A warm cocoon, cradling you under the stars as the night passes. Has enough space for two.
parent: SleepingBag
suffix: folded
components:
- type: Icon
sprite: Floof/Structures/sleepingbag.rsi
state: folded
- type: Foldable
folded: true
26 changes: 26 additions & 0 deletions Resources/Prototypes/Floof/Recipes/Crafting/improvised.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- type: constructionGraph
id: SleepingBag
start: start
graph:
- node: start
edges:
- to: sleepingbag
steps:
- material: Cloth
amount: 5
doAfter: 4
- node: sleepingbag
entity: SleepingBagFolded

- type: construction
name: sleeping bag
id: sleeping_bag
graph: SleepingBag
startNode: start
targetNode: sleepingbag
category: construction-category-furniture
description: A sleeping bed, perfect for those calm nights under a stary sky.
icon:
sprite: Floof/Structures/sleepingbag.rsi
state: open
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.
23 changes: 23 additions & 0 deletions Resources/Textures/Floof/Structures/sleepingbag.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Fansana",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "open"
},
{
"name": "folded"
},
{
"name": "closed"
},
{
"name": "opening"
}
]
}
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.

0 comments on commit 26e753b

Please sign in to comment.