Commit Graph

54 Commits (860131cf963c89d10101e232d8b161647ff060ba)

Author SHA1 Message Date
Warmist 0a42fe0e38 Delete trailing whitespace 2019-09-02 19:50:00 +03:00
Warmist 62aff6edee Whitespace fix 2019-09-02 18:40:50 +03:00
Warmist df756f22f8 Change dwarfmonitor to use global lua state.
This needs more CoreSuspends but they are needed either way. This way
you can access other script environments and access this plugin enviroment
from lua.
2019-09-02 18:35:46 +03:00
lethosor 368f8d0504 Remove and replace checks for OnBreak 2018-11-24 14:52:26 -05:00
lethosor 2dac3c53c7 Add stress cutoffs to Units module, fix dwarfmonitor/manipulator
Fixes #1292
2018-07-09 15:59:12 -04:00
Pauli 9c59b7ff48 Fix unlikely memory leaks if Screen::show fails
The Screen::show takes ownership of the screen pointer. I decided to
switch the parameter to std::unique_ptr to make the pointer ownership
explicit. The unique_ptr then provides automatic screen destruction in
Screen::show unless pointer is inserted or is already in the linked list
that is managed by df.
2018-06-19 16:41:31 +03:00
lethosor aac892c560 Adapted to changed Units functions
Squashed version of #1307

Closes #1307
2018-06-14 10:30:35 -04:00
lethosor f57327e7c8 Fix periodic events in several plugins
Also stop running buildingplan/fortplan while loading a world, and stop running
autogems while paused

Fixes #1286
2018-05-29 23:24:02 -04:00
lethosor 7d0df117ee dwarfmonitor: fix typo in function name 2018-05-12 14:59:26 -04:00
lethosor db95796d4c Many build fixes 2018-03-10 16:53:45 -05:00
lethosor 55f5439ddf dwarfmonitor: remove unused hook, use CoreSuspendClaimer 2018-02-09 02:07:08 -05:00
lethosor 1ed6c70663 dwarfmonitor: Add "view unit" option to prefs screen 2018-01-18 10:17:54 -05:00
lethosor 74aefddd75 dwarfmonitor: Use a reasonable default for unhandled item types 2018-01-18 10:17:40 -05:00
lethosor 7b16cf1619 dwarfmonitor: actually display creature names 2018-01-18 09:54:33 -05:00
lethosor 9515a9e4f5 dwarfmonitor: use interface_key overload of OutputHotkeyString, grey out unit option 2018-01-18 01:14:30 -05:00
lethosor 5f588b376a dwarfmonitor: make handling of unrecognized preferences more obvious 2018-01-18 01:07:20 -05:00
lethosor 4e2c6194ca dwarfmonitor: support poetic/musical/dance forms 2018-01-18 01:06:55 -05:00
lethosor 909776571e dwarfmonitor: support getSelectedUnit 2018-01-18 01:06:03 -05:00
lethosor ae809afde7 Add Gui::refreshSidebar()
This handles feeding CURSOR_DOWN_Z and CURSOR_UP_Z properly, avoiding issues
when on the lowest z-level.
2017-06-23 00:02:21 -04:00
lethosor 4c21bbd5ae Add Lua::TableInsert() helper 2016-10-15 14:55:48 -04:00
lethosor d0c28d3f50 Prevent plugins with active viewscreens from being unloaded
This requires plugins to pass plugin_self to Screen::show(), but
avoids the need to implement special checks in plugin_onstatechange
for the SC_BEGIN_UNLOAD event.
2016-01-01 11:15:29 -05:00
Eric Wald e4de341168 Preparing for MakeInstrument elimination.
Instruments are now made individually, so this type of job no longer happens.  Therefore, it will probably be removed from the job_type enum.
2015-12-17 21:45:43 -07:00
lethosor c44ac8ec6e Improve handling of fatal errors and errors in dfhack.lua
* Several fatal errors that occurred during core initialization didn't
  stop initialization or set 'errorstate' properly, which caused
  update hooks and other code to crash later. This has been fixed and
  should address crashes like the one mentioned in #470.
* Errors when loading dfhack.lua now cause Lua::Open() to fail, which
  triggers a fatal error in Core::Init()
* Failure to initialize the console no longer results in a call to
  fatal() (since it didn't actually stop initialization previously)
2015-10-17 21:18:04 -04:00
lethosor 01e04c24c5 Use a separate lua state in dwarfmonitor render hook 2015-07-31 14:25:33 -04:00
lethosor 825d46af51 Move ListColumn class to a separate header 2015-07-28 21:48:00 -04:00
lethosor 93c9a41a3a Reimplement dwarfmonitor widgets in Lua (and improve customizability)
Widget positions and a few other options (e.g. date formats) can be
specified in dfhack-config/dwarfmonitor.json on a per-instance basis.

Related changes:
* Fixed an issue loading JSON files from Lua
* JSON files in dfhack-config (only dwarfmonitor.json currently) are
  no longer copied into the DF directory when building DFHack. This
  keeps developers' personal settings intact, but will require
  copying over changes made to DFHack's copies manually.
* Fixed incorrect config path in dwarfmonitor help
2015-06-13 21:15:43 -04:00
lethosor 84b0b48028 dwarfmonitor: Allow weather indicator to be configured separately 2015-06-10 23:09:01 -04:00
lethosor eabcee38e5 dwarfmonitor: Get rid of "Clear" weather indicator 2015-06-10 23:05:33 -04:00
lethosor 6eb929b306 Move JSON files out of hack/ folder 2015-05-09 16:04:15 -04:00
lethosor a1fd1d9219 Document dwarfmonitor and allow date format to be modified 2015-04-19 12:38:37 -04:00
lethosor 10cfef0553 Fix whitespace issues 2015-02-14 22:53:06 -05:00
Chris Dombroski f608235b1e Fix some Lua things 2015-01-29 19:56:50 -05:00
Chris Dombroski c179f5b913 Extract some stuff from zone.cpp to plugins/Units.{h,cpp} 2015-01-28 21:28:32 -05:00
lethosor ad6b19f1b2 Merge remote-tracking branch 'PeridexisErrant/needs_porting-cleanup'
Conflicts:
	NEWS
2015-01-05 16:21:24 -05:00
PeridexisErrant f3826abc0c cleaning up in needs_porting
Removed obsolete plugins.  Started hotkeys port.  Mostly-finished
position port.  Corrected dwarfmonitor date display.  Documented
putontable.lua in readme.
2014-12-15 23:11:23 +11:00
lethosor cac2245438 Update some plugins to use REQUIRE_GLOBAL 2014-12-03 23:26:54 -05:00
lethosor 9fd6e9f03c Expand dwarfmonitor weather indicator 2014-11-15 17:29:19 -05:00
lethosor bc73319333 Make rain indicator LIGHTBLUE for better visibility 2014-11-15 16:39:19 -05:00
lethosor 9b0d0eba45 Merge remote-tracking branch 'falconne/plugin_dwarfmonitor' into update-falconne-plugins 2014-11-15 16:36:35 -05:00
lethosor 2484f89542 Update dwarfmonitor's happiness display 2014-11-08 15:08:56 -05:00
Quietust 8a9e3d1a72 Plugin cleanup - always do "using df::global::[foo]". Also, get rid of old 0.34.11 binpatches 2014-08-11 15:07:52 -05:00
lethosor fa26aa79ea Make some plugins compile for 0.40
dwarfmonitor: remove StoreItemInChest, StoreItemInCabinet, ProcessPlantsBag, and BrewDrink
dig/diggingInvaders/siege-engine: update special cases for trees to handle roots/branches/trunks
2014-08-04 12:28:22 -04:00
Anuradha Dissanayake b1f73b791c DwarfMonitor: Show current date and weather in border. 2014-06-07 15:12:19 +12:00
Anuradha Dissanayake e9c7d502e2 dwarfmonitor: add screen to summarise preferences of fortress dwarfs. 2014-05-04 22:45:48 +12:00
Alexander Gavrilov 32a6073dad Remove lambdas from dwarfmonitor and resume. 2013-10-03 16:30:06 +04:00
Alexander Gavrilov d7e35c2d23 Add built-in enable and disable commands. 2013-09-30 13:19:51 +04:00
Anuradha Dissanayake 1550df496f Right align happiness monitor to avoid interference with announcements 2013-04-01 19:52:13 +13:00
Bjørnar Hansen 323c56a641 Right-align happiness monitor overlay.
The overlay was blocking game messages which are displayed on the left side.
2013-03-29 15:03:09 +01:00
Anuradha Dissanayake 59ec9bfc57 Update versions 2013-03-16 22:13:01 +13:00
Anuradha Dissanayake c16bd3d71a Apply r3 name changes 2013-03-16 18:25:02 +13:00