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

Sleeping bag #267

Merged
merged 4 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
@@ -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
27 changes: 27 additions & 0 deletions Resources/Prototypes/Recipes/Crafting/improvised.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,34 @@
sprite: Objects/Weapons/Melee/baseball_bat.rsi
state: icon
objectType: Item
# Floof Section
- 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
Fansana marked this conversation as resolved.
Show resolved Hide resolved
# End floof section
- type: construction
name: ghost sheet
id: ghost_sheet
Expand Down
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.
Loading