[wesnoth-commits] [wesnoth/wesnoth] 9eebf1: Lua API: Fix crash if passing an out-of-bounds sid...

Celtic Minstrel noreply at github.com
Tue Jul 6 06:10:59 UTC 2021


  Branch: refs/heads/celmin
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 9eebf1d7a88045bcf7fb56e409e430c9b35593e3
      https://github.com/wesnoth/wesnoth/commit/9eebf1d7a88045bcf7fb56e409e430c9b35593e3
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-07-06 (Tue, 06 Jul 2021)

  Changed paths:
    M src/scripting/game_lua_kernel.cpp

  Log Message:
  -----------
  Lua API: Fix crash if passing an out-of-bounds side to wesnoth.interface.end_turn


  Commit: b6760e37a6369591e4bf142bd7052a87b5b1dd4d
      https://github.com/wesnoth/wesnoth/commit/b6760e37a6369591e4bf142bd7052a87b5b1dd4d
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-07-06 (Tue, 06 Jul 2021)

  Changed paths:
    M src/display.hpp
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/game_lua_kernel.hpp

  Log Message:
  -----------
  Lua API: Add function to get the current color adjust


  Commit: 954a51247dad56d11d41fdeedbab4ca593763790
      https://github.com/wesnoth/wesnoth/commit/954a51247dad56d11d41fdeedbab4ca593763790
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-07-06 (Tue, 06 Jul 2021)

  Changed paths:
    M data/lua/core/wml.lua
    M src/scripting/lua_common.cpp
    M src/scripting/lua_kernel_base.cpp

  Log Message:
  -----------
  Lua API: Use the named tuple idiom for WML tags

Instead of this:

for i,t in ipairs(cfg) do
  if t[1] == 'foo' then
    do_something(t[2])
  end
end

You can now write this:

for i,t in ipairs(cfg) do
  if t.tag == 'foo' then
    do_something(t.value)
  end
end


  Commit: 8bede5679389b9e4d3e7a073136ab13d5c9e824e
      https://github.com/wesnoth/wesnoth/commit/8bede5679389b9e4d3e7a073136ab13d5c9e824e
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-07-06 (Tue, 06 Jul 2021)

  Changed paths:
    M data/lua/core/sides.lua
    M data/lua/helper.lua

  Log Message:
  -----------
  Lua API: Add wesnoth.sides.iter

This replaces both helper.get_sides and helper.all_teams


  Commit: 46d353039fa46a21785252b4d32c2018239c95a4
      https://github.com/wesnoth/wesnoth/commit/46d353039fa46a21785252b4d32c2018239c95a4
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-07-06 (Tue, 06 Jul 2021)

  Changed paths:
    M src/team.hpp

  Log Message:
  -----------
  Lua API: Fix side.side_name = side.side_name changing the side name

Addresses #4994


  Commit: c55373d79bce08decdcbf7ac21c84de0c4f79fce
      https://github.com/wesnoth/wesnoth/commit/c55373d79bce08decdcbf7ac21c84de0c4f79fce
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-07-06 (Tue, 06 Jul 2021)

  Changed paths:
    M data/lua/core/map.lua
    M data/lua/helper.lua

  Log Message:
  -----------
  Lua API: Add wesnoth.map.iter_adjacent

This replaces helper.adjacent_tiles


  Commit: a5b5f78663296bb13482a446115bc54fb53006f3
      https://github.com/wesnoth/wesnoth/commit/a5b5f78663296bb13482a446115bc54fb53006f3
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-07-06 (Tue, 06 Jul 2021)

  Changed paths:
    M data/lua/core/wml.lua
    M data/lua/helper.lua

  Log Message:
  -----------
  Lua API: Deprecate helper.set_wml_action_metatable

wml.fire now supports the same syntax - both of the following work:

- wml.fire("message", {message = "Hello World"})
- wml.fire.message{message = "Hello World"}


  Commit: 8e816598e9a01d1dabec68cb04d0d2a888654fa5
      https://github.com/wesnoth/wesnoth/commit/8e816598e9a01d1dabec68cb04d0d2a888654fa5
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-07-06 (Tue, 06 Jul 2021)

  Changed paths:
    M data/lua/helper.lua

  Log Message:
  -----------
  Lua API: Deprecate the helper.lua module itself


  Commit: 4df359836dd04c6cf861778a888188adbce0c1e0
      https://github.com/wesnoth/wesnoth/commit/4df359836dd04c6cf861778a888188adbce0c1e0
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-07-06 (Tue, 06 Jul 2021)

  Changed paths:
    M data/ai/lua/ai_helper.lua
    M data/ai/lua/battle_calcs.lua
    M data/ai/lua/ca_high_xp_attack.lua
    M data/ai/lua/ca_move_to_any_enemy.lua
    M data/ai/lua/retreat.lua
    M data/ai/micro_ais/cas/ca_assassin_move.lua
    M data/ai/micro_ais/cas/ca_big_animals.lua
    M data/ai/micro_ais/cas/ca_bottleneck_move.lua
    M data/ai/micro_ais/cas/ca_coward.lua
    M data/ai/micro_ais/cas/ca_fast_combat_leader.lua
    M data/ai/micro_ais/cas/ca_goto.lua
    M data/ai/micro_ais/cas/ca_herding_f_herding_area.lua
    M data/ai/micro_ais/cas/ca_herding_sheep_move.lua
    M data/ai/micro_ais/cas/ca_hunter.lua
    M data/ai/micro_ais/cas/ca_messenger_attack.lua
    M data/ai/micro_ais/cas/ca_recruit_random.lua
    M data/ai/micro_ais/cas/ca_stationed_guardian.lua
    M data/ai/micro_ais/cas/ca_wolves_multipacks_attack.lua
    M data/ai/micro_ais/cas/ca_zone_guardian.lua
    M data/ai/micro_ais/engines/priority_target_engine.lua
    M data/campaigns/Delfadors_Memoirs/utils/sides.cfg
    M data/campaigns/Eastern_Invasion/lua/bandits.lua
    M data/campaigns/Secrets_of_the_Ancients/utils/zombie_recruit_dialog.lua
    M data/campaigns/Son_Of_The_Black_Eye/ai/ca_transport_S6.lua
    M data/campaigns/The_Hammer_of_Thursagan/lua/spawns.lua
    M data/campaigns/The_Hammer_of_Thursagan/scenarios/05_Fear.cfg
    M data/campaigns/World_Conquest/lua/game_mechanics/artifacts.lua
    M data/campaigns/World_Conquest/lua/game_mechanics/bonus.lua
    M data/campaigns/World_Conquest/lua/game_mechanics/effects.lua
    M data/campaigns/World_Conquest/lua/game_mechanics/heroes.lua
    M data/campaigns/World_Conquest/lua/map/main.lua
    M data/campaigns/World_Conquest/lua/map/scenario_utils/side_definitions.lua
    M data/lua/wml-tags.lua
    M data/lua/wml/animate_unit.lua
    M data/lua/wml/harm_unit.lua
    M data/lua/wml/kill.lua
    M data/lua/wml/store_reachable_locations.lua
    M data/test/scenarios/test_require.cfg

  Log Message:
  -----------
  Lua: Update all mainline references to the helper module


  Commit: 114a67b29ea7eb53500933beb2d7b3a34b80340b
      https://github.com/wesnoth/wesnoth/commit/114a67b29ea7eb53500933beb2d7b3a34b80340b
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-07-06 (Tue, 06 Jul 2021)

  Changed paths:
    M src/scripting/game_lua_kernel.cpp

  Log Message:
  -----------
  Lua API: Fix campaign end text being untranslatable

Fixes #5928


  Commit: 44e1d426a909fc74c41ed777f537961b3e73da6c
      https://github.com/wesnoth/wesnoth/commit/44e1d426a909fc74c41ed777f537961b3e73da6c
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-07-06 (Tue, 06 Jul 2021)

  Changed paths:
    M data/lua/core/map.lua
    M data/lua/core/sides.lua

  Log Message:
  -----------
  fix whitespace


Compare: https://github.com/wesnoth/wesnoth/compare/10c4870892a1...44e1d426a909



More information about the Commits mailing list