Skip to content

Commit

Permalink
Merge pull request #696 from myk002/myk_occupation
Browse files Browse the repository at this point in the history
Define occupationst and related structures
  • Loading branch information
myk002 authored Jan 4, 2024
2 parents 743be55 + 3653e42 commit e7134f5
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 32 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ that repo.
Template for new versions:

## Structures
- ``occupation``: realigned
- ``service_order_type``: enum defined
- ``service_orderst``: type defined

]]]

Expand Down
65 changes: 37 additions & 28 deletions df.art.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1075,55 +1075,64 @@
<int32_t name='unk_3'/>
</struct-type>

<enum-type type-name='occupation_type' base-type='int32_t'>
<enum-type type-name='occupation_type' base-type='int32_t' comment='bay12: Occupation'>
<enum-item name='TAVERN_KEEPER'/>
<enum-item name='PERFORMER'/>
<enum-item name='SCHOLAR'/>
<enum-item name='MERCENARY'/>
<enum-item name='MONSTER_SLAYER'/>
<enum-item name='SCRIBE'/>
<enum-item name='MESSENGER'/>
<enum-item name='UNUSED_01'/>
<enum-item name='DOCTOR'/>
<enum-item name='DIAGNOSTICIAN'/>
<enum-item name='SURGEON'/>
<enum-item name='BONE_DOCTOR'/>
</enum-type>

<struct-type type-name='occupation' instance-vector='$global.world.occupations.all' key-field='id'>
<struct-type type-name='occupation' instance-vector='$global.world.occupations.all' key-field='id' original-name='occupationst'>
<int32_t name='id'/>
<enum name='type' base-type='int32_t' type-name='occupation_type'/>
<int32_t name='histfig_id' ref-target='historical_figure'/>
<int32_t name='unit_id' ref-target='unit'/>
<int32_t name='location_id' ref-target='abstract_building' aux-value='$$.site_id'/>
<int32_t name='site_id' ref-target='world_site'/>
<int32_t name='group_id' ref-target='historical_entity'/>
<stl-vector name='unk_1' pointer-type='occupation_sub1'/>
<int32_t name='unk_2' init-value='0'/>
<int32_t name='army_controller_id' ref-target='army_controller'/>
<pointer name='unk_4' type-name='world_site' has-bad-pointers='true' comment="When these haven't crashed the data has been nonsensical"/>
<pointer name='unk_5' type-name='abstract_building' has-bad-pointers='true' comment="When these haven't crashed the data has been nonsensical. Has seen duplicate of unk_4 pointer value"/>
<stl-vector name='service_order' pointer-type='service_orderst' comment='local id vector'/>
<int32_t name='next_service_order_id'/>

<pointer name='wg_site' type-name='world_site' comment='worldgen only'/>
<pointer name='wg_ab' type-name='abstract_building' comment='worldgen only'/>
</struct-type>

<struct-type type-name='occupation_sub1'>
<int32_t name='unk_1'/>
<int32_t name='unk_2'/>
<int16_t name='unk_3'/>
<int16_t name='unk_4'/>
<int16_t name='unk_5'/>
<int32_t name='unk_6'/>
<int32_t name='unk_7'/>
<int32_t name='unk_8'/>
<int32_t name='unk_9'/>
<int32_t name='unk_10'/>
<int32_t name='unk_11'/>
<int32_t name='unk_12'/>
<int32_t name='unk_13'/>
<int32_t name='unk_14'/>
<int32_t name='unk_15'/>
<int32_t name='unk_16'/>
<int32_t name='unk_17'/>
<int32_t name='unk_18'/>
<int32_t name='unk_19'/>
<enum-type type-name='service_order_type' base-type='int32_t' comment='bay12: ServiceOrder'>
<enum-item name='NONE' value='-1'/>
<enum-item name='DRINK'/>
<enum-item name='ROOM_RENTAL'/>
<enum-item name='EXTEND_ROOM_RENTAL'/>
</enum-type>

<struct-type type-name='service_orderst'>
<int32_t name='local_id'/>
<enum base-type='int32_t' name="type" type-name='service_order_type'/>
<enum name='item_type' type-name='item_type'/>
<int16_t name='item_subtype'/>
<int16_t name='mat_type'/>
<int32_t name='mat_index'/>
<int32_t name='customer_hfid'/>
<int32_t name='customer_unid'/>
<int32_t name='money_owed'/>
<int32_t name='room_ab_local_id' comment='not zone or ab id -- something local to ab'/>
<int32_t name='start_year'/>
<int32_t name='start_season_count'/>
<int32_t name='end_year'/>
<int32_t name='end_season_count'/>
<int32_t name='last_failed_year'/>
<int32_t name='last_failed_season_count'/>
<int32_t name='activity_id'/>
<int32_t name='activity_event_id'/>
<bitfield name='flag'>
<flag-bit name='completed'/>
</bitfield>
</struct-type>

</data-definition>
Expand Down
6 changes: 3 additions & 3 deletions df.ui-menus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@
<static-array type-name='uint8_t' count='149' index-enum='job_skill' name='skill_used'/>
<int32_t name='skill_num'/>

<pointer name='loc_occupation' comment='occupationst'/>
<pointer type-name='occupation' name='loc_occupation'/>
<pointer type-name='historical_entity' name='loc_ent'/>
<pointer type-name='entity_position' name='loc_position'/>
<pointer type-name='entity_position_assignment' name='loc_epp'/>
Expand Down Expand Up @@ -1547,7 +1547,7 @@
<int32_t name='open_area_dy'/>
<int32_t name='wc_count'/>

<stl-vector type-name='pointer' name='loc_occupation' comment='occupationst'/>
<stl-vector pointer-type='occupation' name='loc_occupation'/>
<stl-vector pointer-type='historical_entity' name='loc_ent'/>
<stl-vector pointer-type='entity_position' name='loc_position'/>
<stl-vector pointer-type='entity_position_assignment' name='loc_epp'/>
Expand Down Expand Up @@ -2426,7 +2426,7 @@
<stl-vector pointer-type='squad' name='ap_squad_list'/>
<int32_t name='ap_squad_sel'/>

<stl-vector name='pref_occupation' comment='occupationst'/>
<stl-vector pointer-type='occupation' name='pref_occupation'/>
<int32_t name='selected_pref_occupation'/>

<enum name='main_designation_selected' type-name='main_designation_type'/>
Expand Down
1 change: 0 additions & 1 deletion df.world-site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,6 @@
<int32_t name='unk_2'/>
</class-type>


</data-definition>

<!--
Expand Down

0 comments on commit e7134f5

Please sign in to comment.