Skip to content

Commit

Permalink
Merge branch 'develop' into adv-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Aug 14, 2024
2 parents 40eb5f0 + f0c53dd commit 81ea007
Show file tree
Hide file tree
Showing 10 changed files with 1,791 additions and 2,377 deletions.
24 changes: 12 additions & 12 deletions data/blueprints/dreamfort.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1738,12 +1738,12 @@ build2/industry_build2
,,,,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`
,,,,,,,,,,,oh,ol,ol,ol,oh,ol,ol,ol,oh,ol,ol,ol,oh
,,,,oh,oh,oh,oh,oh,oh,oh,oh,ol,ol,ol,oh,ol,ol,ol,oh,ol,ol,ol,oh,oh,oh,oh,oh,oh,oh,oh
,,,,oh,`,`,`,`,`,`,oh,ol,ol,ol,oh,ol,ol,ol,oh,ol,ol,ol,oh,`,`,`,`,`,`,oh
,,,,oh,`,`,`,`,`,`,oh,ol,ol,ol,oh,oh,oh,oh,oh,ol,ol,ol,oh,`,`,`,`,`,`,oh
,,,,oh,`,`,`,`,`,`,oh,ol,ol,ol,oh,oh,`,oh,oh,ol,ol,ol,oh,`,`,`,`,`,`,oh
,,,,oh,`,`,`,`,`,`,oh,ol,ol,ol,oh,oh,`,oh,oh,ol,ol,ol,oh,`,`,`,`,`,`,oh
,,,,oh,`,`,`,`,`,`,oh,ol,ol,ol,`,`,`,`,`,ol,ol,ol,oh,`,`,`,`,`,`,oh
,,,,oh,`,`,`,`,`,`,oh,ol,ol,ol,`,`,`,`,`,ol,ol,ol,oh,`,`,`,`,`,`,oh
,,,,oh,ol,ol,ol,ol,ol,ol,oh,ol,ol,ol,oh,ol,ol,ol,oh,ol,ol,ol,oh,ol,ol,ol,ol,ol,ol,oh
,,,,oh,ol,ol,ol,ol,ol,ol,oh,ol,ol,ol,oh,oh,oh,oh,oh,ol,ol,ol,oh,ol,ol,ol,ol,ol,ol,oh
,,,,oh,ol,ol,ol,ol,ol,ol,oh,ol,ol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`,oh,oh,ol,ol,ol,oh,`,`,`,`,`,`,oh
,,,,oh,oh,oh,oh,oh,oh,oh,oh,ol,ol,ol,`,oh,`,oh,`,ol,ol,ol,oh,`,`,`,`,`,`,oh
,,,,`,`,`,`,`,`,`,oh,ol,ol,ol,`,`,`,`,`,ol,ol,ol,oh,`,`,`,`,`,`,oh
,,,,`,`,`,`,`,`,`,oh,ol,ol,ol,`,ol,ol,ol,`,ol,ol,ol,oh,`,`,`,`,`,`,oh
,,,,`,`,`,`,`,`,`,oh,ol,ol,ol,`,`,`,`,`,ol,ol,ol,oh,ol,ol,ol,ol,ol,ol,oh
,,,,`,`,`,`,`,`,`,oh,ol,ol,ol,`,`,`,`,`,ol,ol,ol,oh,ol,ol,ol,ol,ol,ol,oh
,,,,`,`,`,`,`,`,`,oh,ol,ol,ol,oh,oh,`,oh,oh,ol,ol,ol,oh,ol,ol,ol,ol,ol,ol,oh
,,,,oh,oh,oh,oh,oh,oh,oh,oh,ol,ol,ol,`,oh,`,oh,`,ol,ol,ol,oh,ol,ol,ol,ol,ol,ol,oh
,,,,`,`,`,`,`,`,`,oh,ol,ol,ol,`,`,`,`,`,ol,ol,ol,oh,ol,ol,ol,ol,ol,ol,oh
,,,,`,`,`,`,`,`,`,oh,ol,ol,ol,`,ol,ol,ol,`,ol,ol,ol,oh,ol,ol,ol,ol,ol,ol,oh
,,,,`,`,`,`,`,`,`,oh,ol,ol,ol,`,ol,ol,ol,`,ol,ol,ol,oh,oh,oh,oh,oh,oh,oh,oh
,,,,,,,,,,,oh,ol,ol,ol,oh,ol,ol,ol,oh,ol,ol,ol,oh
,,,,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`
Expand Down
768 changes: 0 additions & 768 deletions data/blueprints/quickfortress.csv

This file was deleted.

1,758 changes: 1,758 additions & 0 deletions docs/about/History.rst

Large diffs are not rendered by default.

1,574 changes: 2 additions & 1,572 deletions docs/changelog.txt

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions docs/guides/quickfort-library-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ These files contain the plans for entire fortresses. Each file has one or more
help sections that walk you through how to build the fort, step by step.

- :source:`library/dreamfort.csv <data/blueprints/dreamfort.csv>`
- :source:`library/quickfortress.csv <data/blueprints/quickfortress.csv>`

.. _dreamfort:

Expand Down Expand Up @@ -133,17 +132,6 @@ Crypt
:target: https://drive.google.com/file/d/16iT_ho7BIRPD_eofuxdlVQ4FunR1Li23
:align: center

The Quick Fortress
~~~~~~~~~~~~~~~~~~

The Quick Fortress is an updated version of the example fortress that came with
`Python Quickfort 2.0 <https://github.com/joelpt/quickfort>`__ (the utility that
inspired DFHack quickfort). While it is not a complete fortress by
itself, it is much simpler than Dreamfort and is good for a first introduction
to `quickfort` blueprints. Read its walkthrough with ``quickfort run
library/quickfortress.csv`` or view the blueprints `online
<https://docs.google.com/spreadsheets/d/1WuLYZBM6S2nt-XsPS30kpDnngpOQCuIdlw4zjrcITdY>`__.

Layout helpers
--------------

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/autobutcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ autobutcher

This plugin monitors how many pets you have of each gender and age and assigns
excess livestock for slaughter. See `gui/autobutcher` for an in-game interface.
Units will be ignored if they are:
Units are protected from being automatically butchered if they are:

* Untamed
* Named or nicknamed
Expand Down
4 changes: 3 additions & 1 deletion library/modules/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,9 @@ static void add_main_interface_focus_strings(const string &baseFocus, vector<str
break;
case df::view_sheet_type::BUILDING:
if (game->main_interface.view_sheets.linking_lever)
newFocusString = baseFocus + "/LinkingLever";
newFocusString += "/LinkingLever";
else if (game->main_interface.stockpile_link.open && game->main_interface.stockpile_link.adding_new_link)
newFocusString += "/LinkingStockpile";
else if (auto bld = df::building::find(game->main_interface.view_sheets.viewing_bldid)) {
newFocusString += '/' + enum_item_key(bld->getType());
auto bld_type = bld->getType();
Expand Down
2 changes: 1 addition & 1 deletion plugins/lua/buildingplan/mechanisms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MechanismOverlay.ATTRS{
desc='Adds mechanism selection capabilities to the link lever/pressure plate screens.',
default_pos={x=5,y=5},
default_enabled=true,
viewscreens='dwarfmode/LinkingLever',
viewscreens='dwarfmode/ViewSheets/BUILDING/LinkingLever',
frame={w=57, h=13},
}

Expand Down
22 changes: 13 additions & 9 deletions plugins/lua/orders.lua
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ SkillRestrictionOverlay.ATTRS{
'dwarfmode/ViewSheets/BUILDING/Furnace',
'dwarfmode/ViewSheets/BUILDING/Workshop',
},
frame={w=54, h=7},
frame={w=57, h=7},
}

local function can_set_skill_level()
Expand Down Expand Up @@ -330,7 +330,7 @@ function SkillRestrictionOverlay:init()
panel:addviews{
widgets.CycleHotkeyLabel{
view_id='min_skill',
frame={l=0, t=0, w=16},
frame={l=1, t=0, w=16},
label='Min skill:',
label_below=true,
key_back='CUSTOM_SHIFT_C',
Expand Down Expand Up @@ -365,7 +365,7 @@ function SkillRestrictionOverlay:init()
end,
},
widgets.RangeSlider{
frame={l=0, t=3},
frame={l=1, t=3},
num_stops=#SKILL_OPTIONS,
get_left_idx_fn=function()
return self.subviews.min_skill:getOptionValue()
Expand Down Expand Up @@ -445,7 +445,7 @@ LaborRestrictionsOverlay.ATTRS{
'dwarfmode/ViewSheets/BUILDING/Workshop/Quern/Workers',
'dwarfmode/ViewSheets/BUILDING/Workshop/Still/Workers',
},
frame={w=37, h=17},
frame={w=57, h=15},
}

local function can_set_labors()
Expand Down Expand Up @@ -527,7 +527,7 @@ end

function make_labor_panel(bld_type, bld_subtype, labors)
local list = widgets.List{
frame={t=2, l=0, r=0, b=2},
frame={t=2, l=1, w=28, b=0},
on_double_click=toggle_labor,
}

Expand All @@ -536,7 +536,7 @@ function make_labor_panel(bld_type, bld_subtype, labors)
frame_background=gui.CLEAR_PEN,
-- will get clamped to parent frame and a scrollbar will appear if the list
-- is too long
frame={l=0, r=0, t=0, h=#labors+7},
frame={l=0, r=0, t=0, h=math.max(#labors+5,9)},
visible=function()
local bld = dfhack.gui.getSelectedBuilding(true)
return bld and bld:getType() == bld_type and bld.type == bld_subtype
Expand All @@ -548,7 +548,7 @@ function make_labor_panel(bld_type, bld_subtype, labors)
},
list,
widgets.HotkeyLabel{
frame={l=0, b=1},
frame={l=30, t=2},
key='CUSTOM_CTRL_A',
label='Toggle all',
auto_width=true,
Expand All @@ -563,12 +563,16 @@ function make_labor_panel(bld_type, bld_subtype, labors)
end,
},
widgets.HotkeyLabel{
frame={l=0, b=0},
frame={l=30, t=4},
key='SELECT',
label='Or double click to toggle',
label='Toggle selected',
auto_width=true,
on_activate=function() toggle_labor(list:getSelected()) end,
},
widgets.Label{
frame={l=37, t=5},
text='(or double click)'
}
},
}

Expand Down
2 changes: 1 addition & 1 deletion scripts

0 comments on commit 81ea007

Please sign in to comment.