[Commits] [wesnoth/wesnoth] 5732ed: add proxy_controller type to teams

GitHub noreply at github.com
Mon Dec 22 04:19:56 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 5732ed504dbf585c2dad0a8cd16f27755be40c35
      https://github.com/wesnoth/wesnoth/commit/5732ed504dbf585c2dad0a8cd16f27755be40c35
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-12-21 (Sun, 21 Dec 2014)

  Changed paths:
    M src/actions/attack.cpp
    M src/game_board.cpp
    M src/game_board.hpp
    M src/menu_events.cpp
    M src/playsingle_controller.cpp
    M src/playturn.cpp
    M src/team.cpp
    M src/team.hpp

  Log Message:
  -----------
  add proxy_controller type to teams

Proxy controller is a field of team, parallel to controller, but
intended only as an interface option and should not be visible to
wml / lua, nor synced with other players or the server, nor saved
in savefiles. The proxy controller indicates "who is making the
moves" rather than "who is getting credit for it". The controller
type, by contrast, affects the victory / defeat results of a
scenario and needs to be synced so that all players can save the
game and get sane controller types when they reload.

Currently the proxy controller only affects human controlled sides,
although in principle it could be changed to affect AI sides also.
(temporarily make an AI side human controlled?)

This commit changes the implementation of "idle" sides to use
proxy controller instead of controller, which is much cleaner and
reduces complications. It changes the ":droid" and ":idle" commands
to use it also.

After this commit, there is no way to actually change controller
types between AI and HUMAN as far as I know. We could consider to
add commands :make_ai / :make_human for this purpose.





More information about the Commits mailing list