Celtic Minstrel
a5b613ba4c
Lua: Allow specifying whether to fire event in put_unit even without an explicit location, and make it fire the event by default
...
Addresses #1817
2017-06-25 11:40:27 -04:00
Celtic Minstrel
6a091f0851
Lua: Support the extra wesnoth.match_unit arguments also in wesnoth.get_units
2017-06-25 00:37:53 -04:00
Celtic Minstrel
93b9a4f80e
Expose the location filter reference unit to the Lua API
2017-06-25 00:37:51 -04:00
Celtic Minstrel
6234d2f6f6
Add error message if something other than a table is passed to animator:add as the options
2017-05-28 18:20:15 -04:00
Celtic Minstrel
8febe037db
Promote wesnoth.game_config to lua_kernel_base
2017-05-23 23:55:40 -04:00
Celtic Minstrel
39dad27260
[modify_side][ai] with ai_algorithm now replaces the AI ( fixes #1216 )
2017-05-22 14:39:35 -04:00
Celtic Minstrel
c0e6940834
Prevent [modify_ai][ai] from cluttering AI config with empty stages
2017-05-22 00:34:08 -04:00
Charles Dang
57d825d114
Avoid some temporary tuples
...
[ci skip]
2017-05-22 14:06:05 +11:00
Celtic Minstrel
96ca0b026e
Replace config_of with new variadic config constructor
2017-05-21 16:27:46 -04:00
Charles Dang
79ffbbe9b4
Game Events: include manager in pump header to avoid having its include in so many places
2017-05-21 07:52:42 +11:00
Celtic Minstrel
cee3698fae
[sound_source] now starts playing the sound immediately
2017-05-11 18:57:55 -04:00
Celtic Minstrel
263aadcaa0
Lua: Allow clearing unit and side variables
2017-05-11 16:00:53 -04:00
Celtic Minstrel
e2ebfa31f6
Add an extra error-checking case for targets in Lua animators
2017-05-10 19:02:59 -04:00
Celtic Minstrel
6000d644d8
Add a second version of luaW_type_error
...
This can make some Lua error messages more helpful.
Unfortunately it's rather difficult to deploy, as most
calls to luaW_type_error are within "check" functions,
where the info needed for the new version is unknown.
2017-05-10 17:40:12 -04:00
Celtic Minstrel
04670c313b
Some additions to wesnoth.simulate_combat output
2017-05-07 12:47:53 -04:00
Celtic Minstrel
a5bd278cf2
fixup! Move wesnoth.get_time_stamp and wesnoth.get_image_size to lua_kernel_base
2017-05-05 17:56:53 -04:00
Celtic Minstrel
3bbb83357e
Move wesnoth.get_time_stamp and wesnoth.get_image_size to lua_kernel_base
2017-05-05 15:24:56 -04:00
Charles Dang
e4f03fe459
Moved all preferences source files into a single folder
2017-05-04 11:04:19 +11:00
Charles Dang
e0f3ce428d
Cleaned up unnecessary uses of get()->
...
This applies both to uses of smart pointers and the SDL_Surface wrapper (surface).
2017-04-30 23:47:34 +11:00
gfgtdf
12f9215da2
deployed some range for loops on gameboard::teams() ( #1007 )
...
deployed some range for loops on gameboard::teams()
2017-04-29 16:08:45 +02:00
Celtic Minstrel
5b4dbe1c61
Port [volume] to Lua
...
This also fixes [volume] considering 100% to be an invalid volume.
2017-04-27 17:09:05 -04: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
Celtic Minstrel
339587ee2b
Properly port [kill] to Lua
2017-04-27 16:55:38 -04:00
Charles Dang
5d6a37f990
Even more deployment of display_context::get_team
2017-04-26 10:23:19 +11:00
Charles Dang
af3a7a7734
Cleaned up remaining usecases of teams()
...
* Cleaned up a few ternary cases (avoid ternary syntax in operator[])
* Made game_lua_kernel::board public so a helper function could use it to access get_team()
* Fixes up 8320dd3
2017-04-26 09:25:59 +11:00
Charles Dang
8320dd349e
This was supposed to be with 06199650e
...
[ci skip]
2017-04-26 05:14:50 +11:00
Charles Dang
921bbc2d7d
Forward get_team call to a display_context derivative when necessary
2017-04-26 03:00:10 +11:00
Charles Dang
0031f9a45a
Don't copy-initialize containers
2017-04-25 04:30:49 +11:00
Celtic Minstrel
66f4c2ba3d
Add WML tag to change the map zoom level
2017-04-24 12:04:23 -04:00
Celtic Minstrel
1fb4d36ef8
Enable scenarios to change theme in an event
2017-04-24 11:01:12 -04:00
Celtic Minstrel
58ee985c5b
Lua: Add float mutator macros and some fixups/cleanup to other mutator/accessor macros
...
- Enclose all macro arguments in parentheses, except those meant to be statements
- Use pushlstring to allow strings with nulls
- New float mutators
2017-04-24 11:01:07 -04:00
Charles Dang
323516d3d8
Avoid copy initialization of arrays (use direct instead)
2017-04-21 03:10:07 +11:00
Charles Dang
9f5d312bfe
Fixup 8923978
2017-04-20 08:05:36 +11:00
Celtic Minstrel
8923978c70
Squash some MSVC warnings
2017-04-19 04:08:10 -04:00
Charles Dang
6addb2e12f
Cleaned up some comments and an include related to intrusive_ptr
...
The include in attack_type is no longer needed since I changed its management to use shared_ptrs
2017-04-15 15:34:36 +11:00
gfgtdf
e4926328f9
use std::scoped_ptr where appropriate 1
2017-04-14 13:48:35 +02:00
Celtic Minstrel
fcc0da5bd4
Some cleanup of attack_type usage for enable_shared_from_this safety
...
- Call shared_from_this() instead of taking the address
- Don't use raw pointers to attack_type
- Change some cases of attack_type objects that weren't owned by a shared_ptr
(either owned by another object or allocated directly on the stack)
List of files that currently call attack_type constructors:
- game_events/conditional_wml.cpp
- gui/dialogs/unit_attack.cpp
- scripting/lua_unit_attacks.cpp
- units/types.cpp
- units/unit.cpp
Each of these has been individually considered and made safe for use with
enable_shared_from_this. (Most of them already were safe.)
2017-04-11 17:15:38 -04:00
Charles Dang
0c3260dc05
Finished deploying std::map::emplace (cont. e1a579da51
)
...
Apparently, the last time I did this I only grepped for `insert(std::pair` not `insert(std::make_pair`. Oversight, much?
2017-04-12 07:51:42 +11:00
Celtic Minstrel
7835e05d93
Fix [animate_unit][facing] not working.
...
This also tweaks the animator:add() API, replacing the facing key
with a target key and requiring it to be an adjacent location.
2017-04-09 01:29:10 -04:00
Celtic Minstrel
ac6a62046e
Add wesnoth.log_replay which adds stuff to the saved game in [upload_log]
2017-04-08 20:20:31 -04:00
Celtic Minstrel
e78f499a1c
Fix [animate_unit]text= rejecting translatable strings (GNA25625)
2017-03-26 11:15:12 +11:00
gfgtdf
cbd3c2644c
add lua end_music setter/getter
...
this also refactors some play_controller members and moves them
to game_data
this also adds a scenario_id getter in lua.
2017-03-23 18:08:16 +01:00
Celtic Minstrel
16df1f3c43
wesnoth.create_animator: Set standing right after animation completed rather than at finalization
2017-03-23 12:44:28 -04:00
Celtic Minstrel
c3e0ce4745
Fixup wesnoth.get_end_level_data
2017-03-23 12:43:25 -04:00
gfgtdf
bd6a0c69d1
replace wesnoth.set_next_scenario() with wesnoth.game_config.next_scenario setter/getter
2017-03-20 02:48:03 +01:00
Celtic Minstrel
b4dc11ce36
Belated 2017 copyright update
2017-03-19 10:05:38 -04:00
Celtic Minstrel
f0c127915b
Allow wesnoth.select_unit() to deselect the unit
...
Since @vultraz recently decided to remove this feature from wesnoth.deselect_hex.
2017-03-18 17:35:51 +11:00
Charles Dang
0becb66a8c
Don't call select_hex when deselecting a hex (fixes bug #24712 )
2017-03-14 12:36:35 +11:00
Celtic Minstrel
2069449805
Fix inverted condition in Lua shroud op API
2017-03-10 18:09:39 -05:00