[wesnoth-commits] [wesnoth/wesnoth] 152eb3: Goto/Assassin MAIs: fix AIs not always working wit...

GitHub noreply at github.com
Mon Dec 31 00:37:34 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 152eb37aecb9c978df582876cf2b0ff8ceccab8c
      https://github.com/wesnoth/wesnoth/commit/152eb37aecb9c978df582876cf2b0ff8ceccab8c
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-12-30 (Sun, 30 Dec 2018)

  Changed paths:
    M changelog.md
    M data/ai/micro_ais/cas/ca_assassin_move.lua
    M data/ai/micro_ais/cas/ca_goto.lua

  Log Message:
  -----------
  Goto/Assassin MAIs: fix AIs not always working with tunnels

The old syntax for using a custom cost function ignored teleports/tunnels. Using calculate= in the path options table allows also setting the ignore_teleports option (but in this syntax it defaults to 'false', so it does not need to be done specifically).


  Commit: 02122f2eaef285c5f48ae6476b1869a3ae15a145
      https://github.com/wesnoth/wesnoth/commit/02122f2eaef285c5f48ae6476b1869a3ae15a145
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-12-30 (Sun, 30 Dec 2018)

  Changed paths:
    M src/scripting/game_lua_kernel.cpp

  Log Message:
  -----------
  wesnoth.find_path: deprecate old syntax for custom cost functions

The new syntax (using calculate= in the path options table) allows simultaneously setting the other path options, while there is no way to do so with the old syntax (passing the cost function as the last argument instead of the path options table).

We also remove the line allowing for an additional boolean argument to set ignore_teleports=. It does not make sense to single out this option from the others. Furthermore, this line makes it default to the opposite of the (more intuitive) default of the new syntax. For the record, this argument has not been in any released version yet and is not yet documented on the wiki.


Compare: https://github.com/wesnoth/wesnoth/compare/7875f4fc0824...02122f2eaef2
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the Commits mailing list