From e72474613ffa5f59e612594046d569a7c46feedb Mon Sep 17 00:00:00 2001 From: lethosor Date: Wed, 27 Dec 2017 13:48:53 -0500 Subject: [PATCH 1/6] Add new PutItemOnDisplay job to labor management plugins Also add building_type::DisplayFurniture to labormanager Fixes #1208 --- library/xml | 2 +- plugins/autohauler.cpp | 3 ++- plugins/autolabor.cpp | 3 ++- plugins/labormanager/joblabormapper.cpp | 5 ++++- plugins/labormanager/labormanager.cpp | 3 ++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/library/xml b/library/xml index 24bd450fd..301807985 160000 --- a/library/xml +++ b/library/xml @@ -1 +1 @@ -Subproject commit 24bd450fdabe8be6483ad73f1355c0fd30571b05 +Subproject commit 301807985eefb4db88416a0f5a7f7b94aadfb667 diff --git a/plugins/autohauler.cpp b/plugins/autohauler.cpp index 7a3f8a3d8..62914c784 100644 --- a/plugins/autohauler.cpp +++ b/plugins/autohauler.cpp @@ -405,7 +405,8 @@ static const dwarf_state dwarf_states[] = { BUSY /* MakeRing */, BUSY /* MakeEarring */, BUSY /* MakeBracelet */, - BUSY /* MakeGem */ + BUSY /* MakeGem */, + BUSY /* PutItemOnDisplay */, }; // Mode assigned to labors. Either it's a hauling job, or it's not. diff --git a/plugins/autolabor.cpp b/plugins/autolabor.cpp index 95863ffb5..a894a2891 100644 --- a/plugins/autolabor.cpp +++ b/plugins/autolabor.cpp @@ -373,7 +373,8 @@ static const dwarf_state dwarf_states[] = { BUSY /* MakeRing */, BUSY /* MakeEarring */, BUSY /* MakeBracelet */, - BUSY /* MakeGem */ + BUSY /* MakeGem */, + BUSY /* PutItemOnDisplay */, }; struct labor_info diff --git a/plugins/labormanager/joblabormapper.cpp b/plugins/labormanager/joblabormapper.cpp index 051331137..d16bfafcf 100644 --- a/plugins/labormanager/joblabormapper.cpp +++ b/plugins/labormanager/joblabormapper.cpp @@ -358,6 +358,7 @@ public: case df::building_type::GrateWall: case df::building_type::Bookcase: case df::building_type::Instrument: + case df::building_type::DisplayFurniture: return df::unit_labor::HAUL_FURNITURE; case df::building_type::Trap: case df::building_type::GearAssembly: @@ -463,6 +464,7 @@ public: case df::building_type::GrateWall: case df::building_type::Bookcase: case df::building_type::Instrument: + case df::building_type::DisplayFurniture: return df::unit_labor::HAUL_FURNITURE; case df::building_type::AnimalTrap: return df::unit_labor::TRAPPER; @@ -882,6 +884,7 @@ JobLaborMapper::JobLaborMapper() job_to_labor_table[df::job_type::MakeEarring] = jlf_make_object; job_to_labor_table[df::job_type::MakeBracelet] = jlf_make_object; job_to_labor_table[df::job_type::MakeGem] = jlf_make_object; + job_to_labor_table[df::job_type::PutItemOnDisplay] = jlf_const(df::unit_labor::HAUL_ITEM); job_to_labor_table[df::job_type::StoreItemInLocation] = jlf_no_labor; // StoreItemInLocation }; @@ -917,4 +920,4 @@ df::unit_labor JobLaborMapper::find_job_labor(df::job* j) return labor; } -/* End of labor deducer */ \ No newline at end of file +/* End of labor deducer */ diff --git a/plugins/labormanager/labormanager.cpp b/plugins/labormanager/labormanager.cpp index 3a026d1ea..42e718488 100644 --- a/plugins/labormanager/labormanager.cpp +++ b/plugins/labormanager/labormanager.cpp @@ -377,7 +377,8 @@ static const dwarf_state dwarf_states[] = { BUSY /* MakeRing */, BUSY /* MakeEarring */, BUSY /* MakeBracelet */, - BUSY /* MakeGem */ + BUSY /* MakeGem */, + BUSY /* PutItemOnDisplay */, }; struct labor_info From a3a0ed03a384fc311bc5031c1d7e7e786a60ff38 Mon Sep 17 00:00:00 2001 From: lethosor Date: Wed, 27 Dec 2017 13:50:02 -0500 Subject: [PATCH 2/6] Update scripts (gui/gm-editor) --- scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts b/scripts index 78904a56d..92ea8f43e 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 78904a56d41082e433b4c2e9f4983702f2a9bced +Subproject commit 92ea8f43ef7ace7e609a83e061d18ddbcf1f56e2 From fde1e284f4822491b3d07202585c59ac487a6e79 Mon Sep 17 00:00:00 2001 From: lethosor Date: Thu, 28 Dec 2017 16:19:45 -0500 Subject: [PATCH 3/6] Gui::getAnyItem: support viewscreen_assign_display_itemst --- library/modules/Gui.cpp | 10 ++++++++++ library/xml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp index 0631e0ed7..d6eedcef7 100644 --- a/library/modules/Gui.cpp +++ b/library/modules/Gui.cpp @@ -74,6 +74,7 @@ using namespace DFHack; #include "df/ui_unit_view_mode.h" #include "df/unit.h" #include "df/unit_inventory_item.h" +#include "df/viewscreen_assign_display_itemst.h" #include "df/viewscreen_buildinglistst.h" #include "df/viewscreen_dungeon_monsterstatusst.h" #include "df/viewscreen_dungeonmodest.h" @@ -1042,6 +1043,15 @@ df::item *Gui::getAnyItem(df::viewscreen *top) return NULL; } + if (VIRTUAL_CAST_VAR(screen, df::viewscreen_assign_display_itemst, top)) + { + if (screen->sel_column == df::viewscreen_assign_display_itemst::T_sel_column::Items) + return vector_get(screen->items[screen->item_type[screen->sel_type]], + screen->sel_item); + + return NULL; + } + if (auto dfscreen = dfhack_viewscreen::try_cast(top)) return dfscreen->getSelectedItem(); diff --git a/library/xml b/library/xml index 301807985..1297be014 160000 --- a/library/xml +++ b/library/xml @@ -1 +1 @@ -Subproject commit 301807985eefb4db88416a0f5a7f7b94aadfb667 +Subproject commit 1297be0141c7116e677e19a9ddcad296ae31de7d From 3f45ba4e5dbb169b3a8e176bbe5d066c7bbec92a Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 29 Dec 2017 23:36:43 -0500 Subject: [PATCH 4/6] Update changelogs --- NEWS.rst | 6 ++++++ docs/NEWS-dev.rst | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 07267a8ab..abecc0900 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -63,7 +63,13 @@ Misc Improvements - `gui/gm-editor`: added enum names to enum edit dialogs - `gui/gm-unit`: made skill search case-insensitive +- `gui/pathable`: added tile types to sidebar - `gui/rename`: added "clear" and "special characters" options +- `modtools/skill-change`: + + - now updates skill levels appropriately + - only prints output if ``-loud`` is passed + - `remotefortressreader`: includes item stack sizes and some performance improvements Removed diff --git a/docs/NEWS-dev.rst b/docs/NEWS-dev.rst index 6bed2e344..1d687f127 100644 --- a/docs/NEWS-dev.rst +++ b/docs/NEWS-dev.rst @@ -37,6 +37,40 @@ Development Changelog .. contents:: :depth: 2 +DFHack 0.44.03-beta1 +==================== + +Fixes +----- +- `autolabor`, `autohauler`, `labormanager`: added support for "put item on + display" jobs and building/destroying display furniture +- `gui/gm-editor`: fixed an error when editing primitives in Lua tables + +Structures +---------- +- Added 7 new globals from DF: ``version``, ``min_load_version``, + ``movie_version``, ``basic_seed``, ``title``, ``title_spaced``, + ``ui_building_resize_radius`` +- Fixed an issue preventing ``enabler`` from being allocated by DFHack +- Added ``job_type.PutItemOnDisplay`` +- Found ``renderer`` vtable on osx64 +- ``adventure_movement_optionst``, ``adventure_movement_hold_tilest``, + ``adventure_movement_climbst``: named coordinate fields +- ``mission``: added type +- ``unit``: added 3 new vmethods: ``getCreatureTile``, ``getCorpseTile``, ``getGlowTile`` +- ``viewscreen_assign_display_itemst``: fixed layout on x64 and identified many fields +- ``viewscreen_reportlistst``: fixed layout, added ``mission_id`` vector +- ``world.status``: named ``missions`` vector + +Other Changes +------------- +- `devel/dump-offsets`: now ignores ``index`` globals +- `gui/pathable`: added tile types to sidebar +- `modtools/skill-change`: + + - now updates skill levels appropriately + - only prints output if ``-loud`` is passed + DFHack 0.44.03-alpha1 ===================== From 04523f9e5d57ddcf510a464e4152b098e525286f Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 29 Dec 2017 23:40:55 -0500 Subject: [PATCH 5/6] dfhack/df-structures#231: twbt_render_map offset for x64 --- docs/NEWS-dev.rst | 1 + library/xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/NEWS-dev.rst b/docs/NEWS-dev.rst index 1d687f127..771684884 100644 --- a/docs/NEWS-dev.rst +++ b/docs/NEWS-dev.rst @@ -51,6 +51,7 @@ Structures - Added 7 new globals from DF: ``version``, ``min_load_version``, ``movie_version``, ``basic_seed``, ``title``, ``title_spaced``, ``ui_building_resize_radius`` +- Added ``twbt_render_map`` code offset on x64 - Fixed an issue preventing ``enabler`` from being allocated by DFHack - Added ``job_type.PutItemOnDisplay`` - Found ``renderer`` vtable on osx64 diff --git a/library/xml b/library/xml index 1297be014..7e23a328f 160000 --- a/library/xml +++ b/library/xml @@ -1 +1 @@ -Subproject commit 1297be0141c7116e677e19a9ddcad296ae31de7d +Subproject commit 7e23a328fd81e3d6db794c0c18b8b2e7bd235649 From 677833eeaa784b8bfc9ddd9fae6b04176e4c35f3 Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 29 Dec 2017 23:41:47 -0500 Subject: [PATCH 6/6] Bump to 0.44.03-beta1 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5672eaab7..9a1177549 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,7 @@ endif() # set up versioning. set(DF_VERSION "0.44.03") -SET(DFHACK_RELEASE "alpha1") +SET(DFHACK_RELEASE "beta1") SET(DFHACK_PRERELEASE TRUE) set(DFHACK_VERSION "${DF_VERSION}-${DFHACK_RELEASE}")