gui/petition does not show correct deity when listing petitions related to temples/organized religions
I noticed that the gui/petition tool does not list the correct deity when listing active petitions related to organized religions/temples. The included screenshots for for example that The Brass Doctrine worship the deity Ral, whereas the gui/petition reports The Brass Doctrine worships, Vashzud Mangystab the Righteous Conqueror.
I have not looked at the code, but I suspect the problem is not checking the agreement's deity_type field to determine whether the deity_data union field refers to a Deity or a Religion.
-- Inline union
<struct-type type-name='religious_practice_data' is-union='true'>
<int32_t name='practice_id'/>
<int32_t name='Deity' ref-target='historical_figure'/>
<int32_t name='Religion' ref-target='historical_entity'/>
</struct-type>
<struct-type type-name='agreement_details_data_location' original-name='agreement_subject_build_locationst'>
<int32_t name='applicant' ref-target='agreement_party'/>
<int32_t name='government' ref-target='agreement_party'/>
<int32_t name='site' ref-target='world_site'/>
<enum name='type' base-type='int32_t' type-name='abstract_building_type'/>
<enum name='deity_type' type-name='religious_practice_type'/>
<compound name='deity_data' type-name='religious_practice_data'/>
<enum name='profession' type-name='profession'/>
<int32_t name='tier' comment='1 = temple or guildhall, 2 = temple complex or grand guildhall; matches location_tier in abstract_building_contents'/>
<bitfield name='flags' base-type='uint32_t' type-name='agreement_subject_build_location_flag'/>
</struct-type>
If it's relevant a few other observations related to this:
It is replicated in world, the same religion was mislabeled in a prior fort in the same world.
Vashzud is a dead minotaur, and if I am reading legends correctly, no religions ever worshiped him.
Yes, that's absolutely the results I would expect from my diagnosis. It's taking an entity id (civilizations, sites, dance troupes, religions, etc) and treating it as a historical figure id. So you get some random creature.