Restructure files, order icons properly
This commit is contained in:
parent
eb3b358626
commit
d036653321
7 changed files with 248 additions and 32 deletions
|
@ -1,2 +1,3 @@
|
||||||
require("prototypes/integrations/data")
|
require("__cf-lib__/util")
|
||||||
require("prototypes/compatibility/data")
|
|
||||||
|
require("prototypes/data")
|
5
train-overhaul/prototypes/data.lua
Normal file
5
train-overhaul/prototypes/data.lua
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
require("tier1")
|
||||||
|
require("tier2")
|
||||||
|
require("tier3")
|
||||||
|
|
||||||
|
require("compatibility/data")
|
|
@ -1 +0,0 @@
|
||||||
require("mini-trains")
|
|
|
@ -1,29 +0,0 @@
|
||||||
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
|
|
85
train-overhaul/prototypes/tier1.lua
Normal file
85
train-overhaul/prototypes/tier1.lua
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
local Recipe = require("__cf-lib__/data/Recipe")
|
||||||
|
local Technology = require("__cf-lib__/data/Technology")
|
||||||
|
|
||||||
|
-- Entities
|
||||||
|
|
||||||
|
table.merge(data.raw["locomotive"]["mini-locomotive"], {
|
||||||
|
max_power = "230kW",
|
||||||
|
max_speed = 0.35,
|
||||||
|
friction_force = 0.20,
|
||||||
|
braking_force = 1,
|
||||||
|
energy_source = {
|
||||||
|
fuel_inventory_size = 2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
table.merge(data.raw["cargo-wagon"]["mini-cargo-wagon"], {
|
||||||
|
max_speed = 0.35,
|
||||||
|
friction_force = 0.1,
|
||||||
|
braking_force = 0.5
|
||||||
|
})
|
||||||
|
|
||||||
|
table.merge(data.raw["fluid-wagon"]["mini-fluid-wagon"], {
|
||||||
|
max_speed = 0.35,
|
||||||
|
friction_force = 0.1,
|
||||||
|
braking_force = 0.5,
|
||||||
|
capacity = 25000
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Items
|
||||||
|
|
||||||
|
table.assign(data.raw.item["mini-locomotive"], {
|
||||||
|
stack_size = 10,
|
||||||
|
order = "c[rolling-stock]-a[tier1]-a[locomotive]",
|
||||||
|
subgroup = "train-transport"
|
||||||
|
})
|
||||||
|
table.assign(data.raw.item["mini-cargo-wagon"], {
|
||||||
|
stack_size = 10,
|
||||||
|
order = "c[rolling-stock]-a[tier1]-b[cargo-wagon]",
|
||||||
|
subgroup = "train-transport"
|
||||||
|
})
|
||||||
|
table.assign(data.raw.item["mini-fluid-wagon"], {
|
||||||
|
stack_size = 10,
|
||||||
|
order = "c[rolling-stock]-a[tier1]-c[fluid-wagon]",
|
||||||
|
subgroup = "train-transport"
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Recipes
|
||||||
|
|
||||||
|
Recipe:new("mini-locomotive")
|
||||||
|
:replaceIngredient("engine-unit", "iron-gear-wheel", 10)
|
||||||
|
|
||||||
|
|
||||||
|
-- Technologies
|
||||||
|
|
||||||
|
Technology:new("railway")
|
||||||
|
:setPrerequisites({ "logistics", "steel-processing" })
|
||||||
|
:removeIngredient("logistic-science-pack")
|
||||||
|
:removeRecipe("locomotive")
|
||||||
|
:removeRecipe("cargo-wagon")
|
||||||
|
:addRecipe("mini-locomotive")
|
||||||
|
:addRecipe("mini-cargo-wagon")
|
||||||
|
:assign({
|
||||||
|
icon = "__Mini_Trains__/data/icons/tech256.png",
|
||||||
|
icon_size = 256
|
||||||
|
})
|
||||||
|
|
||||||
|
Technology:new("automated-rail-transportation")
|
||||||
|
:removeIngredient("logistic-science-pack")
|
||||||
|
:merge({
|
||||||
|
unit = {
|
||||||
|
count = 75
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
Technology:new("fluid-wagon")
|
||||||
|
:removeRecipe("fluid-wagon")
|
||||||
|
:addRecipe("mini-fluid-wagon")
|
||||||
|
:assign({
|
||||||
|
icon = "__Mini_Trains__/data/icons/fluid256.png",
|
||||||
|
icon_size = 256
|
||||||
|
})
|
||||||
|
|
||||||
|
data.raw.technology["mini-trains"] = nil
|
60
train-overhaul/prototypes/tier2.lua
Normal file
60
train-overhaul/prototypes/tier2.lua
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
local Recipe = require("__cf-lib__/data/Recipe")
|
||||||
|
local Technology = require("__cf-lib__/data/Technology")
|
||||||
|
|
||||||
|
-- Entities
|
||||||
|
|
||||||
|
table.merge(data.raw["locomotive"]["rtc-steam-locomotive"], {
|
||||||
|
weight = 4000,
|
||||||
|
max_power = "690kW",
|
||||||
|
max_speed = 0.8,
|
||||||
|
friction_force = 0.50,
|
||||||
|
braking_force = 10,
|
||||||
|
air_resistance = 0.01
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Items
|
||||||
|
|
||||||
|
table.assign(data.raw.item["rtc-steam-locomotive-item"], {
|
||||||
|
stack_size = 10,
|
||||||
|
order = "c[rolling-stock]-b[tier2]-a[locomotive]",
|
||||||
|
subgroup = "train-transport"
|
||||||
|
})
|
||||||
|
table.assign(data.raw["item-with-entity-data"]["cargo-wagon"], {
|
||||||
|
stack_size = 10,
|
||||||
|
order = "c[rolling-stock]-b[tier2]-b[cargo-wagon]",
|
||||||
|
subgroup = "train-transport"
|
||||||
|
})
|
||||||
|
table.assign(data.raw["item-with-entity-data"]["fluid-wagon"], {
|
||||||
|
stack_size = 10,
|
||||||
|
order = "c[rolling-stock]-b[tier2]-c[fluid-wagon]",
|
||||||
|
subgroup = "train-transport"
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Recipes
|
||||||
|
|
||||||
|
Recipe:new("rtc-steam-locomotive-recipe")
|
||||||
|
:addIngredient("holmium-plate", 20)
|
||||||
|
|
||||||
|
Recipe:new("cargo-wagon")
|
||||||
|
:replaceIngredient("iron-plate", "holmium-plate", 10)
|
||||||
|
|
||||||
|
Recipe:new("fluid-wagon")
|
||||||
|
:replaceIngredient("pipe", "holmium-plate", 10)
|
||||||
|
|
||||||
|
|
||||||
|
-- Technologies
|
||||||
|
|
||||||
|
Technology:new("rtc-steam-locomotion-technology")
|
||||||
|
:setPrerequisites({ "electromagnetic-science-pack", "fluid-wagon" })
|
||||||
|
:addRecipe("cargo-wagon")
|
||||||
|
:addRecipe("fluid-wagon")
|
||||||
|
:assign({
|
||||||
|
research_trigger = {
|
||||||
|
type = "craft-item",
|
||||||
|
item = "electromagnetic-science-pack",
|
||||||
|
count = 10
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.prototype.unit = nil
|
95
train-overhaul/prototypes/tier3.lua
Normal file
95
train-overhaul/prototypes/tier3.lua
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
local Recipe = require("__cf-lib__/data/Recipe")
|
||||||
|
local Technology = require("__cf-lib__/data/Technology")
|
||||||
|
|
||||||
|
-- Entities
|
||||||
|
|
||||||
|
table.merge(data.raw["locomotive"]["locomotive"], {
|
||||||
|
weight = 4000,
|
||||||
|
max_power = "1150kW",
|
||||||
|
max_speed = 1.25,
|
||||||
|
friction_force = 0.50,
|
||||||
|
braking_force = 15
|
||||||
|
})
|
||||||
|
|
||||||
|
table.merge(data.raw["cargo-wagon"]["black-cargo-wagon"], {
|
||||||
|
weight = 1500,
|
||||||
|
max_speed = 2,
|
||||||
|
friction_force = 0.5,
|
||||||
|
braking_force = 4,
|
||||||
|
inventory_size = 60
|
||||||
|
})
|
||||||
|
|
||||||
|
table.merge(data.raw["fluid-wagon"]["black-fluid-wagon"], {
|
||||||
|
weight = 1500,
|
||||||
|
max_speed = 2,
|
||||||
|
friction_force = 0.5,
|
||||||
|
braking_force = 4,
|
||||||
|
capacity = 75000
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Items
|
||||||
|
|
||||||
|
table.assign(data.raw["item-with-entity-data"]["locomotive"], {
|
||||||
|
stack_size = 10,
|
||||||
|
order = "c[rolling-stock]-c[tier3]-a[locomotive]",
|
||||||
|
subgroup = "train-transport"
|
||||||
|
})
|
||||||
|
table.assign(data.raw["item-with-entity-data"]["black-cargo-wagon"], {
|
||||||
|
stack_size = 10,
|
||||||
|
order = "c[rolling-stock]-c[tier3]-b[cargo-wagon]",
|
||||||
|
subgroup = "train-transport"
|
||||||
|
})
|
||||||
|
table.assign(data.raw["item-with-entity-data"]["black-fluid-wagon"], {
|
||||||
|
stack_size = 10,
|
||||||
|
order = "c[rolling-stock]-c[tier3]-c[fluid-wagon]",
|
||||||
|
subgroup = "train-transport"
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Recipes
|
||||||
|
|
||||||
|
Recipe:new("locomotive")
|
||||||
|
:replaceIngredient("electronic-circuit", "processing-unit")
|
||||||
|
:replaceIngredient("steel-plate", "tungsten-plate")
|
||||||
|
:replaceIngredient("engine-unit", "electric-engine-unit")
|
||||||
|
:addIngredient("holmium-plate", 20)
|
||||||
|
:addIngredient("lithium-plate", 10)
|
||||||
|
|
||||||
|
Recipe:new("black-cargo-wagon")
|
||||||
|
:replaceIngredient("iron-plate", "tungsten-plate")
|
||||||
|
:replaceIngredient("iron-gear-wheel", "holmium-plate", 10)
|
||||||
|
:replaceIngredient("cargo-wagon", "carbon-fiber", 10)
|
||||||
|
|
||||||
|
Recipe:new("black-fluid-wagon")
|
||||||
|
:replaceIngredient("iron-plate", "tungsten-plate")
|
||||||
|
:replaceIngredient("iron-gear-wheel", "holmium-plate", 10)
|
||||||
|
:replaceIngredient("fluid-wagon", "carbon-fiber", 10)
|
||||||
|
:addIngredient("storage-tank", 2)
|
||||||
|
|
||||||
|
|
||||||
|
-- Technologies
|
||||||
|
|
||||||
|
Technology:new("black-cargo-wagon")
|
||||||
|
:setPrerequisites({ "rtc-steam-locomotion-technology", "cryogenic-science-pack" })
|
||||||
|
:setIngredients({
|
||||||
|
"automation-science-pack",
|
||||||
|
"logistic-science-pack",
|
||||||
|
"chemical-science-pack",
|
||||||
|
"utility-science-pack",
|
||||||
|
"production-science-pack",
|
||||||
|
"space-science-pack",
|
||||||
|
"metallurgic-science-pack",
|
||||||
|
"electromagnetic-science-pack",
|
||||||
|
"cryogenic-science-pack"
|
||||||
|
})
|
||||||
|
:addRecipe("black-fluid-wagon")
|
||||||
|
:addRecipe("locomotive")
|
||||||
|
:merge({
|
||||||
|
unit = {
|
||||||
|
count = 2000,
|
||||||
|
time = 60
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
data.raw.technology["black-fluid-wagon"] = nil
|
Loading…
Add table
Reference in a new issue