Feature #1554 ยป 1554.patch
client/packhand.c | ||
---|---|---|
punit->done_moving = packet_unit->done_moving;
|
||
check_focus = TRUE;
|
||
}
|
||
punit->carrying = packet_unit->carrying;
|
||
/* This won't change punit; it enqueues the call for later handling. */
|
||
agents_unit_changed(punit);
|
client/text.c | ||
---|---|---|
/* TRANS: on own line immediately following \n, ... <city> */
|
||
astr_add_line(&str, _("from %s"), city_name_get(hcity));
|
||
}
|
||
if (punit->carrying
|
||
/* this SHOULD be redundant, but if a savefile got hacked... */
|
||
&& unit_can_do_action(punit, ACTION_TRADE_ROUTE)) {
|
||
/* TRANS: on own line immediately following \n, from ... */
|
||
astr_add_line(&str, _("carrying %s"),
|
||
goods_name_translation(punit->carrying));
|
||
}
|
||
} else if (owner != nullptr) {
|
||
struct player_diplstate *ds = player_diplstate_get(plr, owner);
|
||
server/cityturn.c | ||
---|---|---|
}
|
||
if (punit) {
|
||
notify_player(pplayer, city_tile(pcity), E_UNIT_BUILT, ftc_server,
|
||
/* TRANS: <city> is finished building <unit/building>. */
|
||
_("%s is finished building %s."),
|
||
city_link(pcity), utype_name_translation(utype));
|
||
if (punit->carrying) {
|
||
notify_player(pplayer, city_tile(pcity), E_UNIT_BUILT, ftc_server,
|
||
/* TRANS: <city> is finished building <unit>, carrying <goods>. */
|
||
_("%s is finished building %s, carrying %s."),
|
||
city_link(pcity), utype_name_translation(utype),
|
||
goods_name_translation(punit->carrying));
|
||
} else {
|
||
notify_player(pplayer, city_tile(pcity), E_UNIT_BUILT, ftc_server,
|
||
/* TRANS: <city> is finished building <unit/building>. */
|
||
_("%s is finished building %s."),
|
||
city_link(pcity), utype_name_translation(utype));
|
||
}
|
||
}
|
||
/* After we created the unit remove the citizen. This will also
|
server/unittools.c | ||
---|---|---|
}
|
||
/**********************************************************************//**
|
||
Set carried goods for unit.
|
||
Set carried goods for unit who can do the action "Establish Trade Route"
|
||
**************************************************************************/
|
||
void unit_get_goods(struct unit *punit)
|
||
{
|
||
if (punit->homecity != 0) {
|
||
if (punit->homecity != 0
|
||
&& unit_can_do_action(punit, ACTION_TRADE_ROUTE)) {
|
||
struct city *home = game_city_by_number(punit->homecity);
|
||
if (home != NULL && game.info.goods_selection == GSM_LEAVING) {
|
||
... | ... | |
punit->server.vision = vision_new(pplayer, ptile);
|
||
unit_refresh_vision(punit);
|
||
unit_get_goods(punit);
|
||
send_unit_info(NULL, punit);
|
||
wakeup_neighbor_sentries(punit);
|
||
... | ... | |
city_map_update_tile_now(ptile);
|
||
sync_cities();
|
||
unit_get_goods(punit);
|
||
CALL_FUNC_EACH_AI(unit_created, punit);
|
||
CALL_PLR_AI_FUNC(unit_got, pplayer, punit);
|
||