[wesnoth-commits] [wesnoth/wesnoth] 359e4c: Change [filter_weapon] to not depend on attack_typ...

Steve Cotton noreply at github.com
Thu Feb 10 15:35:43 UTC 2022


  Branch: refs/heads/1.16
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 359e4c8270d3448a79021bb45a34b870bdefafa2
      https://github.com/wesnoth/wesnoth/commit/359e4c8270d3448a79021bb45a34b870bdefafa2
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2022-02-10 (Thu, 10 Feb 2022)

  Changed paths:
    M src/formula/callable_objects.cpp

  Log Message:
  -----------
  Change [filter_weapon] to not depend on attack_type::weapon_specials

This changes it to use the function that attack_type::get_value already uses,
thus removing a call to attack_type::weapon_specials. The latter is being
refactored by newfrenchy83 (and that refactor is expected to be backported as
it allows UI improvements).

This code is part of the object used for [filter_weapon]formula=, however the
implementation of that filter creates exactly one attack_type_callable, so
doesn't trigger this code. For testing I called it via a debugger.

(cherry picked from commit 6ccac5a5e8ff75303c9190c0da60580925cb32c0)





More information about the Commits mailing list