42 lines
1.3 KiB
Lua
42 lines
1.3 KiB
Lua
local flib_data_util = require("__TEST__/depends/flib/data-util");
|
|
local const = require("__TEST__/prototypes/const");
|
|
local auto_till = flib_data_util.copy_prototype(data.raw["electric-energy-interface"]["electric-energy-interface"],
|
|
"auto-till");
|
|
auto_till.energy_source.usage_priority = "secondary-input";
|
|
auto_till.energy_production = "0W";
|
|
auto_till.energy_source.buffer_capacity = const.Auto_till_target .. "KJ";
|
|
auto_till.energy_source.input_flow_limit = const.Auto_till_limit .. "KJ";
|
|
auto_till.energy_source.drain = "0W";
|
|
auto_till.radius_visualisation_specification = { distance = 6.0, sprite = const.Radius_visualisation_sprite }
|
|
local auto_till_item = table.deepcopy(data.raw.item["small-electric-pole"]);
|
|
auto_till_item.name = "auto-till";
|
|
auto_till_item.place_result = "auto-till";
|
|
auto_till_item.icons = {
|
|
{
|
|
icon = auto_till_item.icon,
|
|
icon_size = auto_till_item.icon_size,
|
|
tint = {
|
|
r = 1,
|
|
g = 0,
|
|
b = 0,
|
|
a = 0.3
|
|
}
|
|
}
|
|
};
|
|
local trigger = {
|
|
type = "direct",
|
|
action_delivery = {
|
|
type = "instant",
|
|
target_effects = {
|
|
{
|
|
type = "script",
|
|
effect_id = "auto-till-spwaned"
|
|
}
|
|
}
|
|
}
|
|
};
|
|
auto_till.created_effect = trigger;
|
|
data:extend({
|
|
auto_till,
|
|
auto_till_item
|
|
});
|