Commit graph

17 commits

Author SHA1 Message Date
mattsc
51b2dbec19 Lua code: replace deprecated wesnoth.set_variable() calls 2018-05-12 17:41:28 -07:00
mattsc
2922b19802 Lua code: replace deprecated wesnoth.get_variable() calls 2018-05-10 19:55:31 -07:00
Celtic Minstrel
1ba783959e fixup 0539a68eb 2017-05-11 16:00:52 -04:00
Celtic Minstrel
0539a68eb4 Migrate ai_helper.LS_random_hex to location_set:random 2017-05-10 17:40:21 -04:00
Celtic Minstrel
9b635994e1 Add location_set.(of|to)_triples (migrated from ai_helper) 2017-05-10 17:40:14 -04:00
Celtic Minstrel
2dee1e5f96 Lua Cave Mapgen: Use stable iteration of location sets 2016-10-27 14:20:42 -04:00
Celtic Minstrel
46e31cb462 Refactor Lua cave map generator
This accomplishes two main things:
- Creates a mapgen_helper.lua module containing functions useful for Lua map generators
- Paves the way for allowing the cave generator to produce scenarios and accept user configuration
2016-10-27 14:20:18 -04:00
Chris Beck
d31253f585 bugfix: invalid variable reference
variable v does not exist... the function is not commented so I
can't be sure of the intention, but the most backwards-compatible
fix is to not pass argument v, so that it will be nil as before.

this bug was revealed by enabling lua "strict mode"
2014-11-22 16:43:27 -05:00
Chris Beck
9fb47d7f1f negate the output of location_set:empty, fixing logic error and
ensuring that a boolean value is returned
2014-02-16 19:36:09 -05:00
jleldridge
4e6ecc81ce Fixed location_set().of_pairs() syntax to follow conventions. 2013-05-16 15:52:34 -04:00
jleldridge
0d8bd9fe03 Changed location_set.of_pairs() to work with different formats of x,y coordinate tables. 2013-05-16 00:21:40 -04:00
Anonymissimus
febb9da2ca Reverted 2011-09-21T21:44:58Z!thonsew@yahoo.com and 2011-09-20T21:21:21Z!thonsew@yahoo.com.
thonsew: The lua interface is not your playground. This is not the way
I want the lua files or its C++ interface to be modified. You are
invited to talk with me on IRC.

some of the main reasons:

-Your revisions contain lots of unneccessary changes, some of which
 break existing lua or wml without a reason. Do you ever look at the
 diffs?

-Your revisions pack a lot of unrelated stuff together into one.

2011-09-21T21:44:58Z!thonsew@yahoo.com makes sense in some parts and is what you should have
done in the first place.
2011-09-22 17:09:50 +00:00
Thonsew
e59dc97260 Added support for t_token to lua code.
1. Created a t_token metatable along with support code for indexing,
garbage collection, tostring, tonumber, comparison and concatenation.

2. Adjusted string comparison and lookup in lua code to work with
either t_token or string.

This addresses in part bug #18631, bug #18695.  Before this lua was
treating all t_token as either tstrings or strings.
2011-09-20 21:21:21 +00:00
Guillaume Melquiond
7e43fc0e3f Added a location_set:filter method. 2010-10-31 17:24:33 +00:00
Lari Nieminen
3bd47bcb15 This seems to fix a bug occurring when using of_wml_var.
Should be proofread by someone who knows what they're doing.
2010-10-26 14:42:22 +00:00
Guillaume Melquiond
930cd8fe63 Added location_set:size method. 2010-10-03 13:30:34 +00:00
Guillaume Melquiond
aa7e3e47d9 Added Lua library for location sets and maps. 2010-10-03 06:37:24 +00:00