Assign the following trigger to TilePrototype.default_destroyed_dropped_item_trigger:
Code: Select all
{
type = "direct",
action_delivery = {
type = "instant",
source_effects = {
{
type = "create-pollution",
amount = 1000
}
}
}
}
Here's the code for mod that would reproduce the behavior:
Code: Select all
local effect = {
type = "create-pollution",
amount = 1000
}
if not settings.startup["test-use-trigger-entity"].value then
effect.use_entity_from_trigger = false
end
data.raw.tile["water"].default_destroyed_dropped_item_trigger = {
type = "direct",
action_delivery = {
type = "instant",
source_effects = {
effect
}
}
}
data.raw.tile["water"].destroys_dropped_items = true
Pollution is created regardless of whether it is associated with an entity in the Pollution statistics.
Actual behavior
No pollution is created.
It's also possible that the API doc could be clarified. Currently it states:
From this description, I expected that when no trigger entity is available, pollution would still be created, just without being attributed in the Pollution statistics. Instead, no pollution is created at all.use_entity_from_trigger :: boolean If not set, and entity is not set, the pollution does not show in statistics.

