Commit Graph

712 Commits (4941c06654b74d0baedc9a0c61a23b325505dd8c)

Author SHA1 Message Date
lethosor 70ac99cbfa Fix Buildings::setOwner() persistence
Needed to set bld->owner_id for changes to persist across save/load

Fixes #983, thanks to Quietust
2016-08-21 20:58:40 -04:00
lethosor de731b0299 Move save_dir back into cur_savegame and update submodules 2016-08-14 12:41:09 -04:00
lethosor e965f5318f Replace many includes with forward declarations in modules/Maps.h 2016-08-13 21:44:01 -04:00
lethosor 215afa34f3 Update for 64-bit unit changes
Includes xml, stonesense, scripts

Ref DFHack/df-structures@25cb373
2016-08-10 23:50:00 -04:00
lethosor 79377669a1 Merge remote-tracking branch 'NCommander/dwarfvet' into develop 2016-07-29 16:25:53 -04:00
lethosor 41a81f9021 Fix some more warnings (GCC 4.8) 2016-07-28 11:00:52 -04:00
Vitaly Pronkin fe18f176f7 More 64-bit fixes
Cherry-picked from 7eb3ba6
- Lua update already done in e2c6350, 4dd411e
- Excluded library/modules/Buildings.cpp
2016-07-26 23:47:53 -04:00
lethosor 2455e36510 Initial 64-bit support 2016-07-03 23:32:43 -04:00
Michael Casadevall a03b32846a Modify DFHack to handle new produce() prototype. Major thanks to lethosor, and ragundo for their help in this
Signed-off-by: Michael Casadevall <mcasadevall@ubuntu.com>
2016-06-13 16:57:45 -04:00
Michael Casadevall e45fbfc61d Modified dwaftvet plugin to work with latest DFHack
Initial commit of the dwarfvet plugin

Signed-off-by: Michael Casadevall <mcasadevall@ubuntu.com>
2016-06-08 04:14:59 -04:00
lethosor a89251cdf8 Find job in job screen 2016-05-14 16:07:27 -04:00
lethosor 55e58e5f06 Update handling of viewscreen_workshop_profilest in Gui module, search/sort plugins 2016-05-14 11:43:37 -04:00
lethosor fee6e57b40 Disable viewscreen_layer_workshop_profilest focus handler for now 2016-05-11 17:52:56 -04:00
lethosor 402a96b0e6 Expose new unit functions to lua and add some basic safety checks 2016-04-23 21:52:50 -04:00
lethosor 52728babd4 Merge branch 'develop' into zone-unassign 2016-04-22 18:41:15 -04:00
lethosor b97d33ca28 moveToBuilding improvements
- Don't set in_building by default when use_mode is 0 (consistent with most vanilla DF items)
- make use_mode optional and default to 0 (including in Lua API)

Resolves #885
2016-04-05 11:43:02 -04:00
expwnent f8ff447cb5 Add a check to the histfig fix and tweak NEWS. 2016-03-10 08:50:03 -05:00
expwnent fd132d3fe7 Fix persistent histfig crashbug. 2016-03-10 08:38:55 -05:00
sv-esk 9da79544de fix Units::isCitizen
fixes a lot of issues where plugins ignore non-dwarf citizens and work
with dwarf mercenaries and bards, where it shouldnot
2016-03-04 22:48:33 +02:00
sv-esk d508028bcc fix job-duplicate (do not clone posting_index)
if job cannot be done right now, game puts it in df.global.world.job_postings
when job finally can be done, game removes job from postings and clears posting_index
that index should not be cloned by job-duplicate(new jobs(added by vanilla way) have that value -1 always anyway)
cloning posting_index into the new job causes that job to be ignored
2016-03-03 21:32:16 +02:00
lethosor 5bb19a230f getKillCount: also search kills->events 2016-02-25 15:34:56 -05:00
lethosor 25507a10f9 Add Units::getKillCount() and expose it to Lua 2016-02-25 15:21:14 -05:00
lethosor 3e44aabf12 Expose Units::getSquadName to lua 2016-02-25 15:19:35 -05:00
sv-esk 83c70ccb0f forbid manipulator editing non-citizens 2016-02-11 13:31:52 +02:00
James Gilles 0a670bb0db Implement #804, move some functions to Units, colorize zone output, a
little cleanup
2016-02-01 11:12:06 -05:00
lethosor 248331a196 buildingplan: Support floodgates, grates, bars
See #808
2016-01-31 14:50:07 -05:00
Ben Lubar a316dfa074 set floodgate flags correctly when allocating it in lua or c++
https://github.com/DFHack/dfhack/blob/0.42.04-alpha2/plugins/ruby/building.rb#L63
2016-01-29 14:50:50 -06:00
Ben Lubar 675d173266 set civzone number when constructing a civzone 2016-01-18 14:46:39 -06:00
lethosor 0bcc8dc443 exportlegends: fix day/month issues more reliably
Fixes #783, #791
2016-01-09 19:28:12 -05: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
lethosor fabff1ddfb Fix df::occupation usage 2015-12-26 19:59:54 -05:00
lethosor 64d861bf6b Add support for viewscreen_locationsst to various gui functions 2015-12-25 11:09:13 -05:00
lethosor 2a2ab00ca9 Add "map" parameter to a lot of drawing functions
Ref #746
2015-12-22 11:42:51 -05:00
lethosor 10c72a3d5d Fix produce() call in modules/Items.cpp 2015-12-22 09:46:01 -05:00
lethosor 5a1e5e1464 Expose Units::casteFlagSet() 2015-12-19 11:07:35 -05:00
lethosor 55d5706a21 Update structures and fix various issues with plugins producing items
reaction_product::produce() takes a new unidentified vector<void*>*.
Passing a reference to an empty vector appears to work.
2015-12-18 18:40:11 -05:00
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
lethosor 051244c8d6 Fix GCC compile error 2015-11-06 20:05:14 -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 6e5d9c23e5 Merge pull request #715 from DoctorVanGogh/webfix
Add 'undisturbed' flag to job item checks
2015-10-31 11:28:25 -04: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
DoctorVanGogh ba53f3c035 Add 'undisturbed' flag to job item checks 2015-10-26 02:19:41 +01: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 a56a427d12 Make Filesystem::is* functions handle nonexistent paths properly
If stat() failed, these functions could read from an uninitialized
stat struct and return "true" for paths that didn't exist.
2015-09-19 17:34:58 -04:00
lethosor d663784707 Detect null unit pointer in Items::createItem() 2015-06-09 14:02:42 -04:00