TL;DR
Rocks drop stone, I can clear it on_entity_mined, but I can't prevent it from spilling on the floor when it dies. I would like to have some form of change in either the LuaEntity, event or game mechanic to change this behavior.What ?
When talking about loot, I'm talking about the "expected resources" of things like rocks:Code: Select all
-- decoratives.lua
name = "sand-rock-big",
type = "simple-entity",
minable =
{
mining_particle = "stone-particle",
mining_time = 5,
results = {{name = "stone", amount_min = 19, amount_max = 25}}
},
loot =
{
{item = "stone", probability = 1, count_min = 10, count_max = 15}
},
I propose either, or both of the following in the LUA api, or follow the third option:
- Add a list of items that would be spilled on the ground if an entity dies, which works similar to the buffer when mining it
- Add the ability to alter the LuaEntity "loot table" without having to make a mod
- Don't spill the stone (or coal) when the rock dies (gun fire, biters, explosions, driving against it etc)
Why ?
I feel like this is missing because it's a bit of an odd one. Spilling contents seems to not be desired too much and has actually been removed to prevent certain grieving. However, for my custom soft-mod, the only alternative is to make rocks immune to damage and making sure they only get mined.To illustrate why I would like to prevent them from spilling, please watch this video, but imagine killing all the rocks instead of mining them and ending up with thousands of stone laying around: https://www.youtube.com/watch?v=qsOtkgOt00E