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
346e8b91a9
Use getDwarfmodeViewDims() in getPanelLayout()
...
Allows C++ hooks to affect Lua scripts as well
2017-06-01 23:36:02 -04:00
lethosor
e51c5fc2cc
Allow key_pen option in some widget text
2017-05-28 23:11:37 -04:00
lethosor
8bda738466
df_expr_to_ref: support integer array indices
2017-05-07 16:31:30 -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
318cf92f0b
Merge pull request #1079 from Amostubal/patch-1
...
fix of relations errors.
2017-04-25 21:21:03 -04:00
Amostubal
bc47803948
fix of relations errors.
...
There is a lot more errors in this file, mostly called unk variables... I bet they have names, I've tried to figure out what they were renamed too, but I'm not fully understanding the xml.
2017-04-24 07:07:08 -05:00
lethosor
c21b7bf941
Add a Painter:key_string() method
2017-03-01 15:56:50 -05:00
Milo Christiansen
8bd92b6a08
Add a Lua module for getting a tile's material ( #1031 )
2016-12-27 16:49:46 -05:00
lethosor
b1e3c1088c
Give loadfile() result a better name for tracebacks
2016-10-19 09:53:12 -04:00
lethosor
85ebbf0e9c
Fix df_expr_to_ref for raw userdata
2016-08-24 17:18:55 -04:00
lethosor
6ce470ad57
Add basic lua expression support to memview
...
Currently just supports basic field accesses (world.x, screen.y.z).
No support for world.x - 4, etc.
Closes #976
2016-08-24 16:26:34 -04:00
lethosor
7487f44fc8
Implement a helper to create lua environments with shortcuts (e.g. scr, unit)
...
Used in gui/gm-editor and lua
Closes #977
2016-08-23 21:47:41 -04:00
lethosor
2dccd1d0ff
Add CheckedArray:__tostring() method
2016-08-22 23:18:30 -04:00
lethosor
0b6597ddb2
Stop field_offset from crashing due to missing vtables
...
Now, a pointer to NULL is cast to the type in question, avoiding the need to
call new() or delete() with potentially-misaligned types. Also,
virtual_identity::find has been tweaked to prevent it from crashing on NULL
vtable pointers.
This was suggested by Angavrilov.
2016-08-18 15:59:46 -04:00
lethosor
c2997b9c79
Fix save_dir
2016-08-18 15:47:40 -04:00
lethosor
ee7357b60e
x86: fix vector validity check
2016-08-05 17:51:08 -04:00
lethosor
e8fe72826f
Add new integer types to memscan and update find-offsets
2016-07-29 00:05:12 -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
Warmist
6c64b3441d
Fixes to gui/advfort.lua
2016-05-20 13:55:59 +03:00
lethosor
c1e44c178f
Add on_click/on_rclick handlers to widgets.Label
...
Closes #919
2016-05-09 21:30:34 -04:00
lethosor
b36193857c
Add string:startswith(), endswith()
2016-04-16 17:13:41 -04:00
Warmist
7c91b8f755
Add more informative focus_path
...
This with conjunction of changes in eventful will make the sidebar overlay more bug-free :)
2016-04-10 16:53:18 +03:00
Warmist
8b8ce4eff9
Spelling mistake
2016-04-10 15:45:43 +03:00
Warmist
d1c45d00d2
Fix some bugs in workshopOverlay
...
Fix bugs relating to "remove building"/"suspend remove" part of overlay.
2016-04-10 14:44:09 +03:00
Warmist
80521d1bb1
add onGetSelectedBuilding to workshop overlay
...
This will make other stuff that depends on dfhack.gui.getSelectedBuilding work with workshop overlay
2016-04-10 12:28:15 +03:00
lethosor
49863a9f32
Add a file-like lua JSON wrapper
2016-04-08 17:40:14 -04:00
lethosor
b8bbf5f545
field_offset: Use actual type instances instead of reinterpret_cast(type, 1)
...
ui_build_selector is a virtual class as of 0.42.06, so reinterpret_cast-ing it
with bad addresses will crash. 'df.new(df.ui_build_selector)' works just fine.
2016-03-22 17:27:53 -04:00
lethosor
7da3c65079
Fix display of arrows in lua filtered list widgets
...
Fixes #718
2015-10-30 19:16:29 -04:00
lethosor
d3dbc6225a
Implement getViewscreenByType() in lua
2015-10-17 15:11:04 -04:00
lethosor
9eb86c7e38
Support additional script search paths
...
These can currently be added/removed from C++ or through the Lua API.
2015-09-06 16:23:02 -04:00
lethosor
6fb6645ed5
Merge branch 'dwarfmonitor-widgets' into develop
2015-06-15 12:55:26 -04:00
lethosor
862389d217
Allow lua scripts to redirect to other lua scripts
...
Addresses #634 , #638
2015-06-14 11:56:14 -04:00
lethosor
93c9a41a3a
Reimplement dwarfmonitor widgets in Lua (and improve customizability)
...
Widget positions and a few other options (e.g. date formats) can be
specified in dfhack-config/dwarfmonitor.json on a per-instance basis.
Related changes:
* Fixed an issue loading JSON files from Lua
* JSON files in dfhack-config (only dwarfmonitor.json currently) are
no longer copied into the DF directory when building DFHack. This
keeps developers' personal settings intact, but will require
copying over changes made to DFHack's copies manually.
* Fixed incorrect config path in dwarfmonitor help
2015-06-13 21:15:43 -04:00
lethosor
bb93f2e40f
Fix circular lua script dependencies
2015-06-05 19:08:11 -04:00
lethosor
a47a5f8b0a
Add an alternative to script_environment() that requires scripts to
...
recognize use as a module
Also document the use of enable/disable with lua scripts
2015-05-09 09:21:00 -04:00
lethosor
42a6cfaee6
Improve Lua enable/disable error handling
2015-05-08 18:03:19 -04:00
lethosor
eaf282c18e
Allow lua scripts to be enabled and disabled with built-in commands
2015-05-08 18:03:19 -04:00
lethosor
db423c1aa6
Allow Lua scripts to specify whether they can be used as a module or
...
enabled/disabled
2015-05-08 18:03:18 -04:00
lethosor
e73a2f8778
Move script internals to a single table
2015-05-08 18:03:18 -04:00
lethosor
3ca00f85d0
Merge remote-tracking branch 'lethosor/json' into develop
2015-04-08 20:18:13 -04:00
lethosor
99f4ea4d2b
Implement a PenArray class for caching parts of rendered screens
2015-03-27 22:56:30 -04:00
lethosor
38fa416ad1
Lua: Indent array values
2015-03-22 14:04:03 -04:00
lethosor
96e5c5d2fd
Fix whitespace
2015-03-20 19:55:32 -04:00
lethosor
b976053be0
Add Lua JSON library
2015-03-20 19:51:24 -04:00
lethosor
10cfef0553
Fix whitespace issues
2015-02-14 22:53:06 -05:00
lethosor
37f391ea6d
Don't store runScript() in script environments
2015-02-10 17:22:16 -05:00
lethosor
337598e0d6
Restore lua environment persistence and update modified timestamp correctly
...
See #544
2015-02-10 16:36:21 -05:00
expwnent
712892fb71
Only reload and recompile Lua scripts if they have moved or been updated.
2015-02-02 02:24:43 -05:00
expwnent
bf5e491647
Allow Lua scripts to be used as modules.
2015-01-31 22:43:54 -05:00