diff --git a/train-overhaul/data.lua b/train-overhaul/data.lua new file mode 100644 index 0000000..b28959a --- /dev/null +++ b/train-overhaul/data.lua @@ -0,0 +1,2 @@ +require("prototypes/integrations/data") +require("prototypes/compatibility/data") \ No newline at end of file diff --git a/train-overhaul/prototypes/compatibility/data.lua b/train-overhaul/prototypes/compatibility/data.lua new file mode 100644 index 0000000..62f2cec --- /dev/null +++ b/train-overhaul/prototypes/compatibility/data.lua @@ -0,0 +1,2 @@ +require("aai-industry") +require("lignumis") \ No newline at end of file diff --git a/train-overhaul/prototypes/compatibility/lignumis.lua b/train-overhaul/prototypes/compatibility/lignumis.lua new file mode 100644 index 0000000..842751d --- /dev/null +++ b/train-overhaul/prototypes/compatibility/lignumis.lua @@ -0,0 +1,16 @@ +local Recipe = require("__cf-lib__/data/Recipe") + +if not mods["lignumis"] then return end + +Recipe:new("mini-locomotive") + :replaceIngredient("steel-plate", 10) + :addIngredient("lumber", 10) + +Recipe:new("mini-cargo-wagon") + :replaceIngredient("steel-plate", 5) + :addIngredient("lumber", 5) + +Recipe:new("mini-fluid-wagon") + :replaceIngredient("steel-plate", 5) + :addIngredient("lumber", 5) + :addIngredient("iron-plate", 10) diff --git a/train-overhaul/prototypes/integrations/data.lua b/train-overhaul/prototypes/integrations/data.lua new file mode 100644 index 0000000..b422aab --- /dev/null +++ b/train-overhaul/prototypes/integrations/data.lua @@ -0,0 +1 @@ +require("mini-trains") \ No newline at end of file diff --git a/train-overhaul/prototypes/integrations/mini-trains.lua b/train-overhaul/prototypes/integrations/mini-trains.lua new file mode 100644 index 0000000..9cf0de1 --- /dev/null +++ b/train-overhaul/prototypes/integrations/mini-trains.lua @@ -0,0 +1,29 @@ +local locomotive = data.raw["locomotive"]["mini-locomotive"] +local cargo_wagon = data.raw["cargo-wagon"]["mini-cargo-wagon"] +local fluid_wagon = data.raw["fluid-wagon"]["mini-fluid-wagon"] + +table.merge(locomotive, { + max_power = "230kW", + max_speed = 0.35, + friction_force = 0.20, + braking_force = 1, + energy_source = { + fuel_inventory_size = 2 + } +}) + +table.merge(cargo_wagon, { + max_speed = 0.35, + friction_force = 0.1, + braking_force = 0.5 +}) + +table.merge(fluid_wagon, { + max_speed = 0.35, + friction_force = 0.1, + braking_force = 0.5 +}) + +data.raw.item["mini-locomotive"].stack_size = 10 +data.raw.item["mini-cargo-wagon"].stack_size = 10 +data.raw.item["mini-fluid-wagon"].stack_size = 10 \ No newline at end of file diff --git a/train-overhaul/settings-updates.lua b/train-overhaul/settings-updates.lua new file mode 100644 index 0000000..7b1b435 --- /dev/null +++ b/train-overhaul/settings-updates.lua @@ -0,0 +1,21 @@ +require("__cf-lib__/util") + +table.assign(data.raw["bool-setting"]["mtlw-add-mini-to-regular"], { + hidden = true, + force_value = true +}) + +table.assign(data.raw["bool-setting"]["mtlw-move-regular-to-vulcanus"], { + hidden = true, + force_value = true +}) + +table.assign(data.raw["bool-setting"]["mtlw-replace-some-steel-with-lumber"], { + hidden = true, + force_value = true +}) + +table.assign(data.raw["bool-setting"]["mtlw-nerf-mini-trains"], { + hidden = true, + force_value = false +}) \ No newline at end of file