addMaterialBag - #42
Conversation
📝 WalkthroughWalkthroughAdds a ChangesMaterial bag cargo flow
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
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches✨ Simplify 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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
Resources/Locale/ru-RU/_Art/prototypes/entities/objects/specific/bags/ore_bag.ftlResources/Prototypes/_Art/Catalog/Cargo/cargo_cargo.ymlResources/Prototypes/_Art/Catalog/Fills/Crates/cargo.ymlResources/Prototypes/_Art/Entities/Object/Specific/bags/material_bag.yml
| 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. |
There was a problem hiding this comment.
🎯 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 rawMaterialBagname and description.Resources/Locale/ru-RU/_Art/prototypes/entities/objects/specific/bags/ore_bag.ftl#L1-L2: replaceent-OreBagwith the fork key forMaterialBag.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-L2Resources/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 | |||
There was a problem hiding this comment.
🗄️ 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: renameMaterialBag; update the three crate contents.Resources/Prototypes/_Art/Catalog/Fills/Crates/cargo.yml#L3: renameCrateCargoMaterialsBags; update the cargo product reference.Resources/Prototypes/_Art/Catalog/Cargo/cargo_cargo.yml#L2: renameCargoCrateMaterialsBagsand 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-L3Resources/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
добавил сумку для переноски и сбора материалов (полезно на обломках)
Summary by CodeRabbit