The purpose of this is to show all potential hooks in the output, not just the hooks that are currently assigned.
This alse adds an __index metamethod that returns no-op versions of each callback, so that the __dir output correctly shows them as functions.
This covers both wesnoth.current.schedule and the objects returned by wesnoth.map.get_area()
Also, the wesnoth.schedule module is no longer treated like the schedule metatable, since none of the functions in the module take a schedule as the first argument. This may be reverted in the future.
The attribute registration system has also been extended to permit registry tables to conditionally add certain keys.
Now the __metatable contains the list of member names.
This means that wesnoth.type won't treat named tuples with different members as the same thing – not evne if they're the same length. Which is probably a good thing!
* Rename the vector operations to hex_vector (to emphasize that they are NOT standard vector ops) and document them as official API
* Add new get_hexes_at_radius, which returns an unfilled ring (as opposed to get_hexes_in_radius which returns a filled circle)
* Expose the new cubic coordinate conversions
It was ONLY used in one place, to calculate rotate_right_around_center, and was likely not a very efficient way of calculating that anyway. I've included a different implementation of rotate_right_around_center that uses cubic coordinates.
This code sets orb color to can-still-make-an-action if unit has no moves left,
and has a visible enemy within max and min range of a weapon. This also affects
if the unit is selectable with 'N' (units that can move or attack).
Currently, it doesn't affect the mainline much, as no unit has a weapon
max/min_range different from 1, most notice-able, it marks units with no attack
as incapable of action, after having no moves left.
The purpose of this is part of getting real-ranged attacks into the mainline.
It should work even when the macro appears in the same event as the
attack; this tests that.
The new one uses the COMMON_KEEP macro, but I've left the existing
one unchanged, except for the renaming.