addMaterialBox - #41
Conversation
📝 WalkthroughWalkthroughAdded the ChangesMaterial storage box
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant ConstructionPrototype
participant MaterialBoxGraph
participant MaterialBox
ConstructionPrototype->>MaterialBoxGraph: validate placement and start construction
MaterialBoxGraph->>MaterialBoxGraph: consume 7 Steel after 1 second
MaterialBoxGraph->>MaterialBox: create entity
🚥 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-raw-string-popup.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: 1
🤖 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/Structures/Storege/material_box.yml`:
- Around line 2-4: Update
Resources/Prototypes/_Art/Entities/Structures/Storege/material_box.yml lines 2-4
to use a fork-prefixed prototype ID and locale keys for the name and description
instead of raw text. Update
Resources/Locale/ru-RU/_Art/prototypes/entities/structures/storage/material_box.ftl
lines 1-2 to define matching fork-prefixed, kebab-case keys for MaterialBox.
🪄 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: 88c1e092-06e7-47d9-9a3a-2dda4fab23bb
📒 Files selected for processing (2)
Resources/Locale/ru-RU/_Art/prototypes/entities/structures/storage/material_box.ftlResources/Prototypes/_Art/Entities/Structures/Storege/material_box.yml
| id: MaterialBox | ||
| name: material box | ||
| description: A large storage container for holding construction material. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Align the fork prototype identity across YAML and FTL.
The prototype uses a generic ID and raw text, while the translation targets ent-OreBox. This can cause an upstream ID collision and leave MaterialBox untranslated.
Resources/Prototypes/_Art/Entities/Structures/Storege/material_box.yml#L2-L4: use a fork-prefixed ID and matching locale keys fornameanddescription.Resources/Locale/ru-RU/_Art/prototypes/entities/structures/storage/material_box.ftl#L1-L2: define the matching fork-prefixed, kebab-case keys forMaterialBox.
As per coding guidelines: fork prototype IDs must be fork-named. As per path instructions: prototype display fields must use locale keys, and fork locale keys must be fork--prefixed and kebab-case.
📍 Affects 2 files
Resources/Prototypes/_Art/Entities/Structures/Storege/material_box.yml#L2-L4(this comment)Resources/Locale/ru-RU/_Art/prototypes/entities/structures/storage/material_box.ftl#L1-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/Structures/Storege/material_box.yml`
around lines 2 - 4, Update
Resources/Prototypes/_Art/Entities/Structures/Storege/material_box.yml lines 2-4
to use a fork-prefixed prototype ID and locale keys for the name and description
instead of raw text. Update
Resources/Locale/ru-RU/_Art/prototypes/entities/structures/storage/material_box.ftl
lines 1-2 to define matching fork-prefixed, kebab-case keys for MaterialBox.
Sources: Coding guidelines, Path instructions
|
Нужно добавить спрайт и возможность крафта |
|
я не добавил получение XD |
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/Catalog/Cargo/cargo_cargo.yml`:
- Around line 1-8: Add the missing product field to the CargoMaterialBox
cargoProduct definition, setting it to MaterialBox so purchases spawn the
intended entity, consistent with the CargoOreBox definition.
In
`@Resources/Prototypes/_Art/Recipes/Construction/material_box_construction.yml`:
- Around line 2-3: Rename the fork-owned MaterialBox construction, graph, and
entity references to use the repository’s established fork prefix. Update
Resources/Prototypes/_Art/Recipes/Construction/material_box_construction.yml
lines 2-3 to rename the construction ID and synchronized graph reference; update
Resources/Prototypes/_Art/Recipes/Construction/Graphs/material_box_graph.yml
line 2 to rename the graph ID and line 14 to reference the renamed entity
prototype.
🪄 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: 5f0732c1-9bec-4c97-8b94-d0c0241ed4d0
📒 Files selected for processing (3)
Resources/Prototypes/_Art/Catalog/Cargo/cargo_cargo.ymlResources/Prototypes/_Art/Recipes/Construction/Graphs/material_box_graph.ymlResources/Prototypes/_Art/Recipes/Construction/material_box_construction.yml
| - type: cargoProduct | ||
| id: CargoMaterialBox | ||
| icon: | ||
| sprite: /Textures/Structures/Storage/orebox.rsi | ||
| state: orebox | ||
| cost: 300 | ||
| category: cargoproduct-category-name-cargo | ||
| group: market No newline at end of file |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Link the cargo product to MaterialBox.
The cargo product does not define a product field. Cargo listings use this field to identify the entity to spawn, as shown by CargoOreBox. Add product: MaterialBox; otherwise, purchasing CargoMaterialBox may not provide the new storage box.
Proposed fix
- type: cargoProduct
id: CargoMaterialBox
icon:
sprite: /Textures/Structures/Storage/orebox.rsi
state: orebox
+ product: MaterialBox
cost: 300
category: cargoproduct-category-name-cargo
group: market📝 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.
| - type: cargoProduct | |
| id: CargoMaterialBox | |
| icon: | |
| sprite: /Textures/Structures/Storage/orebox.rsi | |
| state: orebox | |
| cost: 300 | |
| category: cargoproduct-category-name-cargo | |
| group: market | |
| - type: cargoProduct | |
| id: CargoMaterialBox | |
| icon: | |
| sprite: /Textures/Structures/Storage/orebox.rsi | |
| state: orebox | |
| product: MaterialBox | |
| cost: 300 | |
| category: cargoproduct-category-name-cargo | |
| group: market |
🤖 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/Catalog/Cargo/cargo_cargo.yml` around lines 1 - 8,
Add the missing product field to the CargoMaterialBox cargoProduct definition,
setting it to MaterialBox so purchases spawn the intended entity, consistent
with the CargoOreBox definition.
| id: MaterialBox | ||
| graph: MaterialBoxGraph |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Use fork-named IDs for all MaterialBox prototypes.
The construction, graph, and entity identifiers use generic names. Rename the fork-owned prototypes with the repository’s established fork prefix, then update all references.
Resources/Prototypes/_Art/Recipes/Construction/material_box_construction.yml#L2-L3: rename the construction ID and synchronizegraph:.Resources/Prototypes/_Art/Recipes/Construction/Graphs/material_box_graph.yml#L2-L2: rename the graph ID.Resources/Prototypes/_Art/Recipes/Construction/Graphs/material_box_graph.yml#L14-L14: reference the renamed entity prototype.
As per coding guidelines, prototype IDs for fork content must be fork-named to avoid collisions with upstream IDs.
📍 Affects 2 files
Resources/Prototypes/_Art/Recipes/Construction/material_box_construction.yml#L2-L3(this comment)Resources/Prototypes/_Art/Recipes/Construction/Graphs/material_box_graph.yml#L2-L2Resources/Prototypes/_Art/Recipes/Construction/Graphs/material_box_graph.yml#L14-L14
🤖 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/Recipes/Construction/material_box_construction.yml`
around lines 2 - 3, Rename the fork-owned MaterialBox construction, graph, and
entity references to use the repository’s established fork prefix. Update
Resources/Prototypes/_Art/Recipes/Construction/material_box_construction.yml
lines 2-3 to rename the construction ID and synchronized graph reference; update
Resources/Prototypes/_Art/Recipes/Construction/Graphs/material_box_graph.yml
line 2 to rename the graph ID and line 14 to reference the renamed entity
prototype.
Source: Coding guidelines
Добавил коробку для хранения материалов, очень полезно при покупке 10 ящиков пластстали/пластика/стали
Summary by CodeRabbit
New Features
Localization