-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine stacks of coins, make combine work in adventure mode #1227
base: master
Are you sure you want to change the base?
Conversation
…o the now wrong inventory due to item removals)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality looks good. Main thing I was concerned about is coins max stacking at 500 (which is what you've done). Some of the user feedback could be improved though.
if not dfhack.isMapLoaded() then | ||
qerror('combine needs a loaded fortress map to work') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using combine from the main menu now gives a disingenuous error message, because it works in adventure mode. Perhaps change this to combine can only be used in-game
.
if dfhack.world.isAdventureMode() and df.global.game.main_interface.adventure.inventory.open then | ||
-- refresh the inventory to prevent stale item references | ||
df.global.game.main_interface.adventure.inventory.open = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user should be notified at least in command console output if their inventory was closed automatically to prevent bugs. Running a tool that does not ostensibly claim it will manipulate UI and having it, surprisingly, manipulate UI, can be a distressing and disorienting experience for users.
can you synthesize this with sent keystrokes? |
@@ -792,6 +808,8 @@ local function parse_commandline(opts, args) | |||
opts.all=get_stockpile_all() | |||
elseif positionals[1] == 'here' then | |||
opts.here=get_stockpile_here() | |||
elseif positionals[1] == 'item' then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs docs
Allow combine to work in adventure mode and also combine stacks of coins
Note that it's safer to use the (z) -> Items tab to combine stacks currently, as doing so from the (i)nventory will not update the interface to reflect the change until you quit out of the inventory and come back. Need to figure out how to resolve that.