From 62d126205ae867e3cc18fe14f2bb16da741d4b46 Mon Sep 17 00:00:00 2001 From: MAGGen Date: Sun, 26 Oct 2025 22:37:48 +0100 Subject: [PATCH] Added ability to upgrade/replace wooden rails to normal variant and back. Rails are now fast-replaceable and can be upgraded with upgrade plan. Note: To degrade rails back to wooden it's required to manualy select ALL rail variants (straight, diagonal, curve) in upgrade plan and select wooden replacemnet for them. --- .../prototypes/Wood_Products/rail.lua | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Bio_Industries_2/prototypes/Wood_Products/rail.lua b/Bio_Industries_2/prototypes/Wood_Products/rail.lua index 1a5c1e5..dceaad8 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/rail.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/rail.lua @@ -117,7 +117,10 @@ local simulations = require("__base__.prototypes.factoriopedia-simulations") placeable_by = {item = "bi-rail-wood", count = 1}, walking_sound = tile_sounds.walking.rails, extra_planner_goal_penalty = -4, - factoriopedia_alternative = "straight-rail" + factoriopedia_alternative = "straight-rail", + -- for upgrade planer (fast rail change wood/iron) + next_upgrade = "straight-rail", + fast_replaceable_group = "straight-rail", }, { @@ -166,7 +169,10 @@ local simulations = require("__base__.prototypes.factoriopedia-simulations") placeable_by = {item = "bi-rail-wood", count = 2}, walking_sound = tile_sounds.walking.rails, extra_planner_penalty = 0, - factoriopedia_alternative = "straight-rail" + factoriopedia_alternative = "straight-rail", + -- for upgrade planer (fast rail change wood/iron) + next_upgrade = "half-diagonal-rail", + fast_replaceable_group = "half-diagonal-rail", }, { type = "curved-rail-a", @@ -213,7 +219,10 @@ local simulations = require("__base__.prototypes.factoriopedia-simulations") walking_sound = tile_sounds.walking.rails, extra_planner_penalty = 0.5, deconstruction_marker_positions = rail_8shifts_vector(-0.248, -0.533), - factoriopedia_alternative = "straight-rail" + factoriopedia_alternative = "straight-rail", + -- for upgrade planer (fast rail change wood/iron) + next_upgrade = "curved-rail-a", + fast_replaceable_group = "curved-rail-a", }, { type = "curved-rail-b", @@ -260,7 +269,10 @@ local simulations = require("__base__.prototypes.factoriopedia-simulations") walking_sound = tile_sounds.walking.rails, extra_planner_penalty = 0.5, deconstruction_marker_positions = rail_8shifts_vector(-0.309, -0.155), - factoriopedia_alternative = "straight-rail" + factoriopedia_alternative = "straight-rail", + -- for upgrade planer (fast rail change wood/iron) + next_upgrade = "curved-rail-b", + fast_replaceable_group = "curved-rail-b", }, })