From ce34ac8f33e56b89b90da76384825673a5f1dc42 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Mon, 16 May 2022 18:41:47 -0700 Subject: [PATCH] Use debugfilter; remove redundant changelog entries --- .github/workflows/build.yml | 4 +- .pre-commit-config.yaml | 1 + ci/script-docs.py | 4 +- ci/update-submodules.manifest | 2 + data/examples/orders/basic.json | 131 +++++++++++++++++++------------- depends/CMakeLists.txt | 8 +- depends/jsoncpp-sub | 2 +- depends/libexpat | 2 +- depends/libzip | 2 +- depends/lua/src/lapi.c | 2 +- depends/luacov | 2 +- depends/xlsxio | 2 +- docs/Authors.rst | 1 + docs/Lua API.rst | 11 ++- docs/Removed.rst | 8 ++ docs/changelog.txt | 3 +- library/CMakeLists.txt | 4 +- library/Debug.cpp | 2 +- library/LuaApi.cpp | 17 +---- library/MiscUtils.cpp | 58 ++++++++++---- library/include/Debug.h | 2 +- library/include/MiscUtils.h | 3 +- library/include/modules/Gui.h | 8 +- library/modules/Gui.cpp | 126 ++++++++++++++---------------- library/xml | 2 +- plugins/CMakeLists.txt | 6 +- plugins/autolabor.cpp | 2 +- plugins/command-prompt.cpp | 109 ++++++++++++++------------ plugins/isoworld | 2 +- scripts | 2 +- 30 files changed, 295 insertions(+), 233 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8506ae9b..07febaa63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,7 +69,7 @@ jobs: - name: Download DF run: | sh ci/download-df.sh - - name: Build DFHack + - name: Configure DFHack env: CC: gcc-${{ matrix.gcc }} CXX: g++-${{ matrix.gcc }} @@ -85,6 +85,8 @@ jobs: -DBUILD_STONESENSE:BOOL=${{ matrix.plugins == 'all' }} \ -DBUILD_SUPPORTED:BOOL=1 \ -DCMAKE_INSTALL_PREFIX="$DF_FOLDER" + - name: Build DFHack + run: | ninja -C build-ci install - name: Run tests id: run_tests diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 26d135ca2..336bda270 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,6 @@ ci: autofix_prs: false + autoupdate_schedule: monthly repos: # shared across repos: - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/ci/script-docs.py b/ci/script-docs.py index 71d7f37b2..7ef287f8a 100755 --- a/ci/script-docs.py +++ b/ci/script-docs.py @@ -81,11 +81,11 @@ def check_file(fname): def main(): """Check that all DFHack scripts include documentation""" err = 0 - exclude = set(['internal', 'test']) + exclude = {'.git', 'internal', 'test'} for root, dirs, files in os.walk(SCRIPT_PATH, topdown=True): dirs[:] = [d for d in dirs if d not in exclude] for f in files: - if f[-3:] in {'.rb', 'lua'}: + if f.split('.')[-1] in {'rb', 'lua'}: err += check_file(join(root, f)) return err diff --git a/ci/update-submodules.manifest b/ci/update-submodules.manifest index 4bd383018..e97cae6f3 100644 --- a/ci/update-submodules.manifest +++ b/ci/update-submodules.manifest @@ -1,7 +1,9 @@ library/xml master scripts master plugins/stonesense master +plugins/isoworld dfhack depends/libzip dfhack depends/libexpat dfhack depends/xlsxio dfhack depends/luacov dfhack +depends/jsoncpp-sub dfhack diff --git a/data/examples/orders/basic.json b/data/examples/orders/basic.json index fb4668e81..e8dee1680 100644 --- a/data/examples/orders/basic.json +++ b/data/examples/orders/basic.json @@ -1,12 +1,34 @@ [ { - "amount_left" : 1, - "amount_total" : 1, - "frequency" : "Daily", + "amount_left" : 150, + "amount_total" : 150, + "frequency" : "Monthly", "id" : 0, "is_active" : false, "is_validated" : false, "item_conditions" : + [ + { + "condition" : "LessThan", + "flags" : + [ + "unrotten" + ], + "item_type" : "FOOD", + "value" : 400 + } + ], + "job" : "PrepareMeal", + "meal_ingredients" : 2 + }, + { + "amount_left" : 10, + "amount_total" : 10, + "frequency" : "Daily", + "id" : 1, + "is_active" : false, + "is_validated" : false, + "item_conditions" : [ { "condition" : "AtLeast", @@ -25,7 +47,7 @@ "unrotten", "cookable" ], - "value" : 15 + "value" : 500 }, { "condition" : "AtMost", @@ -35,6 +57,15 @@ ], "item_type" : "FOOD", "value" : 3500 + }, + { + "condition" : "AtLeast", + "flags" : + [ + "unrotten" + ], + "item_type" : "FOOD", + "value" : 400 } ], "job" : "PrepareMeal", @@ -44,7 +75,7 @@ "amount_left" : 2, "amount_total" : 2, "frequency" : "Daily", - "id" : 1, + "id" : 2, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -81,7 +112,7 @@ "amount_left" : 2, "amount_total" : 2, "frequency" : "Daily", - "id" : 2, + "id" : 3, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -118,7 +149,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 3, + "id" : 4, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -139,7 +170,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 4, + "id" : 5, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -174,7 +205,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 5, + "id" : 6, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -206,7 +237,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 6, + "id" : 7, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -238,7 +269,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 7, + "id" : 8, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -260,7 +291,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 8, + "id" : 9, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -293,7 +324,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 9, + "id" : 10, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -324,7 +355,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 10, + "id" : 11, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -357,7 +388,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 11, + "id" : 12, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -397,7 +428,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 12, + "id" : 13, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -423,7 +454,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 13, + "id" : 14, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -458,7 +489,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 14, + "id" : 15, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -493,7 +524,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 15, + "id" : 16, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -528,7 +559,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 16, + "id" : 17, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -559,7 +590,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 17, + "id" : 18, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -589,7 +620,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 18, + "id" : 19, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -613,7 +644,6 @@ ], "item_subtype" : "ITEM_TOOL_LARGE_POT", "item_type" : "TOOL", - "material" : "INORGANIC", "value" : 25 } ], @@ -625,7 +655,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 19, + "id" : 20, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -649,7 +679,6 @@ ], "item_subtype" : "ITEM_TOOL_JUG", "item_type" : "TOOL", - "material" : "INORGANIC", "value" : 10 } ], @@ -661,7 +690,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 20, + "id" : 21, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -690,7 +719,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 21, + "id" : 22, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -718,7 +747,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 22, + "id" : 23, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -746,7 +775,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 23, + "id" : 24, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -776,7 +805,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 24, + "id" : 25, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -806,7 +835,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 25, + "id" : 26, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -835,7 +864,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 26, + "id" : 27, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -866,7 +895,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 27, + "id" : 28, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -902,7 +931,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 28, + "id" : 29, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -938,7 +967,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 29, + "id" : 30, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -974,7 +1003,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 30, + "id" : 31, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -993,7 +1022,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 31, + "id" : 32, "is_active" : false, "is_validated" : true, "item_conditions" : @@ -1019,7 +1048,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 32, + "id" : 33, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -1041,7 +1070,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 33, + "id" : 34, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -1067,7 +1096,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 34, + "id" : 35, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -1093,7 +1122,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 35, + "id" : 36, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -1119,7 +1148,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 36, + "id" : 37, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -1152,7 +1181,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 37, + "id" : 38, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -1191,7 +1220,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 38, + "id" : 39, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -1225,7 +1254,7 @@ "amount_left" : 4, "amount_total" : 4, "frequency" : "Daily", - "id" : 39, + "id" : 40, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -1248,7 +1277,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 40, + "id" : 41, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -1272,7 +1301,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 41, + "id" : 42, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -1306,7 +1335,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 42, + "id" : 43, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -1335,7 +1364,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 43, + "id" : 44, "is_active" : false, "is_validated" : false, "item_conditions" : @@ -1364,7 +1393,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 44, + "id" : 45, "is_active" : false, "is_validated" : true, "item_conditions" : @@ -1395,7 +1424,7 @@ "amount_left" : 1, "amount_total" : 1, "frequency" : "Daily", - "id" : 45, + "id" : 46, "is_active" : false, "is_validated" : false, "item_conditions" : diff --git a/depends/CMakeLists.txt b/depends/CMakeLists.txt index 0fcb4ca3c..405a9555e 100644 --- a/depends/CMakeLists.txt +++ b/depends/CMakeLists.txt @@ -12,10 +12,11 @@ endif() add_subdirectory(tthread) option(JSONCPP_WITH_TESTS "Compile and (for jsoncpp_check) run JsonCpp test executables" OFF) option(JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post build step" OFF) +option(JSONCPP_BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." OFF) +option(JSONCPP_BUILD_OBJECT_LIBS "Build jsoncpp_lib as a object library." OFF) +option(JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" OFF) + add_subdirectory(jsoncpp-sub EXCLUDE_FROM_ALL) -if(UNIX) - set_target_properties(jsoncpp_lib_static PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations") -endif() # build clsocket static and only as a dependency. Setting those options here overrides its own default settings. option(CLSOCKET_SHARED "Build clsocket lib as shared." OFF) option(CLSOCKET_DEP_ONLY "Build for use inside other CMake projects as dependency." ON) @@ -37,6 +38,7 @@ if(UNIX) set_target_properties(expat PROPERTIES COMPILE_FLAGS "-Wno-maybe-uninitialized") endif() +set(CMAKE_REQUIRED_QUIET ON) set(LIBZIP_BUILD_DOC OFF CACHE BOOL "") set(LIBZIP_BUILD_EXAMPLES OFF CACHE BOOL "") set(LIBZIP_BUILD_REGRESS OFF CACHE BOOL "") diff --git a/depends/jsoncpp-sub b/depends/jsoncpp-sub index ddabf50f7..ba5eac541 160000 --- a/depends/jsoncpp-sub +++ b/depends/jsoncpp-sub @@ -1 +1 @@ -Subproject commit ddabf50f72cf369bf652a95c4d9fe31a1865a781 +Subproject commit ba5eac54136064af94ab4a923ac110d7534d4f83 diff --git a/depends/libexpat b/depends/libexpat index 3c0f2e86c..3e877cbb3 160000 --- a/depends/libexpat +++ b/depends/libexpat @@ -1 +1 @@ -Subproject commit 3c0f2e86ce4e7a3a3b30e765087d02a68bba7e6f +Subproject commit 3e877cbb3c9bc8f22946053e70490d2e5431f4d5 diff --git a/depends/libzip b/depends/libzip index da0d18ae5..081249cce 160000 --- a/depends/libzip +++ b/depends/libzip @@ -1 +1 @@ -Subproject commit da0d18ae59ef2699013316b703cdc93809414c93 +Subproject commit 081249cceb59adc857a72d67e60c32047680f787 diff --git a/depends/lua/src/lapi.c b/depends/lua/src/lapi.c index 711895b39..aa01148ab 100644 --- a/depends/lua/src/lapi.c +++ b/depends/lua/src/lapi.c @@ -395,7 +395,7 @@ LUA_API size_t lua_rawlen (lua_State *L, int idx) { case LUA_TSHRSTR: return tsvalue(o)->shrlen; case LUA_TLNGSTR: return tsvalue(o)->u.lnglen; case LUA_TUSERDATA: return uvalue(o)->len; - case LUA_TTABLE: return luaH_getn(hvalue(o)); + case LUA_TTABLE: return size_t(luaH_getn(hvalue(o))); default: return 0; } } diff --git a/depends/luacov b/depends/luacov index 87d6ae018..99d068278 160000 --- a/depends/luacov +++ b/depends/luacov @@ -1 +1 @@ -Subproject commit 87d6ae018cb8d288d854f632e9d8d959d75d7db4 +Subproject commit 99d06827848583232dd77afb34cd7ab589567086 diff --git a/depends/xlsxio b/depends/xlsxio index 4056226fe..ab8fd7f3e 160000 --- a/depends/xlsxio +++ b/depends/xlsxio @@ -1 +1 @@ -Subproject commit 4056226fe0df6bff4593ee2353cca07c2b7f327e +Subproject commit ab8fd7f3e9df457e8bc1b5cb31b78d57df0ac5a4 diff --git a/docs/Authors.rst b/docs/Authors.rst index 38fe19862..afb0a3f14 100644 --- a/docs/Authors.rst +++ b/docs/Authors.rst @@ -32,6 +32,7 @@ billw2012 billw2012 BrickViking brickviking brndd brndd burneddi Caldfir caldfir +Cameron Ewell Ozzatron Carter Bray Qartar Chris Dombroski cdombroski Chris Parsons chrismdp diff --git a/docs/Lua API.rst b/docs/Lua API.rst index c13897e07..7e1f45231 100644 --- a/docs/Lua API.rst +++ b/docs/Lua API.rst @@ -1015,7 +1015,7 @@ Fortress mode ``dfhack.gui.recenterViewscreen([zoom])`` Recenter the view on a position using a specific zoom type. If no position is given, - recenter on ``df.global.cursor``. Zoom types are ``df.report_zoom_type`` (0 = Generic, 1 = Item, 2 = Unit), + recenter on ``df.global.cursor``. Zoom types are ``df.report_zoom_type`` (see: `enum definition `_), where ``Generic`` skips recentering and enforces valid view bounds (the same as x = -30000,) ``Item`` brings the position onscreen without centering, and ``Unit`` centers the screen on the position. Default zoom type is Item. @@ -1088,15 +1088,14 @@ Announcements Uses the type to look up options from announcements.txt, and calls the above operations accordingly. The units are used to call ``addCombatReportAuto``. -* ``dfhack.gui.autoDFAnnouncement(report,text[,log_failures])`` - ``dfhack.gui.autoDFAnnouncement(type,pos,text,color[,is_bright,unit1,unit2,is_sparring,log_failures])`` +* ``dfhack.gui.autoDFAnnouncement(report,text)`` + ``dfhack.gui.autoDFAnnouncement(type,pos,text,color[,is_bright,unit1,unit2,is_sparring])`` Takes a ``df.report_init`` (see: `structure definition `_) and a string and processes them just like DF does. Sometimes this means the announcement won't occur. - Set ``log_failures`` to ``true`` to log the reason why to the dfhack console (e.g., unrevealed map or wrong gamemode.) Can also be built from parameters instead of a ``report_init``. Setting ``is_sparring`` to ``true`` means the report - will be added to sparring logs (if applicable) rather than hunting or combat. Text uses ``&`` as an escape character, with ``&r`` being a newline, - ``&&`` being just ``&``, and any other combination causing neither character to display. + will be added to sparring logs (if applicable) rather than hunting or combat. Text is parsed using ``&`` as an escape character, with ``&r`` + being a newline, ``&&`` being just ``&``, and any other combination causing neither character to display. Other ~~~~~ diff --git a/docs/Removed.rst b/docs/Removed.rst index 5d68b2133..54e83a6fc 100644 --- a/docs/Removed.rst +++ b/docs/Removed.rst @@ -10,6 +10,14 @@ work (e.g. links from the `changelog`). :local: :depth: 1 +.. _devel/unforbidall: + +devel/unforbidall +================= + +Replaced by the `unforbid` script. Run ``unforbid all --quiet`` to match the +behavior of the original ``devel/unforbidall`` script. + .. _digfort: digfort diff --git a/docs/changelog.txt b/docs/changelog.txt index 57fe888b6..dacf382fd 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -40,15 +40,14 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Fixes ## Misc Improvements +- `dfhack-examples-guide`: refine food preparation orders and fix conditions for making jugs and pots in the ``basic`` manager orders ## Documentation -- ``Lua API.rst``: added ``autoDFAnnouncement``, ``pauseRecenter``, ``recenterViewscreen`` ## API - add functions reverse-engineered from announcement code: ``Gui::parseReportString``, ``Gui::autoDFAnnouncement``, ``Gui::pauseRecenter``, ``Gui::recenterViewscreen`` ## Lua -- ``dfhack.gui``: Lua wrappers for functions reverse-engineered from announcement code: ``autoDFAnnouncement``, ``pauseRecenter``, ``recenterViewscreen`` # 0.47.05-r5 diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 4ec165308..9e7bf8590 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -415,10 +415,10 @@ if(APPLE) set_target_properties(dfhack PROPERTIES SOVERSION 1.0.0) endif() -target_link_libraries(dfhack protobuf-lite clsocket lua jsoncpp_lib_static dfhack-version ${PROJECT_LIBS}) +target_link_libraries(dfhack protobuf-lite clsocket lua jsoncpp_static dfhack-version ${PROJECT_LIBS}) set_target_properties(dfhack PROPERTIES INTERFACE_LINK_LIBRARIES "") -target_link_libraries(dfhack-client protobuf-lite clsocket jsoncpp_lib_static) +target_link_libraries(dfhack-client protobuf-lite clsocket jsoncpp_static) target_link_libraries(dfhack-run dfhack-client) if(APPLE) diff --git a/library/Debug.cpp b/library/Debug.cpp index 7ac981d30..9b13af168 100644 --- a/library/Debug.cpp +++ b/library/Debug.cpp @@ -198,7 +198,7 @@ DebugCategory::cstring_ref DebugCategory::plugin() const noexcept //! standards only provide runtime checks if an atomic type is lock free struct failIfEnumAtomicIsNotLockFree { failIfEnumAtomicIsNotLockFree() { - std::atomic test; + std::atomic test(DebugCategory::LINFO); if (test.is_lock_free()) return; std::cerr << __FILE__ << ':' << __LINE__ diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index 6954e3996..5881e1b1f 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -1509,23 +1509,19 @@ static const LuaWrapper::FunctionReg dfhack_gui_module[] = { static int gui_autoDFAnnouncement(lua_State *state) { - int rv; + bool rv; df::report_init *r = Lua::GetDFObject(state, 1); if (r) { std::string message = luaL_checkstring(state, 2); - - if (lua_gettop(state) >= 3) - rv = Gui::autoDFAnnouncement(*r, message, lua_toboolean(state, 3)); - else - rv = Gui::autoDFAnnouncement(*r, message); + rv = Gui::autoDFAnnouncement(*r, message); } else { df::coord pos; int color = 0; //initialize these to prevent warning - bool bright = false, is_sparring = false, log_failures = false; + bool bright = false, is_sparring = false; df::unit *unit1 = NULL, *unit2 = NULL; auto type = (df::announcement_type)lua_tointeger(state, 1); @@ -1535,8 +1531,6 @@ static int gui_autoDFAnnouncement(lua_State *state) switch (lua_gettop(state)) { default: - case 9: - log_failures = lua_toboolean(state, 9); case 8: is_sparring = lua_toboolean(state, 8); case 7: @@ -1554,9 +1548,6 @@ static int gui_autoDFAnnouncement(lua_State *state) switch (lua_gettop(state)) { // Use the defaults in Gui.h default: - case 9: - rv = Gui::autoDFAnnouncement(type, pos, message, color, bright, unit1, unit2, is_sparring, log_failures); - break; case 8: rv = Gui::autoDFAnnouncement(type, pos, message, color, bright, unit1, unit2, is_sparring); break; @@ -1577,7 +1568,7 @@ static int gui_autoDFAnnouncement(lua_State *state) } } - lua_pushinteger(state, rv); + lua_pushboolean(state, rv); return 1; } diff --git a/library/MiscUtils.cpp b/library/MiscUtils.cpp index 56af85afe..6ab63d5eb 100644 --- a/library/MiscUtils.cpp +++ b/library/MiscUtils.cpp @@ -168,32 +168,58 @@ std::string to_search_normalized(const std::string &str) return result; } -bool word_wrap(std::vector *out, const std::string &str, size_t line_length) + +bool word_wrap(std::vector *out, const std::string &str, + size_t line_length, bool collapse_whitespace) { - out->clear(); - std::istringstream input(str); - std::string out_line; - std::string word; - if (input >> word) + if (line_length == 0) + line_length = SIZE_MAX; + + std::string line; + size_t break_pos = 0; + + for (auto &c : str) { - out_line += word; - // size_t remaining = line_length - std::min(line_length, word.length()); - while (input >> word) + if (c == '\n') + { + out->push_back(line); + line.clear(); + break_pos = 0; + continue; + } + + if (isspace(c)) { - if (out_line.length() + word.length() + 1 <= line_length) + if (break_pos == line.length() && collapse_whitespace) + continue; + + line.push_back(collapse_whitespace ? ' ' : c); + break_pos = line.length(); + } + else { + line.push_back(c); + } + + if (line.length() > line_length) + { + if (break_pos > 0) { - out_line += ' '; - out_line += word; + // Break before last space, and skip that space + out->push_back(line.substr(0, break_pos - 1)); } else { - out->push_back(out_line); - out_line = word; + // Single word is too long, just break it + out->push_back(line.substr(0, line_length)); + break_pos = line_length; } + line = line.substr(break_pos); + break_pos = 0; } - if (out_line.length()) - out->push_back(out_line); } + if (line.length()) + out->push_back(line); + return true; } diff --git a/library/include/Debug.h b/library/include/Debug.h index 63811a51e..4cad178dc 100644 --- a/library/include/Debug.h +++ b/library/include/Debug.h @@ -326,7 +326,7 @@ public: DFHack::DebugCategory::LDEBUG, ## __VA_ARGS__) /*! - * Open a line for error level debug output if enabled + * Open a line for info level debug output if enabled * * Important debug messages when some rarely changed state changes. Example * would be when a debug category filtering level changes. diff --git a/library/include/MiscUtils.h b/library/include/MiscUtils.h index 7a5f050a2..764b11413 100644 --- a/library/include/MiscUtils.h +++ b/library/include/MiscUtils.h @@ -391,7 +391,8 @@ DFHACK_EXPORT std::string to_search_normalized(const std::string &str); DFHACK_EXPORT bool word_wrap(std::vector *out, const std::string &str, - size_t line_length = 80); + size_t line_length = 80, + bool collapse_whitespace = false); inline bool bits_match(unsigned required, unsigned ok, unsigned mask) { diff --git a/library/include/modules/Gui.h b/library/include/modules/Gui.h index 07672aaec..9b78e4984 100644 --- a/library/include/modules/Gui.h +++ b/library/include/modules/Gui.h @@ -129,10 +129,10 @@ namespace DFHack DFHACK_EXPORT void showAutoAnnouncement(df::announcement_type type, df::coord pos, std::string message, int color = 7, bool bright = true, df::unit *unit1 = NULL, df::unit *unit2 = NULL); // Process an announcement exactly like DF would, which might result in no announcement - DFHACK_EXPORT int autoDFAnnouncement(df::report_init r, std::string message); - DFHACK_EXPORT int autoDFAnnouncement(df::report_init r, std::string message, bool log_failures); - DFHACK_EXPORT int autoDFAnnouncement(df::announcement_type type, df::coord pos, std::string message, int color = 7, bool bright = true, df::unit *unit1 = NULL, df::unit *unit2 = NULL, bool is_sparring = false, bool log_failures = false); - + DFHACK_EXPORT bool autoDFAnnouncement(df::report_init r, std::string message); + DFHACK_EXPORT bool autoDFAnnouncement(df::announcement_type type, df::coord pos, std::string message, int color = 7, bool bright = true, + df::unit *unit1 = NULL, df::unit *unit2 = NULL, bool is_sparring = false); + /* * Cursor and window coords */ diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp index ce43df71f..0c59b0db2 100644 --- a/library/modules/Gui.cpp +++ b/library/modules/Gui.cpp @@ -37,6 +37,7 @@ using namespace std; #include "Error.h" #include "ModuleFactory.h" #include "Core.h" +#include "Debug.h" #include "PluginManager.h" #include "MiscUtils.h" using namespace DFHack; @@ -112,6 +113,11 @@ using namespace DFHack; #include "df/viewscreen_workshop_profilest.h" #include "df/world.h" +namespace DFHack +{ + DBG_DECLARE(core, gui, DebugCategory::LINFO); +} + using namespace df::enums; using df::global::gamemode; @@ -1707,22 +1713,28 @@ void Gui::showAutoAnnouncement( addCombatReportAuto(unit2, flags, id); } -int Gui::autoDFAnnouncement(df::report_init r, string message) +bool Gui::autoDFAnnouncement(df::report_init r, string message) { // Reverse-engineered from DF announcement code - - if (!world->unk_26a9a8) // TODO: world->show_announcements - return 1; + + if (!world->allow_announcements) + { + DEBUG(gui).print("Skipped announcement because world->allow_announcements is false:\n%s\n", message.c_str()); + return false; + } df::announcement_flags a_flags; if (is_valid_enum_item(r.type)) a_flags = df::global::d_init->announcements.flags[r.type]; else - return 2; + { + WARN(gui).print("Invalid announcement type:\n%s\n", message.c_str()); + return false; + } if (message.empty()) { Core::printerr("Empty announcement %u\n", r.type); // DF would print this to errorlog.txt - return 3; + return false; } // Check if the announcement will actually be announced @@ -1737,28 +1749,41 @@ int Gui::autoDFAnnouncement(df::report_init r, string message) if ((world->units.active.empty() || (r.unit1 != world->units.active[0] && r.unit2 != world->units.active[0])) && ((Maps::getTileDesignation(r.pos)->whole & 0x10) == 0x0)) // Adventure mode uses this bit to determine current visibility { - return 4; + DEBUG(gui).print("Adventure mode announcement not heard:\n%s\n", message.c_str()); + return false; } } } else { // Dwarf mode (or arena?) if ((r.unit1 != NULL || r.unit2 != NULL) && (r.unit1 == NULL || Units::isHidden(r.unit1)) && (r.unit2 == NULL || Units::isHidden(r.unit2))) - return 5; + { + DEBUG(gui).print("Dwarf mode announcement not heard:\n%s\n", message.c_str()); + return false; + } if (!a_flags.bits.D_DISPLAY) { if (a_flags.bits.UNIT_COMBAT_REPORT) { if (r.unit1 == NULL && r.unit2 == NULL) - return 6; + { + DEBUG(gui).print("Skipped UNIT_COMBAT_REPORT because it has no units:\n%s\n", message.c_str()); + return false; + } } else { if (!a_flags.bits.UNIT_COMBAT_REPORT_ALL_ACTIVE) - return 7; - if (!recent_report_any(r.unit1) && !recent_report_any(r.unit2)) - return 8; + { + DEBUG(gui).print("Skipped announcement not enabled for this game mode:\n%s\n", message.c_str()); + return false; + } + else if (!recent_report_any(r.unit1) && !recent_report_any(r.unit2)) + { + DEBUG(gui).print("Skipped UNIT_COMBAT_REPORT_ALL_ACTIVE because there's no active report:\n%s\n", message.c_str()); + return false; + } } } } @@ -1774,7 +1799,10 @@ int Gui::autoDFAnnouncement(df::report_init r, string message) parseReportString(results, message, line_length); if (results.empty()) - return 9; + { + DEBUG(gui).print("Skipped announcement because it was empty after parsing:\n%s\n", message.c_str()); + return false; + } // Check for repeat report int32_t repeat_count = check_repeat_report(results); @@ -1785,7 +1813,8 @@ int Gui::autoDFAnnouncement(df::report_init r, string message) world->status.display_timer = r.display_timer; Gui::writeToGamelog("x" + to_string(repeat_count + 1)); } - return 0; + DEBUG(gui).print("Announcement succeeded as repeat:\n%s\n", message.c_str()); + return true; } bool success = false; // only print to gamelog if report was used @@ -1864,66 +1893,25 @@ int Gui::autoDFAnnouncement(df::report_init r, string message) delete_old_reports(); - if (/*debug_gamelog &&*/ success) + if (/*debug_gamelog &&*/ success) // TODO: Add debug_gamelog to globals? + { + DEBUG(gui).print("Announcement succeeded and printed to gamelog.txt:\n%s\n", message.c_str()); Gui::writeToGamelog(message); - else if (success) - return 10; + } + /*else if (success) + { + DEBUG(gui).print("Announcement succeeded but skipped printing to gamelog.txt because debug_gamelog is false:\n%s\n", message.c_str()); + }*/ else - return 11; - - return 0; -} - -int Gui::autoDFAnnouncement(df::report_init r, string message, bool log_failures) -{ // Prints info about failed announcements to DFHack console if log_failures is true - int rv = autoDFAnnouncement(r, message); - - if (log_failures) { - switch (rv) - { - case 0: - break; // success - case 1: - Core::print("Skipped an announcement because world->show_announcements is false:\n%s\n", message.c_str()); - break; - case 2: - Core::printerr("Invalid announcement type!\n"); - break; - case 3: - break; // empty announcement, already handled - case 4: - Core::print("An adventure announcement occured, but nobody heard:\n%s\n", message.c_str()); - break; - case 5: - Core::print("An announcement occured, but nobody heard:\n%s\n", message.c_str()); - break; - case 6: - Core::print("Skipped a UNIT_COMBAT_REPORT because it has no units:\n%s\n", message.c_str()); - break; - case 7: - Core::print("Skipped an announcement not enabled for this game mode:\n%s\n", message.c_str()); - break; - case 8: - Core::print("Skipped an announcement because there's no active report:\n%s\n", message.c_str()); - break; - case 9: - Core::print("Skipped an announcement because it was empty after parsing:\n%s\n", message.c_str()); - break; - case 10: - Core::print("Report added but skipped printing to gamelog.txt because debug_gamelog is false.\n"); - break; - case 11: - Core::print("Report added but didn't qualify to be displayed anywhere:\n%s\n", message.c_str()); - break; - default: - Core::printerr("autoDFAnnouncement: Unexpected return value!\n"); - } + DEBUG(gui).print("Announcement succeeded internally but didn't qualify to be displayed anywhere:\n%s\n", message.c_str()); } - return rv; + + return true; } -int Gui::autoDFAnnouncement(df::announcement_type type, df::coord pos, std::string message, int color, bool bright, df::unit *unit1, df::unit *unit2, bool is_sparring, bool log_failures) +bool Gui::autoDFAnnouncement(df::announcement_type type, df::coord pos, std::string message, int color, + bool bright, df::unit *unit1, df::unit *unit2, bool is_sparring) { auto r = df::report_init(); r.type = type; @@ -1937,7 +1925,7 @@ int Gui::autoDFAnnouncement(df::announcement_type type, df::coord pos, std::stri if (Maps::isValidTilePos(pos)) r.zoom_type = report_zoom_type::Unit; - return autoDFAnnouncement(r, message, log_failures); + return autoDFAnnouncement(r, message); } df::viewscreen *Gui::getCurViewscreen(bool skip_dismissed) diff --git a/library/xml b/library/xml index 7ec5d8699..59075f42b 160000 --- a/library/xml +++ b/library/xml @@ -1 +1 @@ -Subproject commit 7ec5d86996269df5e01d64ea5bae67d0c29afd77 +Subproject commit 59075f42bbc77c354b5f815c5c1cce5bf48e76a5 diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index b8cd25860..ed9404b8e 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -87,7 +87,7 @@ if(BUILD_SUPPORTED) dfhack_plugin(autoclothing autoclothing.cpp) dfhack_plugin(autodump autodump.cpp) dfhack_plugin(autofarm autofarm.cpp) - dfhack_plugin(autogems autogems.cpp LINK_LIBRARIES jsoncpp_lib_static) + dfhack_plugin(autogems autogems.cpp LINK_LIBRARIES jsoncpp_static) dfhack_plugin(autohauler autohauler.cpp) dfhack_plugin(autolabor autolabor.cpp) dfhack_plugin(automaterial automaterial.cpp LINK_LIBRARIES lua) @@ -109,7 +109,7 @@ if(BUILD_SUPPORTED) dfhack_plugin(cursecheck cursecheck.cpp) dfhack_plugin(cxxrandom cxxrandom.cpp LINK_LIBRARIES lua) dfhack_plugin(deramp deramp.cpp) - dfhack_plugin(debug debug.cpp LINK_LIBRARIES jsoncpp_lib_static) + dfhack_plugin(debug debug.cpp LINK_LIBRARIES jsoncpp_static) dfhack_plugin(dig dig.cpp) dfhack_plugin(dig-now dig-now.cpp LINK_LIBRARIES lua) dfhack_plugin(digFlood digFlood.cpp) @@ -143,7 +143,7 @@ if(BUILD_SUPPORTED) dfhack_plugin(mode mode.cpp) dfhack_plugin(mousequery mousequery.cpp) dfhack_plugin(nestboxes nestboxes.cpp) - dfhack_plugin(orders orders.cpp LINK_LIBRARIES jsoncpp_lib_static) + dfhack_plugin(orders orders.cpp LINK_LIBRARIES jsoncpp_static) dfhack_plugin(pathable pathable.cpp LINK_LIBRARIES lua) dfhack_plugin(petcapRemover petcapRemover.cpp) dfhack_plugin(plants plants.cpp) diff --git a/plugins/autolabor.cpp b/plugins/autolabor.cpp index d6921f1ac..ba116c1c5 100644 --- a/plugins/autolabor.cpp +++ b/plugins/autolabor.cpp @@ -873,7 +873,7 @@ static void assign_labor(unit_labor::unit_labor labor, } int pool = labor_infos[labor].talent_pool(); - if (pool < 200 && candidates.size() > 1 && abs(pool) < candidates.size()) + if (pool < 200 && candidates.size() > 1 && size_t(abs(pool)) < candidates.size()) { // Sort in descending order std::sort(candidates.begin(), candidates.end(), [&](const int lhs, const int rhs) -> bool { diff --git a/plugins/command-prompt.cpp b/plugins/command-prompt.cpp index a987ea829..ba2fe0e87 100644 --- a/plugins/command-prompt.cpp +++ b/plugins/command-prompt.cpp @@ -1,23 +1,25 @@ -//command-prompt a one line command entry at the top of the screen for quick commands +// command-prompt: A one-line command entry at the top of the screen for quick commands #include "Core.h" +#include #include #include +#include #include -#include -#include #include +#include -#include #include +#include +#include #include #include +#include "df/enabler.h" +#include "df/graphic.h" #include "df/interface_key.h" #include "df/ui.h" -#include "df/graphic.h" -#include "df/enabler.h" using namespace DFHack; using namespace df::enums; @@ -36,8 +38,10 @@ class prompt_ostream:public buffered_color_ostream protected: void flush_proxy(); public: - prompt_ostream(viewscreen_commandpromptst* parent):parent_(parent){} - bool empty(){return buffer.empty();} + prompt_ostream(viewscreen_commandpromptst* parent) + : parent_(parent) + {} + bool empty() { return buffer.empty(); } }; class viewscreen_commandpromptst : public dfhack_viewscreen { public: @@ -48,7 +52,7 @@ public: } void render(); - void help() { } + void help() {} int8_t movies_okay() { return 0; } df::unit* getSelectedUnit() { return Gui::getAnyUnit(parent); } @@ -57,10 +61,11 @@ public: df::plant* getSelectedPlant() { return Gui::getAnyPlant(parent); } std::string getFocusString() { return "commandprompt"; } - viewscreen_commandpromptst(std::string entry):submitted(false), is_response(false) + viewscreen_commandpromptst(std::string entry) + : submitted(false), is_response(false) { - show_fps=gps->display_frames; - gps->display_frames=0; + show_fps = gps->display_frames; + gps->display_frames = 0; cursor_pos = entry.size(); frame = 0; history_idx = command_history.size(); @@ -76,7 +81,7 @@ public: } ~viewscreen_commandpromptst() { - gps->display_frames=show_fps; + gps->display_frames = show_fps; } void add_response(color_value v, std::string s) @@ -125,7 +130,7 @@ public: } protected: - std::list > responses; + std::list > responses; int cursor_pos; int history_idx; bool submitted; @@ -138,8 +143,8 @@ void prompt_ostream::flush_proxy() { if (buffer.empty()) return; - for(auto it=buffer.begin();it!=buffer.end();it++) - parent_->add_response(it->first,it->second); + for(auto it = buffer.begin(); it != buffer.end(); it++) + parent_->add_response(it->first, it->second); buffer.clear(); } void viewscreen_commandpromptst::render() @@ -154,25 +159,31 @@ void viewscreen_commandpromptst::render() auto dim = Screen::getWindowSize(); parent->render(); - if(is_response) + if (is_response) { - auto it=responses.begin(); - for(int i=0;isecond; - Screen::paintString(Screen::Pen(' ',it->first,0),0,i,cur_line.substr(0,cur_line.size()-1)); + std::vector lines; + word_wrap(&lines, response.second, dim.x); + for (auto &line : lines) + { + Screen::fillRect(Screen::Pen(' ', 7, 0), 0, y, dim.x, y); + Screen::paintString(Screen::Pen(' ', response.first, 0), 0, y, line); + if (++y >= dim.y) + return; + } } } else { std::string entry = get_entry(); - Screen::fillRect(Screen::Pen(' ', 7, 0),0,0,dim.x,0); - Screen::paintString(Screen::Pen(' ', 7, 0), 0, 0,"[DFHack]#"); + Screen::fillRect(Screen::Pen(' ', 7, 0), 0, 0, dim.x, 0); + Screen::paintString(Screen::Pen(' ', 7, 0), 0, 0, "[DFHack]#"); std::string cursor = (frame < enabler->gfps / 2) ? "_" : " "; - if(cursor_pos < (dim.x - 10)) + if (cursor_pos < dim.x - 10) { - Screen::paintString(Screen::Pen(' ', 7, 0), 10,0 , entry); + Screen::paintString(Screen::Pen(' ', 7, 0), 10, 0, entry); if (int16_t(entry.size()) > dim.x - 10) Screen::paintTile(Screen::Pen('\032', 7, 0), dim.x - 1, 0); if (cursor != " ") @@ -191,12 +202,12 @@ void viewscreen_commandpromptst::render() void viewscreen_commandpromptst::submit() { CoreSuspendClaimer suspend; - if(is_response) + if (is_response) { Screen::dismiss(this); return; } - if(submitted) + if (submitted) return; submitted = true; prompt_ostream out(this); @@ -204,11 +215,11 @@ void viewscreen_commandpromptst::submit() Screen::Hide hide_guard(this, Screen::Hide::RESTORE_AT_TOP); Core::getInstance().runCommand(out, get_entry()); } - if(out.empty() && responses.empty()) + if (out.empty() && responses.empty()) Screen::dismiss(this); else { - is_response=true; + is_response = true; } } void viewscreen_commandpromptst::feed(std::set *events) @@ -240,14 +251,14 @@ void viewscreen_commandpromptst::feed(std::set *events) for (auto it = events->begin(); it != events->end(); ++it) { auto key = *it; - if (key==interface_key::STRING_A000) //delete? + if (key == interface_key::STRING_A000) //delete? { - if(entry.size() && cursor_pos > 0) + if (entry.size() && cursor_pos > 0) { entry.erase(cursor_pos - 1, 1); cursor_pos--; } - if(size_t(cursor_pos) > entry.size()) + if (size_t(cursor_pos) > entry.size()) cursor_pos = entry.size(); continue; } @@ -261,34 +272,34 @@ void viewscreen_commandpromptst::feed(std::set *events) } } // Prevent number keys from moving cursor - if(events->count(interface_key::CURSOR_RIGHT)) + if (events->count(interface_key::CURSOR_RIGHT)) { cursor_pos++; if (size_t(cursor_pos) > entry.size()) cursor_pos = entry.size(); } - else if(events->count(interface_key::CURSOR_LEFT)) + else if (events->count(interface_key::CURSOR_LEFT)) { cursor_pos--; if (cursor_pos < 0) cursor_pos = 0; } - else if(events->count(interface_key::CURSOR_RIGHT_FAST)) + else if (events->count(interface_key::CURSOR_RIGHT_FAST)) { forward_word(); } - else if(events->count(interface_key::CURSOR_LEFT_FAST)) + else if (events->count(interface_key::CURSOR_LEFT_FAST)) { back_word(); } - else if(events->count(interface_key::CUSTOM_CTRL_A)) + else if (events->count(interface_key::CUSTOM_CTRL_A)) { cursor_pos = 0; } - else if(events->count(interface_key::CUSTOM_CTRL_E)) + else if (events->count(interface_key::CUSTOM_CTRL_E)) { cursor_pos = entry.size(); } - else if(events->count(interface_key::CURSOR_UP)) + else if (events->count(interface_key::CURSOR_UP)) { history_idx--; if (history_idx < 0) @@ -296,7 +307,7 @@ void viewscreen_commandpromptst::feed(std::set *events) entry = get_entry(); cursor_pos = entry.size(); } - else if(events->count(interface_key::CURSOR_DOWN)) + else if (events->count(interface_key::CURSOR_DOWN)) { if (size_t(history_idx) < command_history.size() - 1) { @@ -321,8 +332,8 @@ command_result show_prompt(color_ostream &out, std::vector & param return CR_OK; } std::string params; - for(size_t i=0;i(params), plugin_self); return CR_OK; } @@ -330,21 +341,23 @@ bool hotkey_allow_all(df::viewscreen *top) { return true; } -DFhackCExport command_result plugin_init ( color_ostream &out, std::vector &commands) +DFhackCExport command_result plugin_init(color_ostream &out, std::vector &commands) { commands.push_back(PluginCommand( - "command-prompt","Shows a command prompt on window.",show_prompt,hotkey_allow_all, - "command-prompt [entry] - shows a cmd prompt in df window. Entry is used for default prefix (e.g. ':lua')" + "command-prompt", "Shows a command prompt on window.", + show_prompt, hotkey_allow_all, + "command-prompt [entry] - shows a cmd prompt in df window." + " Entry is used for default prefix (e.g. ':lua')" )); return CR_OK; } -DFhackCExport command_result plugin_onstatechange (color_ostream &out, state_change_event e) +DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event e) { return CR_OK; } -DFhackCExport command_result plugin_shutdown ( color_ostream &out ) +DFhackCExport command_result plugin_shutdown(color_ostream &out) { return CR_OK; } diff --git a/plugins/isoworld b/plugins/isoworld index e3c49ab01..3630c816d 160000 --- a/plugins/isoworld +++ b/plugins/isoworld @@ -1 +1 @@ -Subproject commit e3c49ab017da2dcbeaadccd10e56d07d8f03b4ca +Subproject commit 3630c816df6962b4594d46d1ae75974c36c11629 diff --git a/scripts b/scripts index b808050d4..e062237ee 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit b808050d4a3885aa0e250e726708b2b28fe28260 +Subproject commit e062237ee03a22d0d8b88b725ba3712e649f1bf6