Integrate Mini trains

This commit is contained in:
Simon Brodtmann 2025-04-03 18:22:32 +02:00
parent fba942124e
commit d3a6ef8893
6 changed files with 71 additions and 0 deletions

2
train-overhaul/data.lua Normal file
View file

@ -0,0 +1,2 @@
require("prototypes/integrations/data")
require("prototypes/compatibility/data")

View file

@ -0,0 +1,2 @@
require("aai-industry")
require("lignumis")

View file

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

View file

@ -0,0 +1 @@
require("mini-trains")

View file

@ -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

View file

@ -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
})