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

Celtic Minstrel noreply at github.com
Sun May 23 05:27:04 UTC 2021


  Branch: refs/heads/wfl_tod
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 2d99de969191014d0a93e71b835deb84c19e94e8
      https://github.com/wesnoth/wesnoth/commit/2d99de969191014d0a93e71b835deb84c19e94e8
  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: ed39fb1e7fad24e1c37a040ef8867b22d978f065
      https://github.com/wesnoth/wesnoth/commit/ed39fb1e7fad24e1c37a040ef8867b22d978f065
  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: 105112c7f488eb31c89954b1aaa9fec85e636564
      https://github.com/wesnoth/wesnoth/commit/105112c7f488eb31c89954b1aaa9fec85e636564
  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/2d99de969191%5E...105112c7f488



More information about the Commits mailing list