Sets of filters used to filter specific events.
Examples of event filters:
script.set_event_filter(defines.events.on_built_entity, {{filter = "name", name = "fast-inserter"}})
script.set_event_filter(defines.events.on_entity_died, {{filter = "type", type = "unit"}, {filter = "name", name = "fast-inserter"}})
script.on_event(defines.events.on_entity_damaged,
function(e) game.print("A wall was damaged on tick " .. e.tick) end,
{{filter="type", type = "wall"}})
An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"type"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:"force"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:"force"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields:"original-damage-amount"
: Additional fields:"final-damage-amount"
: Additional fields:"damage-type"
: Additional fields:An array of filters. Each filter is a table:
"or"
or "and"
.
Default is "or"
.false
. Depending on the value of filter
, the table may take additional fields. filter
may be one of the following:
"ghost"
"rail"
"rail-signal"
"rolling-stock"
"robot-with-logistics-interface"
"vehicle"
"turret"
"crafting-machine"
"wall-connectable"
"transport-belt-connectable"
"circuit-network-connectable"
"type"
: Additional fields:"name"
: Additional fields:"ghost_type"
: Additional fields:"ghost_name"
: Additional fields: