43 lines
1.2 KiB
Lua
43 lines
1.2 KiB
Lua
local flib_data_util = require("__TEST__/depends/flib/data-util");
|
|
local const = require("__TEST__/prototypes/const");
|
|
local planter = flib_data_util.copy_prototype(data.raw["container"]["iron-chest"],
|
|
"planter");
|
|
planter.energy_source = {}
|
|
planter.energy_source.usage_priority = "secondary-input";
|
|
planter.energy_production = "0W";
|
|
planter.energy_source.buffer_capacity = "50KW";
|
|
planter.energy_source.drain = "0W";
|
|
planter.energy_usage = "50KW"
|
|
local planter_item = table.deepcopy(data.raw.item["small-electric-pole"]);
|
|
planter_item.name = "planter";
|
|
planter_item.place_result = "planter";
|
|
planter.radius_visualisation_specification = { distance = 6.0, sprite = const.Radius_visualisation_sprite }
|
|
planter_item.icons = {
|
|
{
|
|
icon = planter_item.icon,
|
|
icon_size = planter_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 = "planter-spwaned"
|
|
}
|
|
}
|
|
}
|
|
};
|
|
planter.created_effect = trigger;
|
|
data:extend({
|
|
planter,
|
|
planter_item
|
|
});
|