myk002
426a538e30
refactor overlay to use script-manager code
2022-12-10 21:59:51 -08:00
myk002
b3c8d85637
new plugin: script-manager
...
scans all scripts and discovers onStateChange and isEnabled functions
2022-12-10 21:59:51 -08:00
Myk Taylor
facdb61e42
explicitly declare namespaces and proto versions
2022-12-10 18:06:53 -08:00
myk002
dec6d3d379
Revert "update google protobuf to 3.21.10"
...
This reverts commit 9dabf51ac7
.
2022-12-07 11:59:48 -08:00
myk002
9dabf51ac7
update google protobuf to 3.21.10
2022-12-07 11:59:15 -08:00
myk002
6fc62946e4
remove obsolete fix_job_postings command
2022-12-06 16:22:39 -08:00
myk002
7e6b8618ea
remove command-prompt
2022-12-04 15:56:11 -08:00
myk002
1547d527b7
fix off-by-one error in dwarfmonitor.misery widget
2022-12-04 15:34:00 -08:00
Myk
fb42951afe
Merge pull request #2464 from myk002/myk_cleanup
...
remove unused "plugin" file
2022-12-03 18:47:04 -08:00
Myk
017d473903
Merge pull request #2460 from myk002/myk_buildingplan
...
move buildingplan into subdir
2022-12-03 18:46:42 -08:00
myk002
8d9fba665e
remove unused "plugin" file
2022-12-02 17:04:18 -08:00
myk002
fa9a3fcbbf
add missing CMakeLists file
2022-12-02 16:32:21 -08:00
Kelly Kinkade
d62514b201
fix stupid typo in cmakefile
2022-12-02 17:08:17 -06:00
Kelly Kinkade
231b521c02
INFO -> TRACE in autolabor
...
sorry about that
2022-12-02 17:05:26 -06:00
myk002
e0aff474f3
move buildingplan into subdir
2022-12-02 14:22:48 -08:00
Myk
ed52c4cd6e
Merge pull request #2374 from wolfboyft/movement-timer-api
...
Action timer API
2022-12-02 09:31:13 -08:00
Myk
08f267955c
Merge pull request #2454 from cppcooper/channel-safely
...
Implements plugin: channel-safely v1.1.1b
2022-12-01 16:49:32 -08:00
Josh Cooper
e316b7aa75
Implements plugin: channel-safely v1.1.1b
2022-12-01 16:36:32 -08:00
Tachytaenius
0836962007
Rename [xyz]CategoryActionTimers to [xyz]GroupActionTimers in action timer API
2022-12-01 23:24:04 +00:00
Myk
e7ca1cb0c1
Merge pull request #2452 from lethosor/dwarfmonitor-cursor-widget-config
...
Dwarfmonitor cursor widget config
2022-12-01 11:49:17 -08:00
Kelly Kinkade
437335454d
make autohauler not be a chatty cathy
...
INFO -> TRACE
2022-12-01 09:00:50 -06:00
Tachytaenius
f863b9807a
Add action timer API input validation
2022-12-01 13:34:54 +00:00
Tachytaenius
7f54a77ed9
Continue work on unit action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
16ef4f8313
Rename action_type_group to unit_timer_action_type_group
2022-12-01 13:34:54 +00:00
Tachytaenius
fa589b5764
Make progress with action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
0f8ce360ac
Make first pass of action timer API
2022-12-01 13:34:54 +00:00
lethosor
40f3a3333e
Make Cursor widget prefix and coordinate types configurable
...
e.g. the old behavior can be restored with "coords_type": "mouse_ui" and
"coords_short": true
2022-12-01 00:08:56 -05:00
Kelly Kinkade
9b5a693637
death to whitespace
2022-11-30 21:46:35 -06:00
Kelly Kinkade
cea9e144c6
switch autolabor & autohauler to debugging api
...
might need to change some of the message levels, time will tell
2022-11-30 21:46:35 -06:00
Kelly Kinkade
8d95d20852
remove stray whitespace
2022-11-30 21:43:56 -06:00
Kelly Kinkade
9fcb20888f
realign autohauler and autolabor with each other
...
also clean up C++ code smells in both
2022-11-30 21:43:56 -06:00
myk002
ce1ef15bb2
reduce hotspot visuals to a single exclamation mark
2022-11-30 18:13:19 -08:00
myk002
1851a82fe1
close the hotkey menu if the mouse "flicks" onto it
...
also initialize the selected item properly if the widget is anchored to
the bottom of the screen
2022-11-30 18:11:02 -08:00
lethosor
3b7206777e
spectate: avoid printing or taking action on load when disabled
2022-11-30 20:31:59 -05:00
Myk
760fbf7b8f
Merge pull request #2434 from cppcooper/channel-safely
...
Implements plugin: channel-safely v1.1b
2022-11-30 08:28:08 -08:00
Myk Taylor
8900bc84d8
fix crash in buildingplan
...
when a player cancels out of placing a building type with plan mode
enabled and then immediately switches to placing a different building
type where plan mode is not enabled, the placement errors array would be
erroneously cleared and allow placement of the building. this would
cause DF to crash if there were no materials available to build the
building with.
2022-11-30 04:51:11 -08:00
Kelly Kinkade
bc502f8132
correct QUERN construct labor
2022-11-29 18:32:57 -06:00
myk002
f5d20c99a3
prep for usage by gui/overlay
2022-11-29 15:12:02 -08:00
myk002
9d17be84a8
set width to something representative on init
...
so if the widget is enabled in gui/overlay without ever being resized with real data,
it won't be truncated
2022-11-29 15:12:02 -08:00
Josh Cooper
3999ed5c72
Implements plugin: channel-safely v1.1b
2022-11-28 17:10:55 -08:00
myk002
23e467deaf
use consistent bounds checking style in hotkeys
2022-11-28 15:50:05 -08:00
myk002
4e7b4dc554
show hotkeys bound to number keys, F11, and F12
2022-11-28 15:37:01 -08:00
Myk
344ed4312b
Merge pull request #2111 from cppcooper/channel-safely
...
Channel safely
2022-11-23 12:41:50 -08:00
Myk
e943b4ed31
Merge pull request #2413 from myk002/myk_resume
...
Turn down resume plugin
2022-11-23 11:29:56 -08:00
Myk
a900b1789a
Merge pull request #2414 from myk002/myk_mouse_buttons
...
Make mouse button event behavior conform to docs
2022-11-23 11:29:20 -08:00
Josh Cooper
c6b15b1ccb
Implements plugin: channel-safely v1.2a
2022-11-22 11:03:28 -08:00
myk002
24dc879888
adapt library code to newly correct mouse events
2022-11-21 17:36:46 -08:00
myk002
cb338e4257
remove resume plugin
...
all functionality has been migrated to unsuspend
2022-11-21 15:27:40 -08:00
Josh Cooper
8a0999ffdc
Implements plugin: channel-safely v1.1a
2022-11-21 12:39:26 -08:00
Josh Cooper
5352649b88
Implements plugin: spectate v1.0.3b
...
test
2022-11-21 12:26:40 -08:00
Josh Cooper
4a0abd1915
Implements plugin: spectate v1.0.2b
2022-11-21 12:26:40 -08:00
Josh Cooper
b99e948b8a
Implements plugin: spectate v1.0.1a
2022-11-21 12:26:40 -08:00
Josh Cooper
40cbe4fe88
Implements plugin: spectate v1.0a
2022-11-21 12:26:40 -08:00
Josh Cooper
ec6cd8d53a
Implements plugin: spectate v0.5
...
Fixes spectate not starting with the first job
Updates spectate.cpp
- refactors features/settings to under a `Configuration` struct with a global variable `config`
- refactors existing `config` => `pconfig`
- moves plugin logic, mostly, to namespace SP (spectate plugin)
- utilizes debugging log macros
- updates status format
- refactors status print code into a separate function
2022-11-21 12:26:27 -08:00
Josh Cooper
9959ef1b36
Implements plugin: channel-safely v1.0.1a
2022-11-21 09:26:55 -08:00
Josh Cooper
6c68e72295
Implements plugin: channel-safely v1.0a
2022-11-21 09:26:55 -08:00
Josh Cooper
c4e55f1cc9
Implements plugin: channel-safely v0.6.1.3
2022-11-21 09:26:55 -08:00
Josh Cooper
3cb186a62f
Implements plugin: channel-safely v0.6.1.2
2022-11-21 09:26:55 -08:00
Josh Cooper
8847ed23b4
Implements plugin: channel-safely v0.6.1.1
2022-11-21 09:26:55 -08:00
Josh Cooper
a9f0021927
Implements plugin: channel-safely v0.6.1
2022-11-21 09:26:55 -08:00
Josh Cooper
92537bc459
Implements plugin: channel-safely v0.6
2022-11-21 09:26:55 -08:00
Josh Cooper
fcd6696768
Implements plugin: channel-safely v0.5.3
2022-11-21 09:26:55 -08:00
Josh Cooper
84ffeef092
Implements plugin: channel-safely v0.5.2
2022-11-21 09:26:55 -08:00
Josh Cooper
9db0d809fa
Implements plugin: channel-safely v0.5.1
2022-11-21 09:26:55 -08:00
Josh Cooper
e5dbaac85d
Implements plugin: channel-safely v0.5
2022-11-21 09:26:55 -08:00
Josh Cooper
c2d346fc84
Implements plugin: channel-safely v0.4
2022-11-21 09:26:55 -08:00
Josh Cooper
a8dcfeead9
Implements plugin: channel-safely v0.3.1
2022-11-21 09:26:55 -08:00
Josh Cooper
b7ee01108e
Implements plugin: channel-safely v0.3
2022-11-21 09:26:55 -08:00
Josh Cooper
3a6205d19e
Removes extra EOF lines
2022-11-21 09:26:55 -08:00
Josh Cooper
bd6c748d00
Implements plugin: channel-safely v0.2
2022-11-21 09:26:55 -08:00
Josh Cooper
22414f26fa
Implements plugin: channel-safely v0.1
2022-11-21 09:26:55 -08:00
myk002
5967e5c9e0
fix up cleanowned status message
...
print unit id instead of raw pointer and display "wear level" instead of
just "wear"
2022-11-20 16:03:08 -08:00
Myk
ff447d46bd
don't overcount units for misery widget
...
addendum to #2366
2022-11-20 09:45:23 -08:00
Kelly Kinkade
2bc2dd8f5b
remove unnecessary 'const'
...
wouldn't it be nice if there was a single C++ standard that all compilers adhered to?
2022-11-20 10:21:32 -06:00
Kelly Kinkade
2453b34194
refactor common labor state map table
...
eliminates code duplication
2022-11-20 10:09:52 -06:00
Kelly Kinkade
aa78c626f9
collect autolabor plugins into one directory
...
these plugins all share code, moving them into a common directory will make refactoring the code shared between them more straightforward
2022-11-20 01:58:08 -06:00
Kelly Kinkade
99f919c3dc
autofarm: insert missing output flushes
...
insert calls to std::flush as appropriate
fixes #2365
2022-11-15 20:00:27 -06:00
Kelly Kinkade
d191993376
autolabor/autohauler: add labor entries for 241-243
...
add missing entries for jobs 241, 242, and 243
this was fixed in labormanager in PR #1566 (see #1561 ) but was never addressed in autolabor or autohauler
should close #1994
2022-11-15 13:13:33 -06:00
Myk
35cea1b5e1
Merge pull request #2371 from myk002/myk_overlay_hotkeys
...
[hotkeys] implement hotspot menu widget
2022-11-14 16:50:30 -08:00
myk002
6635b6489b
handle commands like ':lua <something>'
2022-11-14 16:46:03 -08:00
myk002
bdf201c670
ensure keybinding shows up in hotkeys command
...
not overlay
2022-11-14 16:46:03 -08:00
myk002
47d7c477b3
show menu hotkey for list but not on the menu
2022-11-14 16:46:02 -08:00
myk002
a2efc41fef
use new anywhere hotkey and filter out own hotkey
2022-11-14 16:46:02 -08:00
myk002
de20603080
implement CLI commands
2022-11-14 16:46:02 -08:00
myk002
1fc30493c0
right align hotkeys for list items
...
and combine hotkeys for identical commands
and don't hide the menu until the mouse has left the frame
and start the widget one tile closer to the edge so the mouse is already
on the list instead of on the frame
2022-11-14 16:46:02 -08:00
myk002
8bf987e7db
use a more natural ordering for modifier keys
2022-11-14 16:46:02 -08:00
myk002
2b73d6e8e9
allow hotkeys to be invoked as a hotkey
...
also ensure keybindings are always cleaned up
2022-11-14 16:46:02 -08:00
myk002
66d3409a65
solve concurrency issues
2022-11-14 16:46:01 -08:00
myk002
5d29da31b0
rework hotkeys plugin to support the widget
2022-11-14 16:46:01 -08:00
myk002
c630a71c73
click on arrow to launch gui/launcher with command
2022-11-14 16:46:01 -08:00
myk002
d8c86fd0b1
allow commands with hotkey guards to work
2022-11-14 16:46:01 -08:00
myk002
fb7b55fb11
open gui/launcher with the command on right arrow
2022-11-14 16:46:01 -08:00
myk002
ae2d9008ef
add frames around menu panels
2022-11-14 16:46:00 -08:00
myk002
6e005d4a8d
implement basic logic for hotspot menu
2022-11-14 16:46:00 -08:00
myk002
e3498f275f
fix dwarfmonitor weather widget
2022-11-14 16:45:08 -08:00
myk002
9ce9d2001c
adapt dwarfmonitor widgets to new API
2022-11-14 16:45:07 -08:00
myk002
2cf6767589
migrate dwarfmonitor widgets to overlay v2
2022-11-14 16:45:07 -08:00
myk002
19289bf3c8
clean up docs and code
2022-11-14 16:40:36 -08:00
myk002
208e96c1b7
bounds check overlay_onupdate_max_freq_seconds
2022-11-14 16:40:35 -08:00
myk002
56cf7e945c
use anywhere hotkey so the overlay can be invoked
2022-11-14 16:40:35 -08:00
myk002
9bdc995f20
write docs and make implementation match the docs
...
added ability to enable/disable all
added showing current widget configuration
added moving widget back to default coordinates
2022-11-14 16:40:35 -08:00
myk002
ffc09ff25d
record explicitly triggered widget screens
2022-11-14 16:40:35 -08:00
myk002
6e0a583e8d
enable overlay from init scripts; self-enable bad
...
loading other plugin modules during plugin_init results in those other
plugin modules not getting initialized properly. specifically, their
DFHACK_PLUGIN_LUA_FUNCTIONS and commands don't get added to their lua
module namespaces.
2022-11-14 16:40:35 -08:00
myk002
1ebf58ff83
rewrite conf management according to discord convo
...
move non-user-editable state into the widget config
remove registry json files
all user-editable state is now in a single overlay.json file
2022-11-14 16:40:35 -08:00
myk002
94c6bc8063
refactor generic lua function caller to Lua ns
2022-11-14 16:40:35 -08:00
myk002
6e6e174c31
implement CLI interface
2022-11-14 16:40:34 -08:00
myk002
a76c04c9ec
load overlay widget configuration
2022-11-14 16:40:34 -08:00
myk002
bd318b7a21
implement basic overlay event logic
2022-11-14 16:40:34 -08:00
myk002
d7fba5c720
add stub lua layer for overlay
2022-11-14 16:40:34 -08:00
lethosor
2d40626912
Change other instances of "0x%p" to "%p"
...
Followup to c0f9488b61
2022-11-10 16:02:28 -05:00
myk002
c0f9488b61
fix double "0x" when printing address in probe
2022-11-10 10:48:04 -08:00
Myk
eac7fac8e9
Merge pull request #2389 from myk002/myk_gui_anywhere
...
[Gui] add "anywhere" keybinding guard
2022-11-09 15:48:04 -08:00
myk002
8cd9c88981
use new standard "anywhere" hotkey in Gui
2022-11-09 14:34:39 -08:00
myk002
d95a5ac238
add string_to_int to MiscUtils.h
2022-11-09 11:55:29 -08:00
Myk
8a47c103fc
Merge pull request #2379 from myk002/myk_overlay_reset_and_simplify
...
[overlay] reset implementation and simplify with lovely preprocessor macros
2022-11-09 10:32:15 -08:00
myk002
dce312b83b
Revert "use preprocessor foreach to reduce boilerplate"
...
This reverts commit 5e845ec7983555a3577e583038da824902dbf477.
not compatible with our MSVC toolchain. we can revert this revert once
we update MSVC for the steam release
2022-11-09 09:37:51 -08:00
myk002
69673c2472
remove unused (and unusable) instance fields
2022-11-09 09:37:43 -08:00
myk002
2f81c3a696
use preprocessor foreach to reduce boilerplate
2022-11-09 09:37:43 -08:00
myk002
78e5c072e5
reset overlay code to skeleton
2022-11-09 09:37:43 -08:00
myk002
3a713c6368
update devel plugins
2022-11-07 17:52:39 -08:00
myk002
5b9c18fc3c
migrate string fns from uicommon to MiscUtils
...
and clean up some leaky usings
2022-11-07 15:36:16 -08:00
Myk
1e31cc197d
Merge branch 'develop' into spectate
2022-10-26 12:30:58 -07:00
Myk
c7f4f57367
Merge pull request #2360 from myk002/myk_automaterial_render
...
[automaterial] fix render errors with box boundaries
2022-10-26 12:25:48 -07:00
Myk
e60cbfc743
Merge pull request #2361 from myk002/myk_zjump_twbt
...
[mousequery] fix z-level jumps when clicking quickly
2022-10-26 12:25:40 -07:00
Josh Cooper
9dc199dac3
Apply suggestions from code review
2022-10-25 15:01:57 -07:00
Josh Cooper
48e0b53adc
Fixes logical error in new failsafe
2022-10-24 17:59:29 -07:00
Josh Cooper
606f204b82
Apply suggestions from code review
2022-10-24 17:57:14 -07:00
myk002
7b2119c4d1
remove debug statement that doesn't help
2022-10-24 17:03:28 -07:00
myk002
8b61a17009
prevent z-level from changing after box select
...
if the player clicks the mouse too fast after finishing a selection
2022-10-24 12:46:31 -07:00
myk002
01c46f7a7e
fix z-level jumps when clicking quickly
...
this happens when TWBT is enabled and multilevel is > 0
getDepthAt() returns inconsistent values for the same position, leading
to a mismatch when we "unshift" the coordinates to account for render
depth
2022-10-24 12:44:25 -07:00
myk002
6a57cc4450
fix render errors with automaterial box boundaries
2022-10-24 12:41:17 -07:00
Josh Cooper
a39d3f20a7
Replaces unsigned integer for freq map's value to ensure reasonable p's
2022-10-21 00:02:42 -07:00
Josh Cooper
f0baaff9db
Merge remote-tracking branch 'origin/spectate' into spectate
2022-10-20 23:53:20 -07:00
Josh Cooper
f66dd6f404
Implements change requests
...
- removes redundant `if (df::global::ui)` checks; and tested to ensure no segfaults cropped up like in the past times I've removed these
- removes useless `if (pause_lock)` pause lock is set when plugin initializes, even if pause lock was left null (since we technically don't need it, and that was the point of the null check) it still would be a useless check (actually an impediment preventing functionality)
- removes disabled interpose code
- removes lua linkage
- updates doc
extra:
- surrounds user input for tick frequency with `std::abs()` not that we would have ended up with a negative value, but it was probably a typo and this is easier than printing an error or letting it underflow past max int (on most systems)
2022-10-20 23:52:30 -07:00
Josh Cooper
fd747525d0
Removes atomic_bool from pause.h
...
this is 99% for triggering CI
2022-10-15 22:58:21 -07:00
Josh Cooper
851ff10959
Fixes uninitialized warning
2022-10-14 18:23:48 -07:00
Josh Cooper
9b1541add5
Merge branch 'develop' into spectate
2022-10-14 17:41:34 -07:00
Josh Cooper
45ac340f37
Finalizes spectate update
...
- Fixes for state transitions that were found broken. eg. plugin disabled -> enable auto-unpause feature -> enable plugin (auto-unpause will not truly be enabled; similar transitions were broken)
- Adds a commented out lock for if the pause code is ever adopted into the core API, as to enable many mods to use the `World::SetPauseState()` without walking over each other, and in the case of `reveal hell` also be able to avoid needing to set the state every tick in onupdate
- Revises the usage docs with `enable|disable|set` syntax
2022-10-14 17:02:43 -07:00
Josh Cooper
736313d16b
Extends pause api
2022-10-14 15:55:44 -07:00
Josh Cooper
aa64dea61d
Revert "Includes pause.h in spectate's cmake"
...
This reverts commit 2c9ce5f316
.
2022-10-14 15:44:52 -07:00
Josh Cooper
d53746ed48
Fixes various state transition edge cases
2022-10-14 15:43:39 -07:00
myk002
20c0b75f8b
reduce size of overlay button
2022-10-14 13:20:50 -07:00
myk002
fea0ce0718
fix cvs quoting
2022-10-14 13:11:26 -07:00
Josh Cooper
7c769ebb9c
Disables pause locking and announcement manipulation code in spectate
2022-10-14 12:42:20 -07:00
Josh Cooper
ff072bf0c2
Updates spectate's pause locking
2022-10-14 12:41:36 -07:00
myk002
b1bf80e585
support "group" file split strategy for blueprint
2022-10-14 12:27:24 -07:00
Josh Cooper
ffed499057
Swaps static variable instantiation order in pause.cpp
2022-10-13 23:22:51 -07:00
Josh Cooper
c9165f8999
Adds the pause.h World::Update() to onupdate, to keep settings locked
2022-10-13 11:57:05 -07:00
Josh Cooper
2c9ce5f316
Includes pause.h in spectate's cmake
...
as to.. "changes to the header file will trigger recompliation"
2022-10-13 11:52:39 -07:00
myk002
b4986aad97
create meta bp only if it will reduce the bp count
2022-10-12 17:49:37 -07:00