#Just released my new mod: [Dispose in
1 messages · Page 1 of 1 (latest)
I'm quite intrigued on this as a mod maker and I wanna know how viable this is for other mods to use. Can I define what can and can't be dumped in certain tiles? How UPS efficient is it?
Also, would it be possible to define if pollution is created when an item is dumped and also what kind? I think this as a library mod would be mighty useful
Pretty sure they're just using
https://lua-api.factorio.com/latest/prototypes/TilePrototype.html#destroys_dropped_items
Basically it turns the flag on tiles that allows items to be destroyed, in the same manner as lava works on Vulcanus. In that regard it is UPS efficient as no scripting/calculation is done by a mod, but at the same time no item selection could be made.
Yep, exactly
You could theoretically use https://lua-api.factorio.com/latest/prototypes/TilePrototype.html#default_destroyed_dropped_item_trigger
to make a script trigger that you use to be more specific about what items get destroyed... though I suspect they're already destroyed at that point
So you'd probably need the trigger on the item:
https://lua-api.factorio.com/latest/prototypes/ItemPrototype.html#destroyed_by_dropping_trigger
Currently I use default_destroyed_dropped_item_trigger for the visual effects, not sure about other uses
Also re pollution - I couldn't find a way to create pollution from a trigger, as this way I could avoid scripting it and keep UPS friendly. I'm open for suggestions, it would be cool to add it as a feature.
Pollution is not something I think I ever considered for triggers
But now that I've thought of it, I think it's worth an interface request
I'll share a link to the request once it's published.