Types/DamageTypeFilters: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Migrated prototype doc to separate website)
(Updated styling of prototype doc migration note)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/DamageTypeFilters.html https://lua-api.factorio.com/latest/types/DamageTypeFilters.html]
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/DamageTypeFilters.html https://lua-api.factorio.com/latest/types/DamageTypeFilters.html]


This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>





Latest revision as of 10:42, 21 September 2023

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/DamageTypeFilters.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.


Either a dictionary (Types/table) with the below properties, an array (Types/table) of names of Prototype/DamageTypes (Types/strings), or one name of a Prototype/DamageType (Types/string).

Mandatory properties

types

Type: Types/string or Types/table (array) of Types/string

Default: false

Name or names of Prototype/DamageTypes.

Optional properties

whitelist

Type: Types/bool

Default: false

Whether this is a whitelist or a blacklist of damage types. Defaults to being a blacklist.

Examples

A single damage type filter to blacklist fire can be specified in the following 4 different ways:

damage_type_filters = "fire"
damage_type_filters = { "fire" } -- more damage types could be specified here
damage_type_filters = 
{
  whitelist = false, -- optional
  types = "fire"
}
damage_type_filters = 
{
  whitelist = false, -- optional
  types = { "fire" } -- more damage types could be specified here
}