Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,54 @@
state: copper
- type: Stack
count: 1

- type: entity
parent: IngotBase
id: IngotPigIron
name: pig iron ingot
suffix: Full
components:
- type: Material
- type: PhysicalComposition
materialComposition:
Iron: 100
- type: Stack
stackType: PigIron
baseLayer: base
layerStates:
- pig_iron_one
- pig_iron_half
- pig_iron_full
- type: Sprite
state: pig_iron_full
layers:
- state: pig_iron_full
map: ["base"]
- type: Item
heldPrefix: iron
- type: Appearance
- type: Extractable
grindableSolutionName: iron
- type: SolutionContainerManager
solutions:
iron:
reagents:
- ReagentId: Iron
Quantity: 10

- type: entity
parent: IngotPigIron
id: IngotPigIron1
name: pig iron ingot
suffix: Single
components:
- type: Sprite
state: pig_iron_one
- type: Stack
count: 1
- type: stack
id: PigIron
name: PigIron
icon: { sprite: /Textures/Objects/Materials/ingots.rsi, state: pig_iron_one }
spawn: IngotPigIron1
maxCount: 30
11 changes: 11 additions & 0 deletions Resources/Prototypes/Civ14/Entities/Structures/Craft/armor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- civ13_suit_hauberk
- civ13_suit_emirate_armor
- civ13_suit_imperial_chinese_armor
- SheetSheetCiv14

- type: latheRecipePack
id: AnvilArmorImperial
Expand Down Expand Up @@ -103,3 +104,13 @@
materials:
Iron: 1000
result: civ13_suit_imperial_chinese_armor

- type: latheRecipe
id: SheetSheetCiv14
categories:
- AnvilArmorMedieval
result: SheetSteel1
completetime: 4
materials:
PigIron: 100

Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,45 @@
completetime: 2
materials:
RawSand: 100

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

Copy link
Copy Markdown

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.

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
Comment on lines +152 to +168

Copy link
Copy Markdown

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.

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

Copy link
Copy Markdown

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.

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

Copy link
Copy Markdown

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).


- type: latheRecipePack
id: BlastFurnace
recipes:
- IngotPigIron
62 changes: 62 additions & 0 deletions Resources/Prototypes/Civ14/Recipes/Construction/metallurgy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,37 @@
graph:
- node: start
edges:

- 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
Comment on lines +39 to +68

Copy link
Copy Markdown

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.

- to: end
steps:
- material: Stone
Expand Down Expand Up @@ -121,3 +152,34 @@
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked

- 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: blast furnace
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: blast_furnace }
objectType: Structure
agemin: 2
agemax: 8
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading