Skip to content

Conversation

@lethosor
Copy link
Member

@lethosor lethosor commented Jun 6, 2024

Followup to feedback in #4674.

I verified that dfhack.internal.setArmokTools() and dfhack.setMortalMode() can still be called from the lua interpreter without deadlocking. I haven't seen meaningful changes occur from calling them, though, so my testing may not be exhaustive.

lethosor added 2 commits June 6, 2024 13:16
This fixes many crashes in API functions that used GetVector() without this check
@lethosor lethosor requested a review from myk002 June 6, 2024 17:32
@myk002 myk002 merged commit d040a3f into DFHack:develop Jun 6, 2024
@myk002
Copy link
Member

myk002 commented Jun 6, 2024

quick way to test:

  1. disable mortal mode
  2. go to the main dwarfmode map and hit Ctrl-Shift-T to bring up gui/teleport (which should come up)
  3. enable mortal mode
  4. go back to the map and hit Ctrl-Shift-T again. nothing should happen

you can see more info about the change in processing by running this before doing the testing:

debugfilter set debug core keybinding

@myk002
Copy link
Member

myk002 commented Jun 6, 2024

also, to test setArmokTools:

  1. enable mortal mode
  2. on main dwarfmode map, hit Ctrl-Shift-T and fail to bring up gui/teleport
  3. exit back to title screen
  4. edit hack/docs/docs/tools/gui/teleport.txt and take armok out of the tags
  5. load up a world, Ctrl-Shift-T should now launch gui/teleport even with mortal mode enabled

@lethosor
Copy link
Member Author

lethosor commented Jun 6, 2024

I was trying to filter out teleport in gui/launcher, with no luck. Didn't try loading a fort.

@myk002
Copy link
Member

myk002 commented Jun 6, 2024

that shouldn't be affected by this change, and should continue to work.

However, I think I see the issue that you might have been running into -- the tag filters in gui/launcher are not reset when you change the mortal mode config setting in gui/control-panel. I'll see if I can make that experience a little more smooth.

vidcap-2024-06-06_15.51.52.mp4

@myk002
Copy link
Member

myk002 commented Jun 6, 2024

fixed in #4680 and DFHack/scripts#1153

@lethosor lethosor deleted the threadsafe-mortal-cpp branch June 7, 2024 02:33
@lethosor
Copy link
Member Author

lethosor commented Jun 7, 2024

That would explain what I was seeing, thanks.

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

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants