-
Notifications
You must be signed in to change notification settings - Fork 480
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
WIP update zone #2930
WIP update zone #2930
Conversation
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
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.
I'm not sure what I think of all this state yet. Can the searching be done in a ZScreen?
@@ -98,7 +98,8 @@ enable automelt | |||
|
|||
# Other interface improvement tools | |||
enable \ | |||
confirm | |||
confirm \ | |||
zone |
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.
It looks like zone
has no functionally left that needs enabling at the plugin level. Overlay enabling is managed by overlay
. It can be removed from this file, and the enabled state and plugin_enable
function in the cpp can be removed.
return #df.global.world.raws.creatures.all[unit.race].caste[unit.caste].shearable_tissue_layer > 0 | ||
end | ||
|
||
local function copyTable(table_to_copy) |
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.
Can use the copyall
global function instead
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.
I actually had some problems using copyall
because it maintains the zero index, which gets missed in ipairs when it's an actual table. Like if I sub in copyall
in place of copyTable
right now things would break lol
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.
ah, ok, understood. maybe the function should be called toLuaList()
then?
} | ||
|
||
local function zone_assign_is_active() | ||
return dfhack.gui.matchFocusString('dwarfmode/UnitSelector') and (df.global.game.main_interface.unit_selector.context == 0 or df.global.game.main_interface.unit_selector.context == 1) |
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 focus string part should move into the viewscreen attribute on the overlay. See orders.lua
for an example
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.
And should the context value be part of the focus string as well?
Request from Reddit: would it be possible to autoassign hachlings to their mothers pastures? Nestboxes is an amazing function but it's painful to use if you just get goslings running amok. |
continuation of reddit convo:
|
closing PR for now since the functionality is now offered by the assign to pasture dialog. I'm keeping the reference to this PR in the associated issue, though, since there are bits of this PR we might want to merge into that dialog |
Very WIP on #2913, I wouldn't spend too much time reviewing yet unless you are graciously assisting me with specific questions lol