[Commits] [wesnoth/wesnoth] a723d5: Add single unit instance recall_costs

GitHub noreply at github.com
Fri Mar 21 04:16:53 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: a723d5fa59dae3742c0bf9b94bcaa8dd0f08ff6b
      https://github.com/wesnoth/wesnoth/commit/a723d5fa59dae3742c0bf9b94bcaa8dd0f08ff6b
  Author: Aishiko <Aishiko at users.noreply.github.com>
  Date:   2014-03-15 (Sat, 15 Mar 2014)

  Changed paths:
    M data/lua/wml-tags.lua
    M src/scripting/lua.cpp
    M src/unit.cpp
    M src/unit.hpp
    M src/unit_types.cpp
    M src/unit_types.hpp

  Log Message:
  -----------
  Add single unit instance recall_costs

Add the variables, lua, and wml support variables to allow a scenario
designer the ability to define different from the standard recall costs
or team recall costs for both individual units and unit types.
from least to highest order of precendent we'll have default, team/side,
unit_type, and finally individual units.

The tag in the scenarios and in the unit config files is recall_cost=int.


  Commit: c6d11a5f5e8378bfd56d306ed962f1e71ba8ccaf
      https://github.com/wesnoth/wesnoth/commit/c6d11a5f5e8378bfd56d306ed962f1e71ba8ccaf
  Author: Aishiko <Aishiko at users.noreply.github.com>
  Date:   2014-03-17 (Mon, 17 Mar 2014)

  Changed paths:
    M src/actions/create.cpp
    M src/actions/undo.cpp
    M src/statistics.cpp
    M src/statistics.hpp
    M src/unit.cpp

  Log Message:
  -----------
  Implement unit instance recall costs.

Actually allows for the unit instance recall costs to be used. Proper
taking of the gold and undoing the cost for each unit is implemented
and works.  At advancement if the unit's current recall matches their
unit_type's recall_cost then it takes the new unit_type's recall_cost
otherwise it keeps whatever value it currently has until it fails this
check.  Recall costs are also now persistant and will carry over from
one scenario into the next as well.

If a cost is not set, it will continue to use the team/side/default
costs, these changes should not affect the current workings when
dealing with unaltered scenarios, and unit config files.  I repeat This
will not affect or change the currently way things work UNLESS a user
alters a file or includes the new recall_cost (as in copies and
modifies a unit in the scenario unit files) for a unit instance in
their scenario file(s).


  Commit: d4896db78bf9efa4c719483aec73e36d48e2c915
      https://github.com/wesnoth/wesnoth/commit/d4896db78bf9efa4c719483aec73e36d48e2c915
  Author: Aishiko <Aishiko at users.noreply.github.com>
  Date:   2014-03-17 (Mon, 17 Mar 2014)

  Changed paths:
    M src/dialogs.cpp
    M src/dialogs.hpp
    M src/menu_events.cpp

  Log Message:
  -----------
  Show unit instance recall cost in Recall dialog

Show in the recall dialog below the unit type the recall cost of
that unit.  The costs are also colour coded, red for more then the
team/side recall_cost, white for same as team recall_cost and
finally green for below team recall_cost.  It also alters the not
enough gold message from "you must have X gold to recall a unit." to
"you must have X gold to recall this unit."  There is some new
comparisions to make this all work.  The header for one function
(recall_dialog) has had a const of the team.recall_cost passed to it to
allow for the comparisions more easy to do in that function.

There is room for improvement here, perhaps removing the costs display
if no unit has a recall cost that differs from the others.


  Commit: 1469c39f1c194450871e9977d1420a05e00923f2
      https://github.com/wesnoth/wesnoth/commit/1469c39f1c194450871e9977d1420a05e00923f2
  Author: Aishiko <Aishiko at users.noreply.github.com>
  Date:   2014-03-17 (Mon, 17 Mar 2014)

  Changed paths:
    M src/whiteboard/recall.cpp

  Log Message:
  -----------
  Single unit instances work with whiteboard.

Here the changes to get whiteboard to work are mostly cosmetic, the
right cost for each unit is displayed on the unit in question.  This
is mostly for peace of mind as the user looks at the screen they don't
get confused.  The proper gold is also taken for each recall and
replaced for each canceled/undone recall while in whiteboard.


  Commit: c288fcb203ce6d51f59712055c6843b6a7442aeb
      https://github.com/wesnoth/wesnoth/commit/c288fcb203ce6d51f59712055c6843b6a7442aeb
  Author: Aishiko <Aishiko at users.noreply.github.com>
  Date:   2014-03-20 (Thu, 20 Mar 2014)

  Changed paths:
    M src/whiteboard/recall.cpp

  Log Message:
  -----------
  Single unit instances work with whiteboard.

Here the changes to get whiteboard to work are mostly cosmetic, the
right cost for each unit is displayed on the unit in question.  This
is mostly for peace of mind as the user looks at the screen they don't
get confused.  The proper gold is also taken for each recall and
replaced for each canceled/undone recall while in whiteboard.


  Commit: c8346d34464443c5362ffced49cad0c3ea738a89
      https://github.com/wesnoth/wesnoth/commit/c8346d34464443c5362ffced49cad0c3ea738a89
  Author: Aishiko <Aishiko at users.noreply.github.com>
  Date:   2014-03-20 (Thu, 20 Mar 2014)

  Changed paths:
    M changelog

  Log Message:
  -----------
  Added line to changelog for adding single unit instance recall costs


  Commit: 0fe4a943f354159003cfcaaecfe02072a45a7f98
      https://github.com/wesnoth/wesnoth/commit/0fe4a943f354159003cfcaaecfe02072a45a7f98
  Author: Aishiko <Aishiko at users.noreply.github.com>
  Date:   2014-03-20 (Thu, 20 Mar 2014)

  Changed paths:
    M src/dialogs.cpp

  Log Message:
  -----------
  Changed recall cost in recall dialog to default colour


  Commit: b979516e755ec9e6b87c66eb6ffe7ebdbc690b0c
      https://github.com/wesnoth/wesnoth/commit/b979516e755ec9e6b87c66eb6ffe7ebdbc690b0c
  Author: Aishiko <Aishiko at users.noreply.github.com>
  Date:   2014-03-20 (Thu, 20 Mar 2014)

  Changed paths:
    M data/core/about.cfg

  Log Message:
  -----------
  Added Aishiko to about.cfg as requsted by shadowm

Added Aishiko and a comment about her being to blame for the unit instance
recall costs.


  Commit: 2a923b5a26d8badd331c59aaa11721469c44c75d
      https://github.com/wesnoth/wesnoth/commit/2a923b5a26d8badd331c59aaa11721469c44c75d
  Author: Aishiko <Aishiko at users.noreply.github.com>
  Date:   2014-03-20 (Thu, 20 Mar 2014)

  Changed paths:
    M src/unit.cpp

  Log Message:
  -----------
  Corrected use of cfg["foo"], removed 2 assignments, and 2 whitespace fixes

Changed from cfg["foo"] > number, to !cfg["foo"].blank(). Turned a cfg call into
just a default assignment.  Added a .to_int to a cfg["foo"] call to prepare
against bad user input.  Finally added whitespace to 2 lines to get them to line
up with the rest of the lines.


  Commit: bbe8b7a816d05c21ac11e13c381af709f2cb774e
      https://github.com/wesnoth/wesnoth/commit/bbe8b7a816d05c21ac11e13c381af709f2cb774e
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-03-21 (Fri, 21 Mar 2014)

  Changed paths:
    M changelog
    M data/core/about.cfg
    M data/lua/wml-tags.lua
    M src/actions/create.cpp
    M src/actions/undo.cpp
    M src/dialogs.cpp
    M src/dialogs.hpp
    M src/menu_events.cpp
    M src/scripting/lua.cpp
    M src/statistics.cpp
    M src/statistics.hpp
    M src/unit.cpp
    M src/unit.hpp
    M src/unit_types.cpp
    M src/unit_types.hpp
    M src/whiteboard/recall.cpp

  Log Message:
  -----------
  Merge branch 'Add-unit-instance-recall-costs' of https://github.com/Aishiko/wesnoth into Aishiko-Add-unit-instance-recall-costs

Conflicts:
	changelog


  Commit: d219881656019f0e02b8ad0df0aed23863e11cc3
      https://github.com/wesnoth/wesnoth/commit/d219881656019f0e02b8ad0df0aed23863e11cc3
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-03-21 (Fri, 21 Mar 2014)

  Changed paths:
    M changelog

  Log Message:
  -----------
  Improve a changelog entry


Compare: https://github.com/wesnoth/wesnoth/compare/d58589797bc4...d21988165601


More information about the Commits mailing list