Ich habe gerade eine mit new industries v2.2 kompatible Version hochgeladen.
verantwortlich ist der code für den güterverbrauch.
if (townBuildingParams.landUseType == "INDUSTRIAL" or townBuildingParams.landUseType == "COMMERCIAL") then
local ruleCapacity = math.floor(result.personCapacity.capacity / 4 + 0.5)
if (ruleCapacity > 0) then
result.stocks = { }
result.stockRules = { }
local cargoTypes = townBuildingParams.landUseType == "INDUSTRIAL" and { "CONSTRUCTION_MATERIALS", "MACHINES", "FUEL" } or { "TOOLS", "FOOD", "GOODS" }
local inputs = { { { 1, 0, 0 } }, { { 0, 1, 0 } }, { { 0, 0, 1 } } }
for i = 1, 3 do
result.stocks[i] = {
cargoType = cargoTypes[i],
type = "RECEIVING",
edges = { },
moreCapacity = ruleCapacity
}
result.stockRules[i] = {
input = inputs[i],
output = { { 0, 0, 0 } },
capacity = ruleCapacity
}
end
end
end
Alles anzeigen