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.
This commit is contained in:
Aishiko 2014-03-20 17:57:31 -04:00
parent 1469c39f1c
commit c288fcb203

View file

@ -140,7 +140,7 @@ void recall::apply_temp_modifier(unit_map& unit_map)
std::vector<unit>::iterator it = find_if_matches_id(recalls, temp_unit_->id());
assert(it != recalls.end());
recalls.erase(it);
// Temporarily insert unit into unit_map
//unit map takes ownership of temp_unit
unit_map.insert(temp_unit_.release());
@ -173,7 +173,6 @@ void recall::draw_hex(map_location const& hex)
const double y_offset = 0.7;
//position 0,0 in the hex is the upper left corner
std::stringstream number_text;
// number_text << utils::unicode_minus << resources::teams->at(team_index()).recall_cost();
unit &it = *get_unit();
int cost = statistics::un_recall_unit_cost(it);
if (cost < 0) {