diff options
| author | Alexander Gavrilov | 2012-08-24 13:20:08 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-08-24 13:20:08 +0400 |
| commit | e825dc5ddb1f2c0798b571ebcb02a52e184fc689 (patch) | |
| tree | f5fe92c3ea5b2f56e677f8d9d0b670e252317b4c /scripts | |
| parent | b12b9fa91e3be0d4d157f144f4b20202cdb72917 (diff) | |
| download | dfhack-e825dc5ddb1f2c0798b571ebcb02a52e184fc689.tar.gz dfhack-e825dc5ddb1f2c0798b571ebcb02a52e184fc689.tar.bz2 dfhack-e825dc5ddb1f2c0798b571ebcb02a52e184fc689.tar.xz | |
Tweak the API for current viewscreen, and dispatch show/dismiss from C++.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/gui/mechanisms.lua | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/scripts/gui/mechanisms.lua b/scripts/gui/mechanisms.lua index fe45d4ac..3b40ffbd 100644 --- a/scripts/gui/mechanisms.lua +++ b/scripts/gui/mechanisms.lua @@ -142,11 +142,8 @@ function MechanismList:onInput(keys) end end -if not df.viewscreen_dwarfmodest:is_instance(dfhack.gui.getCurViewscreen()) then - qerror("This script requires the main dwarfmode view") -end -if df.global.ui.main.mode ~= df.ui_sidebar_mode.QueryBuilding then - qerror("This script requires the 'q' interface mode") +if dfhack.gui.getCurFocus() ~= 'dwarfmode/QueryBuilding/Some' then + qerror("This script requires the main dwarfmode view in 'q' mode") end local list = MechanismList.new(df.global.world.selected_building) |
