[wesnoth-commits] [wesnoth/wesnoth] 800c94: ai_helper.has_ability: restore previous functionality

mattsc noreply at github.com
Thu Jan 2 04:51:27 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 800c94322148aab37b4dd63edb3c0fca05525dc0
      https://github.com/wesnoth/wesnoth/commit/800c94322148aab37b4dd63edb3c0fca05525dc0
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2020-01-01 (Wed, 01 Jan 2020)

  Changed paths:
    M data/ai/lua/ai_helper.lua

  Log Message:
  -----------
  ai_helper.has_ability: restore previous functionality

Before the recent change, the ability type (tag name) was checked. It then got changed to ability id. This commit changes it back to the old behavior.

For the record, there are situation when either the id or the type is needed. In addition, one sometimes wants to check wheter the ability is active (or will be active). Thus, no matter how this is done, neither will serve all purposes and sometimes other functions/functionality should be used. This commit does, however, restore the previous behavior and thus preserves backward compatibilty.


  Commit: 5f05ae31d62c88fed323db4786ccd5dc58218d54
      https://github.com/wesnoth/wesnoth/commit/5f05ae31d62c88fed323db4786ccd5dc58218d54
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2020-01-01 (Wed, 01 Jan 2020)

  Changed paths:
    M data/ai/lua/ai_helper.lua
    M data/ai/micro_ais/cas/ca_bottleneck_move.lua

  Log Message:
  -----------
  ai_helper: deprecate has_ability()


Compare: https://github.com/wesnoth/wesnoth/compare/a7aa08c90ada...5f05ae31d62c



More information about the Commits mailing list