Commit graph

10 commits

Author SHA1 Message Date
Severin Glöckner
a748126b75 Lua: don't trigger unit placed events by WML tags
If the last argument to the C++ function ( game_lua_kernel::intf_put_unit )
is false, event's won't be fired.

closes #5158
2022-10-26 23:32:10 -05:00
Celtic Minstrel
7e234f8833 Replace deprecated usages of on_event() 2022-07-18 21:56:42 -04:00
Celtic Minstrel
0ee05637d9 Lua: Replace uses of deprecated (moved) interface functions 2019-11-16 12:35:20 -05:00
Celtic Minstrel
977f05d77f Lua: Replace uses of deprecated (moved) unit functions
Also backtracked the removal of wesnoth.get_recall_units, which is now available as wesnoth.units.find_on_recall - it's just more convenient than passing x=recall to wesnoth.units.find
2019-11-15 22:39:08 -05:00
Charles Dang
0103959c36 Cleaned up deprecated API usage in core Lua
[ci skip]
2018-03-13 16:55:36 +11:00
Charles Dang
471c9e876a Addressed a large chunk of the whitespace issues from #2613
[ci skip]
2018-03-09 11:37:00 +11:00
gfgtdf
fcf8272abf
fix bug in feeding code
wesnoth.current.event_context might not contain all information if the die event was triggered by wml ([fire_event]), this made wesnoth.get_unit error (invalid argument)
2017-11-11 13:50:35 +01:00
Celtic Minstrel
8d4cf3cf62 Shorten requires where possible 2017-05-03 02:42:25 -04:00
gfgtdf
2fa8bc0350 cleanup lua feeding implementation. 2016-05-22 19:41:54 +02:00
gfgtdf
2ba7ad5c43 move feedung event to lua
this has 2 advantages:
1) It decreased savefile size since the event is no longer sotred in
each savefile.
2) The ABILITY_FEEDING no longer assumes its used from within
[abilities]
2016-05-20 14:42:49 +02:00