Kelvie Wong
f8d94afb7d
Add getSelectedCivZone to dfhack.gui
...
Mostly helpful for my own automation in my custom lua scripts.
Tested it with barracks, meeting areas, and pastures.
2023-02-13 15:22:33 -08:00
Robob27
65f38ec75c
Add isGeldable, isMarkedForGelding, isPet
2023-02-11 05:44:45 -05:00
Myk Taylor
cd12f95849
add const & to Push overloads; remove circular def
2023-02-08 12:15:19 -08:00
Robob27
2bf9b86c7b
Fix getCurFocus lua, use where appropriate in c++
2023-02-05 19:04:21 -05:00
Robob27
a770a4cae4
WIP
2023-02-05 19:04:21 -05:00
Myk
21f93173c3
Merge pull request #2778 from myk002/myk_halfsies
...
support offset text in graphics mode for pens
2023-02-01 17:50:24 -08:00
Myk Taylor
58be8cfd69
support offset text in graphics mode for pens
2023-02-01 17:39:32 -08:00
Myk Taylor
5127f06571
expose new tiles to Lua
2023-01-31 23:55:30 -08:00
Myk
274e995790
Merge pull request #2747 from myk002/myk_on_off
...
Add new on/off icons
2023-01-29 16:55:01 -08:00
Myk Taylor
1c6235633f
add dfhack.units.getCitizens()
2023-01-29 16:28:05 -08:00
Myk Taylor
c2d6debcd8
add on/off light textures and expose to lua
2023-01-29 00:35:29 -08:00
Myk Taylor
22dd49ce38
remove "room" checking for buildings -- there is no room
2023-01-27 13:38:21 -08:00
Myk Taylor
9aaa55cd7f
add textures and frames for various use cases
2023-01-23 03:58:51 -08:00
20k
598354d9d4
getbiometype naming, docs
2023-01-21 20:33:40 +00:00
20k
8b7c8d83b5
remove save fixup
...
Add notifyCivzoneModified
2023-01-19 21:55:20 +00:00
Myk Taylor
478b5ada39
expose icons texpos to Lua
2023-01-12 22:17:39 -08:00
Myk Taylor
079d5e4178
support foreground and background writing from pens
2023-01-12 12:30:07 -08:00
Myk Taylor
2234328a91
use an actual pin texture for ZScreen pins
2023-01-09 00:47:13 -08:00
Myk Taylor
6f46ae672e
add Gui::getDFViewscreen and Lua binding
2023-01-06 12:17:36 -08:00
Myk Taylor
1934014659
framework for passthru, z-order swapping windows
2023-01-05 18:07:38 -08:00
Myk Taylor
5d04b9c4cb
add Textures module and load DFHack logo
...
undocumented for now since it's internal. in the future, perhaps this
could morph into a dynamic texture loading facility for tools
2023-01-04 13:30:18 -08:00
Myk Taylor
7d5d2d0a9b
clear out obsolete area map and menu logic
...
in particular, return the correct map dimensions in getDwarfmodeDims()
2022-12-31 22:49:30 -08:00
Myk Taylor
fc523f12fe
expose and document dfhack.screen.getMousePixels()
2022-12-28 16:05:27 -08:00
Tachytaenius
0836962007
Rename [xyz]CategoryActionTimers to [xyz]GroupActionTimers in action timer API
2022-12-01 23:24:04 +00:00
Tachytaenius
a925c34413
Rename [xyz]ActionTimer functions to [xyz]ActionTimers
2022-12-01 13:34:54 +00:00
Tachytaenius
7f54a77ed9
Continue work on unit action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
0f8ce360ac
Make first pass of action timer API
2022-12-01 13:34:54 +00:00
Myk
ac5a1d35ae
remove duplicate function definition
2022-11-18 17:39:49 -08:00
Myk
11c27d40dd
Merge branch 'develop' into Bumber64-patch-2
2022-11-18 17:34:00 -08:00
Josh Cooper
7e1bdb5302
Matches Units.h ordering in LuaApi.cpp
2022-11-12 17:05:11 -08:00
Josh Cooper
ebd450af0e
Adds isUnitInBox to Units module
2022-11-12 14:42:41 -08:00
Josh Cooper
34de030ba9
Units module
...
- Updates `Lua API.rst`
- Only adds the most important additions (complicated enough to need explaining)
- Adds new functions to LuaApi.cpp
- Revises isUndead to accommodate `dfhack.units.isUndead(u)` => `Units::isUndead(u, false)` instead of taking the default value
2022-11-09 22:03:39 -08:00
myk002
e4d0bb9e46
move Lua push methods into LuaTools.cpp
2022-11-08 10:15:28 -08:00
myk002
b82a604c8d
factor out keys -> lua onInput code to LuaTools
2022-11-08 10:15:28 -08:00
Tachytaenius
ded5f483d6
Fix issues in construction module
2022-10-12 21:32:27 +01:00
Tachytaenius
1cf9688349
Implement/change/expose constructions findAtTile & insert (not building)
2022-10-12 21:10:22 +01:00
Myk Taylor
28b70eaee9
return map coords as a coord, not x, y, z
2022-09-18 13:27:33 -07:00
Myk Taylor
1f15e4d47e
expose Gui::getMousePos() to Lua
2022-09-18 08:19:56 -07:00
myk002
cae2bca0a7
add dfhack.screen.hideGuard
2022-09-10 09:49:43 -07:00
myk002
10f8417cc2
create helpdb entries for all plugins
...
even those that have no commands and are not enableable
2022-07-26 22:22:43 -07:00
myk002
2ce7518562
read plugin command docs from single plugin file
2022-07-21 22:33:43 -07:00
myk002
048b20ac45
no help entries for non-enableable plugins
2022-07-20 13:34:29 -07:00
myk002
e650bd0942
add comment about plugin docs
2022-07-17 17:05:29 -07:00
myk002
c9a87511bd
add dfhack history repository and expose to lua
2022-07-15 09:18:27 -07:00
myk002
193b9a4004
add missing namespace
...
which did not cause compiler errors for some reason
2022-07-14 14:08:33 -07:00
myk002
e926e1116e
replace more Core cpp code with calls to helpdb
...
also document devel/dump-rpc builtin
2022-07-14 13:19:30 -07:00
Myk
64aba7a8a3
Myk rendered help ( #2240 )
...
* implement help db
* add initial list of tags
* read tags fr help, read script short desc, filter
2022-07-10 20:14:21 -07:00
Ryan Williams
b0b601cf0f
Remove recenterViewscreen, update revealInDwarfmodeMap
2022-06-04 11:59:04 -07:00
Ryan Williams
ce34ac8f33
Use debugfilter; remove redundant changelog entries
2022-05-16 18:41:47 -07:00
Ryan Williams
5be0fe2a44
Fix issues, update changelog and docs
...
Initialize variables in LuaApi.cpp, solve changelog conflicts, hyperlink and escape char info in docs
2022-05-02 23:52:47 -07:00
Ryan Williams
f565de88e8
Fix stuff ( #4 )
...
* Update Lua API.rst
* Update Gui.h
* Update Gui.cpp
* Update LuaApi.cpp
2022-05-01 22:53:53 -07:00
Ryan Williams
b56d9520e9
Fix trailing whitespace
2022-04-25 00:39:05 -07:00
Ryan Williams
861a0ee85e
Update LuaApi.cpp
...
Wrappers for autoDFAnnouncement, pauseRecenter, and recenterViewscreen.
2022-04-24 22:52:31 -07:00
Ryan Williams
88b403ec7a
Add functions reverse-engineered from ambushing unit code ( #1992 )
...
* Add functions reverse-engineered from ambushing unit code
* Fix whitespace
* Fix debug_showambush check
* Remove getOuterContainerRef from Lua API
Don't think this works properly without allocating a new specific_ref. More trouble that it's worth.
* Fixed tile visibility check
* I don't think gamemode or gametype are ever NULL
* Minor tweaks to documentation
* Reimplement getOuterContainerRef for Lua; fix some comments
* Update Units.cpp and changelog
* Update Units.cpp
* Update changelog.txt
2022-03-13 17:19:35 -07:00
Ryan Williams
818ff7a946
Rename getPlantAtCoords to getPlantAtTile
2021-06-23 22:59:39 -07:00
Ryan Williams
bc841f595e
Update LuaApi.cpp
2021-06-22 20:05:45 -07:00
myk002
fc860478e4
move fastdwarf's teleport code to Units module
...
and expose in Lua API
2021-06-06 08:48:32 -07:00
myk002
6819ee9928
make alchemist flag valid for controllable civs
2021-02-05 16:45:39 -08:00
lethosor
69ce5d9e3f
Send runCommand output to correct output stream
...
e.g. when run with dfhack-run
2021-01-08 21:06:42 -05:00
lethosor
a9bb11c145
Optimize Lua's internal.runCommand() when printing directly to the console
...
This also makes commands run with `run_command()` detect the console properly (notably used by `df2console()`)
2020-11-20 17:57:54 -05:00
lethosor
913d860ae4
Use initial working directory as process path on Linux, and expose to Lua
2020-11-12 19:07:51 -05:00
lethosor
ce7772a1c2
Add Filesystem::restorecwd()
...
This allows restoring the working directory to its original value, which may not actually be the DF root. See #1671 , dfhack/scripts#152
2020-10-14 21:22:53 -04:00
lethosor
9c8098b4f0
Expose to_search_normalized to Lua, add test, and use in ListColumn (most useful for the `stocks` plugin)
2020-10-10 01:40:00 -04:00
lethosor
8f047530c4
Make Units::getRaceNameById and other ID-related functions available to Lua
2020-08-08 14:28:17 -04:00
Ryan Bennitt
a85b77e6f1
Retrieve goal string values from enum attributes and add new Units methods to Lua API and docs
2020-08-07 22:07:48 +01:00
lethosor
7c921d8c91
Lua listdir_recursive: allow nil to be used for default arguments
...
https://github.com/DFHack/dfhack/pull/1609#issuecomment-663803777
2020-07-25 13:02:35 -04:00
lethosor
cafdc1620b
Improve Lua listdir_recursive error handling
...
Ref #519 , #1609
2020-07-24 22:15:35 -04:00
Myk Taylor
d0f8ba06a2
expose new include_prefix param to Lua
2020-07-19 01:52:57 -07:00
Myk Taylor
c19fc1f349
gcc-4.8 compatibility
2020-07-15 21:35:21 -07:00
PatrikLundell
121497a466
Propagated getBookTitle to Lua
2020-01-26 11:47:47 +01:00
Jeremy Apthorp
50e696acf6
getDescription => getPhysicalDescription
2019-12-14 09:36:47 -08:00
Jeremy Apthorp
910f965838
wip
2019-12-07 22:17:59 -08:00
Stoyan Gaydarov
12c8046f90
Some memory management changes for Core
2018-07-14 19:51:46 -07:00
lethosor
7afa3690bf
Add support for DFHACK_BUILD_ID
...
Used for BuildMaster builds, for example
2018-07-11 11:47:55 -04:00
lethosor
2dac3c53c7
Add stress cutoffs to Units module, fix dwarfmonitor/manipulator
...
Fixes #1292
2018-07-09 15:59:12 -04:00
lethosor
46e53fc3b3
Make df2console only call df2utf if the output stream is a console
...
Fixes output in command-prompt, for example
2018-07-09 11:00:28 -04:00
lethosor
81a7ddcf92
Merge remote-tracking branch 'suokko/screen_show_memory_leak' into develop
2018-07-02 22:58:11 -04:00
Pauli
c39a882b57
Add missing Unit::isDiplomat
...
Fixes #1324
2018-06-29 16:19:18 +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
PatrikLundell
f329774059
dead & killed flag separation
...
squashed 4 commits from #1297
2018-06-13 15:37:45 -04:00
lethosor
e44bca0fb4
Merge remote-tracking branch 'grubsteak/patch-1' into develop
2018-05-18 00:48:04 -04:00
grubsteak
fe0049db8c
enable lua api construction functions
...
it seems this has been left out on accident?
2018-05-17 23:29:10 -05:00
lethosor
17ba492992
Add some exclusion functions to Kitchen module, expose to Lua, fix build
2018-05-17 19:34:03 -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
Ben Lubar
a44b3b8f98
Move null pointer check from Job module to LuaApi, where it does not invoke undefined behavior.
2018-04-05 16:01:26 -05:00
lethosor
7721a142d8
Add a basic Lua console API
2017-12-07 14:43:27 -05:00
lethosor
d628212254
Lua API: Use CallWithCatchWrapper for a few more functions
...
This produces more readable backtraces when native functions that aren't wrapped
using wrap_function() throw exceptions.
2017-07-01 17:39:39 -04:00
lethosor
6100074ba6
Add a few MD5 and thread functions to the Lua API
2017-07-01 17:39:17 -04: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
9b63c451b1
Expose getUnitsInBox to Lua
2017-06-10 21:03:42 -04:00
lethosor
8d23660d55
Expose Gui::getAny* to Lua
2017-06-08 11:21:30 -04:00
lethosor
4eb767c3f0
Expose getDepthAt() to Lua
2017-06-02 15:39:49 -04:00
lethosor
ae1aa49089
Add map parameter to Lua paintTile() and use in Painter
...
Also updated gui/siege-engine.lua
2017-06-02 12:42:51 -04:00
lethosor
05f322ca30
Merge remote-tracking branch 'lethosor/lua-dmdims' into develop
2017-06-01 23:34:35 -04:00
lethosor
d41ff4e836
Implement map parameters for Lua paintString() and fillRect(), update docs
2017-06-01 16:17:59 -04:00