Skip to content

Script changes for getAdventurer arena fix - #1645

Open
Bumber64 wants to merge 6 commits into
DFHack:masterfrom
Bumber64:get-adventurer
Open

Bumber64 wants to merge 6 commits into
DFHack:masterfrom
Bumber64:get-adventurer

Conversation

@Bumber64

@Bumber64 Bumber64 commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Merge after DFHack/dfhack#5991.

Enable more scripts to work properly in adventure arena. Disable gui/reveal in arena since reveal returns CR_FAILURE.

gui/create-item fix is implicit from getAdventurer fix.

* Update launch.lua - Arena
* Update ghostly.lua - Arena
* Update resurrect-adv.lua - Arena
* Update position.lua - Arena
* Update resize-armor.lua - Arena
* Update toggle-kbd-cursor.lua - Arena
* Update markdown.lua - Arena
* Update advtools.lua - Arena
* Update gui/notify.lua - Arena
* Update skills-progress.lua - Arena
* Update gui/reveal.lua - Disallow arena
* Update changelog.txt
* Update position.lua - Revert, no meaningful arena position
* Update changelog.txt - Revert position

* Update advtools.lua
* Update ghostly.lua
* Update notify.lua
* Update skills-progress.lua
* Update launch.lua
* Update markdown.lua
* Update resize-armor.lua
* Update resurrect-adv.lua
* Update toggle-kbd-cursor.lua
@Bumber64
Bumber64 marked this pull request as ready for review October 5, 2026 18:32

@SilasD SilasD left a comment

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.

this generally seems solid.

I don't really like moving away from clean getters to probing fields directly,
df.global.gamemode == df.game_mode.ADVENTURE feels clunkier.

is there no combo like isAdventureMode() and not isArena() that can do the job?

Comment thread gui/reveal.lua
if not dfhack.isMapLoaded() then
qerror('This script requires a map to be loaded')
elseif dfhack.world.isArena() then
qerror('This script doesn\'t work in arena mode')

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.

no real need to escape this apostrophe.

Suggested change
qerror('This script doesn\'t work in arena mode')
qerror("This script doesn't work in arena mode")

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.

2 participants