added bots and roboports

This commit is contained in:
Snogard 2025-08-18 16:00:50 +02:00
parent fa6339d396
commit 63c7a42782
94 changed files with 822 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,269 @@
local QUANTITY = 10;
local base_name = "construction-robot";
local base_entity = table.deepcopy(data.raw["construction-robot"][base_name]);
local base_recipe = table.deepcopy(data.raw.recipe[base_name]);
local base_item = table.deepcopy(data.raw.item[base_name]);
local base_tech = table.deepcopy(data.raw.technology["construction-robotics"]);
local tech_count = 400;
local base_speed = 0.06;
local base_max_energy = 1.5;
local speed_increment = base_speed / 2;
local max_energy_increment = base_max_energy / 2;
local sciencePacks = {
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
{ "utility-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
{ "utility-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
{ "utility-science-pack", 1 }
},
}
local prerequisites = {
{
"logistic-robotics",
"construction-robotics"
},
{
"5d-construction-robot-1",
"5d-logistic-robot-1",
"5d-roboport-2"
},
{
"5d-construction-robot-2",
"5d-logistic-robot-2",
"5d-roboport-3",
"chemical-science-pack"
},
{
"5d-construction-robot-3",
"5d-logistic-robot-3",
"5d-roboport-4"
},
{
"5d-construction-robot-4",
"5d-logistic-robot-4",
"5d-roboport-5",
"production-science-pack"
},
{
"5d-construction-robot-5",
"5d-logistic-robot-5",
"5d-roboport-6"
},
{
"5d-construction-robot-6",
"5d-logistic-robot-6",
"5d-roboport-7",
"utility-science-pack"
},
{
"5d-construction-robot-7",
"5d-logistic-robot-7",
"5d-roboport-8"
},
{
"5d-construction-robot-8",
"5d-logistic-robot-8",
"5d-roboport-9"
}
}
local ingredients = {
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "electronic-circuit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "electronic-circuit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "advanced-circuit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "advanced-circuit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "advanced-circuit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "processing-unit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "processing-unit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "processing-unit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "processing-unit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "processing-unit", amount = 1 }
},
}
data:extend({
{
type = "item-subgroup",
name = "5d-" .. base_name,
group = "logistics",
order = "e"
},
});
for i = 2, QUANTITY, 1 do
local entity = table.deepcopy(base_entity);
local name = "5d-" .. base_name .. "-0" .. i;
if i >= 10 then
name = "5d-" .. base_name .. "-" .. i;
end
table.assign(entity, {
name = name,
icon = lib.getGraphics("icon", base_name, i),
next_upgrade = "5d-" .. base_name .. "-0" .. (i + 1),
fast_replaceable_group = base_name,
speed = base_speed + speed_increment * (i - 1),
max_energy = (base_max_energy + max_energy_increment * (i - 1)) .. "MJ",
});
entity.minable.result = name;
local number = "0" .. i;
if i >= 10 then
number = "" .. i;
end
-- Idle
entity.idle.filename =
"__snogard-re5dim__/graphics/entities/construction-robot/construction-robot/construction-robot-" ..
number .. ".png"
-- Idle
entity.in_motion.filename =
"__snogard-re5dim__/graphics/entities/construction-robot/construction-robot/construction-robot-" ..
number .. ".png"
-- Working
entity.working.filename =
"__snogard-re5dim__/graphics/entities/construction-robot/construction-robot-working/construction-robot-working-" ..
number .. ".png"
local recipe = table.deepcopy(base_recipe);
local final_ingredients = table.deepcopy(ingredients[i - 1]);
table.insert(final_ingredients, { type = "item", name = "5d-" .. base_name .. "-0" .. (i - 1), amount = 1 });
table.assign(recipe, {
name = name,
enabled = false,
icon_size = 64,
icon = lib.getGraphics("icon", base_name, i),
ingredients = final_ingredients,
results = { { type = "item", name = name, amount = 1 } },
})
if (i == 2) then
table.assign(recipe, {
ingredients = {
{ type = "item", name = base_name, amount = 1 },
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "electronic-circuit", amount = 1 }
},
});
end
-- set order on item(letters)
local item = table.deepcopy(base_item);
table.assign(item, {
name = name,
subgroup = "5d-" .. base_name,
icon_size = 64,
icon = lib.getGraphics("icon", base_name, i),
order = letters[i],
place_result = name,
});
local tech = table.deepcopy(base_tech);
table.assign(tech, {
name = "5d-construction-robot-" .. (i-1),
icon_size = 64,
icon = lib.getGraphics("icon", base_name, i),
place_result = name,
prerequisites = table.deepcopy(prerequisites[i - 1]),
effects = {
{
type = "unlock-recipe",
recipe = name
}
},
});
tech.unit.count = tech_count * (i - 1);
tech.unit.ingredients = table.deepcopy(sciencePacks[i - 1]);
data:extend({
entity,
item,
recipe,
tech
});
end

View File

@ -0,0 +1,254 @@
local QUANTITY = 10;
local base_name = "logistic-robot";
local base_entity = table.deepcopy(data.raw["logistic-robot"][base_name]);
local base_recipe = table.deepcopy(data.raw.recipe[base_name]);
local base_item = table.deepcopy(data.raw.item[base_name]);
local base_tech = table.deepcopy(data.raw.technology["logistic-robotics"]);
local tech_count = 400;
local base_speed = 0.05;
local base_max_energy = 1.5;
local speed_increment = base_speed / 2;
local max_energy_increment = base_max_energy / 2;
local sciencePacks = {
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
{ "utility-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
{ "utility-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
{ "utility-science-pack", 1 }
},
}
local prerequisites = {
{
"logistic-robotics",
"construction-robotics"
},
{
"5d-construction-robot-1",
"5d-logistic-robot-1",
"5d-roboport-2"
},
{
"5d-construction-robot-2",
"5d-logistic-robot-2",
"5d-roboport-3",
"chemical-science-pack"
},
{
"5d-construction-robot-3",
"5d-logistic-robot-3",
"5d-roboport-4"
},
{
"5d-construction-robot-4",
"5d-logistic-robot-4",
"5d-roboport-5",
"production-science-pack"
},
{
"5d-construction-robot-5",
"5d-logistic-robot-5",
"5d-roboport-6"
},
{
"5d-construction-robot-6",
"5d-logistic-robot-6",
"5d-roboport-7",
"utility-science-pack"
},
{
"5d-construction-robot-7",
"5d-logistic-robot-7",
"5d-roboport-8"
},
{
"5d-construction-robot-8",
"5d-logistic-robot-8",
"5d-roboport-9"
}
}
local ingredients = {
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "advanced-circuit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "advanced-circuit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "advanced-circuit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "advanced-circuit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "processing-unit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "processing-unit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "processing-unit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "processing-unit", amount = 1 }
},
{
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "processing-unit", amount = 1 }
},
}
data:extend({
{
type = "item-subgroup",
name = "5d-" .. base_name,
group = "logistics",
order = "e"
},
});
for i = 2, QUANTITY, 1 do
local entity = table.deepcopy(base_entity);
local name = "5d-" .. base_name .. "-0" .. i;
if i >= 10 then
name = "5d-" .. base_name .. "-" .. i;
end
table.assign(entity, {
name = name,
icon = lib.getGraphics("icon", base_name, i),
next_upgrade = "5d-" .. base_name .. "-0" .. (i + 1),
fast_replaceable_group = base_name,
speed = base_speed + speed_increment * (i - 1),
max_energy = (base_max_energy + max_energy_increment * (i - 1)) .. "MJ",
});
entity.minable.result = name;
-- Idle
entity.idle.filename = lib.getGraphics("entities", base_name, i);
-- Idle
entity.idle_with_cargo.filename = lib.getGraphics("entities", base_name, i);
-- Idle
entity.in_motion.filename = lib.getGraphics("entities", base_name, i);
-- Idle
entity.in_motion_with_cargo.filename = lib.getGraphics("entities", base_name, i);
local recipe = table.deepcopy(base_recipe);
local final_ingredients = table.deepcopy(ingredients[i - 1]);
table.insert(final_ingredients, { type = "item", name = "5d-" .. base_name .. "-0" .. (i - 1), amount = 1 });
table.assign(recipe, {
name = name,
enabled = false,
icon_size = 64,
icon = lib.getGraphics("icon", base_name, i),
ingredients = final_ingredients,
results = { { type = "item", name = name, amount = 1 } },
})
if (i == 2) then
table.assign(recipe, {
ingredients = {
{ type = "item", name = base_name, amount = 1 },
{ type = "item", name = "flying-robot-frame", amount = 1 },
{ type = "item", name = "advanced-circuit", amount = 1 }
},
});
end
-- set order on item(letters)
local item = table.deepcopy(base_item);
table.assign(item, {
name = name,
subgroup = "5d-" .. base_name,
icon_size = 64,
icon = lib.getGraphics("icon", base_name, i),
order = letters[i],
place_result = name,
});
local tech = table.deepcopy(base_tech);
table.assign(tech, {
name = "5d-logistic-robot-" .. (i-1),
icon_size = 64,
icon = lib.getGraphics("icon", base_name, i),
place_result = name,
prerequisites = table.deepcopy(prerequisites[i - 1]),
effects = {
{
type = "unlock-recipe",
recipe = name
}
},
});
tech.unit.count = tech_count * (i - 1);
tech.unit.ingredients = table.deepcopy(sciencePacks[i - 1]);
data:extend({
entity,
item,
recipe,
tech
});
end

View File

@ -0,0 +1,3 @@
require("construction-robot");
require("logistic-robot");
require("roboport");

View File

@ -0,0 +1,294 @@
local QUANTITY = 10;
local base_name = "roboport";
local base_entity = table.deepcopy(data.raw["roboport"][base_name]);
local base_recipe = table.deepcopy(data.raw.recipe[base_name]);
local base_item = table.deepcopy(data.raw.item[base_name]);
local base_tech = table.deepcopy(data.raw.technology["logistic-robotics"]);
local tech_count = 450;
local base_charging_speed = 1000;
local base_energy_usage = 50;
local base_buffer_capacity = 100;
local base_flow = 5;
local base_logistic_radius = 25;
local base_construction_radius = 55;
local base_robot_slots = 7;
local base_recharge_minimum = 40;
local base_recharge_slots = 4;
local charging_speed_increment = base_charging_speed / 2;
local energy_usage_increment = base_energy_usage;
local buffer_capacity_increment = base_buffer_capacity / 2;
local flow_increment = 13; -- base_flow / 2;
local logistic_radius_increment = base_logistic_radius / 2;
local construction_radius_increment = (base_construction_radius - 5) / 2;
local robot_slots_increment = 1;
local recharge_minimum_increment = base_recharge_minimum / 2;
local recharge_slots_increment = base_recharge_slots / 2;
local sciencePacks = {
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
{ "utility-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
{ "utility-science-pack", 1 }
},
{
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
{ "utility-science-pack", 1 }
},
}
local prerequisites = {
{
"logistic-robotics",
"construction-robotics"
},
{
"5d-construction-robot-1",
"5d-logistic-robot-1",
"5d-roboport-1"
},
{
"5d-construction-robot-2",
"5d-logistic-robot-2",
"5d-roboport-2",
"chemical-science-pack"
},
{
"5d-construction-robot-3",
"5d-logistic-robot-3",
"5d-roboport-3"
},
{
"5d-construction-robot-4",
"5d-logistic-robot-4",
"5d-roboport-4",
"production-science-pack"
},
{
"5d-construction-robot-5",
"5d-logistic-robot-5",
"5d-roboport-5"
},
{
"5d-construction-robot-6",
"5d-logistic-robot-6",
"5d-roboport-6",
"utility-science-pack"
},
{
"5d-construction-robot-7",
"5d-logistic-robot-7",
"5d-roboport-7"
},
{
"5d-construction-robot-8",
"5d-logistic-robot-8",
"5d-roboport-8"
}
}
local ingredients = {
{
{ type = "item", name = "steel-plate", amount = 45 },
{ type = "item", name = "iron-gear-wheel", amount = 45 },
{ type = "item", name = "advanced-circuit", amount = 45 }
},
{
{ type = "item", name = "steel-plate", amount = 45 },
{ type = "item", name = "iron-gear-wheel", amount = 45 },
{ type = "item", name = "advanced-circuit", amount = 45 }
},
{
{ type = "item", name = "steel-plate", amount = 45 },
{ type = "item", name = "iron-gear-wheel", amount = 45 },
{ type = "item", name = "advanced-circuit", amount = 45 }
},
{
{ type = "item", name = "steel-plate", amount = 45 },
{ type = "item", name = "iron-gear-wheel", amount = 45 },
{ type = "item", name = "advanced-circuit", amount = 45 }
},
{
{ type = "item", name = "steel-plate", amount = 45 },
{ type = "item", name = "iron-gear-wheel", amount = 45 },
{ type = "item", name = "advanced-circuit", amount = 45 }
},
{
{ type = "item", name = "steel-plate", amount = 45 },
{ type = "item", name = "iron-gear-wheel", amount = 45 },
{ type = "item", name = "advanced-circuit", amount = 45 }
},
{
{ type = "item", name = "steel-plate", amount = 45 },
{ type = "item", name = "iron-gear-wheel", amount = 45 },
{ type = "item", name = "advanced-circuit", amount = 45 }
},
{
{ type = "item", name = "steel-plate", amount = 45 },
{ type = "item", name = "iron-gear-wheel", amount = 45 },
{ type = "item", name = "advanced-circuit", amount = 45 }
},
{
{ type = "item", name = "steel-plate", amount = 45 },
{ type = "item", name = "iron-gear-wheel", amount = 45 },
{ type = "item", name = "advanced-circuit", amount = 45 }
}
}
data:extend({
{
type = "item-subgroup",
name = "5d-" .. base_name,
group = "logistics",
order = "e"
},
});
for i = 2, QUANTITY, 1 do
local entity = table.deepcopy(base_entity);
local name = "5d-" .. base_name .. "-0" .. i;
if i >= 10 then
name = "5d-" .. base_name .. "-" .. i;
end
table.assign(entity, {
name = name,
icon = lib.getGraphics("icon", base_name, i),
next_upgrade = "5d-" .. base_name .. "-0" .. (i + 1),
charging_energy = (base_charging_speed + charging_speed_increment * (i - 1)) .. "kW",
energy_usage = (base_energy_usage + energy_usage_increment * (i - 1)) .. "kW",
logistics_radius = math.ceil(base_logistic_radius + logistic_radius_increment * (i - 1)),
construction_radius = base_construction_radius + construction_radius_increment * (i - 1),
robot_slots_count = base_robot_slots + math.floor(i / 3),
recharge_minimum = (base_recharge_minimum + recharge_minimum_increment * (i - 1)) .. "MJ",
charging_station_count = (base_recharge_slots + recharge_slots_increment * (i - 1)),
});
entity.energy_source.buffer_capacity = (base_buffer_capacity + buffer_capacity_increment * (i - 1)) .. "MJ";
entity.energy_source.input_flow_limit = (base_flow + flow_increment * (i - 1)) .. "MW";
entity.minable.result = name;
local number = "0" .. i;
if i >= 10 then
number = "" .. i;
end
-- Base
entity.base.layers[1].filename = "__snogard-re5dim__/graphics/entities/roboport/roboport-base/roboport-base-" ..
number .. ".png"
-- Base patch
entity.base_patch.filename = "__snogard-re5dim__/graphics/entities/roboport/roboport-base-patch/roboport-base-patch-" ..
number .. ".png"
if (i == QUANTITY) then
table.assign(entity, {
next_upgrade = nil,
});
end
local recipe = table.deepcopy(base_recipe);
local final_ingredients = table.deepcopy(ingredients[i - 1]);
table.insert(final_ingredients, { type = "item", name = "5d-" .. base_name .. "-0" .. (i - 1), amount = 1 });
table.assign(recipe, {
name = name,
enabled = false,
icon_size = 64,
icon = lib.getGraphics("icon", base_name, i),
ingredients = final_ingredients,
results = { { type = "item", name = name, amount = 1 } },
})
if (i == 2) then
table.assign(recipe, {
ingredients = {
{ type = "item", name = base_name, amount = 1 },
{ type = "item", name = "steel-plate", amount = 45 },
{ type = "item", name = "iron-gear-wheel", amount = 45 },
{ type = "item", name = "advanced-circuit", amount = 45 }
},
});
end
-- set order on item(letters)
local item = table.deepcopy(base_item);
table.assign(item, {
name = name,
subgroup = "5d-" .. base_name,
icon_size = 64,
icon = lib.getGraphics("icon", base_name, i),
order = letters[i],
place_result = name,
});
local tech = table.deepcopy(base_tech);
table.assign(tech, {
name = "5d-roboport-" .. (i - 1),
icon_size = 64,
icon = lib.getGraphics("icon", base_name, i),
place_result = name,
prerequisites = table.deepcopy(prerequisites[i - 1]),
effects = {
{
type = "unlock-recipe",
recipe = name
}
},
});
tech.unit.count = tech_count * (i - 1);
tech.unit.ingredients = table.deepcopy(sciencePacks[i - 1]);
data:extend({
entity,
item,
recipe,
tech
});
end

View File

@ -1,2 +1,3 @@
require("automation.automation"); require("automation.automation");
require("energy.energy"); require("energy.energy");
require("logistic.logistic");