Commit graph

30 commits

Author SHA1 Message Date
Charles Dang
f23305f7e2 Formatting cleanup: T const& -> const T& 2018-01-23 01:26:23 +11:00
Gregory A Lundberg
b5f76eff79
Bump copyright to 2018 2018-01-19 00:02:20 -06:00
Celtic Minstrel
6906ced4e7 Properly port [music] to Lua 2017-04-27 17:09:03 -04:00
Celtic Minstrel
0a591cd424 Properly port [scroll] to Lua 2017-04-27 17:05:53 -04:00
Charles Dang
323516d3d8 Avoid copy initialization of arrays (use direct instead) 2017-04-21 03:10:07 +11:00
Celtic Minstrel
b4dc11ce36 Belated 2017 copyright update 2017-03-19 10:05:38 -04:00
Celtic Minstrel
e0d07e854e Properly port [modify_side] to Lua 2016-12-11 18:07:36 -05:00
gfgtdf
0383e713ec fix lua side:matches always iterating over all units on the map. 2016-12-11 14:00:58 +01:00
Celtic Minstrel
ef1d052136 Add Lua API for fetching net income and related values 2016-12-09 20:03:03 -05:00
Charles Dang
8c92a9ee8e Formatting cleanup: moved const qualifiers before type names 2016-10-31 01:04:18 +11:00
Celtic Minstrel
56a0f369cb Add matches method to team metatable 2016-09-11 17:05:53 -04:00
Celtic Minstrel
36bced059b Make Lua team references comparable with == 2016-08-28 00:24:19 -04:00
Spixi
a8f625fc8a Make the multiplayer faction accessible via Lua and simplified Hornshark
Island
2016-05-22 00:51:09 +02:00
Celtic Minstrel
ca382018b7 BOOST_FOREACH -> range for 2016-04-02 09:38:29 -04:00
Celtic Minstrel
3ac7f8d970 NULL -> nullptr
A few cases of NULL were missed, since changing them led to errors
(Mainly instances where it was passed to a boost::function)
2016-03-31 00:42:38 -04:00
gfgtdf
fa056da7a3 make 'persistent' side attribute modifable by lua. 2016-01-16 20:50:15 +01:00
Chris Beck
ba51524f6e update copyright to year 2016
using this shell script:

find src -type f -print0 | xargs -0 sed -i "s|Copyright (C) \([[:digit:]]*\)\([ ]*\)-\([ ]*\)2015|Copyright (C) \1\2-\32016|g"
2016-01-02 23:59:31 -05:00
gfgtdf
7f13156c28 Revert "Rename team_name/user_team_name to team_id/team_name (old syntax still valid)"
And related commits.

This reverts commit 545253ec2b.
This reverts commit 1215f65eb8.
This reverts commit 11664f4024.
This reverts commit e948df3424.
This reverts commit 3781e7839f.

This commits were reverted to exclude them from wesnoth 1.13.2 release because:
1) We are still unsure about the best name oftthese attributes
2) This breaks multiple campaigns, including LoW and the tutorial.
Feel free to revert this revert after 1.13.2 when thse issues can be solved..
2015-12-10 21:29:52 +01:00
gfgtdf
31ae13da1e remove name= attribute in [side]
this was only used in debug messages.
2015-12-08 01:13:16 +01:00
gfgtdf
d755d3b820 add [endlevel] bonus=number
instead of bonus=yes/no you can also pass a number, so bonus=0.5 will
give you only half of the bonus gold.
2015-11-30 02:49:08 +01:00
gfgtdf
91943451c7 move most of [endlevel] implementation to lua
as a side effect we get read/write fields
side.carryover_bonus/carryover_add/carryover_percentage in lua sides.
2015-11-30 02:49:01 +01:00
gfgtdf
44179a2cbb add lua getter for side save_id 2015-11-29 17:18:00 +01:00
Charles Dang
3781e7839f Rename team_name/user_team_name to team_id/team_name (old syntax still valid) 2015-10-26 00:44:28 +11:00
gfgtdf
49219ad0fd add team share_vision=all/shroud/none
previously there were 2 flags share_view=yes/no and share_maps=yes/no,
but only 3 possible settings (share both, share none, only share shroud)
(so share_maps= was ignored if share_viewv=yes). This made the wml code and
the c++ code needlessly complicated.

Now these 2 flags are replaced by share_vision=all/shroud/none
2015-07-23 14:00:08 +02:00
gfgtdf
08e3862efa add to_string method to MAKE_ENUM
structs generated by the MAKE_ENUM makro now have a .to_string() method.
2015-06-04 21:30:51 +02:00
gfgtdf
da1c8bf60e rewrite MAKE_ENUM macro
Instead of creating an enum, the MAKE_ENUM macro now creates a struct
which holds an enum and provides functions for enum <-> string
conversion.

This has multiple advantages:
1) We don't need MAKE_ENUM_STREAM_OPS anymore.
2) The generated struct is much easier to use in templates
3) We don't allow implicit to int conversions anymore.
4) The enum values are now declared inside the structs scope.
2015-06-04 02:08:02 +02:00
gfgtdf
b892e16b94 include lua/... files after others
headers from lua/..  contain macros that can break other headers in
wesnoth, boost or other libraries.

In this case it was a macro
#define cast(t, exp) ((t)(exp))
defined in lua/llimits.h that broke a boost header.
2015-03-27 00:54:22 +01:00
Ignacio R. Morelle
57ae45387a New Year copyright update 2015-01-01 19:07:35 -03:00
Chris Beck
1f124ff2ee lua: give more specific errors for "unknown modifiable property" 2014-12-29 23:17:13 -05:00
Chris Beck
1969267d19 lua: move code related to get_sides metatable to its own file 2014-12-26 02:41:42 -05:00