Commit Graph

250 Commits (9319ebfba0f2890605f9ba3541b9a4955316bf18)

Author SHA1 Message Date
lethosor 2aeac718cc workflow: Account for job postings correctly and fix existing issues
Without removing postings correctly, it was possible to end up with
multiple workers assigned to a job that workflow had suspended
multiple times, which caused crashes if more than one worker was
assigned to the same job by DF.

This adds an additional command, fix-job-postings, that runs
automatically when loading a world and fixes:
- Multiple job postings that point to the same job
- Job postings that point to a job where posting_index == -1
  (i.e. jobs that should have no posting assigned)

Fixes #741
2015-11-25 20:33:13 -05:00
lethosor 610170b0b0 Add hooks for getDwarfmodeViewDims and getDepthAt (new) 2015-11-15 11:54:34 -05:00
lethosor fcfffd1cb6 Track state of gui hooks
Also fix a bug in drawborder() and expand color-dfhack-text to test
multiple hooks
2015-11-15 11:54:34 -05:00
lethosor fff9072b07 Add initial support for hooking into Gui-related functions 2015-11-15 11:54:34 -05:00
DoctorVanGogh e9be1aa657 Fix for construction over existing construction & on top of walls
Fix to allow constructions on top of (natural) down stairs
2015-11-06 19:00:43 +01:00
lethosor ac71fa8070 Add isValidLabor() to Units module
Closes #711 and could avoid potential issues when editing units from
other civs with manipulator.
2015-10-30 18:41:09 -04:00
lethosor 8de710f1c1 Add Renderer module - safer way to install custom renderers 2015-10-21 17:18:39 -04:00
lethosor 3f5c002634 Pass virtual_identity by reference 2015-10-03 09:27:24 -04:00
lethosor d343dfd8a0 Add a function to find viewscreens (or parents) of a given type
This makes it possible for some plugins to detect the game state more
reliably - for example, prospector would previously fail when
embarking if the viewscreen_choose_start_sitest instance had any
children.
2015-10-02 21:50:55 -04:00
lethosor 36fde3d7e3 Allow Lua screens to allow OPTIONS to work 2015-06-05 18:45:52 -04:00
lethosor bbb41078e7 Expose PenArray dimensions and tiles to Lua 2015-03-28 18:35:07 -04:00
lethosor e2b6ae9beb Allocate Lua PenArray objects using an existing buffer 2015-03-28 11:27:47 -04:00
lethosor 99f4ea4d2b Implement a PenArray class for caching parts of rendered screens 2015-03-27 22:56:30 -04:00
lethosor afca7419dc Add gametype checks to World.cpp 2015-03-09 20:08:21 -04:00
lethosor 10cfef0553 Fix whitespace issues 2015-02-14 22:53:06 -05:00
expwnent e9b4fc513a Merge remote-tracking branch 'cdombroski/zone-plugin-cleanup' into temp
Conflicts:
	NEWS
	plugins/zone.cpp
2015-01-31 21:01:41 -05:00
lethosor 066adfdf95 Implement a function to list directories recursively 2015-01-30 17:29:17 -05:00
Chris Dombroski f608235b1e Fix some Lua things 2015-01-29 19:56:50 -05:00
Chris Dombroski f2eec3198c Rename findPenPitAtCoord 2015-01-29 15:02:54 -05:00
Chris Dombroski 86495270a6 Remove duplicate isMilkable definition. 2015-01-29 14:40:09 -05:00
Chris Dombroski 48b6cf1beb Export functions to Buildings.h 2015-01-29 13:57:50 -05:00
lethosor daf739fcec Remove FIFO support 2015-01-28 21:39:17 -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 f98e2964e6 Fix a few Windows compilation errors 2015-01-28 20:05:24 -05:00
lethosor bebceffa5f Add Filesystem::listdir() 2015-01-28 19:15:58 -05:00
lethosor e8c0482fdc Add atime()/ctime()/mtime() 2015-01-28 18:18:06 -05:00
lethosor 2e3261565c Clean up Filesystem.h 2015-01-28 17:15:09 -05:00
Casey Link 7072252902 fix build error on windows
with certain #include permutations the lack of this define would
break the build on windows as windows.h pollutes the namespace with min
and max macros that conflict with std::min and std::max.
2014-12-05 12:35:24 +01:00
lethosor 445640f80c Allow commands invoked through command-prompt to access selected items/units/buildings
Fixes #273
2014-11-25 20:25:31 -05:00
expwnent 779ac3fd50 Updated interaction-trigger to work better. 2014-11-09 18:36:21 -05:00
Eric Wald 8631da7e4e Convenience method to collect a vector from StockpileIterator. 2014-09-07 14:10:27 -06:00
Eric Wald 567397df85 Stockpile iterator.
Efficient way to operate on all items stored on a stockpile.
Doesn't currently check whether the items match the stockpile settings,
but does ignore empty containers assigned to the stockpile.
2014-09-07 13:52:07 -06:00
Quietust deee486b81 Update Maps::SortBlockEvents to include spoors and item spatters 2014-08-20 10:51:58 -05:00
Alexander Gavrilov 2471c4a68e Add a new API for converting between interface_key and string characters.
It's necessary now that the simple linear arrangement is broken.
2014-08-11 14:23:19 +04:00
Quietust 1450298484 assumed_identity -> identity 2014-07-29 16:30:22 -05:00
JapaMala b598cbb0dd Merge branch 'develop' of github.com:DFHack/dfhack into develop 2014-07-20 16:43:00 +05:30
JapaMala a14caa53d0 Fixed mapcache reading plants in for 0.40.01 onwards. 2014-07-20 16:41:20 +05:30
expwnent 2fb8faf3e6 Added Items::createItem function. 2014-07-03 10:39:20 -04:00
expwnent 81c87d0921 EventManager: INTERACTION event for unit interactions. 2014-07-03 04:55:12 -04:00
expwnent 4ac32cfd74 EventManager: made UNIT_ATTACK trigger for severed body parts. 2014-07-01 08:58:48 -04:00
expwnent 961d033ade EventManager: unload event for convenience. 2014-06-29 10:03:55 -04:00
expwnent 8e7e87ac73 Added UNIT_ATTACK event to EventManager and exposed it to Lua. 2014-06-28 02:31:34 -04:00
expwnent 7313c18a2a EventManager/eventful: added ON_REPORT event and exposed it to Lua. 2014-06-23 09:15:46 -04:00
expwnent 036aae060b Merge lethosor stuff. For some reason, git's auto merge message didn't happen because of git-stash shenanigans. Oh well. 2014-06-19 22:58:17 -04:00
lethosor ef69522d93 Merge branch 'develop' into filesystem-module-pr 2014-06-18 15:45:42 -04:00
lethosor 6fa478de22 Filesystem module
Implements a handful of filesystem-related functions (e.g. chdir, mkdir)
in C++ and Lua.
2014-06-15 22:38:17 -04:00
Pierre-David Bélanger bdcc00f6f7 Util method (in the Units class) to get a unit squad name (the translated name, or alias if set) 2014-06-09 21:51:52 -04:00
Quietust 0f4684f29d Add Items::getItemBaseValue and Items::getValue, available from Lua 2014-04-25 11:04:21 -05:00
Quietust c3d45c3a1e Add Job::getName(job *), also available from Lua 2014-04-23 08:03:10 -05:00
Alexander Gavrilov c27c38e4c0 Remove tired or hungry siege operators from duty when at peace.
The threshold is set at the level when they start to blink - normally
they would continue on with the job until they get a thirsty/hungry
thought, but immediately run off to eat if they lose the job (thus
refusing to load the engine after firing it). The code checks for
active sieges and whether there is a free replacement unit.
2014-04-15 21:52:39 +04:00