Dan Amlund
2deeda11d2
add many new cases for Gui::getSelectedUnit: report list, combat log list, military screen, unit health, unit custumize, assigning to cage, viewing cage, pitting, penning, burrows, look at corpse, look at corpse piece, look at named spatter
2018-01-28 13:04:52 +01:00
lethosor
1ba5477b63
Add designation priority support to MapCache and dig plugin
...
Fixes #481
2018-01-21 19:27:16 -05:00
lethosor
fde1e284f4
Gui::getAnyItem: support viewscreen_assign_display_itemst
2017-12-28 16:19:45 -05:00
lethosor
4d5c7c5927
getKeyDisplay: use enabler::GetKeyDisplay()
2017-12-25 20:14:11 -05:00
Quietust
88c7e493b8
Merge ui_area_map_width into ui_menu_width, now a 2-byte array
2017-12-03 20:34:59 -06:00
Quietust
c72ae8d8a7
Merge "announcements" global into d_init where it belongs
2017-12-03 20:05:08 -06:00
lethosor
2c95ac411e
Update xml and all uses of job_handler
2017-11-25 00:59:59 -05:00
Quietust
33a43c5bfd
update structures
2017-11-04 07:50:47 -06:00
lethosor
5c33fcccbd
Merge remote-tracking branch 'BenLubar/win64-warnings' into develop
2017-08-07 13:51:18 -04:00
lethosor
16fb230ef6
getAnyItem: support viewscreen_textviewerst
2017-08-05 21:38:18 -04:00
Ben Lubar
17a7885ef2
Fix a bunch of 64-bit Windows warnings
2017-07-21 13:30:05 -05:00
Vitaly Pronkin
6af5f3b299
fixing getItemBaseValue() for cheese, sheets and instruments
2017-06-26 09:17:23 +12: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
cda5cedacf
Fix Gui::refreshSidebar() on topmost z-level
2017-06-23 10:30:16 -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
0ed7e60522
getAnyUnit: support viewscreen_layer_unit_relationshipst
2017-06-10 19:06:43 -04:00
lethosor
1321a64613
Remove lots of old/unused functions from the Units module
2017-06-10 17:21:34 -04:00
lethosor
047a66030b
getAnyUnit: add support for viewscreen_unitst, viewscreen_textviewerst
2017-06-07 20:51:40 -04:00
lethosor
92c2e52e45
Fix MSVC error
2017-06-02 21:22:19 -04:00
lethosor
9df35dd844
revealInDwarfmodeMap: use map y dimensions
2017-06-02 00:40:59 -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
f59be2a9a0
Expand focus strings for jobmanagement and workquota_condition viewscreens
2017-05-27 00:57:16 -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
adb14491d0
Fix loop in Designations::unmarkPlant()
2017-05-05 17:24:51 -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
lethosor
19695b4ee7
EventManager/eventful: Pass building ID pointers to event handlers
...
Previously, there was some disagreement over whether event handlers such as
Buildings::updateBuildings() took building pointers or building IDs shoved
into pointers. It turned out to be the latter, which, unfortunately, did not
compile on x64. Passing building IDs isn't possible in all cases, because
building event handlers can be called for recently-deleted buildings too.
Pointers to building IDs do work reliably, though.
Fixes #1003
2017-02-17 22:53:48 -05: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
de0e211e07
Figured I could like test my code.
2016-11-24 23:35:03 -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
8b964ca2dc
Wipe job_items vector
2016-11-21 06:51:21 -08:00
Stephen Baynham
fba32f2e2f
Also disconnect the job from its items.
2016-11-17 23:25:48 -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
70d3c07cdb
Initial lua getDwarfmodeViewDims rewrite
2016-10-07 23:51:58 -04:00
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
lethosor
36fde3d7e3
Allow Lua screens to allow OPTIONS to work
2015-06-05 18:45:52 -04:00
lethosor
a8f5e683f7
Merge remote-tracking branches 'RossM/autolabor-changes', 'RossM/workflow-changes' and 'lethosor/plugin-exports' into develop
2015-05-09 09:39:55 -04:00
Ross Morgan-Linial
51d61d91cb
Change tabs to spaces.
2015-05-07 20:50:19 -07:00
Ross Morgan-Linial
7aac9a8fb8
Improve workflow handling of plant reactions
...
Makes workflow understand "seeds of any plant", "thread of any plant",
"drink of any plant", "powder of any plant", and "liquid of any plant"
when counting items.
Changes workflow's handling of the built-in plant reactions to
understand that they always produce plant products, and that they also
produce seeds.
This means that you can set a target for, for example, "powder of any
plant", and workflow will use a milling job to produce that.
2015-05-07 20:49:29 -07: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
92bd6349a7
Fix listdir_recursive on Windows.
2015-01-31 22:28:17 -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
48b6cf1beb
Export functions to Buildings.h
2015-01-29 13:57:50 -05:00
Chris Dombroski
1514233aaa
Add missing null checks to Units.cpp
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
expwnent
8f4b766107
EventManager: Fix a crash bug with EQUIPMENT_CHANGE event.
2015-01-15 18:13:19 -05:00
lethosor
d932c76242
Fix MapCache compiling error on Windows
2015-01-05 17:28:42 -05:00
lethosor
06029c92c2
Merge remote-tracking branches 'lethosor/export-dt-ini-0.40.21' and 'lethosor/patch-9'
2015-01-05 16:40:44 -05:00
lethosor
983f096a60
Merge remote-tracking branch 'quipyowert/define-maxlayers' into 0.40.23-r1
2015-01-05 16:04:37 -05:00
Lethosor
3c0ac70615
Remove output from filetype()
...
Not sure how this made it in, but it's causing problems with PRINT_MODE:TEXT (not to mention filling up stdout.log)
2014-12-27 15:05:43 -05:00
quipyowert
f4e8fa2f30
Define a static variable to fix debug mode crash.
...
Fixes #404
2014-12-01 17:19:20 -08:00
expwnent
83d3785735
Update xml.
2014-11-30 14:03:00 -05: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
5e3bf9a494
Make it compile for OSX.
2014-11-14 22:21:03 -05:00
expwnent
4464d7318d
EventManager: make REPORT events only trigger for new reports, not ones that already exist in the save.
2014-11-14 22:07:48 -05:00
expwnent
428fe6a400
interaction-trigger tweaks
2014-11-14 18:50:19 -05:00
expwnent
779ac3fd50
Updated interaction-trigger to work better.
2014-11-09 18:36:21 -05:00
expwnent
fa401f8637
EventManager tweak.
2014-11-07 14:16:10 -05:00
expwnent
dcdb6aae1b
EventManager: properly deal with frame_counter getting reset.
2014-11-06 23:44:13 -05:00
Alexander Gavrilov
04ec2c9932
Update version to v0.40.14 and hack things so they compile.
...
Also make the find-offsets script less likely to crash if the
unit structure is misaligned and add more integrity checks.
2014-10-26 16:40:39 +03:00
Eric Wald
8631da7e4e
Convenience method to collect a vector from StockpileIterator.
2014-09-07 14:10:27 -06:00
Quietust
deee486b81
Update Maps::SortBlockEvents to include spoors and item spatters
2014-08-20 10:51:58 -05:00
Quietust
5e434721ff
Remove stray BOM
2014-08-19 13:47:05 -05:00
Quietust
4da333fca1
Fix Buildings module to work with ui.tax_collection.rooms change
2014-08-18 16:33:12 -05:00
JapaMala
5add8c433d
Merge branch 'develop' of github.com:DFHack/dfhack into remote_reader
...
Conflicts:
plugins/remotefortressreader.cpp
2014-08-15 19:15:00 +05:30
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
JapaMala
36435ca8cf
Merge branch 'develop' of https://github.com/quietust/dfhack into remote_reader
...
Conflicts:
library/modules/Items.cpp
library/modules/MapCache.cpp
library/modules/Maps.cpp
library/modules/Materials.cpp
library/modules/Translation.cpp
plugins/CMakeLists.txt
2014-08-08 20:54:44 +05:30
JapaMala
08da62392e
Fixed a mistake where MapCache was using the wrong range for root depth.
2014-08-02 17:09:59 +05:30
Quietust
1450298484
assumed_identity -> identity
2014-07-29 16:30:22 -05:00
Alexander Gavrilov
4902c577b3
Fix some crashes when running without globals and update structures.
2014-07-24 23:10:37 +04:00
JapaMala
bc5e0f6ad6
Made DFHack buildable. Also added plant proto definitions
2014-07-23 19:57:47 +05:30
Quietust
9435d8f4d9
Fix crashes caused by missing globals
2014-07-21 19:14:43 -05:00
Quietust
38cdb37433
Update plant_tree_info field names
2014-07-21 14:46:51 -05:00
Quietust
e711605413
Some minor corrections
2014-07-21 13:26:34 -05:00
Quietust
97de21357c
First pass for 0.40 compatibility; still lots left to do, but this will at least build
2014-07-21 13:18:29 -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
0a16bc2e12
Merge remote-tracking branch 'origin/perSaveScripts' into scriptOrganization
...
Conflicts:
plugins/CMakeLists.txt
2014-07-07 09:01:07 -04:00
expwnent
649dcd1413
EventManager tweak: make it report the correct invasion id.
2014-07-03 14:37:13 -04:00
expwnent
2fb8faf3e6
Added Items::createItem function.
2014-07-03 10:39:20 -04:00
expwnent
d8c3a05f42
Made EQUIPMENT_CHANGE event trigger for new units.
2014-07-03 08:10:12 -04:00
expwnent
81c87d0921
EventManager: INTERACTION event for unit interactions.
2014-07-03 04:55:12 -04:00
JapaMala
516121d4f8
Fixed the getprofession behavior in adventure mode. Now it checks for the current adventurer's race instead of the fortress race.
2014-07-02 23:07:24 +05:30
expwnent
8f43b97284
EventManager tweaks.
2014-07-01 09:02:20 -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
ceae634954
Squashed EventManager commented out thing I don't need anymore.
2014-06-28 02:41:00 -04:00
expwnent
8e7e87ac73
Added UNIT_ATTACK event to EventManager and exposed it to Lua.
2014-06-28 02:31:34 -04:00
expwnent
c635632ae7
EventManager.cpp: fix indentation.
2014-06-27 22:09:01 -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
ec64a787c6
Use _getcwd on Windows
2014-06-19 22:34:40 -04:00
Lethosor
73fdb8b125
Fix Windows compile-time error
2014-06-19 21:24:16 -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
e0808c8c96
Use squad::find instead of indexing the vector
2014-06-10 22:38:32 -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
e483e7439f
Fix problems with NONE for item types and subtypes
2014-05-22 08:18:01 -05:00
Alexander Gavrilov
415cdad489
Make using new for allocating DF objects with vtables a compile-time error.
...
When done from plugins, it doesn't correctly initialize the vtable
because of some weird things MSVC does, so the only safe way is to
use df::allocate<df::foo>(). For consistency, it is also enforced
for code in the main library. It reveals the issue in the digging
invaders plugin, first found by warmist.
This change is linked to a modification in df-structures codegen.
2014-04-30 21:28:02 +04:00
Alexander Gavrilov
98325757e2
Fix signed-unsigned mismatch warnings in the new item value code.
...
Unsigned comparison allows catching negatives in the same check too.
Also, it didn't check the values in getValue.
2014-04-30 20:44:22 +04:00
Quietust
0f4684f29d
Add Items::getItemBaseValue and Items::getValue, available from Lua
2014-04-25 11:04:21 -05:00
Quietust
57fbb1004b
Assorted cleanup
2014-04-23 08:23:34 -05:00
Quietust
c3d45c3a1e
Add Job::getName(job *), also available from Lua
2014-04-23 08:03:10 -05:00
Alexander Gavrilov
6bef167f83
Add a couple of useful scripts and fix two missing NULL checks.
...
- A script to unstick jobs trying to build walls from the same tile.
- A devel script for viewing the path a unit is currently following.
2014-04-21 09:24:05 +04: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
Alexander Gavrilov
fc9826389b
Account for meandering movement when predicting unit path in siege engine.
...
The movement is random, but there is an average slowdown coefficient.
2014-04-15 19:50:23 +04:00
Alexander Gavrilov
7844907204
Add new API functions for creating announcements and combat reports.
...
Allow specifying the announcement flags directly, and adding unit
combat reports. Also, make announcement functions write the message
to the game log.
2014-04-15 19:50:23 +04:00
Alexander Gavrilov
b56c3a95a6
Fix some signed/unsigned mismatch warnings and whitespace in Job module.
2014-04-15 19:50:23 +04:00
Alexander Gavrilov
7aecffe0cd
Update structures and fix broken things.
2014-04-04 22:34:39 +04:00
Quietust
e620ae765c
Add missing import/export info for MersenneRNG::unitvector<>
2014-03-25 13:30:21 -05:00
jj
387cc983f9
Merge branch 'osx_shenanigans' of git://github.com/tareqak/dfhack
2014-02-02 23:50:21 +01:00
Tareq A Khandaker
f0eeba93ce
DFHack compiles under OS X now.
2014-01-25 03:21:56 -05:00
jj
ce33973f0f
Merge branch 'master' of github.com/quietust/dfhack
2013-12-24 14:07:08 +01:00
Alexander Gavrilov
53bd112515
Hide fake historical figures from legends xml export.
2013-11-07 12:27:53 +04:00
jj
04dce1aa7f
MaterialInfo: fix decoding for COAL subtypes
2013-11-05 00:31:32 +01:00
expwnent
329741f235
EventManager: added EQUIPMENT_CHANGE event and exposed it to lua.
2013-10-24 19:32:52 -04:00
expwnent
4dbcee9560
EventManager: be smarter about removing things while iterating.
2013-10-20 23:16:21 -04:00
expwnent
c409289ee4
EventManager: TICK events should unregister correctly when requested and after they fire, other tweaks.
...
- fixed unregister to allow unregistering individual TICK events
- make registerTick return the resulting freq you have to put back in to the handler in order for it to be unregisterable
- when TICK events fire, they now automatically remove themselves from handlers[TICK], as they should
- make sure manageTickEvent fires once per tick
2013-10-20 22:54:25 -04:00
expwnent
3594dc2eb8
EventManager: fixed the TICK event, and a few tweaks.
...
- redo tick event management to work with world->frame_counter
- the freq of a TICK EventHandler is now ignored
- unregistering for an individual TICK event is still broken
- you would have to know the modified freq to even begin removing it
- it is only removed from handleres[TICK], not from tickQueue
- redo unregisterAll to be more efficient
- use the map loaded/unloaded events instead of world loaded/unloaded for initializing/clearing event monitoring data
- get rid of silly unsigned variables
2013-10-20 21:48:28 -04:00
expwnent
9bf004d07f
Several EventManager fixes and improvements.
...
- handle loading and unloading of saves better
- made sure it never triggers bogus events on loading a save
- plugins should now handle loading themselves with onStateChange
- special case to make Buildings module keep track of all buildings correctly on load
- fixed syndrome detection
- was broken because of the switch from ticks-since-the-dawn-of-time to world->frame_counter
- added lastSyndromeTime global
- fixed possible off by one error when looking for new created items
- got rid of the unread lastTick global
- const'ed the function pointer array of eventManagers
2013-10-20 20:12:42 -04:00
expwnent
f69fd1d528
EventManager: prevent eventspam just after loading a save.
2013-10-20 17:39:54 -04:00
expwnent
d78a111f02
EventManager: Fixed the death event, fixed another problem with construction event, and made EventManager use world->frame_counter for scheduling event checking in order to make it work in arena mode.
2013-10-20 14:41:39 -04:00
expwnent
39553cfb6d
EventManager: fixed a problem with constructionHandler.
2013-10-20 14:14:02 -04:00
expwnent
ee056f4422
Merge remote-tracking branch 'angavrilov/master' into 0.34.11-r4
...
Conflicts:
NEWS
2013-10-20 11:09:40 -04:00
expwnent
9d3ee11349
Merge branch 'diggingInvaders' into 0.34.11-r4
...
Conflicts:
scripts/devel/invasion-now.lua
2013-10-19 21:26:50 -04:00
expwnent
57fc0f3e89
Merge remote-tracking branch 'angavrilov/master' into 0.34.11-r4
...
Conflicts:
NEWS
library/xml
plugins/CMakeLists.txt
plugins/autoSyndrome.cpp
2013-10-19 20:19:29 -04:00
Alexander Gavrilov
78de739d75
Update aquifers when generating 3D vein layout.
2013-10-11 19:23:32 +04:00
Alexander Gavrilov
63d8267606
Decode ice under constructions if possible, but never write it out.
2013-10-10 12:15:50 +04:00
Alexander Gavrilov
f36041f6bd
Implement a MapCache api for writing base layer tiles of arbitrary stone.
...
Precompute some tables in TileTypes for extremely efficient
conversion between tiles of most important material types.
2013-10-10 12:15:50 +04:00
Alexander Gavrilov
68b6e10b2c
Implement writing veins tile by tile through MapCache.
...
Unlike changevein, which changes the material in an existing vein
object, with this feature you can set the material for individual
tiles, and the cache will write it out as vein objects.
The array inside the cache data is changed from layer material to
vein material, because layer material is easy to compute.
2013-10-08 18:17:36 +04:00
Alexander Gavrilov
9442e8ea1f
Make biome information more explicit in MapCache.
2013-10-07 16:58:10 +04:00
Alexander Gavrilov
ea36233dff
Split MapCache code from Maps.cpp
2013-10-07 16:58:10 +04:00
Alexander Gavrilov
e175efa689
Implement a template-based classical Perlin noise generator.
...
The mask argument of the Impl template is there because apparently
an inner template cannot be fully specialized, so there needs to be
some argument besides i.
2013-10-01 18:58:04 +04:00
Alexander Gavrilov
599af0a4d9
Fix linux and windows build issues.
...
- Linux makefile overrides and removes the optimization flags.
- Old linux gcc doesn't understand lambdas.
- MSVC doesn't like extern and explicit instantiation in same file.
2013-09-30 22:51:29 +04:00
Alexander Gavrilov
9e81d27cd1
Implement the same random generator as DF uses for DFHack.
2013-09-30 19:46:39 +04:00
Alexander Gavrilov
df2e04db26
Update xml definitions.
2013-08-16 18:25:16 +04:00
expwnent
ba73de5e35
EventManager: use units.all instead of units.active.
2013-06-20 21:34:32 -04:00
Alexander Gavrilov
49409d4630
Follow xml changes.
2013-06-11 16:10:42 +04:00
expwnent
57c42e3927
Maps.ensureTileBlock: fixed temperature issues, and properly added blocks to the world.map.map_blocks vector to prevent weird glitches.
2013-06-10 15:43:14 -04:00
expwnent
08114cf574
diggingInvaders: more fixes. Still a few issues with ramps probably.
2013-05-31 20:39:43 -04:00
expwnent
f8261348ff
Merge branch 'master' into diggingInvaders
...
Also make edgeCost.cpp compile because I stopped midsentence for some reason.
Conflicts:
library/modules/Maps.cpp
2013-05-31 16:28:05 -04:00
expwnent
3403146461
Merge remote-tracking branch 'peterix/master'
...
Conflicts:
plugins/CMakeLists.txt
plugins/autoSyndrome.cpp
2013-05-25 20:08:56 -04:00
expwnent
638b2e974c
EventManager: cleaned up manageEvents considerably, using a function pointer array.
2013-05-25 12:19:54 -04:00
expwnent
bcaaa72387
EventManager should use a CoreSuspender just in case.
2013-05-25 11:50:43 -04:00
expwnent
b44cd86dc9
EventManager: completely overhauled JOB_COMPLETED event detection, and tweaked Job::cloneJobStruct.
2013-05-25 09:44:17 -04:00
expwnent
29b5e20575
autoSyndrome should now work with syndromeTrigger.
2013-05-11 16:46:37 -04:00
jj
e5fd918b0c
job: unk2 -> subtype
2013-05-05 03:55:08 +02:00
Petr Mrázek
6a907e3584
Fix issue #195 - off by one error in building dimensions
2013-04-24 17:41:25 +02:00
expwnent
b4092f62e6
New module: Once. Intended to help prevent debug error message spam.
2013-03-23 22:38:33 -04:00
Alexander Gavrilov
7cbd201f31
Nuke the third exit(1) and change building caching code to make more sense.
2013-02-14 13:13:25 +04:00
Alexander Gavrilov
9ca435544e
Nuke unsafe behavior in Buildings::findAtTile from orbit.
2013-02-13 15:03:15 +04:00
Petr Mrázek
e06b6904f1
Small fix to sync dfhack with the structures.
2013-01-15 23:41:43 +01:00
expwnent
3ffbef2396
Merge branch 'canStepBetween' into recent
2013-01-05 18:10:29 -05:00
expwnent
f8abd5c595
StepBetween: renamed stuff back to the way it was. Thought I had already done that.
2013-01-05 18:09:50 -05:00
expwnent
6622e9e06f
Merge branch 'canStepBetween' into recent
...
Conflicts:
library/modules/Maps.cpp
2013-01-05 13:32:29 -05:00
expwnent
8e90ca6b41
Merge branch 'eventManager' into diggingInvaders-unstable
2013-01-03 22:47:45 -05:00
expwnent
ec03d567d2
EventManager: use WORLD_LOADED instead of MAP_LOADED.
2013-01-03 22:47:27 -05:00
expwnent
f145f8d528
Merge branch 'eventManager' into diggingInvaders-unstable
2013-01-03 19:32:12 -05:00
expwnent
715f191c26
EventManager: made the frequency part of EventHandler.
2013-01-03 19:31:29 -05:00
expwnent
9e74ae58f2
EventManager: Fixed a problem with deregistering event frequencies.
2013-01-03 19:07:05 -05:00
expwnent
84b8fae326
Merge branch 'eventManager' into diggingInvaders-unstable
2013-01-03 15:53:06 -05:00
expwnent
910e398a7b
EventManager: added invasion event.
2013-01-03 15:52:56 -05:00
expwnent
5865579b23
EventManager: got rid of print statement.
2013-01-02 19:26:37 -05:00
expwnent
6d2773856a
EventManager: fixed a few things.
2013-01-02 19:23:40 -05:00
expwnent
4e4e382b8f
EventManager: added syndrome event.
2013-01-02 18:30:15 -05:00
expwnent
144e0b4dcb
Digging Invaders: merged eventManager and recent.
2013-01-02 11:26:30 -05:00
expwnent
c3b2ae2137
EventManager: allowed plugins to specify how often they need events to be checked, in the event that monitoring is necessary.
2013-01-02 11:07:56 -05:00
expwnent
fa78d6ccfc
Merge branch 'recent' into eventManager-unstable
...
Conflicts:
library/modules/Job.cpp
2013-01-02 03:16:45 -05:00
expwnent
4e99841862
EventManager: made Buildings module keep track of buildings so that it
...
can do findAtTile in constant time.
2013-01-01 22:22:31 -05:00
expwnent
ee4f37ff72
Merge branch 'canWalkBetween' into diggingInvaders
2012-12-19 20:31:17 -05:00
expwnent
7972902c81
stepBetween: named a few things better, and fixed a lot.
2012-12-19 20:30:37 -05:00
expwnent
a93c0223a2
EventManager: unstable. Temp commit.
2012-12-18 20:28:30 -05:00
expwnent
555c754636
EventManager: added construction and building events.
2012-12-18 18:34:38 -05:00
expwnent
515eb3b060
Reverted the silly changes to Buildings module that didn't work anyway.
2012-12-17 17:38:47 -05:00
expwnent
3fde504ae2
Merge branch 'canWalkBetween' into diggingInvaders
2012-12-17 00:25:31 -05:00
expwnent
22837af8d7
canWalkBetween: fixed bug involving ramps.
2012-12-17 00:25:14 -05:00
expwnent
d79583a2c9
Merge branch 'canWalkBetween' into diggingInvaders
2012-12-16 23:39:36 -05:00
expwnent
1a6a09281b
canWalkBetween: forgot a case with ramps.
2012-12-16 23:37:15 -05:00
expwnent
d2be8f18e1
canWalkBetween: forgot a case with stairs.
2012-12-16 23:30:35 -05:00
expwnent
01e5e93825
Renamed Maps::canWalkBetween to Maps::canPathBetween and added Maps::canWalkBetween, which does what it says.
2012-12-16 23:26:50 -05:00
expwnent
131d19e4cf
Merge branch 'eventManager' into diggingInvaders
2012-12-16 16:43:58 -05:00
expwnent
8a242b3c0d
Merge branch 'master' into diggingInvaders
2012-12-16 16:34:45 -05:00
expwnent
78aab90f3a
EventManager: whitespace.
2012-12-16 16:27:08 -05:00
expwnent
3951d4d204
EventManager: made it safe to register/unregister while events are being triggered.
2012-12-16 15:39:39 -05:00
expwnent
d4d8e69556
EventManager: Allowed absolute time registration.
2012-12-15 18:08:59 -05:00
expwnent
86e002f3ff
EventManager: added item creation event.
2012-12-15 16:49:13 -05:00
expwnent
b0314755e0
EventManager: added unit death event.
2012-12-15 14:40:11 -05:00
expwnent
155a4d044c
EventManager: fiddled with time events. Made it possible to register for time events before a world is loaded. Also added some files I forgot to add to the previous commit.
2012-12-14 23:29:28 -05:00
expwnent
747723187f
EventManager: first draft.
2012-12-14 21:05:38 -05:00
jj
6bc791d985
follow df-structure rename unit.unknown8 + able_stand_*
2012-12-10 22:50:33 +01:00
Alexander Gavrilov
a0e671d75d
Make rename unit reset the name if it becomes completely empty.
2012-12-08 20:39:57 +04:00
jj
ebc2625d97
ditch the unused Vegetation module
2012-12-06 23:47:25 +01:00
jj
3953112eb9
dump Vegetation::t_plant, fix plant.is_burning
2012-12-03 19:03:07 +01:00
Alexander Gavrilov
9703d3fd8f
Detect mouse press events for lua.
2012-12-02 14:43:23 +04:00
Quietust
e3eb325d36
Minimize references to gps->dimx/dimy
2012-11-23 19:18:56 -06:00
Alexander Gavrilov
767c1b9368
Duplicate the lua Painter class in C++.
2012-11-19 18:11:26 +04:00
Quietust
3f2e583746
Naming consistency
2012-11-16 15:35:34 -06:00
Quietust
e2b9b703a0
Get rid of tabs
2012-11-16 15:33:36 -06:00
Alexander Gavrilov
2401be1b3b
Add an api function to retrieve unit skill experience.
2012-11-16 22:48:49 +04:00
Alexander Gavrilov
72912edf58
Ensure AddPersistentData won't create duplicate ids.
...
If anything messes around with the histfig vector between calls.
2012-11-16 18:45:51 +04:00
Quietust
bbe94c006f
Update for temperaturest
2012-11-12 11:54:21 -06:00
Alexander Gavrilov
b4dcc7e7ad
Add more native api functions for finding general and specific refs.
2012-11-12 19:17:32 +04:00
Quietust
a99d47ee7a
Remove UTF-8 BOMs added by notepad
2012-11-12 08:38:29 -06:00
Quietust
766aca4911
Rename general_ref vectors for consistency
2012-11-12 08:27:58 -06:00
Alexander Gavrilov
eb936c4ce0
Support milking and shearing in workflow.
2012-11-10 17:06:54 +04:00
Alexander Gavrilov
ff982dcf73
Fix representation and parsing of built-in materials.
...
The trick is to support both FOO and FOO:NONE for all of them,
including INORGANIC[:NONE]. Otherwise the workflow gui scripts
have problems.
2012-11-07 13:31:36 +04:00
Alexander Gavrilov
3ff5d38a5c
Add a few utility functions to the main library.
2012-10-30 12:40:26 +04:00
Alexander Gavrilov
dc2805b1f3
Link the renderer vtable from libgraphics on linux.
2012-10-30 10:38:32 +04:00
Alexander Gavrilov
b976e01b8c
Follow the change in the base-type of job_skill.
2012-10-26 20:29:21 +04:00
Alexander Gavrilov
a1dd31aab3
Tweak the mechanics for showing and rendering lua screens.
...
- Place new screens below any dismissed ones on top.
- When asked to render a dismissed lua screen, call render() on its
parent to avoid producing a black screen frame when unlucky.
2012-10-25 12:09:39 +04:00
Alexander Gavrilov
59ec9b304e
Implement adding workflow constraints from gui/workflow.
2012-10-24 21:49:30 +04:00
Quietust
27c7dfde4f
ANY_FREE -> IN_PLAY, to match terminology used in DF's error messages
2012-10-23 12:14:21 -05:00
Alexander Gavrilov
fbba4caab2
Suppress checking the cookable material flag if the item is a container.
2012-10-20 21:16:00 +04:00
Alexander Gavrilov
0c9f1e0af4
Check the item type against job_item_vector_id when matching to jobs.
...
This will prevent setting an invalid item type via the job command.
2012-10-20 21:01:22 +04:00
Alexander Gavrilov
795961bfc4
Fix the treatment of non_economic in Materials/Items modules.
...
non_economic == !(is boulder && is inorganic && is economic)
2012-10-20 20:31:45 +04:00
Alexander Gavrilov
2b1d856214
Add a few utility functions to the lua api.
2012-10-20 17:06:33 +04:00
Alexander Gavrilov
2d4935bc17
Add lua API functions for verifying item and material vs job_item flags.
2012-10-17 19:16:18 +04:00
Alexander Gavrilov
2865e1373a
Experimental API for associating tile bitmasks with persistent data.
...
Use block_square_event_world_constructionst objects with the same
bogus negative id as the matching historical figure object.
2012-10-11 17:34:34 +04:00
Alexander Gavrilov
010417c812
Compute detailed focus string for the hauling menu.
2012-10-11 12:36:17 +04:00
Alexander Gavrilov
459c69046b
Dissolve the World module class into a namespace.
...
It made accessing persistent data way too cumbersome.
2012-10-06 13:46:20 +04:00
Alexander Gavrilov
5396a67465
Some tweaking and edited NEWS.
2012-10-06 12:40:46 +04:00
Alexander Gavrilov
7440e80e6c
Add an API function to retrieve interface key bindings for display.
2012-10-02 13:49:31 +04:00
Petr Mrázek
8812238bf6
Update license, add contributors file, bump release number
2012-09-30 04:03:37 +02:00
Alexander Gavrilov
62cde96724
Add a script to reclassify 'individual choice' weapons based on unit skill.
2012-09-29 17:21:49 +04:00
Alexander Gavrilov
48da06ec37
Add an API function for reading the nominal skill level.
2012-09-29 15:18:04 +04:00
Alexander Gavrilov
eaddd0e646
Try shutting up a few random warnings.
2012-09-29 12:47:41 +04:00
jj
7cc29250f8
fix for updated viewlist_petst
2012-09-26 18:22:07 +02:00
Alexander Gavrilov
82dc1445cf
Support the Room list in getSelectedBuilding.
2012-09-20 11:55:53 +04:00
Alexander Gavrilov
c39a337223
Add unit/item/job/building getter hook vmethods to dfhack_viewscreen.
2012-09-20 11:11:20 +04:00
Alexander Gavrilov
7ce772ae0e
Add an API function that returns the selected building.
2012-09-20 10:41:03 +04:00
Alexander Gavrilov
d70a79deb9
Follow changes in XML defs.
2012-09-18 13:11:11 +04:00
Alexander Gavrilov
36e44c682c
Add a plugin implementing 'add spatter to item' reactions.
2012-09-17 21:15:51 +04:00
Alexander Gavrilov
c1e20c6f05
Follow changes to structures.
2012-09-17 12:47:18 +04:00
Alexander Gavrilov
24772f4dbc
Add an api function for destroying items.
2012-09-14 18:49:02 +04:00
Quietust
1d8c9a6a5f
Merge https://github.com/danaris/dfhack
2012-09-13 14:30:44 -05:00
Quietust
46321a6a01
Rename world_data.unk_204 to feature_map
2012-09-12 13:41:59 -05:00
Alexander Gavrilov
f06f9af6b8
Throw items from bins around in siege engine, like minecarts do.
2012-09-12 20:57:25 +04:00
Alexander Gavrilov
7c71aeab5f
Add function for making item projectiles.
2012-09-12 18:17:42 +04:00
Timothy Collett
ccefd02ee3
Merge branch 'master' of git://github.com/angavrilov/dfhack
2012-09-10 11:56:23 -04:00
Timothy Collett
96abc903ab
Merge branch 'master' of http://github.com/peterix/dfhack
2012-09-10 11:54:56 -04:00
Timothy Collett
274d6038ad
Merge further changes (???)
2012-09-10 09:19:21 -04:00
Alexander Gavrilov
9679b7729c
Clean up the movement speed calculation function and move into the core.
2012-09-09 17:04:58 +04:00
Alexander Gavrilov
ec3d489bda
Move curse-affected attribute value getters to the core.
2012-09-09 12:51:08 +04:00
Alexander Gavrilov
a36fe25e72
Finish the effective skill computation function, and move to core.
2012-09-09 12:27:40 +04:00
Alexander Gavrilov
bfa6ed3e08
Support setting the target area for the siege engine.
2012-09-08 13:46:02 +04:00
Alexander Gavrilov
e925d8f4d9
Add an API function for reading tiles from the screen buffers.
2012-09-07 11:36:45 +04:00
Alexander Gavrilov
c971a819de
Experimental creation of map blocks in gui/liquids script.
2012-09-06 22:45:19 +04:00
Alexander Gavrilov
d5ea05ebb8
Implement a pressure plate sensitive to machine power.
...
When built next to a gearbox, it will monitor its powered state.
2012-09-06 12:37:29 +04:00
Alexander Gavrilov
8d876cc7d9
Support renaming some buildings, and arbitrary units, via gui script.
2012-09-05 21:27:42 +04:00
Alexander Gavrilov
3713c5ea9e
Add some APIs required by steam engine to the core.
2012-09-02 14:10:58 +04:00
Alexander Gavrilov
0f1be28637
Follow xml changes.
2012-09-01 00:17:08 +04:00
Alexander Gavrilov
f1915915b4
Follow change in xml again.
2012-08-27 23:03:02 +04:00
Alexander Gavrilov
41ad42d0fd
Expose the liquids plugin engine to lua, and make a wrapper gui script.
2012-08-25 10:37:03 +04:00
expwnent
45efcfc763
Warning: does not work. Temp commit!
2012-08-24 11:40:51 -04:00
Alexander Gavrilov
8359e80b23
Expose a few API functions to lua, and implement a room browser overlay.
2012-08-24 18:26:18 +04:00
Alexander Gavrilov
e825dc5ddb
Tweak the API for current viewscreen, and dispatch show/dismiss from C++.
2012-08-24 13:20:08 +04:00
Quietust
1e28ceff6d
Add getProfessionColor and getCasteProfessionColor to Units module
2012-08-22 16:54:00 -05:00
Alexander Gavrilov
7987ea9a98
Put some compatibility features into the base dfhack viewscreen.
2012-08-22 18:18:19 +04:00
Alexander Gavrilov
2b79582e99
Implement a policy of marking DFHack-owned screens with a signature.
2012-08-22 12:28:01 +04:00
Alexander Gavrilov
8969fc9435
manipulator: Inherit from dfhack_viewscreen, and don't use itoa.
2012-08-22 12:23:56 +04:00
Quietust
51ba252344
Add Screen::drawBorder(string), duplicates DF's interfacest::drawborder()
2012-08-21 15:28:11 -05:00
Alexander Gavrilov
38a07a4ca5
Export the tile finder function to lua, and improve mouse event reporting.
2012-08-19 20:00:10 +04:00
Alexander Gavrilov
cacb082416
Add a stupid example of a lua-controlled viewscreen.
2012-08-19 17:53:25 +04:00
Alexander Gavrilov
30f71ff510
Implement support for lua-backed viewscreens.
2012-08-19 14:27:44 +04:00
Alexander Gavrilov
b8ee52131b
Add a module for painting tiles into the gps global.
2012-08-19 09:31:09 +04:00
Alexander Gavrilov
fd0bf2ef92
Extract the color enum from color_ostream to toplevel.
2012-08-19 09:21:25 +04:00
Quietust
bf82b2d20d
Sync with df-structures
2012-07-17 10:35:20 -05:00
jj
cdd711efa4
add COAL subtypes in MaterialInfo::getToken
2012-07-04 17:31:41 +02:00
Alexander Gavrilov
db91850464
Sync to the change in gamemode/gametype globals.
2012-06-16 14:42:56 +04:00
Petr Mrázek
52f9fe4a6a
Merge https://github.com/danaris/dfhack
...
Conflicts:
depends/clsocket
2012-06-14 00:00:36 +02:00
Alexander Gavrilov
9dbcaa2733
Support adventure mode and stockpile screens in focus strings.
2012-06-06 18:54:06 +04:00
Alexander Gavrilov
e72bf1ac9a
Sync to changes in df-structures.
2012-05-26 14:49:27 +04:00
Alexander Gavrilov
8644ea4dc0
Merge remote-tracking branch 'q-github/master'
2012-05-26 14:41:36 +04:00
Timothy Collett
44c3afc306
Merge git://github.com/quietust/dfhack
...
Gotta get the changes that prevent DFHack from crashing.
2012-05-24 15:39:11 -04:00
Timothy Collett
24d221052b
Initial changes to get dfhack building on the Mac
2012-05-24 11:31:20 -04:00
Quietust
64ea06bbfe
Don't crash if "gps" is null
2012-05-23 13:38:01 -05:00
Quietust
9a73ea9f14
Cleanup World module to use df::global, and fix crashes when control_mode/game_mode are missing
2012-05-23 12:51:03 -05:00
Alexander Gavrilov
9adf310d7f
Update Units::isCitizen after looking at game-over detection code.
2012-05-22 12:31:37 +04:00
Alexander Gavrilov
81022451c2
Support sorting items in stocks, and correct unit sorting in joblist.
2012-05-21 22:29:03 +04:00
Alexander Gavrilov
34f08c0223
Handle the stocks screen in the focus strings.
2012-05-21 21:30:53 +04:00
Alexander Gavrilov
32d6257c70
DF code analysis uncovered another item-related flag to clear.
...
It turns out, buildings cache their 'site is blocked' state,
and won't actually recheck until the flag is cleared.
2012-05-20 21:58:43 +04:00
Alexander Gavrilov
b992b04f0b
Remove stuff that shouldn't be in the core, and expose to lua what's left.
...
Specifically, any "if (verbose) { Core::printerr("blah") }" kind
of stuff definitely doesn't belong in the common API functions.
Also, ref->getUnit() is very expensive.
On the other hand, checks for crash-inducing conflicts with the
ui should be in the core api, and not in client plugins.
2012-05-20 21:57:45 +04:00
Alexander Gavrilov
d28d240dbd
Merge remote-tracking branch 'kmartin/master'
2012-05-20 11:03:41 +04:00
Kelly Martin
abbe0ceb8d
Fix order-of-operations oopsie in DFHack::Items::moveToInventory
2012-05-19 14:13:32 -05:00
Petr Mrázek
bc7dbe1175
Merge derp fixed.
2012-05-19 20:03:08 +02:00
Alexander Gavrilov
1b4a24c827
Support using focus strings to limit keybinding scope.
2012-05-19 21:31:42 +04:00
Petr Mrázek
51f06c78fc
Merge https://github.com/playfordh/dfhack
...
Conflicts:
library/include/modules/Items.h
library/modules/Items.cpp
2012-05-19 19:09:13 +02:00
Alexander Gavrilov
7774f5f2c1
Add a mechanism converting ui focus to a string representation.
...
The idea is to make ui handling more modular, dispensing with
huge functions that switch or if/else on lots of variables.
For now, used to split up functions in the sort plugin.
2012-05-19 19:50:36 +04:00
Petr Mrázek
1333dc569f
Merge https://github.com/Caldfir/dfhack
2012-05-18 17:42:34 +02:00
Petr Mrázek
ed6da7618a
Merge https://github.com/warmist/dfhack
2012-05-18 17:41:09 +02:00
Alexander Gavrilov
3c44e22760
Support trade viewscreens in Items::getSelectedItem.
2012-05-18 17:54:05 +04:00
Warmist
48185568e9
Added df::Items::moveToBuilding. Moved item from ground to building, usefull for museum forts (placing items on tables)
2012-05-18 16:05:29 +03:00
Alexander Gavrilov
f37f708b37
Add a workaround for Planepacked bug in buildings constructed via API.
...
Buildings hanging in the air cause constructWithFilters to
exhibit the same behavior as a moody dwarf in a burrow excluding
the workshop, i.e. endlessly collecting the same type of reagent.
http://www.bay12games.com/dwarves/mantisbt/view.php?id=1416
The workaround monitors jobs and reclassifies the reagents on the fly.
2012-05-17 20:38:27 +04:00
Alexander Gavrilov
2c0024adc9
Make Items::getPosition exactly match the DF original in behavior.
2012-05-17 19:56:55 +04:00
Alexander Gavrilov
efdb709284
Support creating rollers and stops with dfhack.buildings.constructBuilding.
2012-05-17 00:19:29 +04:00
harlanplayford
27ca317871
Added new method - Items::moveToInventory(...)
...
Signed-off-by: playfordh <harlanplayford@gmail.com>
2012-05-15 06:01:59 -04:00
Alexander Gavrilov
87ec1de891
Improve lua api for tile biome access.
2012-05-13 13:58:41 +04:00
Alexander Gavrilov
60bb486aba
Add api for enabling liquid and temperature updates for blocks.
...
Now updates also have to be enabled for the z level to work.
2012-05-12 20:12:09 +04:00
Alexander Gavrilov
9ad8d767b4
Add code for adding abstract buildings and removing constructions.
2012-05-06 19:09:11 +04:00
Alexander Gavrilov
b70130cf36
Add a couple more building api functions.
2012-05-06 11:22:55 +04:00
Alexander Gavrilov
05e8083c84
Allow constructing itemless actual buildings.
2012-05-06 10:09:39 +04:00
Alexander Gavrilov
81f2240c23
Fix some things that confuse MSVC.
2012-05-05 20:46:28 +04:00
Alexander Gavrilov
5afe2ca002
Update dfhack for specific_ref.
2012-05-03 11:47:04 +04:00
Alexander Gavrilov
eadce95940
Add a convenience function for designating constructions.
2012-05-01 19:55:25 +04:00
Alexander Gavrilov
4cffb6428d
Update building creation code with new knowledge, and fix zone.
...
Also, document new lua api, and add a more convenient wrapper.
2012-05-01 18:55:30 +04:00
Alexander Gavrilov
2303a25bde
Implement unconstructed building instance creation and linking into world.
...
For more flexibility, the base api is split into 3 phases:
alloc, setSize, and construct. No support for non-actual
buildings like stockpiles and activity zones at the moment.
2012-04-29 21:07:39 +04:00
Alexander Gavrilov
82a0e52a3e
Add api to check the walkable cache, and update flow_forbid in liquids.
2012-04-26 18:51:39 +04:00
Alexander Gavrilov
16ee049664
Split off the burrows api from Maps and Units.
2012-04-26 12:56:28 +04:00
Alexander Gavrilov
6ab270d129
Retrieve unit noble position info, and use it in getProfessionName.
2012-04-26 12:03:56 +04:00
Alexander Gavrilov
9489c6ed1a
Add support for a few more viewscreens to Units::getSelectedUnit.
2012-04-26 11:05:35 +04:00
Alexander Gavrilov
763a301b4f
Add a few more lua api functions, documentation, and unit sort orders.
...
Units::getProfessionName appears to work correctly for
everything except nobles.
2012-04-23 21:30:53 +04:00
Caldfir
035d65536b
Added in job loading to t_unit for stonesense.
2012-04-22 18:51:27 -07:00
Alexander Gavrilov
3282ac3db2
Add a hotkey command that sorts units in lists using lua comparators.
2012-04-21 15:43:52 +04:00
Alexander Gavrilov
adbd351462
Rename units.other[0] to units.active.
2012-04-21 12:46:55 +04:00
Alexander Gavrilov
0a6982f404
Enable warnings correctly on linux and fix a lot of them.
2012-04-20 13:30:37 +04:00
Alexander Gavrilov
0b32d374db
Implement SOIL/STONE substitution logic, and add compat in mapexport.
2012-04-19 23:02:30 +04:00
Alexander Gavrilov
4b87f1bcac
Refactor MapCache: make it parse everything that is known re tiles & mats.
2012-04-19 19:17:07 +04:00
Alexander Gavrilov
f655a0986d
Sync to changes in the data structure definitions.
2012-04-19 11:03:29 +04:00
Alexander Gavrilov
7a34a89f53
Add burrow subcommands to modify burrow unit and tile sets.
2012-04-14 14:12:59 +04:00
Alexander Gavrilov
37cfb1fdcd
Add unit position and container api.
2012-04-13 16:10:19 +04:00
Alexander Gavrilov
2d8611a480
Add core api for moving items between ground and containers.
2012-04-12 18:37:27 +04:00
Alexander Gavrilov
583ccdcc0c
Support pre-initializing vtable pointers from symbols.xml
2012-04-12 10:54:53 +04:00
Alexander Gavrilov
5d5502ae34
Update the item owner modification api and export it to lua.
2012-04-11 20:10:31 +04:00
Alexander Gavrilov
0c2b78b96b
Add api for manipulating burrows to the core.
2012-04-11 19:42:05 +04:00
Alexander Gavrilov
c7b922250b
More maps api refactoring and renaming.
...
getBlockAbs is a very confusing name; getTileBlock is better.
2012-04-11 12:01:27 +04:00
Alexander Gavrilov
59ddbfacb7
Implement item occupancy tracking in MapCache.
2012-04-10 20:19:41 +04:00
Alexander Gavrilov
b15d2da819
Get rid of some obsolete api functions, and restructure MapCache.
2012-04-10 18:21:19 +04:00
Alexander Gavrilov
93c795cfc3
Job module api tweaks: add a namespace to match others and some funcs.
2012-04-10 11:43:36 +04:00
Alexander Gavrilov
45ae2ed67f
Pull a few utility functions into the core and publish to lua.
2012-04-07 19:08:30 +04:00
Alexander Gavrilov
0daafef690
Wrap MaterialInfo for lua.
2012-04-06 19:56:19 +04:00
Alexander Gavrilov
903e9ee716
Export a few more functions to lua.
2012-04-06 11:21:28 +04:00
Alexander Gavrilov
9eed9f0d24
Wrap a few utility functions defined on the c++ side for lua.
2012-04-05 19:55:59 +04:00
Alexander Gavrilov
59f411e401
Oops, forgot return statement.
2012-04-05 12:32:10 +04:00
Alexander Gavrilov
d1b27418a6
Add a World::GetPersistentData version that auto-adds if not found.
2012-04-05 11:32:23 +04:00
Alexander Gavrilov
afe4eba957
Improve performance of the persistent data api, and wrap it for lua.
...
Use an stl table for string keys to avoid linear cost of lookup.
This uncovered a bug in the new luaL_getsubtable function.
2012-04-01 16:43:40 +04:00
Petr Mrázek
8a847dbaba
Tweaks and cleanups
...
Removed t_virtual.
Made lua use C++ compiler
Removed many silly exception types from Error.h and renamed the rest.
Removed Brush classes from tiletypes plugin.
2012-03-24 12:13:51 +01:00
Alexander Gavrilov
d4626f9751
Add unit professions and filtering on status.
2012-03-18 15:35:38 +04:00
Alexander Gavrilov
368b92f81f
Add a RPC call to retrieve unit info.
...
For performance reasons, material flag arrays are changed to use ints,
with enum item name mappings retrievable via a different RPC call.
2012-03-17 17:41:56 +04:00
Alexander Gavrilov
58eb199036
Add many new template functions for enums & bitfields.
...
An incompatible change: ENUM_KEY_STR returns std::string now.
The old behavior is available via enum_item_key_str function.
2012-03-17 12:52:22 +04:00
Quietust
5464564ef6
Merge branch 'master' of git://github.com/angavrilov/dfhack
...
Conflicts:
library/xml
2012-03-15 20:12:01 -05:00
Quietust
52aca6e05a
Rename "interface" to "interfacest" and just avoid all of these MSVC problems
2012-03-15 13:00:47 -05:00
Alexander Gavrilov
f84b1539a8
Change to the traits representation of enum and bitfield properties.
2012-03-15 20:46:08 +04:00
Alexander Gavrilov
a05cbcc2de
Rename the world substruct with the save directory name.
2012-03-14 10:56:30 +04:00
Petr Mrázek
eb4757043b
Move depends out of main library, make them (static) libraries.
2012-03-13 14:46:48 +01:00
Petr Mrázek
75113b715a
Misc fixes for warnings...
2012-03-10 16:03:11 +01:00
Alexander Gavrilov
8cc82d5876
Make plugins accept explicit output stream references.
...
This is an incompatible change to the plugin ABI.
The Console is not thread-safe unless used indirectly
via color_ostream_proxy, so everything should use their
per-thread stream.
2012-03-10 15:55:42 +04:00
Petr Mrázek
f83db86258
Use tile buffers!
2012-03-05 02:24:02 +01:00
Petr Mrázek
a45fc82743
First pass at windowing, track df2mc, stonesense
2012-03-05 01:34:04 +01:00
Quietust
2b2c30ac43
DEEP_ANY got renamed to SPECIAL
2012-03-03 16:03:35 -06:00
Petr Mrázek
7fe8762852
Get rid of Simple namespace, Gui module is now a namespace.
2012-03-03 14:38:24 +01:00
Petr Mrázek
022822277d
Fix the ugly Materials code...
2012-03-01 01:52:13 +01:00
Petr Mrázek
2682c54fce
Fix horrible errors and make MSVC shut upt about non-issues.
2012-03-01 01:29:55 +01:00
Mike Stewart
14b471a459
Add ability menu/area map width reading and writing to the Gui module, and use the new information in follow to properly center the screen regardless of menu configuration. Also general fixing and cleanup in follow.
2012-02-21 23:30:44 -08:00
Alexander Gavrilov
02e486be88
Support the new unitlist screen; it's same as joblist, but with pages.
2012-02-20 17:53:39 +04:00
Petr Mrázek
80cedd2ff8
Fix header includes, update structures.
2012-02-20 11:42:40 +01:00
Petr Mrázek
33f77c8837
Merge https://github.com/quietust/dfhack
2012-02-19 20:28:08 +01:00
Petr Mrázek
252895708f
Fixage.
2012-02-19 20:27:44 +01:00
Quietust
d394dc406b
Update t_building, change subtype into a union of all possible subtypes (depending on type)
2012-02-18 11:34:52 -06:00
Petr Mrázek
1bf5080828
Fixage. Runs with 34.01
2012-02-15 21:35:44 +01:00
Alexander Gavrilov
c04a140713
Add a new DfArray class to match generated headers.
...
Also, add working assignment and copy constructor to BitArray, and
change the unsafe conversion to int from an operator to a method.
2012-02-12 16:44:35 +04:00
Petr Mrázek
8527547cbe
Merge branch 'master' into purge
...
Conflicts:
library/DataDefs.cpp
2012-02-11 18:48:17 +01:00
Quietust
952f621ee2
Synchronize with df-structures
2012-02-08 22:35:22 -06:00
Petr Mrázek
8f680dcf94
Make it build and run on linux (no stonesense, df2mc, dfusion)
2012-02-09 03:07:26 +01:00
Quietust
0d11d1b79c
Synch with structures changes
2012-02-07 15:37:21 -06:00
Quietust
9afcea3deb
In all loops that iterate across a vector, use a size_t as the index
2012-01-31 10:55:38 -06:00
Quietust
a82f4c9138
Cleanup code to get rid of MSVC warning C4482
2012-01-31 10:17:27 -06:00
Quietust
8a4740c479
Make all "origin" fields strongly typed, and fix building.origin to actually be meaningful
2012-01-28 14:12:41 -06:00
Quietust
69b8f168cc
Improve Translation::isValid() - make sure world exists
2012-01-27 22:01:59 -06:00
Quietust
34f9d98d45
Simplify TranslateName a bit using a helper function
2012-01-27 21:46:52 -06:00
Quietust
116e5d60be
Update Translation::TranslateName to include the first name, plus have it follow the init setting for nickname display (in Dwarf mode)
2012-01-27 21:36:01 -06:00
Quietust
ccad6efeb8
Remove UTF-8 BOMs
2012-01-27 09:47:14 -06:00
Quietust
5521459fc1
"unknown1" was renamed to "body_info"
2012-01-27 09:41:51 -06:00
Petr Mrázek
1d7ed14442
Merge https://github.com/quietust/dfhack
...
Re-add some get* forms of module calls.
Conflicts:
plugins/mapexport/mapexport.cpp
2012-01-27 06:27:57 +01:00
Petr Mrázek
d5d4875532
Make things work properly.
2012-01-27 05:54:26 +01:00
Quietust
be892beba9
Update materials module to match XML changes
2012-01-26 21:32:47 -06:00
Quietust
fe34e07d2b
Re-add the ability to request simplified copies of Constructions, Engravings, and Plants; also fix the "isValid" checks for those modules to actually be meaningful
2012-01-26 20:29:59 -06:00
Quietust
3c60b43a38
Fix "origin" field on mapblock40d to actually be correct
2012-01-25 07:57:11 -06:00
Quietust
902e0c4d90
Strip out old offsets from Gui module and use df::global vars where available
2012-01-24 22:18:21 -06:00
Quietust
9a683ffda4
Switch some World module stuff to read out of appropriate df::global vars, and fix setPauseState to only write a byte instead of a dword
2012-01-24 21:51:17 -06:00
Quietust
26730dc6c2
Kill the Constructions module
2012-01-24 16:11:48 -06:00
Quietust
8861e93848
Kill the Vegetation module, replacing it with the same 3 simple methods used in Engravings
2012-01-24 12:02:12 -06:00
Quietust
6d1af090c5
Tweak Engravings.h
2012-01-24 11:57:47 -06:00