df-structures
df-structures copied to clipboard
Enum df.world_data.world_region_type same as df.world.worldgen_region_type
The title refers to the .XML files the enums reside in. The enums have the "same" values in the same order. The mixed case enums in the former type have different names with broadly the same meaning in some cases ('Jungle' vs 'FOREST', 'Steppe' vs 'GRASSLAND'). Since the latter enum's values match what's used by DF itself through the world generation files, that is probably the type that should remain.
'forest' (lowercase) also features in df.units.xml - https://github.com/DFHack/df-structures/blob/0e8313dc86617796b7145a306df274a882474175/df.units.xml#L13
comment='used for units no longer linked to merchant/diplomacy, they just try to leave mostly'/>
@FantasticFwoosh that instance of "forest" has absolutely nothing to do with biomes or region types - it just means they want to "return to the forest".
world_region_type
is an int16_t
and worldgen_region_type
is an int32_t
. Is that a problem?
Somewhat. Currently, only fields of an enum type whose size matches the size of the enum's base type are treated as enum fields in Lua. For example, building_screw_pumpst.direction will be displayed as a screw_pump_direction in gui/gm-editor (with fancy names), but building_rollersst.direction will not (because its type, int32_t, does not match the enum's base type, int8_t).