Commit Graph

305 Commits (6f90273bb6a81a5bb778c9d64a8a635dc8658ffe)

Author SHA1 Message Date
lethosor 9ee368d456 Merge remote-tracking branch 'suokko/MapCache_reduce_latency_from_designation_to_jobs' into develop 2018-07-11 11:51:24 -04:00
lethosor 2dac3c53c7 Add stress cutoffs to Units module, fix dwarfmonitor/manipulator
Fixes #1292
2018-07-09 15:59:12 -04:00
lethosor 037e7e4901 Merge remote-tracking branch 'suokko/spotclean_ui_state_fix_1194' into develop
Moved/adjusted changelog entry
2018-07-07 18:08:53 -04:00
lethosor 616675f0ce Merge remote-tracking branch 'suokko/kittens_data_race_fix' into develop 2018-07-03 00:30:36 -04:00
lethosor 81a7ddcf92 Merge remote-tracking branch 'suokko/screen_show_memory_leak' into develop 2018-07-02 22:58:11 -04:00
Pauli 0727403ac1 Fix devel plugins linking in linux 2018-06-30 21:12:42 +03:00
Pauli c39a882b57 Add missing Unit::isDiplomat
Fixes #1324
2018-06-29 16:19:18 +03:00
Pauli 123de7fdf7 Use constexpr to prevent attempts of linking static variable 2018-06-24 17:06:32 +03:00
Pauli 9b6781f0f2 Temporary lower command-prompt when executing the command
command-prompt viewscreen may affect command execution if they are
looking for UI state. To make commands execute simillary to hotkeys or
console commands the viewscreen needs to removed from the top position.

Fixes #1194
2018-06-20 21:51:45 +03: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
Pauli 1b5ec7ce69 Update jobs when committing MapCache changes
The map_block->designation.{dig,smooth} are reset to zeros when a job
posting is created for the designation. The job is then used to override
the designation state in the map_block. To make the new designation set
propogate to jobs the job structure would require updating. The update
would be possible a complex operation. The simple alternative is to
remove the job and let df create a new job in the next tick.

Fixes #1229
2018-06-18 16:34:09 +03:00
Pauli 6a151353e3 Use automatic return type for index_tile 2018-06-18 16:23:57 +03:00
lethosor 10e6016989 Merge branch 'units_dead' into develop
Closes #1297
2018-06-13 15:38:35 -04:00
PatrikLundell f329774059 dead & killed flag separation
squashed 4 commits from #1297
2018-06-13 15:37:45 -04:00
lethosor 03968db344 Fix GCC warnings in 'tweak kitchen-prefs-all' and dev plugins 2018-06-01 10:02:38 -04:00
lethosor 7a04fefb0b Remove Vermin module (unused and obsolete) 2018-06-01 00:22:10 -04:00
lethosor 17ba492992 Add some exclusion functions to Kitchen module, expose to Lua, fix build 2018-05-17 19:34:03 -04:00
lethosor 97a79893e7 Change Kitchen.{h,cpp} to title case 2018-05-17 11:08:13 -04:00
lethosor e9ec08f419 Add Buildings::getRoomDescription(), moved from search plugin, +cleanup 2018-05-12 17:00:21 -04:00
lethosor c15571caa0 Move isRouteVehicle, isSquadEquipment from workflow to Items module 2018-05-12 14:49:30 -04:00
lethosor a34b34d3cb Move a few item functions from autotrade/stocks into DFHack::Items 2018-05-12 12:04:46 -04:00
lethosor 2a52582c1f Add Gui::inRenameBuilding 2018-05-09 10:23:05 -04:00
lethosor 1ba5477b63 Add designation priority support to MapCache and dig plugin
Fixes #481
2018-01-21 19:27:16 -05:00
lethosor 10e13c532a Add "tweak cage-butcher" and some extra Building module functions
* Buildings::markedForRemoval()
* Buildings::getCageOccupants()

Closes #906
2017-06-25 15:27:21 -04: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 27343e3253 Add unit and tile visibility functions 2017-06-10 21:54:08 -04:00
lethosor 778ffb0971 More Units module cleanup, modernize getUnitsInBox 2017-06-10 21:02:30 -04:00
lethosor 1321a64613 Remove lots of old/unused functions from the Units module 2017-06-10 17:21:34 -04:00
lethosor 43c4a88068 Move some checks in paintTile/readTile after hooks are called 2017-06-02 00:40:14 -04:00
lethosor 05f322ca30 Merge remote-tracking branch 'lethosor/lua-dmdims' into develop 2017-06-01 23:34:35 -04:00
lethosor 939aff3231 readTile(): add hook support and map parameter 2017-05-31 12:12:15 -04:00
lethosor 55931703ac Designate the correct tile for trees with multi-tile trunks
DF always designates the southeast trunk tile, while plant.pos is the center,
which is sometimes inaccessible (see #1014)
2017-05-05 21:25:25 -04:00
lethosor d3c496cc2b Add getSelectedPlant() and related functions
Currently only works with the center tile of multi-tile trees
2017-05-05 14:45:46 -04:00
lethosor 1e469453fc Add Designations module, currently supporting plant/tree designations
This makes it easier for tools to properly handle designating and undesignating
trees for chopping and plants for gathering, which changed significantly in
0.40.20.

Ref #531 (?), #656, #1014, #1018, #1030, #1076
2017-05-04 21:47:12 -04:00
lethosor 71b553b305 Add a few functions to retrieve unit social activities 2017-04-28 17:25:58 -04:00
David Corbett acdb369aa8 Avoid non-trivial bitfield constructors 2016-12-09 13:41:14 -05:00
lethosor 8521b830b2 Merge remote-tracking branch 'CannibalVox/job_remove' into develop 2016-12-05 15:24:37 -05:00
Stephen Baynham 595f3857b6 Reverse the param order of these two methods
The current way doesn't match other Job module methods
2016-12-01 20:13:49 -08:00
Stephen Baynham 7920f71517 Bad formatting 2016-11-25 00:25:18 -08:00
Stephen Baynham e490afdf00 Rebuilt slightly to offer bool return val
We fail on unknown general ref types now, without modifying the job at
all yet
2016-11-24 22:36:11 -08:00
Stephen Baynham 74f5df99db Add job remove method
Job remove eliminates a job's worker & holder references, if any, puts
the worker on cd, if appropriate, removes the job's postings, eliminates
the job from the global linked list, and then finally deletes it.  This
code was tested by incorporating it into autochop and it does make the
plugin work.  However, chop jobs don't have holder building references,
and anyway, with DF being 90% edge case by volume, this could use a heck
of a lot more testing.

I saw elsewhere code that prevented worker removal if the job was a
special job, and that made me feel funny so I made the job remove method
not work if the job is a special job.
2016-11-17 19:54:41 -08:00
lethosor 8a138fcc4c Avoid polluting global namespace in MapCache.h 2016-10-15 14:53:10 -04:00
lethosor 70d3c07cdb Initial lua getDwarfmodeViewDims rewrite 2016-10-07 23:51:58 -04:00
lethosor e965f5318f Replace many includes with forward declarations in modules/Maps.h 2016-08-13 21:44:01 -04:00
lethosor 79377669a1 Merge remote-tracking branch 'NCommander/dwarfvet' into develop 2016-07-29 16:25:53 -04:00
lethosor 2455e36510 Initial 64-bit support 2016-07-03 23:32:43 -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 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
lethosor 25507a10f9 Add Units::getKillCount() and expose it to Lua 2016-02-25 15:21:14 -05:00