Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum df.world_data.world_region_type same as df.world.worldgen_region_type #164

Open
PatrikLundell opened this issue Oct 10, 2016 · 4 comments
Labels

Comments

@PatrikLundell
Copy link
Contributor

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.

@lethosor lethosor added the enums label Oct 24, 2016
@FantasticFwoosh
Copy link

'forest' (lowercase) also features in df.units.xml -

<flag-bit name='forest'

comment='used for units no longer linked to merchant/diplomacy, they just try to leave mostly'/>

@quietust
Copy link
Member

@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".

@dscorbett
Copy link
Contributor

world_region_type is an int16_t and worldgen_region_type is an int32_t. Is that a problem?

@lethosor
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants