User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

data-types [2020/01/23 13:38]
maxime created
data-types [2020/07/07 15:32] (current)
Line 146: Line 146:
 | //''​_step''//​ | ''​integer''​ | Amount of sides of the circle | | //''​_step''//​ | ''​integer''​ | Amount of sides of the circle |
 +==== bitfield ====
 +A bitfield is a dictionary with enumeration values of a specific type as keys, and boolean values as value.
 +When defining a new object, a enumeration value missing from a bitfield table will be considered as false. When [[:​asset-override|overriding existing data]], a missing enumeration value means the existing value will not be overriden.
 +To initialize a bitfield of [[api:​building_zone_type|BUILDING_ZONE_TYPE]] with the ''​DEFAULT''​ and ''​GRASS_CLEAR''​ values:
 +<file lua>
 +local bitfield = {
 +    DEFAULT = true,
 +    NAVIGABLE = false,
 +    GRASS_CLEAR = true
data-types.txt ยท Last modified: 2020/07/07 15:32 by maxime