Skip to content

SleepingBag#73

Open
cosmosgc wants to merge 1 commit intoLaryNevesPR:EE-Andromedafrom
cosmosgc:SleepingBagPort
Open

SleepingBag#73
cosmosgc wants to merge 1 commit intoLaryNevesPR:EE-Andromedafrom
cosmosgc:SleepingBagPort

Conversation

@cosmosgc
Copy link

@cosmosgc cosmosgc commented Apr 8, 2025

port de Floof-Station/Floof-Station#267

image
image

Summary by CodeRabbit

  • New Features

    • Introduced a sleeping bag item that can be crafted using cloth and accommodates two individuals.
    • Added both unfolded and folded visual states for the sleeping bag, including appropriate icons and animations.
    • Sleeping bag provides healing effects and can be interacted with, stored, and carried.
  • Crafting

    • Added a new recipe for crafting a sleeping bag under furniture construction.
  • Visuals

    • Added new textures and animations for the sleeping bag, covering open, folded, closed, and opening states.

@github-actions
Copy link

github-actions bot commented Apr 8, 2025

RSI Diff Bot; head commit 4275aeb merging into 7b76e91
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Floof/Structures/sleepingbag.rsi

State Old New Status
closed Added
folded Added
open Added
opening Added

@cosmosgc
Copy link
Author

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Apr 18, 2025

✅ Actions performed

Full review triggered.

@coderabbitai
Copy link

coderabbitai bot commented Apr 18, 2025

Walkthrough

This update introduces a new foldable sleeping bag entity and its folded variant, complete with detailed properties, behaviors, and visual states. A crafting recipe and construction graph for creating the sleeping bag from cloth have been added, specifying the process and requirements. Additionally, new texture metadata for the sleeping bag, including various visual states, is provided. The changes collectively enable players to craft, interact with, and visually distinguish between open, closed, and folded sleeping bags in the game.

Changes

File(s) Change Summary
Resources/Prototypes/Floof/Entities/Structures/Furniture/sleeping_bag.yml Added entity prototypes for SleepingBag and SleepingBagFolded with detailed components and behaviors.
Resources/Prototypes/Floof/Recipes/Crafting/improvised.yml Introduced a construction graph and crafting recipe for creating a sleeping bag from cloth.
Resources/Textures/Floof/Structures/sleepingbag.rsi/meta.json Added metadata for sleeping bag textures, defining states and animation names.

Sequence Diagram(s)

sequenceDiagram
    participant Player
    participant CraftingSystem
    participant ConstructionGraph
    participant SleepingBag

    Player->>CraftingSystem: Initiate crafting "sleeping bag"
    CraftingSystem->>ConstructionGraph: Start "SleepingBag" graph
    ConstructionGraph->>Player: Require 5x Cloth
    Player->>ConstructionGraph: Provide Cloth
    ConstructionGraph->>CraftingSystem: Wait 4 units (crafting delay)
    ConstructionGraph->>CraftingSystem: Output "SleepingBagFolded"
    CraftingSystem->>Player: Deliver SleepingBagFolded
    Player->>SleepingBag: Unfold/use as needed
Loading

Poem

In a meadow of pixels, a bag now appears,
Folded or open, it soothes all your fears.
With cloth and some time, you craft it with glee,
A cozy new place for two buns to be!
Textures and recipes, all neatly aligned—
Sweet dreams in the code, for all rabbits combined.
💤🐇

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
Resources/Textures/Floof/Structures/sleepingbag.rsi/meta.json (1)

9-23: Review texture states versus prototype usage.

You’ve defined four states (open, folded, closed, opening), but in this PR only open, folded, and closed are referenced in entities/recipes. Consider removing or postponing the opening state to avoid unused assets, or confirm its intended animation use.

Resources/Prototypes/Floof/Recipes/Crafting/improvised.yml (2)

1-14: Check construction graph naming conventions.

The constructionGraph uses id: SleepingBag (PascalCase), while many existing graphs follow snake_case (e.g., stone_cutter). Verify if PascalCase is acceptable or rename to sleeping_bag for consistency.


22-22: Fix typo in recipe description.

The text currently reads “stary sky.” It should be:

description: A sleeping bag, perfect for those calm nights under a starry sky.

Also, consider using “sleeping bag” instead of “sleeping bed.”

Resources/Prototypes/Floof/Entities/Structures/Furniture/sleeping_bag.yml (1)

19-30: Refine sprite component comment and verify layer mapping.

The inline comment mentions “body bags,” which seems leftover. Update or remove it for clarity. Also double‑check that your closed/folded/open layers map to the correct texture frames.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6bfba58 and 4275aeb.

⛔ Files ignored due to path filters (4)
  • Resources/Textures/Floof/Structures/sleepingbag.rsi/closed.png is excluded by !**/*.png
  • Resources/Textures/Floof/Structures/sleepingbag.rsi/folded.png is excluded by !**/*.png
  • Resources/Textures/Floof/Structures/sleepingbag.rsi/open.png is excluded by !**/*.png
  • Resources/Textures/Floof/Structures/sleepingbag.rsi/opening.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • Resources/Prototypes/Floof/Entities/Structures/Furniture/sleeping_bag.yml (1 hunks)
  • Resources/Prototypes/Floof/Recipes/Crafting/improvised.yml (1 hunks)
  • Resources/Textures/Floof/Structures/sleepingbag.rsi/meta.json (1 hunks)
🔇 Additional comments (11)
Resources/Textures/Floof/Structures/sleepingbag.rsi/meta.json (2)

2-4: Texture metadata version and licensing look correct.

The version, license, and copyright fields
adhere to project standards and acknowledge the original author.


5-8: Texture dimensions are appropriate.

A size of 32×32 pixels matches the grid and other Floof structure assets.

Resources/Prototypes/Floof/Recipes/Crafting/improvised.yml (1)

9-11: Verify material identifier exists.

This step consumes Cloth. Ensure there’s a matching prototype with id: Cloth (case‑sensitive) so the crafting graph can resolve the material.

Resources/Prototypes/Floof/Entities/Structures/Furniture/sleeping_bag.yml (8)

1-6: SleepingBag entity prototype setup is solid.

The id, parent, name, and description follow conventions and clearly convey the sleeping bag’s purpose.


7-11: Confirm healing modifiers balance.

The HealOnBuckle component applies -0.1 to Poison and Blunt damage (10% reduction). Verify these values align with the intended healing/balance metrics.


12-16: Construction component correctly linked.

Referencing graph: SleepingBag and node: sleepingbag matches the crafted flow; folding behavior will trigger as expected.


31-37: Icon and door‑state visuals are configured correctly.
The closed icon and stateDoorOpen: open ensure proper inventory and in-world displays.


38-45: Interaction and physics components validated.

Clickable, InteractionOutline, Pullable, Physics, Strap, and Transform settings align with other foldable furniture prototypes.


46-56: Fixture bounds and density look appropriate.

Your PhysShapeAabb bounds, density, and collision mask follow established patterns for dynamic items.


57-76: EntityStorage parameters and tagging.

Capacity 2 matches the intended two‑person use; sounds are assigned correctly. However, the BodyBag tag may be misleading—confirm if this tag is intended or if a more specific tag (e.g., SleepingBag) should be used.


81-93: Folded variant inherits properly.

SleepingBagFolded sets suffix: folded and applies the Foldable component. Inheritance will maintain all other behaviors and visuals.

Comment on lines +23 to +26
icon:
sprite: Floof/Structures/sleepingbag.rsi
state: open
objectType: Item
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Align recipe icon state with crafted item.

The recipe yields SleepingBagFolded but uses state: open for its icon. Change to folded to accurately represent the result:

 icon:
   sprite: Floof/Structures/sleepingbag.rsi
-  state: open
+  state: folded
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
icon:
sprite: Floof/Structures/sleepingbag.rsi
state: open
objectType: Item
icon:
sprite: Floof/Structures/sleepingbag.rsi
state: folded
objectType: Item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant