Add SSF support along the way. No deprecation for default side=1 needed,
since if left empty, an array with all starting locations is created,
side 1 being the first element and $array[0].something is the same as
$array.something.
(I used the same trick for [store_side] already.)
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.
This fixes all of the lua errors in wesnoth -t. This does not fix all
of the errors in Anonymissimus' multiplayer add-on, which are due to
references leaking through the arbitrary code hole in wml-tags.lua:250
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.
...t_token in place of std::string. t_token compares, copies, copy
constructs and hashes in 1 operation instead of proportional to the
length of the string.
since when running into this rare exception (if the SLF doesn't
matching anything) it could be hard to figure out what happens.
[remove_item] does nothing in this case now.
an array is created is several sides match
no backwardscompat-hack or deprecation needed since $var. ... is the
same as $var[0]. ... ,
clearing a container variable is the same as if it was an array and
side=1 automatically matches first for an empty filter :)
...to return wesnoth.sides[side_number], side_number
TBH, I dont't fully understand the syntax, especially the one before
this, and it seems silene did experiment with it too...but this works
now at least.
Create an accessor for the help systems known units list for the lua
coder. (used by allow_recruit)
Added an accessor for the new unit attribute "extra_recruit" for the lua coder.
Implemented [allow_extra_recruit], [dissallow_extra_recruit] and
[set_extra_recruit] by lua defined wml tags.
AI awareness is still to be done, the code locations are marked TODO
in unit.cpp.
...allow_recruit and set_recruit this way
The [filter_side] tag should never have been added to allow_recruit
and I included disallow- and set_recruit only since allow_recruit was
already changed. These tags will be much nicer with an inline ssf. I'm
pretending now that [filter_side] was never added and hope nobody uses
it until the next release...the whole thing isn't yet in the changelog
and not fully in the wiki anyway...
...to deprecate side-taking wml action tags with message "empty side=
is deprecated" with the goal of an inline ssf, which can only be added
support for once the deprecation period is over
...in [teleport], [move_unit] and [unstore_unit] to check_passability=
to get rid of the confusing negation as long as they're not used
yet. Adjusted default values accordingly. Breaks backwards
compatibility in case of [teleport], there are however no usages of
the key in mainline wml.