49 lines
797 B
Lua
49 lines
797 B
Lua
local flib_data_util = require("__TEST__/depends/flib/data-util");
|
|
function create_new_crop_base(name)
|
|
local trigger = {
|
|
type = "direct",
|
|
action_delivery = {
|
|
type = "instant",
|
|
target_effects = {
|
|
{
|
|
type = "script",
|
|
effect_id = "crop-" .. name .. "-spwaned"
|
|
}
|
|
}
|
|
}
|
|
};
|
|
local base = flib_data_util.copy_prototype(data.raw["simple-entity"]["rock-big"], name);
|
|
base.collision_mask = {
|
|
"ground-tile",
|
|
"object-layer",
|
|
"water-tile"
|
|
};
|
|
base.collision_box = {
|
|
{
|
|
-0.4,
|
|
-0.4
|
|
},
|
|
{
|
|
0.4,
|
|
0.4
|
|
}
|
|
};
|
|
base.selection_box = {
|
|
{
|
|
-0.4,
|
|
-0.4
|
|
},
|
|
{
|
|
0.4,
|
|
0.4
|
|
}
|
|
};
|
|
base.flags = {
|
|
"placeable-neutral",
|
|
"player-creation"
|
|
};
|
|
base.pictures = nil;
|
|
base.created_effect = trigger;
|
|
base.minable = { mining_time = 0.1 }
|
|
return base;
|
|
end;
|