Skip to content

addMaterialBag - #42

Open
Ledniky wants to merge 2 commits into
ss14-art:masterfrom
Ledniky:addMaterialBag
Open

addMaterialBag#42
Ledniky wants to merge 2 commits into
ss14-art:masterfrom
Ledniky:addMaterialBag

Conversation

@Ledniky

@Ledniky Ledniky commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

добавил сумку для переноски и сбора материалов (полезно на обломках)

Summary by CodeRabbit

  • New Features
    • Added a material bag for storing construction materials, with quick and area insertion support.
    • Added a cargo crate containing three material bags.
    • Added the material bag crate to the cargo catalog with pricing and market categorization.
    • Added Russian localization for the ore bag’s name and description.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a MaterialBag entity for construction materials, Russian localization for OreBag, and a cargo crate that contains three material bags and is available through the cargo catalog.

Changes

Material bag cargo flow

Layer / File(s) Summary
Material bag definition
Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml, Resources/Locale/ru-RU/_Art/prototypes/entities/objects/specific/bags/ore_bag.ftl
Adds MaterialBag with storage behavior, insertion settings, and a ConstructionMaterial whitelist. Adds Russian name and description text for OreBag.
Cargo crate integration
Resources/Prototypes/_Art/Catalog/Fills/Crates/cargo.yml, Resources/Prototypes/_Art/Catalog/Cargo/cargo_cargo.yml
Adds a crate that creates three MaterialBag entities and registers the crate as a cargo product with its icon, cost, category, and market group.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CargoCatalog
  participant CrateCargoMaterialsBags
  participant MaterialBag
  CargoCatalog->>CrateCargoMaterialsBags: Purchase cargo product
  CrateCargoMaterialsBags->>MaterialBag: Create three entities
Loading

Suggested reviewers: rewafflution

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the addition of the material bag feature.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.45.0)

ast-grep could not parse rule config: /ast-grep-rules/../git/.ast-grep/rules/ss14-xaml-literal-text.yml


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml`:
- Around line 2-5: Replace the raw player-facing fields in
Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml:2-5 and
Resources/Prototypes/_Art/Catalog/Fills/Crates/cargo.yml:4-5 with matching
fork-prefixed, kebab-case locale keys. Define the corresponding base name and
description keys under Resources/Locale/en-US/_Art/, and update
Resources/Locale/ru-RU/_Art/prototypes/entities/objects/specific/bags/ore_bag.ftl:1-2
to use the fork key for MaterialBag with matching localized keys.
- Line 3: Rename the new prototype IDs using the repository’s fork naming
convention and update every reference: in
Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml:3
rename MaterialBag and update the three crate contents; in
Resources/Prototypes/_Art/Catalog/Fills/Crates/cargo.yml:3 rename
CrateCargoMaterialsBags and update its cargo product reference; in
Resources/Prototypes/_Art/Catalog/Cargo/cargo_cargo.yml:2 rename
CargoCrateMaterialsBags and update any catalog references.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5eef81f7-3194-4404-b157-b242269bbb5d

📥 Commits

Reviewing files that changed from the base of the PR and between b88a46a and 86b6740.

📒 Files selected for processing (4)
  • Resources/Locale/ru-RU/_Art/prototypes/entities/objects/specific/bags/ore_bag.ftl
  • Resources/Prototypes/_Art/Catalog/Cargo/cargo_cargo.yml
  • Resources/Prototypes/_Art/Catalog/Fills/Crates/cargo.yml
  • Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml

Comment on lines +2 to +5
name: material bag
id: MaterialBag
parent: OreBag
description: A robust bag for salvage specialists and miners alike to carry large amounts of material. Magnetises any nearby materials when attached to a belt.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use one fork-owned localization contract for the new player-facing prototypes.

The new prototypes use raw English fields, while the added FTL entry targets ent-OreBag. Use matching fork-prefixed, kebab-case keys, define the base keys under Resources/Locale/en-US/_Art/, and add locale-specific translations with the same keys.

  • Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml#L2-L5: replace the raw MaterialBag name and description.
  • Resources/Locale/ru-RU/_Art/prototypes/entities/objects/specific/bags/ore_bag.ftl#L1-L2: replace ent-OreBag with the fork key for MaterialBag.
  • Resources/Prototypes/_Art/Catalog/Fills/Crates/cargo.yml#L4-L5: replace the raw crate name and description.

As per coding guidelines: player-facing strings must use fork--prefixed keys in Resources/Locale/en-US/_Art/*.ftl. As per path instructions: prototype names and descriptions must use locale keys, and FTL keys must be fork-prefixed and kebab-case.

📍 Affects 3 files
  • Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml#L2-L5 (this comment)
  • Resources/Locale/ru-RU/_Art/prototypes/entities/objects/specific/bags/ore_bag.ftl#L1-L2
  • Resources/Prototypes/_Art/Catalog/Fills/Crates/cargo.yml#L4-L5
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml`
around lines 2 - 5, Replace the raw player-facing fields in
Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml:2-5 and
Resources/Prototypes/_Art/Catalog/Fills/Crates/cargo.yml:4-5 with matching
fork-prefixed, kebab-case locale keys. Define the corresponding base name and
description keys under Resources/Locale/en-US/_Art/, and update
Resources/Locale/ru-RU/_Art/prototypes/entities/objects/specific/bags/ore_bag.ftl:1-2
to use the fork key for MaterialBag with matching localized keys.

Sources: Coding guidelines, Path instructions

@@ -0,0 +1,15 @@
- type: entity
name: material bag
id: MaterialBag

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Use fork-named IDs for all new prototypes.

These IDs are new fork content but use unprefixed names. Rename each ID with the repository’s fork naming convention and update all cross-file references.

  • Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml#L3: rename MaterialBag; update the three crate contents.
  • Resources/Prototypes/_Art/Catalog/Fills/Crates/cargo.yml#L3: rename CrateCargoMaterialsBags; update the cargo product reference.
  • Resources/Prototypes/_Art/Catalog/Cargo/cargo_cargo.yml#L2: rename CargoCrateMaterialsBags and update any catalog references.

As per path instructions: Resources/Prototypes/_Art/**/*.yml requires fork content IDs to be fork-named to avoid collisions with upstream IDs.

📍 Affects 3 files
  • Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml#L3-L3 (this comment)
  • Resources/Prototypes/_Art/Catalog/Fills/Crates/cargo.yml#L3-L3
  • Resources/Prototypes/_Art/Catalog/Cargo/cargo_cargo.yml#L2-L2
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml` at
line 3, Rename the new prototype IDs using the repository’s fork naming
convention and update every reference: in
Resources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml:3
rename MaterialBag and update the three crate contents; in
Resources/Prototypes/_Art/Catalog/Fills/Crates/cargo.yml:3 rename
CrateCargoMaterialsBags and update its cargo product reference; in
Resources/Prototypes/_Art/Catalog/Cargo/cargo_cargo.yml:2 rename
CargoCrateMaterialsBags and update any catalog references.

Source: Path instructions

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

Projects

Status: Нужно сделать

Development

Successfully merging this pull request may close these issues.

1 participant