Skip to content

gui/petition: fix deity display#1586

Open
chdoc wants to merge 1 commit into
DFHack:masterfrom
chdoc:fix-gui-petition
Open

gui/petition: fix deity display#1586
chdoc wants to merge 1 commit into
DFHack:masterfrom
chdoc:fix-gui-petition

Conversation

@chdoc
Copy link
Copy Markdown
Member

@chdoc chdoc commented May 15, 2026

fixes: DFHack/dfhack#5686

Disclaimer: I am following the structure of the types here, I don't actually have a petition from an organization that doesn't worship a religion but directly worships a deity.

@chdoc chdoc force-pushed the fix-gui-petition branch from e5d8839 to 56bf915 Compare May 15, 2026 19:19
@chdoc chdoc force-pushed the fix-gui-petition branch from 56bf915 to ccc4674 Compare May 15, 2026 19:20
@chdoc
Copy link
Copy Markdown
Member Author

chdoc commented May 15, 2026

@SilasD Would you be willing to take a look at this?

Copy link
Copy Markdown
Contributor

@SilasD SilasD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks fine except for future-proofing in case a third option is added to the
df.religious_practice_type. which realistically ain't gonna happen.

It should resolve the issue. I'm fine with it.

Comment thread list-agreements.lua
local hf = df.historical_figure.find(practice_id)
if not hf then return 'An Unknown Deity' end
return dfhack.translation.translateName(hf.name, true)
else
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like this could be
elseif practice_type == df.religious_practice_type.RELIGION_ENID then
(untested code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gui/petition does not show correct deity when listing petitions related to temples/organized religions

2 participants