myk002
07761e1d5d
add some more handy widgets to the library
...
TooltipLabel
HotkeyLabel
CycleHotkeyLabel
ToggleHotkeyLabel
2022-04-18 17:37:11 -07:00
Timur Kelman
cb123e5076
default unset `frame_inset` values to 0 ( #2100 )
...
* default unset `frame_inset` values to 0
This change allows writing `frame_inset = {r=1}` instead of `frame_inset = {l=0, r=1, t=0, b=0}`
2022-04-16 08:17:35 -07:00
Josh Cooper
9bf9a79a11
EventManager/Eventful - Generate event arrays ( #2097 )
...
* Replaces EventManager.cpp's event array with an auto-gen one
* Replaces eventful.cpp's event array with auto-gen one
2022-04-14 21:47:25 -07:00
lethosor
0f464b13b3
Merge remote-tracking branch 'lethosor/pre-commit' into develop
2022-04-12 21:17:15 -04:00
lethosor
d1f0edd33b
Apply initial pre-commit config
2022-04-12 14:48:19 -04:00
DFHack-Urist via GitHub Actions
f3386d0621
Auto-update submodules
...
library/xml: master
scripts: master
2022-04-12 07:18:03 +00:00
Myk
fd1ee233a2
automatically manage sidebar modes in MenuOverlay ( #2083 )
2022-04-11 20:58:54 -07:00
Myk
10f22ecc27
add ResizingPanel class and autolayout for Panels ( #2086 )
...
* add autolayout for Panels and new ResizingPanel
2022-04-11 18:25:00 -07:00
Myk
e6299700bf
Handle punctuation in FilteredList filter matching ( #2085 )
...
* allow punctuation to be typed into a filter
and allow the filter to match keys with punctuation
2022-04-11 18:22:31 -07:00
myk002
4a383b1c84
handle number-indexed lua maps in safe_index
2022-04-11 18:02:57 -07:00
Myk
4f9608da13
Document and update argparse module ( #2089 )
...
also add unit tests and use new string fns in processArgs and allow it to recognize parameters with two dashes instead of just one
2022-04-11 16:16:55 -07:00
Myk
9a8fd12785
ensure ListBoxes always have enough height ( #2084 )
...
so they can always display an error message if the filter doesn't match anything
2022-04-11 16:15:50 -07:00
Myk
96b5b4420b
Add string:escape_pattern() utility function ( #2082 )
...
* add string:escape_pattern() to dfhack.lua
stolen from devel/query.lua. will migrate scripts to use the common implementation later
2022-04-10 21:18:01 -07:00
DFHack-Urist via GitHub Actions
39f5084902
Auto-update submodules
...
library/xml: master
scripts: master
2022-04-07 07:17:48 +00:00
DFHack-Urist via GitHub Actions
b313b31879
Auto-update submodules
...
library/xml: master
2022-04-03 07:16:42 +00:00
DFHack-Urist via GitHub Actions
8b09e9bbf9
Auto-update submodules
...
library/xml: master
2022-03-31 07:17:20 +00:00
Alan
ec0941da2f
git-describe: fail earlier if git fails to run or doesn't exist ( #2061 )
...
In cases where the cached `GIT_EXECUTABLE` does not exist, `git-describe.cmake`
would fail silently, resulting in a `git-describe.h` with missing definitions
that caused `DFHackVersion.cpp` to fail to compile.
This change produces a more descriptive error earlier in the build process.
2022-03-30 14:49:18 -07:00
Myk
257e7a3dfd
[core] Debug logging facelift ( #2060 )
...
* route 'Loading script...' messages through the debug logging framework
* they are now controllable via debugfilter. to turn off, add this to your dfhack.init file: debugfilter set Warning core script
* clarify debug logging docs
* prevent DEBUG messages from being compiled out of the binary
* recolor INFO messages so they blend into existing console output
* add configuration interface for log message header elements so they are individually configurable. all default to off
2022-03-30 14:46:09 -07:00
Myk
2df6980237
fix crash in eventful due to misaligned fn map ( #2059 )
...
also add warnings in eventful and EventManager to prompt devs to keep them in sync
2022-03-29 12:51:21 -07:00
Josh Cooper
69ca0d8a28
Improves support for dfhack as a sub-project ( #2058 )
...
Replaces CMAKE_SOURCE_DIR with dfhack_SOURCE_DIR so it can be included in other cmake projects that have a different top-level CMAKE_SOURCE_DIR
2022-03-29 10:28:52 -07:00
Josh Cooper
b18eff9ce2
Revert EventManager to previous behavior, but keep new events
...
Fixes #2031
2022-03-29 09:42:24 -07:00
myk002
db5e7d55c1
fix guidm.enterSidebarMode(DesignateMine)
...
it would end up in DesignateChopTrees if you happened to be looking at
the surface z-level.
2022-03-28 16:57:24 -07:00
DFHack-Urist via GitHub Actions
bbea31db34
Auto-update submodules
...
library/xml: master
2022-03-26 07:16:35 +00:00
Tachytaenius
19c0a4fe06
Added (chain) for [CHAIN_METAL_TEXT] armours in library/gui/materials.lua used by the gui/create-item script ( #2037 )
2022-03-19 15:32:16 -07:00
Ryan Williams
88b403ec7a
Add functions reverse-engineered from ambushing unit code ( #1992 )
...
* Add functions reverse-engineered from ambushing unit code
* Fix whitespace
* Fix debug_showambush check
* Remove getOuterContainerRef from Lua API
Don't think this works properly without allocating a new specific_ref. More trouble that it's worth.
* Fixed tile visibility check
* I don't think gamemode or gametype are ever NULL
* Minor tweaks to documentation
* Reimplement getOuterContainerRef for Lua; fix some comments
* Update Units.cpp and changelog
* Update Units.cpp
* Update changelog.txt
2022-03-13 17:19:35 -07:00
DFHack-Urist via GitHub Actions
8a4ddacff3
Auto-update submodules
...
library/xml: master
scripts: master
2022-03-13 07:15:55 +00:00
Kelly Kinkade
3d4c96de56
update Job.cpp to use the DF-provided job cancel method
...
use DF's provided job cancel function instead of the hackadoo workaround we used to use
2022-03-12 15:37:33 -08:00
Quietust
aa1bc3fe52
Cleanup Kitchen module (and the seedwatch plugin which uses it)
2022-03-12 12:04:34 -08:00
Josh Cooper
3f05859780
Revises manageJobStartedEvent, and adds comments
2022-03-12 11:33:27 -08:00
Josh Cooper
c8e7869375
Fixes some build errors
2022-03-12 11:33:27 -08:00
Josh Cooper
524f1670ed
Fixes missing namespace
2022-03-12 11:33:27 -08:00
Josh Cooper
ba5710f263
Adds new event type NEW_UNIT_ACTIVE
2022-03-12 11:33:27 -08:00
Josh Cooper
6ace4b2cf8
Fixes mistake in EventManager::manageTickEvent
2022-03-12 11:33:27 -08:00
Josh Cooper
b8ad0131ea
Modifies EventManager::registerTick to retain old behaviour of re-registering tick events
2022-03-12 11:33:27 -08:00
Josh Cooper
fb51e2d8b5
Adds comments to members of EventHandler
2022-03-12 11:33:27 -08:00
Josh Cooper
1107c03b86
Modifies EventManager unit loops
2022-03-12 11:33:27 -08:00
Josh Cooper
c550a6caf0
Updates EventManager job loops
2022-03-12 11:33:27 -08:00
Josh Cooper
07ffa0b8da
Fixes bug in manageJobStartedEvent
2022-03-12 11:33:27 -08:00
Josh Cooper
24255d3195
Adds event type JOB_STARTED
2022-03-12 11:33:27 -08:00
Josh Cooper
48444afbd5
Fixes issue in manageJobCompletedEvent
2022-03-12 11:33:27 -08:00
Josh Cooper
3e72d549d1
Switches iterators to pre-increment instead of post for EventManager
...
My understanding is that iterators (.begin()/end()) are slightly faster with
pre-increment instead of post. Something about avoiding a copy if I recall correctly.
I replaced all `([:alpha:]+)\+\+` with `++$1` so non-iterators were switched as well - luckily there is no impact to pre/post aside from with iterators.
2022-03-12 11:33:27 -08:00
Josh Cooper
f5ced46608
Refactors EventManager
...
- handler freq now works on an individual handler basis (set to 0 to fire as frequently as possible)
- tick events no longer need to be re-registered after every eventful tick
2022-03-12 11:33:27 -08:00
Josh Cooper
12df6d14e9
Improves documentation for plugin writing
2022-03-12 11:33:27 -08:00
myk002
cf54b84fd6
Bump to 0.47.05-r4
2022-03-09 14:27:20 -08:00
myk002
31397af99b
cache civzones so lookup is O(1) instead of O(N)
2022-02-26 15:32:25 -08:00
myk002
a7085ea36b
report to the console and stderr when we run inits
2022-02-25 12:59:38 -08:00
myk002
faa2410058
fix typos in argparse
2022-02-18 14:54:45 -08:00
myk002
e531346968
make a (shallow) copy of table params
...
this improves introspection capabilities since the table is snapshotted
at the time of the mock call
2022-02-18 13:33:08 -08:00
DFHack-Urist via GitHub Actions
e1e3c6f7ac
Auto-update submodules
...
library/xml: master
2021-10-29 07:16:44 +00:00
myk002
42ae45dd5f
support designate for enterSidebarMode
2021-10-02 09:26:32 -07:00