hide planner overlay during the tutorial

develop
Myk Taylor 2023-04-10 04:24:00 -07:00
parent 661ddbd256
commit 04c16186de
No known key found for this signature in database
2 changed files with 9 additions and 1 deletions

@ -45,6 +45,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
## Misc Improvements
- `buildingplan`: items in the item selection dialog should now use the same item quality symbols as the base game
- `buildingplan`: hide planner overlay while the DF tutorial is active so that it can detect when you have placed the carpenter's workshop and bed and allow you to finish the tutorial
-@ `buildingplan`: rearranged elements of ``planneroverlay`` interface
-@ `buildingplan`: rearranged elements of ``itemselection`` interface
- Mods: scripts in mods that are only in the steam workshop directory are now accessible. this means that a script-only mod that you never mark as "active" when generating a world will still receive automatic updates and be usable from in-game

@ -141,8 +141,15 @@ local function is_construction()
return uibs.building_type == df.building_type.Construction
end
local function is_tutorial_open()
local help = df.global.game.main_interface.help
return help.open and
help.context == df.help_context_type.START_TUTORIAL_WORKSHOPS_AND_TASKS
end
local function is_plannable()
return get_cur_filters() and
return not is_tutorial_open() and
get_cur_filters() and
not (is_construction() and
uibs.building_subtype == df.construction_type.TrackNSEW)
end