[wesnoth-commits] [wesnoth/wesnoth] 4c8167: WFL: Deal with the side fiasco by deprecating it

Celtic Minstrel noreply at github.com
Sun May 23 17:46:51 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 4c8167c4e7b2144f4e484dfbbb0aca1e6fe4dbf6
      https://github.com/wesnoth/wesnoth/commit/4c8167c4e7b2144f4e484dfbbb0aca1e6fe4dbf6
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-05-23 (Sun, 23 May 2021)

  Changed paths:
    M src/formula/callable_objects.cpp

  Log Message:
  -----------
  WFL: Deal with the side fiasco by deprecating it

When you have a unit object, "side" starts at 0. When you have a terrain object, "owner" starts at 0 (or -1 for an unowned tile). When you have a side object, "side" starts at 1.

This deprecates all those and adds "side_number" (or "owner_side" for terrain) instead which always starts at 1.


  Commit: 7a7434c143f8407c37d8c8ac885486352b54e2fa
      https://github.com/wesnoth/wesnoth/commit/7a7434c143f8407c37d8c8ac885486352b54e2fa
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-05-23 (Sun, 23 May 2021)

  Changed paths:
    M src/formula/function_gamestate.cpp

  Log Message:
  -----------
  WFL: Add functions to get the time of day bonus

tod_bonus: accounts for inherent terrain lighting and unit illumination effects
base_tod_bonus: ignores these effects

Both take an optional location and an optional turn number. With a location, time areas are taken into account. With a turn number, you can check what the bonus will be iin the future, or what it was in the past.

Closes #5776


  Commit: dec133215211c81f1ab82db8294de9271267fda2
      https://github.com/wesnoth/wesnoth/commit/dec133215211c81f1ab82db8294de9271267fda2
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2021-05-23 (Sun, 23 May 2021)

  Changed paths:
    M src/formula/callable_objects.cpp

  Log Message:
  -----------
  WFL: Add a convenient way to get the terrain a unit is standing on


Compare: https://github.com/wesnoth/wesnoth/compare/735ba1b8f232...dec133215211



More information about the Commits mailing list