Skip to content

Conversation

@fruitnoodle
Copy link

Changelog

added steel

Media

i dont wanna....

@coderabbitai
Copy link

coderabbitai bot commented Aug 22, 2025

Summary by CodeRabbit

  • New Features
    • Added pig iron ingots with stacking and extraction behaviour.
    • Introduced a Blast Furnace structure for producing pig iron, including construction options with age-based availability.
    • Added a crafting recipe to convert pig iron into steel sheets at the medieval armour workstation.
    • Implemented a new pig iron stack type with icon and capacity settings.
    • Minor tweak to copper ingot single-unit behaviour.

Walkthrough

Adds pig iron ingot entities and a PigIron stack, a BlastFurnace entity with lathe recipe pack and construction graph plus two buildable entries, a lathe recipe to convert PigIron into steel sheets, and removes a single-unit Stack component from an existing copper ingot entry.

Changes

Cohort / File(s) Summary
Materials: pig iron + copper tweak
Resources/Prototypes/Civ14/Entities/Objects/Materials/materials_metals.yml
Adds IngotPigIron (Material, PhysicalComposition Iron:100, Stack with states pig_iron_one/half/full, Sprite, Item, Appearance, Extractable, SolutionContainerManager exposing Iron reagent), IngotPigIron1 (single-unit variant), and stack PigIron (icon pig_iron_one, spawn IngotPigIron1, maxCount 30). Removes the Stack component (count: 1) from IngotCopper1.
Armour crafting: lathe recipe
Resources/Prototypes/Civ14/Entities/Structures/Craft/armor.yml
Adds lathe recipe SheetSheetCiv14 (100 PigIron → SheetSteel1, completetime 4) and appends it to AnvilArmorMedieval recipe pack.
Metallurgy: Blast Furnace entity & pack
Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml
Adds public entity BlastFurnace (sprite idle/running layers, Destructible with DamageTrigger 200 and behaviors, ApcPowerReceiver needsPower:false, Lathe configured with static pack, Construction node) and a latheRecipePack BlastFurnace containing recipe IngotPigIron.
Construction: Blast Furnace graph + entries
Resources/Prototypes/Civ14/Recipes/Construction/metallurgy.yml
Adds ConstructionGraph BlastFurnace (start → end requires Iron 25 with doAfter 15; end spawns BlastFurnace). Adds two Construction entries exposing the BlastFurnace (both id BlastFurnace) with different names/icons/agemin (0 vs 2) and shared placement/TileNotBlocked condition.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Player
  participant ConstructionUI as Construction UI
  participant World
  participant BF as BlastFurnace Entity
  participant LatheBF as Lathe (BlastFurnace pack)
  participant DB as Prototypes

  Player->>ConstructionUI: Select "blast furnace" blueprint
  ConstructionUI->>World: Validate placement (TileNotBlocked)
  World-->>ConstructionUI: OK
  Player->>ConstructionUI: Provide Iron x25 (doAfter 15)
  ConstructionUI->>World: Spawn BlastFurnace entity
  World-->>Player: BlastFurnace placed

  Player->>BF: Open crafting UI
  BF->>LatheBF: Load pack "BlastFurnace"
  LatheBF->>DB: List recipe IngotPigIron
  Player->>LatheBF: Start recipe
  LatheBF-->>Player: Produce PigIron (stacked)
Loading
sequenceDiagram
  autonumber
  actor Player
  participant Anvil as AnvilArmorMedieval
  participant LatheAnvil as Lathe (Anvil pack)
  participant DB as Prototypes

  Player->>Anvil: Open crafting
  Anvil->>LatheAnvil: Load pack (includes SheetSheetCiv14)
  LatheAnvil->>DB: Fetch recipe SheetSheetCiv14
  Player->>LatheAnvil: Provide PigIron x100
  LatheAnvil-->>Player: Output SheetSteel1 (time: 4)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

The furnace hums, the pig iron gleams,
Stacks grow tall in molten dreams.
Anvil sings and sheets are born,
Copper lost its little scorn.
Sparks fly — build, craft, repeat — cha‑charm! 🔥🛠️

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit 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.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@github-actions github-actions bot added Untriaged This issue has not been reviewed yet Changes: Sprites Changes: No C# labels Aug 22, 2025
@github-actions
Copy link

github-actions bot commented Aug 22, 2025

RSI Diff Bot; head commit 2cc9dca merging into 56f1392
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Objects/Materials/ingots.rsi

State Old New Status
pig_iron_full Added
pig_iron_half Added
pig_iron_one Added

Edit: diff updated after 2cc9dca

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: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml (1)

152-193: YAML structure is broken for BlastFurnace entity and pack; also missing the actual IngotPigIron recipe.

  • The entity block is missing - type: at the correct indentation and a components: list.
  • Several keys are mis-indented (will fail prototype parsing).
  • latheRecipePack should be a top-level prototype (not nested under the entity).
  • There’s no latheRecipe with id IngotPigIron, yet the pack references it.

Let’s replace the whole block with a well-formed version and add the missing recipe. Also, giving the entity a parent (OreProcessor) keeps it consistent with StoneKiln/Bloomery behaviour.

- type: entity
-  id: BlastFurnace
-  name: blastfurnace
-  description: Used for making pig iron.
-   - type: Sprite
-    sprite: Civ14/Objects/metallurgy.rsi
-    layers:
-    - state: blast_furnace_on
-      shader: unshaded
-      map: [ "enum.LatheVisualLayers.IsRunning" ]
-    - state: blast_furnace
-      map: [ "enum.PowerDeviceVisualLayers.Powered" ]
-    - state: blast_furnace
-      map: [ "enum.MaterialStorageVisualLayers.Inserting" ]
-    - state: blast_furnace
-      map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
-  - type: Destructible
-    thresholds:
-    - trigger: !type:DamageTrigger
-        damage: 200
-      behaviors:
-      - !type:PlaySoundBehavior
-        sound:
-          collection: StoneBreak
-      - !type:DoActsBehavior
-        acts: [ "Destruction" ]
-  - type: ApcPowerReceiver
-    needsPower: false
-  - type: Lathe
-    idleState: blast_furnace
-    runningState: blast_furnace_on
-    staticPacks:
-    - BlastFurnace
-  - type: Construction
-    graph: BlastFurnace
-    node: end
-
-    - type: latheRecipePack
-  id: BlastFurnace
-  recipes:
-    - IngotPigIron
+ - type: entity
+  id: BlastFurnace
+  name: blast furnace
+  parent: OreProcessor
+  description: Used for making pig iron.
+  components:
+    - type: Sprite
+      sprite: Civ14/Objects/metallurgy.rsi
+      layers:
+        - state: blast_furnace_on
+          shader: unshaded
+          map: ["enum.LatheVisualLayers.IsRunning"]
+        - state: blast_furnace
+          map: ["enum.PowerDeviceVisualLayers.Powered"]
+        - state: blast_furnace
+          map: ["enum.MaterialStorageVisualLayers.Inserting"]
+        - state: blast_furnace
+          map: ["enum.WiresVisualLayers.MaintenancePanel"]
+    - type: Destructible
+      thresholds:
+        - trigger: !type:DamageTrigger
+            damage: 200
+          behaviors:
+            - !type:PlaySoundBehavior
+              sound:
+                collection: StoneBreak
+            - !type:DoActsBehavior
+              acts: ["Destruction"]
+    - type: ApcPowerReceiver
+      needsPower: false
+    - type: Lathe
+      idleState: blast_furnace
+      runningState: blast_furnace_on
+      staticPacks:
+        - BlastFurnace
+    - type: Construction
+      graph: BlastFurnace
+      node: end
+
+ - type: latheRecipePack
+  id: BlastFurnace
+  recipes:
+    - IngotPigIron
+
+ - type: latheRecipe
+  id: IngotPigIron
+  result: IngotPigIron1
+  icon: { sprite: "/Textures/Objects/Materials/ingots.rsi", state: pig_iron_one }
+  completetime: 2
+  materials:
+    RawIron: 100

Verification helpers:

#!/bin/bash
# Lint for missing recipes referenced by packs
rg -nP '^- type:\s+latheRecipePack\b' -n -C3 Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml
rg -nP '^\s*id:\s*IngotPigIron\b' Resources/Prototypes

# Ensure the entity compiles structure-wise (quick heuristic checks)
rg -n 'id:\s*BlastFurnace' Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml -n -C5
Resources/Prototypes/Civ14/Recipes/Construction/metallurgy.yml (1)

156-186: Ensure Unique IDs for BlastFurnace constructions

We’ve got two pairs of entries all using id: BlastFurnace in
Resources/Prototypes/Civ14/Recipes/Construction/metallurgy.yml, which will collide at load time—either merge them or rename one variant.

• constructionGraph “BlastFurnace” at line 40
• construction “blastfurnace” (id: BlastFurnace) at line 55
• constructionGraph “BlastFurnace” at line 157
• construction “blast furnace” (id: BlastFurnace) at line 172

Option A (single construction):
• Remove the earlier or later pair so there’s only one graph+construction block.

Option B (two constructions):
• Give the alternate block a new id (e.g. BlastFurnaceAlt) and update its graph reference and icon.

Example sibling to drop in next to the existing block:

- type: construction
  name: blast furnace
  id: BlastFurnaceAlt
  graph: BlastFurnace
  startNode: start
  targetNode: end
  category: construction-category-production
  description: Used for smelting pig iron (alternate).
  icon:
    sprite: Civ14/Objects/metallurgy.rsi
    state: blast_furnace
  objectType: Structure
  agemin: 2
  agemax: 8
  placementMode: SnapgridCenter
  canBuildInImpassable: false
  conditions:
    - !type: TileNotBlocked

Pick your poison—don’t let these IDs brawl!

Resources/Prototypes/Civ14/Entities/Objects/Materials/materials_metals.yml (1)

141-147: Stack prototype naming: call it “pig iron”, not “iron”.

The PigIron stack’s name is currently “iron”, which will be confusing in-game and in logs. Rename to “pig iron”.

-  id: PigIron
-  name: iron
+  id: PigIron
+  name: pig iron
🧹 Nitpick comments (1)
Resources/Prototypes/Civ14/Entities/Structures/Craft/armor.yml (1)

20-20: Recipe pack entry is fine, but consider a clearer ID.

Adding the recipe to the pack looks good. For clarity/grepability, consider renaming the recipe ID to match its output (e.g., SheetSteelCiv14 instead of SheetSheetCiv14).

Apply:

-    - SheetSheetCiv14
+    - SheetSteelCiv14
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 56f1392 and aa7f7a7.

⛔ Files ignored due to path filters (3)
  • Resources/Textures/Objects/Materials/ingots.rsi/pig_iron_full.png is excluded by !**/*.png
  • Resources/Textures/Objects/Materials/ingots.rsi/pig_iron_half.png is excluded by !**/*.png
  • Resources/Textures/Objects/Materials/ingots.rsi/pig_iron_one.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • Resources/Prototypes/Civ14/Entities/Objects/Materials/materials_metals.yml (1 hunks)
  • Resources/Prototypes/Civ14/Entities/Structures/Craft/armor.yml (2 hunks)
  • Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml (1 hunks)
  • Resources/Prototypes/Civ14/Recipes/Construction/metallurgy.yml (2 hunks)

Comment on lines 108 to 114
- type: latheRecipe
id: SheetSheetCiv14
result: SheetSteel1
completetime: 4
materials:
PigIron: 100

Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Missing categories and possible missing output prototype.

  • This recipe lacks categories, so it may not be grouped properly in the UI tabs. All other armour recipes declare categories: [AnvilArmorMedieval].
  • Please verify that SheetSteel1 exists; otherwise this will hard-fail at runtime.

Suggested fix:

-  id: SheetSheetCiv14
-  result: SheetSteel1
-  completetime: 4
-  materials:
-    PigIron: 100
+  id: SheetSteelCiv14
+  categories:
+    - AnvilArmorMedieval
+  result: SheetSteel1
+  completetime: 4
+  materials:
+    PigIron: 100

Quick checks:


🏁 Script executed:

#!/bin/bash
# 1) Ensure the output prototype exists somewhere in the repo
rg -nP '^\s*id:\s*SheetSteel1\b' -C2

# 2) Ensure the recipe ID referenced by the pack matches the definition
rg -n 'SheetSteelCiv14|SheetSheetCiv14' Resources/Prototypes/Civ14/Entities/Structures/Craft/armor.yml

Length of output: 619


Add missing categories and correct recipe ID

We’ve confirmed that the output prototype SheetSteel1 exists in
Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml:88 and that the recipe’s current ID SheetSheetCiv14 is a typo. Additionally, the categories field is missing, so this recipe won’t appear under the “AnvilArmorMedieval” tab.

Affected file:

  • Resources/Prototypes/Civ14/Entities/Structures/Craft/armor.yml (around lines 108–114)

Suggested diff:

  - type: latheRecipe
-  id: SheetSheetCiv14
+  id: SheetSteelCiv14
+  categories:
+    - AnvilArmorMedieval
   result: SheetSteel1
   completetime: 4
   materials:
     PigIron: 100
📝 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
- type: latheRecipe
id: SheetSheetCiv14
result: SheetSteel1
completetime: 4
materials:
PigIron: 100
- type: latheRecipe
id: SheetSteelCiv14
categories:
- AnvilArmorMedieval
result: SheetSteel1
completetime: 4
materials:
PigIron: 100
🤖 Prompt for AI Agents
In Resources/Prototypes/Civ14/Entities/Structures/Craft/armor.yml around lines
108 to 114, the recipe ID is a typo and the categories field is missing so the
recipe won't show under the AnvilArmorMedieval tab; rename the id from
"SheetSheetCiv14" to "SheetSteelCiv14" (matching the output SheetSteel1) and add
a categories field containing "AnvilArmorMedieval" (as a list), keeping the
existing type, result, completetime and materials intact and properly indented.

Comment on lines +39 to +68
- type: constructionGraph
id: BlastFurnace
start: start
graph:
- node: start
edges:
- to: end
steps:
- material: Iron
amount: 25
doAfter: 15
- node: end
entity: BlastFurnace

- type: construction
name: blastfurnace
id: BlastFurnace
graph: BlastFurnace
startNode: start
targetNode: end
category: construction-category-production
description: Used for smelting pig iron.
icon: { sprite: Civ14/Objects/metallurgy.rsi, state: bloomery }
objectType: Structure
agemin: 0
agemax: 8
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Duplicate BlastFurnace graph/construction inserted mid-Bloomery graph (and wrong icon).

This block creates:

  • A duplicate constructionGraph with id BlastFurnace (another appears later).
  • A construction with the same id as the later one (BlastFurnace), causing an ID collision.
  • It’s also spliced into the middle of the Bloomery graph before its edges finish, which will confuse the YAML parser faster than you can say “slag”.

Best move: remove this earlier block and keep the later, cleaner one; or keep both constructions but give them unique IDs. Below is the “remove the earlier block” option.

- - type: constructionGraph
-  id: BlastFurnace
-  start: start
-  graph:
-  - node: start
-    edges:
-    - to: end
-      steps:
-      - material: Iron
-        amount: 25
-        doAfter: 15
-  - node: end
-    entity: BlastFurnace
-
- - type: construction
-  name: blastfurnace
-  id: BlastFurnace
-  graph: BlastFurnace
-  startNode: start
-  targetNode: end
-  category: construction-category-production
-  description: Used for smelting pig iron.
-  icon: { sprite: Civ14/Objects/metallurgy.rsi, state: bloomery }
-  objectType: Structure
-  agemin: 0
-  agemax: 8
-  placementMode: SnapgridCenter
-  canBuildInImpassable: false
-  conditions:
-  - !type:TileNotBlocked
📝 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
- type: constructionGraph
id: BlastFurnace
start: start
graph:
- node: start
edges:
- to: end
steps:
- material: Iron
amount: 25
doAfter: 15
- node: end
entity: BlastFurnace
- type: construction
name: blastfurnace
id: BlastFurnace
graph: BlastFurnace
startNode: start
targetNode: end
category: construction-category-production
description: Used for smelting pig iron.
icon: { sprite: Civ14/Objects/metallurgy.rsi, state: bloomery }
objectType: Structure
agemin: 0
agemax: 8
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
🤖 Prompt for AI Agents
In Resources/Prototypes/Civ14/Recipes/Construction/metallurgy.yml around lines
39 to 68, there is an inserted block defining a constructionGraph and
construction both with id BlastFurnace that interrupts the Bloomery graph and
duplicates a later BlastFurnace definition; remove the entire block from line 39
to 68 so the Bloomery graph remains contiguous and the single, correct
BlastFurnace definition later is preserved (alternatively, if you intend two
distinct entries, give this early block unique ids and correct its icon/state),
then validate the YAML to ensure no parsing errors remain.

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: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml (2)

189-193: latheRecipePack block is mis-indented and appears nested under the entity.

Recipe packs are top-level documents, not inside components. Pull it out to top level and fix the stray leading spaces and dash alignment.

-
-    - type: latheRecipePack
-  id: BlastFurnace
-  recipes:
-    - IngotPigIron
+ - type: latheRecipePack
+  id: BlastFurnace
+  recipes:
+    - IngotPigIron

152-193: One-shot full replacement (if you prefer a clean patch).

This consolidates all fixes above into a single, known-good block mirroring kiln/bloomery structure.

- - type: entity
-  id: BlastFurnace
-  name: blastfurnace
-  description: Used for making pig iron.
-   - type: Sprite
-    sprite: Civ14/Objects/metallurgy.rsi
-    layers:
-    - state: blast_furnace_on
-      shader: unshaded
-      map: [ "enum.LatheVisualLayers.IsRunning" ]
-    - state: blast_furnace
-      map: [ "enum.PowerDeviceVisualLayers.Powered" ]
-    - state: blast_furnace
-      map: [ "enum.MaterialStorageVisualLayers.Inserting" ]
-    - state: blast_furnace
-      map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
-  - type: Destructible
-    thresholds:
-    - trigger: !type:DamageTrigger
-        damage: 200
-      behaviors:
-      - !type:PlaySoundBehavior
-        sound:
-          collection: StoneBreak
-      - !type:DoActsBehavior
-        acts: [ "Destruction" ]
-  - type: ApcPowerReceiver
-    needsPower: false
-  - type: Lathe
-    idleState: blast_furnace
-    runningState: blast_furnace_on
-    staticPacks:
-    - BlastFurnace
-  - type: Construction
-    graph: BlastFurnace
-    node: end
-
-    - type: latheRecipePack
-  id: BlastFurnace
-  recipes:
-    - IngotPigIron
+ - type: entity
+  id: BlastFurnace
+  name: blast furnace
+  parent: OreProcessor
+  description: Used for making pig iron.
+  components:
+    - type: Sprite
+      sprite: Civ14/Objects/metallurgy.rsi
+      layers:
+        - state: blast_furnace_on
+          shader: unshaded
+          map: ["enum.LatheVisualLayers.IsRunning"]
+        - state: blast_furnace
+          map: ["enum.PowerDeviceVisualLayers.Powered"]
+        - state: blast_furnace
+          map: ["enum.MaterialStorageVisualLayers.Inserting"]
+        - state: blast_furnace
+          map: ["enum.WiresVisualLayers.MaintenancePanel"]
+    - type: Destructible
+      thresholds:
+        - trigger: !type:DamageTrigger
+            damage: 200
+          behaviors:
+            - !type:PlaySoundBehavior
+              sound:
+                collection: StoneBreak
+            - !type:DoActsBehavior
+              acts: ["Destruction"]
+    - type: ApcPowerReceiver
+      needsPower: false
+    - type: Lathe
+      idleState: blast_furnace
+      runningState: blast_furnace_on
+      staticPacks:
+        - BlastFurnace
+    - type: Construction
+      graph: BlastFurnace
+      node: end
+
+ - type: latheRecipePack
+  id: BlastFurnace
+  recipes:
+    - IngotPigIron
🧹 Nitpick comments (1)
Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml (1)

154-154: Name spacing nit: “blastfurnace” → “blast furnace”.

Matches style of “stone kiln” and “bloomery”. Tiny, but helps consistency. Your future self will thank you (or at least grumble less).

-  name: blastfurnace
+  name: blast furnace
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between afb988c and 2cc9dca.

📒 Files selected for processing (1)
  • Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml (1 hunks)
🔇 Additional comments (1)
Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml (1)

152-193: Dependencies are in place—blast furnace is good to go! Verified that the IngotPigIron entity, the BlastFurnace construction graph, and the metallurgy.rsi sprite file all exist in the codebase.

Comment on lines +152 to +168
- type: entity
id: BlastFurnace
name: blastfurnace
description: Used for making pig iron.
- type: Sprite
sprite: Civ14/Objects/metallurgy.rsi
layers:
- state: blast_furnace_on
shader: unshaded
map: [ "enum.LatheVisualLayers.IsRunning" ]
- state: blast_furnace
map: [ "enum.PowerDeviceVisualLayers.Powered" ]
- state: blast_furnace
map: [ "enum.MaterialStorageVisualLayers.Inserting" ]
- state: blast_furnace
map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
- type: Destructible
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Malformed entity: missing components: block and broken indentation under Sprite.

The BlastFurnace entity lacks a components: key, and the - type: Sprite entry is at the wrong level. YAML will fail to parse; game won’t load this prototype. Let’s fix structure and indentation.

Apply this diff to introduce components: and correct indentation:

- - type: entity
+ - type: entity
   id: BlastFurnace
-  name: blastfurnace
-  description: Used for making pig iron.
-   - type: Sprite
-    sprite: Civ14/Objects/metallurgy.rsi
-    layers:
-    - state: blast_furnace_on
-      shader: unshaded
-      map: [ "enum.LatheVisualLayers.IsRunning" ]
-    - state: blast_furnace
-      map: [ "enum.PowerDeviceVisualLayers.Powered" ]
-    - state: blast_furnace
-      map: [ "enum.MaterialStorageVisualLayers.Inserting" ]
-    - state: blast_furnace
-      map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
+  name: blast furnace
+  description: Used for making pig iron.
+  components:
+    - type: Sprite
+      sprite: Civ14/Objects/metallurgy.rsi
+      layers:
+        - state: blast_furnace_on
+          shader: unshaded
+          map: ["enum.LatheVisualLayers.IsRunning"]
+        - state: blast_furnace
+          map: ["enum.PowerDeviceVisualLayers.Powered"]
+        - state: blast_furnace
+          map: ["enum.MaterialStorageVisualLayers.Inserting"]
+        - state: blast_furnace
+          map: ["enum.WiresVisualLayers.MaintenancePanel"]

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml around
lines 152-168, the BlastFurnace entity is malformed: it is missing a top-level
components: key and the Sprite/Destructible entries are mis-indented at the
entity level; fix by adding a components: block under the BlastFurnace entity
and indent the Sprite and Destructible entries as items under components (ensure
each component starts with "- type:" and nested keys like sprite, layers, state,
map are indented under the Sprite component), preserving existing values but
correcting indentation so YAML parses and the engine recognizes the components.

Comment on lines +153 to +156
id: BlastFurnace
name: blastfurnace
description: Used for making pig iron.
- type: Sprite
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider inheriting from OreProcessor like the other furnaces.

StoneKiln and Bloomery both parent: OreProcessor. Without this, BlastFurnace may miss expected defaults/components. Add the parent unless intentionally diverging.

   id: BlastFurnace
-  name: blast furnace
+  name: blast furnace
+  parent: OreProcessor

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml around
lines 153 to 156, the BlastFurnace entry lacks the parent: OreProcessor
declaration used by StoneKiln and Bloomery, so it may miss expected
defaults/components; update the BlastFurnace definition to include parent:
OreProcessor (or explicitly add any missing components/defaults if you
intentionally diverge) to align its behavior with the other furnaces.

Comment on lines +168 to +178
- type: Destructible
thresholds:
- trigger: !type:DamageTrigger
damage: 200
behaviors:
- !type:PlaySoundBehavior
sound:
collection: StoneBreak
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: ApcPowerReceiver
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Indentation within Destructible.thresholds is off.

Lists (- trigger, - !type:PlaySoundBehavior, etc.) must be indented under their parents. Current shape will either blow up at parse time or silently ignore behaviours. Let’s align it with the existing kiln/bloomery pattern.

-  - type: Destructible
-    thresholds:
-    - trigger: !type:DamageTrigger
-        damage: 200
-      behaviors:
-      - !type:PlaySoundBehavior
-        sound:
-          collection: StoneBreak
-      - !type:DoActsBehavior
-        acts: [ "Destruction" ]
+    - type: Destructible
+      thresholds:
+        - trigger: !type:DamageTrigger
+            damage: 200
+          behaviors:
+            - !type:PlaySoundBehavior
+              sound:
+                collection: StoneBreak
+            - !type:DoActsBehavior
+              acts: ["Destruction"]

Committable suggestion skipped: line range outside the PR's diff.

Comment on lines +181 to +187
idleState: blast_furnace
runningState: blast_furnace_on
staticPacks:
- BlastFurnace
- type: Construction
graph: BlastFurnace
node: end
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

staticPacks list item needs nesting; Construction belongs under components.

- BlastFurnace is at the same indent as staticPacks: which makes it a sibling key, not the list value. Also - type: Construction must remain within the components: list.

-  - type: Lathe
-    idleState: blast_furnace
-    runningState: blast_furnace_on
-    staticPacks:
-    - BlastFurnace
-  - type: Construction
-    graph: BlastFurnace
-    node: end
+    - type: Lathe
+      idleState: blast_furnace
+      runningState: blast_furnace_on
+      staticPacks:
+        - BlastFurnace
+    - type: Construction
+      graph: BlastFurnace
+      node: end
📝 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
idleState: blast_furnace
runningState: blast_furnace_on
staticPacks:
- BlastFurnace
- type: Construction
graph: BlastFurnace
node: end
- type: Lathe
idleState: blast_furnace
runningState: blast_furnace_on
staticPacks:
- BlastFurnace
- type: Construction
graph: BlastFurnace
node: end
🤖 Prompt for AI Agents
In Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml around
lines 181 to 187, the YAML indentation is wrong: the "- BlastFurnace" entry is
not nested under staticPacks and the "- type: Construction" block has been
pulled out of the components list; fix by indenting the "- BlastFurnace" line to
be a child list item of staticPacks and re-indent the "- type: Construction"
block so it remains nested under the existing components: list (aligning its
dash at the same indent level as the other component items).

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

Labels

Changes: No C# Changes: Sprites Untriaged This issue has not been reviewed yet