[Commits] [wesnoth/wesnoth] 26a263: Make the formula and Lua views of a unit coincide ...
GitHub
noreply at github.com
Fri Mar 18 16:52:09 UTC 2016
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 26a2638f2cce0fd66dddc5b26eb9707c06c99c7d
https://github.com/wesnoth/wesnoth/commit/26a2638f2cce0fd66dddc5b26eb9707c06c99c7d
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M data/test/scenarios/filter_this_unit.cfg
M src/callable_objects.cpp
M src/scripting/game_lua_kernel.cpp
M wml_test_schedule
Log Message:
-----------
Make the formula and Lua views of a unit coincide more closely
Several keys were either missing or misnamed in the formula view.
These have been changed to match the Lua and WML names for the keys.
This affects canrecruit, moves, and max_moves, as well as status.
In addition, a large number of keys were missing entirely from the formula view.
Most of these keys have now been added and can be accessed from formulas.
A few that have little use in filters (such as image_mods or profile) are still missing.
The Lua view missed a few keys that the formula view did provide.
Although these could in principle have been obtained by using the special __cfg key,
they have now been added to the Lua view anyway.
Commit: 240b5f61a7c6be0f886fefb5e7b6af0348fa8fb2
https://github.com/wesnoth/wesnoth/commit/240b5f61a7c6be0f886fefb5e7b6af0348fa8fb2
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M data/test/scenarios/filter_this_unit.cfg
M src/unit_formula_manager.cpp
M wml_test_schedule
Log Message:
-----------
Output formula errors in unit filters to WML error stream
(And consider them to match no units)
Commit: 03bbc793678f38fbd1cd4974da6375eadf92e7a7
https://github.com/wesnoth/wesnoth/commit/03bbc793678f38fbd1cd4974da6375eadf92e7a7
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M data/gui/default/widget/toggle_button_orb.cfg
M src/formula.cpp
Log Message:
-----------
Formula engine: change undocumented string substitution syntax
It used to use {}, which gets caught by the preprocessor.
Now it uses [] instead.
Commit: 1ae426c51c6038013b8d9ba491337816d5541fd0
https://github.com/wesnoth/wesnoth/commit/1ae426c51c6038013b8d9ba491337816d5541fd0
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula.cpp
M src/formula_tokenizer.cpp
M src/variant.cpp
M src/variant.hpp
Log Message:
-----------
Formula engine: new concatenate and range operators
str .. str = concatenation
list .. list = concatenation
int ~ int = range (as a list)
Commit: 0674f2a8443a32aa4344ad4f42a380216f4f1b0f
https://github.com/wesnoth/wesnoth/commit/0674f2a8443a32aa4344ad4f42a380216f4f1b0f
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula.cpp
M src/formula_tokenizer.cpp
Log Message:
-----------
Formula engine: support wfl/wflend instead of fai/faiend
Commit: 279ced9b5545bdeb9e3bbf509c5252baeb0c3ce8
https://github.com/wesnoth/wesnoth/commit/279ced9b5545bdeb9e3bbf509c5252baeb0c3ce8
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/variant.cpp
M src/variant.hpp
Log Message:
-----------
Formula engine: allow lists to be indexed by a list
This produces a slice of the original list
Commit: e4b944d83be7fe133270ec4bd247477cc0336512
https://github.com/wesnoth/wesnoth/commit/e4b944d83be7fe133270ec4bd247477cc0336512
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/variant.cpp
M src/variant.hpp
Log Message:
-----------
Make variant iterator bidirectional and stdlib compatible
Commit: 1c9eb0cdbb7e158cc2ad9bb76c0c6daadaf17bce
https://github.com/wesnoth/wesnoth/commit/1c9eb0cdbb7e158cc2ad9bb76c0c6daadaf17bce
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
Log Message:
-----------
Formula engine: add tan and tail functions, extra argument to head function
Commit: 6490b535a3e2c3be10e1815a24152a4d10e98bed
https://github.com/wesnoth/wesnoth/commit/6490b535a3e2c3be10e1815a24152a4d10e98bed
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/ai/formula/ai.cpp
M src/menu_events.cpp
M src/variant.cpp
Log Message:
-----------
Tweak output of formula evaluation command prompt
Commit: ad6528d13cad19bcaf67d3dbba234e9203f2e770
https://github.com/wesnoth/wesnoth/commit/ad6528d13cad19bcaf67d3dbba234e9203f2e770
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula.cpp
M src/formula.hpp
Log Message:
-----------
Formula engine: Support function definitions everywhere
This constructs a temporary function symbol table (lasting only the duration of the formula)
if no symbol table was passed to the formula at construction time.
Commit: 4aa725ac29e2e22af652c8ffb9d022022dadfa13
https://github.com/wesnoth/wesnoth/commit/4aa725ac29e2e22af652c8ffb9d022022dadfa13
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula.cpp
Log Message:
-----------
Formula engine: When possible, use synced RNG for the dice roll operator
Commit: fe05f51c9e3a3346c59186991e9247242ddad589
https://github.com/wesnoth/wesnoth/commit/fe05f51c9e3a3346c59186991e9247242ddad589
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/variant.cpp
M src/variant.hpp
Log Message:
-----------
Formula engine: Fix decimal values not being convertible to integers
Commit: c1ca72f1dc2e1255877f89100783c198866281d9
https://github.com/wesnoth/wesnoth/commit/c1ca72f1dc2e1255877f89100783c198866281d9
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
M src/variant.cpp
Log Message:
-----------
Formula engine: fix abs() and modulus not working on decimals
Commit: 59dd9cc6af93431dd8e395a35eceecdaea0a3919
https://github.com/wesnoth/wesnoth/commit/59dd9cc6af93431dd8e395a35eceecdaea0a3919
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
Log Message:
-----------
Formula engine: Add optional base argument to reduce()
Commit: 2637f23afd821034b23c63498ee9789a16c2e5b7
https://github.com/wesnoth/wesnoth/commit/2637f23afd821034b23c63498ee9789a16c2e5b7
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
M src/variant.cpp
M src/variant.hpp
Log Message:
-----------
Formula engine: New function to reverse a string
Commit: 390baf7d11d0c04af64acc6ae4c449c5bbf676e8
https://github.com/wesnoth/wesnoth/commit/390baf7d11d0c04af64acc6ae4c449c5bbf676e8
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
Log Message:
-----------
Formula engine: New function to zip a list of lists
Commit: 159dbcf28e1e38aed555eadc9877bc8d055c7ad3
https://github.com/wesnoth/wesnoth/commit/159dbcf28e1e38aed555eadc9877bc8d055c7ad3
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
Log Message:
-----------
Formula engine: New take_while function
Returns all elements up to the first one failing the condition
Commit: 1cf9f616ecf1f4791e6f16f7bc68a83ea6aa9106
https://github.com/wesnoth/wesnoth/commit/1cf9f616ecf1f4791e6f16f7bc68a83ea6aa9106
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
M src/tests/test_formula_function.cpp
Log Message:
-----------
Formula engine: Substring function now accepts negative size
This results in counting backwards from the given offset.
Size of 1 and -1 have the same effect.
Commit: c589298e0f90efaae23ca72dede907a8d6ca0e48
https://github.com/wesnoth/wesnoth/commit/c589298e0f90efaae23ca72dede907a8d6ca0e48
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
Log Message:
-----------
Formula engine: Add inverse trig functions
Commit: f32b51b022191922085ea44a4cc6d1977c404d81
https://github.com/wesnoth/wesnoth/commit/f32b51b022191922085ea44a4cc6d1977c404d81
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
Log Message:
-----------
Formula engine: Add root functions
Commit: 523154f8071c1913049268777d54a49c1f79989c
https://github.com/wesnoth/wesnoth/commit/523154f8071c1913049268777d54a49c1f79989c
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
Log Message:
-----------
Formula engine: Add several more math functions
Commit: a40ffc0351b3a480ce46e84a78ad56f53298cd1b
https://github.com/wesnoth/wesnoth/commit/a40ffc0351b3a480ce46e84a78ad56f53298cd1b
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
Log Message:
-----------
Formula engine: Catch cases of NaN resulting from math functions
They are now converted to null.
Commit: 6aed9791139802c6e799bdf32417056aac709ddd
https://github.com/wesnoth/wesnoth/commit/6aed9791139802c6e799bdf32417056aac709ddd
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
Log Message:
-----------
Reformat the formula function classes
Commit: bb0d00f34864cf224fde4b29cfc214a56ce7bc86
https://github.com/wesnoth/wesnoth/commit/bb0d00f34864cf224fde4b29cfc214a56ce7bc86
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
M src/tests/test_formula_function.cpp
M src/variant.cpp
M src/variant.hpp
Log Message:
-----------
Formula engine: Fix rounding issues with math functions
Commit: b239dd5fd109a03a8b2feb4263801df3040fe7da
https://github.com/wesnoth/wesnoth/commit/b239dd5fd109a03a8b2feb4263801df3040fe7da
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula_function.cpp
Log Message:
-----------
Formula engine: New string functions find_string and replace
Commit: 38f6e8c4f127ad8b1c3ea2bbed2f05ea22578eae
https://github.com/wesnoth/wesnoth/commit/38f6e8c4f127ad8b1c3ea2bbed2f05ea22578eae
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula.cpp
M src/formula_tokenizer.cpp
M src/variant.cpp
Log Message:
-----------
Formula engine: Add string escapes mechanism
This builds on the string substitution syntax:
- [(] means an open bracket
- [)] means a close bracket
- ['] means a single quote / apostrophe
The tokenizer is now aware of string substitutions, making this possible
as well as the nesting of strings within string substitutions.
Commit: 0b84677ee91af528cffc781e58e24b32412998a1
https://github.com/wesnoth/wesnoth/commit/0b84677ee91af528cffc781e58e24b32412998a1
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/variant.cpp
Log Message:
-----------
Formula engine: Lists can be indexed with negative numbers
(this counts from the end)
Commit: a4469210d425b5e6e649d662d4272c8a6fb85604
https://github.com/wesnoth/wesnoth/commit/a4469210d425b5e6e649d662d4272c8a6fb85604
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula.cpp
Log Message:
-----------
Formula engine: fix exponentiation being left-associative
Commit: 4a3fce393a8b0eebdb426c2db12347a6884400e8
https://github.com/wesnoth/wesnoth/commit/4a3fce393a8b0eebdb426c2db12347a6884400e8
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-17 (Thu, 17 Mar 2016)
Changed paths:
M src/formula.cpp
Log Message:
-----------
Formula engine: fix index operator having lowest precedence
It now has the highest precedence
Commit: de4186c47b17ee601944c37373d03e6912aeb418
https://github.com/wesnoth/wesnoth/commit/de4186c47b17ee601944c37373d03e6912aeb418
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/formula_function.cpp
M src/variant.cpp
M src/variant.hpp
Log Message:
-----------
Formula engine: add type() function
Commit: 6da744a37a54e5043d175329aedc577bbf6f476c
https://github.com/wesnoth/wesnoth/commit/6da744a37a54e5043d175329aedc577bbf6f476c
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/formula.cpp
M src/variant.cpp
Log Message:
-----------
Formula engine: add empty map literal
Commit: b53ee994c98cfabd8ff6ff67bffb5cc79cd79d7a
https://github.com/wesnoth/wesnoth/commit/b53ee994c98cfabd8ff6ff67bffb5cc79cd79d7a
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/variant.cpp
Log Message:
-----------
Formula engine: now exponentiation returns null on NaN
Commit: e78b5d7bafc5d795431256377fbc8f6a06603599
https://github.com/wesnoth/wesnoth/commit/e78b5d7bafc5d795431256377fbc8f6a06603599
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/variant.cpp
Log Message:
-----------
Formula engine: fix comparison trying to cast everything to decimal
Now it only tries to cast to decimal if both are numbers.
Commit: f6be40bb71aff2a42acfea4950fadf97666c2384
https://github.com/wesnoth/wesnoth/commit/f6be40bb71aff2a42acfea4950fadf97666c2384
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj
M src/CMakeLists.txt
M src/SConscript
M src/formula.cpp
A src/tests/test_formula_core.cpp
M src/tests/test_formula_function.cpp
Log Message:
-----------
Transfer original formula unit tests to Boost framework
In the process, I have corrected a few tests and added a few extras
Commit: a9a29a11ccf813e210df008fcfbc7890e9da6b6b
https://github.com/wesnoth/wesnoth/commit/a9a29a11ccf813e210df008fcfbc7890e9da6b6b
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/tests/test_formula_function.cpp
Log Message:
-----------
Add a few more formula math tests
Commit: 928ccbfc06da2795a3a57eede424c0d78fead4ce
https://github.com/wesnoth/wesnoth/commit/928ccbfc06da2795a3a57eede424c0d78fead4ce
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/formula_function.cpp
M src/tests/test_formula_function.cpp
Log Message:
-----------
Formula engine: fix max() and min() not working on decimals
Commit: f0abbf1111495ae2a3f6d93150bd1dd61c9ab7ff
https://github.com/wesnoth/wesnoth/commit/f0abbf1111495ae2a3f6d93150bd1dd61c9ab7ff
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/tests/test_formula_core.cpp
Log Message:
-----------
Add a few more formula string tests
Commit: e814bb48be967c9789900ab1522adae01589691d
https://github.com/wesnoth/wesnoth/commit/e814bb48be967c9789900ab1522adae01589691d
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/formula.cpp
Log Message:
-----------
Formula engine: Allow dot notation on strings and maps
- On maps, it selects string keys that equal the identifier
- On strings, it allows character, word, or "item" indexing
Commit: 50c42caf11290f4c95909439eb3d48e2d6aa95e5
https://github.com/wesnoth/wesnoth/commit/50c42caf11290f4c95909439eb3d48e2d6aa95e5
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/formula.cpp
M src/formula_tokenizer.cpp
M src/variant.cpp
M src/variant.hpp
Log Message:
-----------
Formula engine: Add "in" operator for map/list containment
Commit: 2e412df9b94883997edf00ef7944f6351d76045c
https://github.com/wesnoth/wesnoth/commit/2e412df9b94883997edf00ef7944f6351d76045c
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/ai/formula/function_table.cpp
M src/formula_function.cpp
Log Message:
-----------
Formula_engine: make distance_between function a core function
Commit: 69024df4f53f804839db36128249fd4dd3b20075
https://github.com/wesnoth/wesnoth/commit/69024df4f53f804839db36128249fd4dd3b20075
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/formula_function.cpp
Log Message:
-----------
Formula engine: Allow two-argument if() - returns null if false
Commit: a02b1c13a1c2da2076c937516c09c9f58722b806
https://github.com/wesnoth/wesnoth/commit/a02b1c13a1c2da2076c937516c09c9f58722b806
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/formula.cpp
M src/formula_debugger.cpp
M src/formula_debugger.hpp
M src/formula_debugger_fwd.cpp
M src/formula_debugger_fwd.hpp
M src/gui/dialogs/formula_debugger.cpp
Log Message:
-----------
Formula engine: Improve debugger
- Less-than characters no longer break markup
- More debug information attached to various evaluation stages
- Fixed how some components of formulas were printed
- You can now step through the assignments in where clauses
Commit: f8476368d323b3c71a75dc4b3c55a2ac08f524c0
https://github.com/wesnoth/wesnoth/commit/f8476368d323b3c71a75dc4b3c55a2ac08f524c0
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M src/formula_function.cpp
Log Message:
-----------
Formula engine: debug_print() now shows in chat if debug mode on
Commit: 229e8881ee1759cf8d50480c56a5697f521090f5
https://github.com/wesnoth/wesnoth/commit/229e8881ee1759cf8d50480c56a5697f521090f5
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M changelog
Log Message:
-----------
Update changelog
Commit: bb510a58af3e1b01d96c0c72b87ff1d4277f59b3
https://github.com/wesnoth/wesnoth/commit/bb510a58af3e1b01d96c0c72b87ff1d4277f59b3
Author: Celtic Minstrel <CelticMinstrel at users.noreply.github.com>
Date: 2016-03-18 (Fri, 18 Mar 2016)
Changed paths:
M changelog
M data/gui/default/widget/toggle_button_orb.cfg
M data/test/scenarios/filter_this_unit.cfg
M projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj
M src/CMakeLists.txt
M src/SConscript
M src/ai/formula/ai.cpp
M src/ai/formula/function_table.cpp
M src/callable_objects.cpp
M src/formula.cpp
M src/formula.hpp
M src/formula_debugger.cpp
M src/formula_debugger.hpp
M src/formula_debugger_fwd.cpp
M src/formula_debugger_fwd.hpp
M src/formula_function.cpp
M src/formula_tokenizer.cpp
M src/gui/dialogs/formula_debugger.cpp
M src/menu_events.cpp
M src/scripting/game_lua_kernel.cpp
A src/tests/test_formula_core.cpp
M src/tests/test_formula_function.cpp
M src/unit_formula_manager.cpp
M src/variant.cpp
M src/variant.hpp
M wml_test_schedule
Log Message:
-----------
Merge pull request #624 from CelticMinstrel/lua_formula_bridge
Many new features in the formula engine
Compare: https://github.com/wesnoth/wesnoth/compare/e5b3d8139b11...bb510a58af3e
More information about the Commits
mailing list