[Freeciv-Dev] (PR#13790) rename notify_player_ex
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13790 >
This patch renames notify_player_ex as notify_player. It is strictly
search-and-replace.
P.S. What does ex mean? extended?
-jason
Index: ai/aicity.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aicity.c,v
retrieving revision 1.238
diff -p -u -r1.238 aicity.c
--- ai/aicity.c 22 Aug 2005 21:15:49 -0000 1.238
+++ ai/aicity.c 26 Aug 2005 19:44:49 -0000
@@ -986,7 +986,7 @@ static void ai_city_choose_build(struct
if (!pcity->production.is_unit && is_great_wonder(pcity->production.value)
&& (is_unit_choice_type(pcity->ai.choice.type)
|| pcity->ai.choice.choice != pcity->production.value))
- notify_player_ex(NULL, pcity->tile, E_WONDER_STOPPED,
+ notify_player(NULL, pcity->tile, E_WONDER_STOPPED,
_("The %s have stopped building The %s in %s."),
get_nation_name_plural(pplayer->nation),
get_impr_name_ex(pcity, pcity->production.value),
@@ -997,7 +997,7 @@ static void ai_city_choose_build(struct
&& (pcity->production.is_unit
|| pcity->production.value != pcity->ai.choice.choice)) {
if (is_great_wonder(pcity->ai.choice.choice)) {
- notify_player_ex(NULL, pcity->tile, E_WONDER_STARTED,
+ notify_player(NULL, pcity->tile, E_WONDER_STARTED,
_("The %s have started building The %s in %s."),
get_nation_name_plural(city_owner(pcity)->nation),
get_impr_name_ex(pcity, pcity->ai.choice.choice),
@@ -1318,7 +1318,7 @@ static void ai_sell_obsolete_buildings(s
&& (is_building_replaced(pcity, i)
|| building_unwanted(city_owner(pcity), i))) {
do_sell_building(pplayer, pcity, i);
- notify_player_ex(pplayer, pcity->tile, E_IMP_SOLD,
+ notify_player(pplayer, pcity->tile, E_IMP_SOLD,
_("%s is selling %s (not needed) for %d."),
pcity->name, get_improvement_name(i),
impr_sell_gold(i));
Index: server/barbarian.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/barbarian.c,v
retrieving revision 1.100
diff -p -u -r1.100 barbarian.c
--- server/barbarian.c 22 Aug 2005 20:46:00 -0000 1.100
+++ server/barbarian.c 26 Aug 2005 19:44:50 -0000
@@ -180,7 +180,7 @@ static struct player *create_barbarian_p
freelog(LOG_VERBOSE, "Created barbarian %s, player %d",
barbarians->name, barbarians->player_no);
- notify_player_ex(NULL, NULL, E_UPRISING,
+ notify_player(NULL, NULL, E_UPRISING,
_("Barbarians gain a leader by the name %s. Dangerous "
"times may lie ahead."), barbarians->name);
gamelog(GAMELOG_PLAYER, barbarians);
@@ -468,11 +468,11 @@ static void try_summon_barbarians(void)
/* There should probably be a different message about Sea Raiders */
if (is_land_barbarian(barbarians)) {
- notify_player_ex(victim, utile, E_UPRISING,
+ notify_player(victim, utile, E_UPRISING,
_("Native unrest near %s led by %s."), pc->name,
barbarians->name);
} else if (map_is_known_and_seen(utile, victim)) {
- notify_player_ex(victim, utile, E_UPRISING,
+ notify_player(victim, utile, E_UPRISING,
_("Sea raiders seen near %s!"), pc->name);
}
}
Index: server/cityhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityhand.c,v
retrieving revision 1.154
diff -p -u -r1.154 cityhand.c
--- server/cityhand.c 25 Aug 2005 19:12:23 -0000 1.154
+++ server/cityhand.c 26 Aug 2005 19:44:50 -0000
@@ -113,7 +113,7 @@ void handle_city_make_specialist(struct
city_refresh(pcity);
sync_cities();
} else {
- notify_player_ex(pplayer, pcity->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity->tile, E_BAD_COMMAND,
_("You don't have a worker here."));
}
sanity_check_city(pcity);
@@ -170,7 +170,7 @@ void really_handle_city_sell(struct play
Impr_type_id id)
{
if (pcity->did_sell) {
- notify_player_ex(pplayer, pcity->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity->tile, E_BAD_COMMAND,
_("You have already sold something here this turn."));
return;
}
@@ -179,7 +179,7 @@ void really_handle_city_sell(struct play
return;
pcity->did_sell=TRUE;
- notify_player_ex(pplayer, pcity->tile, E_IMP_SOLD,
+ notify_player(pplayer, pcity->tile, E_IMP_SOLD,
_("You sell %s in %s for %d gold."),
get_improvement_name(id), pcity->name,
impr_sell_gold(id));
@@ -218,27 +218,27 @@ void really_handle_city_buy(struct playe
assert(pcity && player_owns_city(pplayer, pcity));
if (pcity->turn_founded == game.info.turn) {
- notify_player_ex(pplayer, pcity->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity->tile, E_BAD_COMMAND,
_("Cannot buy in city created this turn."));
return;
}
if (pcity->did_buy) {
- notify_player_ex(pplayer, pcity->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity->tile, E_BAD_COMMAND,
_("You have already bought this turn."));
return;
}
if (get_current_construction_bonus(pcity, EFT_PROD_TO_GOLD) > 0) {
assert(!pcity->production.is_unit);
- notify_player_ex(pplayer, pcity->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity->tile, E_BAD_COMMAND,
_("You don't buy %s!"),
get_improvement_name(pcity->production.value));
return;
}
if (pcity->production.is_unit && pcity->anarchy != 0) {
- notify_player_ex(pplayer, pcity->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity->tile, E_BAD_COMMAND,
_("Can't buy units when city is in disorder."));
return;
}
@@ -257,7 +257,7 @@ void really_handle_city_buy(struct playe
if (cost > pplayer->economic.gold) {
/* In case something changed while player tried to buy, or player
* tried to cheat! */
- notify_player_ex(pplayer, pcity->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity->tile, E_BAD_COMMAND,
_("%d gold required. You only have %d gold."), cost,
pplayer->economic.gold);
return;
@@ -358,7 +358,7 @@ void handle_city_change(struct player *p
if (!is_build_id_unit_id && !can_build_improvement(pcity, build_id))
return;
if (pcity->did_buy && pcity->shield_stock > 0) {
- notify_player_ex(pplayer, pcity->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity->tile, E_BAD_COMMAND,
_("You have bought this turn, can't change."));
return;
}
@@ -383,7 +383,7 @@ void handle_city_rename(struct player *p
}
if (!is_allowed_city_name(pplayer, name, message, sizeof(message))) {
- notify_player_ex(pplayer, pcity->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity->tile, E_BAD_COMMAND,
_("%s"), message);
return;
}
Index: server/citytools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v
retrieving revision 1.344
diff -p -u -r1.344 citytools.c
--- server/citytools.c 26 Aug 2005 19:40:26 -0000 1.344
+++ server/citytools.c 26 Aug 2005 19:44:50 -0000
@@ -610,7 +610,7 @@ void transfer_city_units(struct player *
unit_owner(vunit)->name, unit_name(vunit->type),
vunit->tile->x, vunit->tile->y, pcity->name);
if (verbose) {
- notify_player_ex(unit_owner(vunit), vunit->tile,
+ notify_player(unit_owner(vunit), vunit->tile,
E_UNIT_LOST,
_("%s lost along with control of %s."),
unit_name(vunit->type), pcity->name);
@@ -802,7 +802,7 @@ void transfer_city(struct player *ptaker
&& city_list_find_name(ptaker->cities, pcity->name)) {
sz_strlcpy(pcity->name,
city_name_suggestion(ptaker, pcity->tile));
- notify_player_ex(ptaker, pcity->tile, E_BAD_COMMAND,
+ notify_player(ptaker, pcity->tile, E_BAD_COMMAND,
_("You already had a city called %s."
" The city was renamed to %s."), old_city_name,
pcity->name);
@@ -1020,7 +1020,7 @@ void create_city(struct player *pplayer,
send_city_info(NULL, pcity);
sync_cities(); /* Will also send pcity. */
- notify_player_ex(pplayer, ptile, E_CITY_BUILD,
+ notify_player(pplayer, ptile, E_CITY_BUILD,
_("You have founded %s"), pcity->name);
maybe_make_contact(ptile, city_owner(pcity));
@@ -1090,7 +1090,7 @@ void remove_city(struct city *pcity)
if (could_unit_move_to_tile(punit, tile1) == 1) {
moved = handle_unit_move_request(punit, tile1, FALSE, TRUE);
if (moved) {
- notify_player_ex(unit_owner(punit), NULL, E_UNIT_RELOCATED,
+ notify_player(unit_owner(punit), NULL, E_UNIT_RELOCATED,
_("Moved %s out of disbanded city %s "
"to avoid being landlocked."),
unit_type(punit)->name, pcity->name);
@@ -1099,7 +1099,7 @@ void remove_city(struct city *pcity)
}
} adjc_iterate_end;
if (!moved) {
- notify_player_ex(unit_owner(punit), NULL, E_UNIT_LOST,
+ notify_player(unit_owner(punit), NULL, E_UNIT_LOST,
_("When %s was disbanded your %s could not "
"get out, and it was therefore lost."),
pcity->name, unit_type(punit)->name);
@@ -1110,7 +1110,7 @@ void remove_city(struct city *pcity)
/* Destroy final ineligible units (land units in ocean city) */
unit_list_iterate_safe(ptile->units, punit) {
if (is_ocean(tile_get_terrain(ptile)) && is_ground_unit(punit)) {
- notify_player_ex(unit_owner(punit), NULL, E_UNIT_LOST,
+ notify_player(unit_owner(punit), NULL, E_UNIT_LOST,
_("When %s was disbanded your %s could not "
"get out, and it was therefore lost."),
pcity->name, unit_type(punit)->name);
@@ -1222,9 +1222,9 @@ void handle_unit_enter_city(struct unit
* the city will be destroyed.
*/
if (pcity->size <= 1) {
- notify_player_ex(pplayer, pcity->tile, E_UNIT_WIN_ATT,
+ notify_player(pplayer, pcity->tile, E_UNIT_WIN_ATT,
_("You destroy %s completely."), pcity->name);
- notify_player_ex(cplayer, pcity->tile, E_CITY_LOST,
+ notify_player(cplayer, pcity->tile, E_CITY_LOST,
_("%s has been destroyed by %s."),
pcity->name, pplayer->name);
gamelog(GAMELOG_LOSECITY, city_owner(pcity), pplayer, pcity, "destroyed");
@@ -1241,22 +1241,22 @@ void handle_unit_enter_city(struct unit
cplayer->economic.gold -= coins;
send_player_info(cplayer, cplayer);
if (pcity->original != pplayer) {
- notify_player_ex(pplayer, pcity->tile, E_UNIT_WIN_ATT,
+ notify_player(pplayer, pcity->tile, E_UNIT_WIN_ATT,
_("You conquer %s, your lootings accumulate"
" to %d gold!"),
pcity->name, coins);
- notify_player_ex(cplayer, pcity->tile, E_CITY_LOST,
+ notify_player(cplayer, pcity->tile, E_CITY_LOST,
_("%s conquered %s and looted %d gold"
" from the city."),
pplayer->name, pcity->name, coins);
gamelog(GAMELOG_LOSECITY, city_owner(pcity), pplayer, pcity, "conquered");
} else {
- notify_player_ex(pplayer, pcity->tile, E_UNIT_WIN_ATT,
+ notify_player(pplayer, pcity->tile, E_UNIT_WIN_ATT,
_("You have liberated %s!"
" Lootings accumulate to %d gold."),
pcity->name, coins);
- notify_player_ex(cplayer, pcity->tile, E_CITY_LOST,
+ notify_player(cplayer, pcity->tile, E_CITY_LOST,
_("%s liberated %s and looted %d gold"
" from the city."),
pplayer->name, pcity->name, coins);
@@ -1805,7 +1805,7 @@ void change_build_target(struct player *
because the worklist advances, then the wonder was completed --
don't announce that the player has *stopped* building that wonder.
*/
- notify_player_ex(NULL, pcity->tile, E_WONDER_STOPPED,
+ notify_player(NULL, pcity->tile, E_WONDER_STOPPED,
_("The %s have stopped building The %s in %s."),
get_nation_name_plural(pplayer->nation),
get_impr_name_ex(pcity, pcity->production.value),
@@ -1837,7 +1837,7 @@ void change_build_target(struct player *
/* Tell the player what's up. */
/* FIXME: this may give bad grammar when translated if the 'source'
* string can have multiple values. */
- notify_player_ex(pplayer, pcity->tile, event,
+ notify_player(pplayer, pcity->tile, event,
/* TRANS: "<city> is building <production><source>." */
_("%s is building %s%s."),
pcity->name, name, source);
@@ -1845,7 +1845,7 @@ void change_build_target(struct player *
/* If the city is building a wonder, tell the rest of the world
about it. */
if (!pcity->production.is_unit && is_great_wonder(pcity->production.value)) {
- notify_player_ex(NULL, pcity->tile, E_WONDER_STARTED,
+ notify_player(NULL, pcity->tile, E_WONDER_STARTED,
_("The %s have started building The %s in %s."),
get_nation_name_plural(pplayer->nation),
get_impr_name_ex(pcity, pcity->production.value),
@@ -2083,7 +2083,7 @@ void city_landlocked_sell_coastal_improv
NULL, NULL, NULL, NULL,
preq)) {
do_sell_building(pplayer, pcity, impr);
- notify_player_ex(pplayer, tile1, E_IMP_SOLD,
+ notify_player(pplayer, tile1, E_IMP_SOLD,
_("You sell %s in %s (now landlocked)"
" for %d gold."),
get_improvement_name(impr), pcity->name,
Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.332
diff -p -u -r1.332 cityturn.c
--- server/cityturn.c 26 Aug 2005 19:40:26 -0000 1.332
+++ server/cityturn.c 26 Aug 2005 19:44:51 -0000
@@ -120,7 +120,7 @@ void remove_obsolete_buildings_city(stru
built_impr_iterate(pcity, i) {
if (can_city_sell_building(pcity, i) && improvement_obsolete(pplayer, i)) {
do_sell_building(pplayer, pcity, i);
- notify_player_ex(pplayer, pcity->tile, E_IMP_SOLD,
+ notify_player(pplayer, pcity->tile, E_IMP_SOLD,
_("%s is selling %s (obsolete) for %d."),
pcity->name, get_improvement_name(i),
impr_sell_gold(i));
@@ -374,7 +374,7 @@ void update_city_activities(struct playe
/* This test include the cost of the units because pay_for_units is called
* in update_city_activity */
if (gold - (gold - pplayer->economic.gold) * 3 < 0) {
- notify_player_ex(pplayer, NULL, E_LOW_ON_FUNDS,
+ notify_player(pplayer, NULL, E_LOW_ON_FUNDS,
_("WARNING, we're LOW on FUNDS sire."));
}
/* uncomment to unbalance the game, like in civ1 (CLG)
@@ -466,12 +466,12 @@ static void city_increase_size(struct ci
if (!city_can_grow_to(pcity, pcity->size + 1)) { /* need improvement */
if (get_current_construction_bonus(pcity, EFT_SIZE_ADJ) > 0
|| get_current_construction_bonus(pcity, EFT_SIZE_UNLIMIT) > 0) {
- notify_player_ex(powner, pcity->tile, E_CITY_AQ_BUILDING,
+ notify_player(powner, pcity->tile, E_CITY_AQ_BUILDING,
_("%s needs %s (being built) "
"to grow any further."), pcity->name,
get_improvement_name(pcity->production.value));
} else {
- notify_player_ex(powner, pcity->tile, E_CITY_AQUEDUCT,
+ notify_player(powner, pcity->tile, E_CITY_AQUEDUCT,
_("%s needs an improvement to grow any further."),
pcity->name);
}
@@ -514,7 +514,7 @@ static void city_increase_size(struct ci
city_refresh(pcity);
- notify_player_ex(powner, pcity->tile, E_CITY_GROWTH,
+ notify_player(powner, pcity->tile, E_CITY_GROWTH,
_("%s grows to size %d."), pcity->name, pcity->size);
script_signal_emit("city_growth", 2,
API_TYPE_CITY, pcity, API_TYPE_INT, pcity->size);
@@ -545,7 +545,7 @@ static void city_populate(struct city *p
if (unit_type(punit)->upkeep[O_FOOD] > 0
&& !unit_flag(punit, F_UNDISBANDABLE)) {
- notify_player_ex(city_owner(pcity), pcity->tile, E_UNIT_LOST,
+ notify_player(city_owner(pcity), pcity->tile, E_UNIT_LOST,
_("Famine feared in %s, %s lost!"),
pcity->name, unit_type(punit)->name);
@@ -558,11 +558,11 @@ static void city_populate(struct city *p
}
} unit_list_iterate_safe_end;
if (pcity->size > 1) {
- notify_player_ex(city_owner(pcity), pcity->tile, E_CITY_FAMINE,
+ notify_player(city_owner(pcity), pcity->tile, E_CITY_FAMINE,
_("Famine causes population loss in %s."),
pcity->name);
} else {
- notify_player_ex(city_owner(pcity), pcity->tile, E_CITY_FAMINE,
+ notify_player(city_owner(pcity), pcity->tile, E_CITY_FAMINE,
_("Famine destroys %s entirely."), pcity->name);
}
pcity->food_stock = (city_granary_size(pcity->size - 1)
@@ -636,7 +636,7 @@ static bool worklist_change_build_target
/* Maybe we can just upgrade the target to what the city /can/ build. */
if (new_target == U_NOT_OBSOLETED) {
/* Nope, we're stuck. Dump this item from the worklist. */
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s can't build %s from the worklist; "
"tech not yet available. Postponing..."),
pcity->name, ptarget->name);
@@ -648,7 +648,7 @@ static bool worklist_change_build_target
} else if (!can_eventually_build_unit(pcity, new_target)) {
/* If the city can never build this unit or its descendants,
* drop it. */
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s can't build %s from the worklist. "
"Purging..."),
pcity->name,
@@ -668,7 +668,7 @@ static bool worklist_change_build_target
continue;
} else {
/* Yep, we can go after new_target instead. Joy! */
- notify_player_ex(pplayer, pcity->tile, E_WORKLIST,
+ notify_player(pplayer, pcity->tile, E_WORKLIST,
_("Production of %s is upgraded to %s in %s."),
ptarget->name,
new_target->name,
@@ -684,7 +684,7 @@ static bool worklist_change_build_target
/* If the city can never build this improvement, drop it. */
if (!can_eventually_build_improvement(pcity, new_target)) {
/* Nope, never in a million years. */
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s can't build %s from the worklist. "
"Purging..."),
pcity->name,
@@ -716,7 +716,7 @@ static bool worklist_change_build_target
known = TRUE;
switch (preq->source.type) {
case REQ_TECH:
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s can't build %s from the worklist; "
"tech %s not yet available. Postponing..."),
pcity->name,
@@ -729,7 +729,7 @@ static bool worklist_change_build_target
API_TYPE_STRING, "need_tech");
break;
case REQ_BUILDING:
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s can't build %s from the worklist; "
"need to have %s first. Postponing..."),
pcity->name,
@@ -742,7 +742,7 @@ static bool worklist_change_build_target
API_TYPE_STRING, "need_building");
break;
case REQ_GOV:
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s can't build %s from the worklist; "
"it needs %s government. Postponing..."),
pcity->name,
@@ -754,7 +754,7 @@ static bool worklist_change_build_target
API_TYPE_STRING, "need_government");
break;
case REQ_SPECIAL:
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s can't build %s from the worklist; "
"%s special is required. Postponing..."),
pcity->name,
@@ -766,7 +766,7 @@ static bool worklist_change_build_target
API_TYPE_STRING, "need_special");
break;
case REQ_TERRAIN:
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s can't build %s from the worklist; "
"%s terrain is required. Postponing..."),
pcity->name,
@@ -780,7 +780,7 @@ static bool worklist_change_build_target
case REQ_NATION:
/* FIXME: we should skip rather than postpone, since we'll
* never be able to meet this req... */
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s can't build %s from the worklist; "
"only %s may build this. Postponing..."),
pcity->name,
@@ -798,7 +798,7 @@ static bool worklist_change_build_target
/* Will only happen with a bogus ruleset. */
break;
case REQ_MINSIZE:
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s can't build %s from the worklist; "
"city must be of size %d. Postponing..."),
pcity->name,
@@ -820,7 +820,7 @@ static bool worklist_change_build_target
if (!known) {
/* This shouldn't happen...
FIXME: make can_build_improvement() return a reason enum. */
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s can't build %s from the worklist; "
"Reason unknown! Postponing..."),
pcity->name,
@@ -829,7 +829,7 @@ static bool worklist_change_build_target
continue;
} else {
/* Hey, we can upgrade the improvement! */
- notify_player_ex(pplayer, pcity->tile, E_WORKLIST,
+ notify_player(pplayer, pcity->tile, E_WORKLIST,
_("Production of %s is upgraded to %s in %s."),
get_impr_name_ex(pcity, target.value),
get_impr_name_ex(pcity, new_target),
@@ -854,7 +854,7 @@ static bool worklist_change_build_target
if (worklist_is_empty(&pcity->worklist)) {
/* There *was* something in the worklist, but it's empty now. Bug the
player about it. */
- notify_player_ex(pplayer, pcity->tile, E_WORKLIST,
+ notify_player(pplayer, pcity->tile, E_WORKLIST,
_("%s's worklist is now empty."),
pcity->name);
}
@@ -928,7 +928,7 @@ static void upgrade_building_prod(struct
pcity->production.value);
if (can_build_improvement(pcity, upgrades_to)) {
- notify_player_ex(pplayer, pcity->tile, E_UNIT_UPGRADED,
+ notify_player(pplayer, pcity->tile, E_UNIT_UPGRADED,
_("Production of %s is upgraded to %s in %s."),
get_improvement_type(pcity->production.value)->name,
get_improvement_type(upgrades_to)->name,
@@ -976,7 +976,7 @@ static void upgrade_unit_prod(struct cit
if (id2 && can_build_unit_direct(pcity, id2)) {
pcity->production.value = id2->index;
- notify_player_ex(pplayer, pcity->tile, E_UNIT_UPGRADED,
+ notify_player(pplayer, pcity->tile, E_UNIT_UPGRADED,
_("Production of %s is upgraded to %s in %s."),
id->name, id2->name,
pcity->name);
@@ -997,7 +997,7 @@ static bool city_distribute_surplus_shie
if (utype_upkeep_cost(unit_type(punit), pplayer, g, O_SHIELD) > 0
&& pcity->surplus[O_SHIELD] < 0
&& !unit_flag(punit, F_UNDISBANDABLE)) {
- notify_player_ex(pplayer, pcity->tile, E_UNIT_LOST,
+ notify_player(pplayer, pcity->tile, E_UNIT_LOST,
_("%s can't upkeep %s, unit disbanded."),
pcity->name, unit_type(punit)->name);
handle_unit_disband(pplayer, punit->id);
@@ -1016,7 +1016,7 @@ static bool city_distribute_surplus_shie
if (upkeep > 0 && pcity->surplus[O_SHIELD] < 0) {
assert(unit_flag(punit, F_UNDISBANDABLE));
- notify_player_ex(pplayer, pcity->tile, E_UNIT_LOST,
+ notify_player(pplayer, pcity->tile, E_UNIT_LOST,
_("Citizens in %s perish for their failure to "
"upkeep %s!"), pcity->name, unit_type(punit)->name);
if (!city_reduce_size(pcity, 1)) {
@@ -1058,7 +1058,7 @@ static bool city_build_building(struct p
}
upgrade_building_prod(pcity);
if (!can_build_improvement(pcity, id)) {
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s is building %s, which "
"is no longer available."),
pcity->name, get_impr_name_ex(pcity, id));
@@ -1096,7 +1096,7 @@ static bool city_build_building(struct p
if (is_great_wonder(id)) {
game.info.great_wonders[id] = pcity->id;
- notify_player_ex(NULL, pcity->tile, E_WONDER_BUILD,
+ notify_player(NULL, pcity->tile, E_WONDER_BUILD,
_("The %s have finished building %s in %s."),
get_nation_name_plural(pplayer->nation),
get_impr_name_ex(pcity, id),
@@ -1113,7 +1113,7 @@ static bool city_build_building(struct p
gamelog(GAMELOG_BUILD, pcity);
}
- notify_player_ex(pplayer, pcity->tile, E_IMP_BUILD,
+ notify_player(pplayer, pcity->tile, E_IMP_BUILD,
_("%s has finished building %s."), pcity->name,
get_improvement_name(id));
script_signal_emit("building_built", 2,
@@ -1141,7 +1141,7 @@ static bool city_build_building(struct p
}
}
if (space_part && pplayer->spaceship.state == SSHIP_NONE) {
- notify_player_ex(NULL, pcity->tile, E_SPACESHIP,
+ notify_player(NULL, pcity->tile, E_SPACESHIP,
_("The %s have started "
"building a spaceship!"),
get_nation_name_plural(pplayer->nation));
@@ -1175,7 +1175,7 @@ static bool city_build_unit(struct playe
they build!! - Per */
if (!can_build_unit_direct(pcity, utype)
&& !is_barbarian(pplayer)) {
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s is building %s, which is no longer available."),
pcity->name, unit_name(utype));
script_signal_emit("unit_cant_be_built", 3,
@@ -1197,7 +1197,7 @@ static bool city_build_unit(struct playe
}
if (pcity->size <= pop_cost) {
- notify_player_ex(pplayer, pcity->tile, E_CITY_CANTBUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_CANTBUILD,
_("%s can't build %s yet."),
pcity->name, unit_name(utype));
script_signal_emit("unit_cant_be_built", 3,
@@ -1228,7 +1228,7 @@ static bool city_build_unit(struct playe
pcity->before_change_shields -= unit_build_shield_cost(utype);
pcity->shield_stock -= unit_build_shield_cost(utype);
- notify_player_ex(pplayer, pcity->tile, E_UNIT_BUILT,
+ notify_player(pplayer, pcity->tile, E_UNIT_BUILT,
/* TRANS: <city> is finished building <unit/building>. */
_("%s is finished building %s."),
pcity->name,
@@ -1273,7 +1273,7 @@ static void pay_for_buildings(struct pla
if (can_city_sell_building(pcity, i)
&& pplayer->government != game.government_when_anarchy) {
if (pplayer->economic.gold - improvement_upkeep(pcity, i) < 0) {
- notify_player_ex(pplayer, pcity->tile, E_IMP_AUCTIONED,
+ notify_player(pplayer, pcity->tile, E_IMP_AUCTIONED,
_("Can't afford to maintain %s in %s, "
"building sold!"),
get_improvement_name(i), pcity->name);
@@ -1308,7 +1308,7 @@ static void check_pollution(struct city
&& !tile_has_special(ptile, S_POLLUTION)) {
tile_set_special(ptile, S_POLLUTION);
update_tile_knowledge(ptile);
- notify_player_ex(city_owner(pcity), pcity->tile,
+ notify_player(city_owner(pcity), pcity->tile,
E_POLLUTION, _("Pollution near %s."),
pcity->name);
return;
@@ -1459,7 +1459,7 @@ static void update_city_activity(struct
if (city_celebrating(pcity)) {
pcity->rapture++;
if (pcity->rapture == 1)
- notify_player_ex(pplayer, pcity->tile, E_CITY_LOVE,
+ notify_player(pplayer, pcity->tile, E_CITY_LOVE,
_("We Love The %s Day celebrated in %s."),
get_ruler_title(pplayer->government, pplayer->is_male,
pplayer->nation),
@@ -1467,7 +1467,7 @@ static void update_city_activity(struct
}
else {
if (pcity->rapture != 0)
- notify_player_ex(pplayer, pcity->tile, E_CITY_NORMAL,
+ notify_player(pplayer, pcity->tile, E_CITY_NORMAL,
_("We Love The %s Day canceled in %s."),
get_ruler_title(pplayer->government, pplayer->is_male,
pplayer->nation),
@@ -1497,16 +1497,16 @@ static void update_city_activity(struct
if(city_unhappy(pcity)) {
pcity->anarchy++;
if (pcity->anarchy == 1)
- notify_player_ex(pplayer, pcity->tile, E_CITY_DISORDER,
+ notify_player(pplayer, pcity->tile, E_CITY_DISORDER,
_("Civil disorder in %s."), pcity->name);
else
- notify_player_ex(pplayer, pcity->tile, E_CITY_DISORDER,
+ notify_player(pplayer, pcity->tile, E_CITY_DISORDER,
_("CIVIL DISORDER CONTINUES in %s."),
pcity->name);
}
else {
if (pcity->anarchy != 0)
- notify_player_ex(pplayer, pcity->tile, E_CITY_NORMAL,
+ notify_player(pplayer, pcity->tile, E_CITY_NORMAL,
_("Order restored in %s."), pcity->name);
pcity->anarchy=0;
}
@@ -1515,7 +1515,7 @@ static void update_city_activity(struct
send_city_info(NULL, pcity);
if (pcity->anarchy>2
&& get_player_bonus(pplayer, EFT_REVOLUTION_WHEN_UNHAPPY) > 0) {
- notify_player_ex(pplayer, pcity->tile, E_ANARCHY,
+ notify_player(pplayer, pcity->tile, E_ANARCHY,
_("The people have overthrown your %s, "
"your country is in turmoil."),
get_government_name(g));
@@ -1540,7 +1540,7 @@ static bool disband_city(struct city *pc
if (!rcity) {
/* What should we do when we try to disband our only city? */
- notify_player_ex(pplayer, ptile, E_CITY_CANTBUILD,
+ notify_player(pplayer, ptile, E_CITY_CANTBUILD,
_("%s can't build %s yet, "
"and we can't disband our only city."),
pcity->name, unit_name(utype));
@@ -1562,7 +1562,7 @@ static bool disband_city(struct city *pc
transfer_city_units(pplayer, pplayer, pcity->units_supported, rcity,
pcity, -1, TRUE);
- notify_player_ex(pplayer, ptile, E_UNIT_BUILT,
+ notify_player(pplayer, ptile, E_UNIT_BUILT,
/* TRANS: Settler production leads to disbanded city. */
_("%s is disbanded into %s."),
pcity->name,
Index: server/diplhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/diplhand.c,v
retrieving revision 1.102
diff -p -u -r1.102 diplhand.c
--- server/diplhand.c 26 Aug 2005 19:40:26 -0000 1.102
+++ server/diplhand.c 26 Aug 2005 19:44:51 -0000
@@ -333,10 +333,10 @@ void handle_diplomacy_accept_treaty_req(
switch (pclause->type) {
case CLAUSE_EMBASSY:
establish_embassy(pdest, pgiver); /* sic */
- notify_player_ex(pgiver, NULL, E_TREATY_SHARED_VISION,
+ notify_player(pgiver, NULL, E_TREATY_SHARED_VISION,
_("You gave an embassy to %s."),
pdest->name);
- notify_player_ex(pdest, NULL, E_TREATY_SHARED_VISION,
+ notify_player(pdest, NULL, E_TREATY_SHARED_VISION,
_("%s allowed you to create an embassy!"),
pgiver->name);
gamelog(GAMELOG_TREATY, GL_EMBASSY, pgiver, pdest);
@@ -353,7 +353,7 @@ void handle_diplomacy_accept_treaty_req(
get_nation_name_plural(pgiver->nation));
break;
}
- notify_player_ex(pdest, NULL, E_TECH_GAIN,
+ notify_player(pdest, NULL, E_TECH_GAIN,
_("You are taught the knowledge of %s."),
get_tech_name(pdest, pclause->value));
@@ -405,11 +405,11 @@ void handle_diplomacy_accept_treaty_req(
break;
}
- notify_player_ex(pdest, pcity->tile, E_CITY_TRANSFER,
+ notify_player(pdest, pcity->tile, E_CITY_TRANSFER,
_("You receive city of %s from %s."),
pcity->name, pgiver->name);
- notify_player_ex(pgiver, pcity->tile, E_CITY_LOST,
+ notify_player(pgiver, pcity->tile, E_CITY_LOST,
_("You give city of %s to %s."),
pcity->name, pdest->name);
@@ -423,10 +423,10 @@ void handle_diplomacy_accept_treaty_req(
pgiver->diplstates[pdest->player_no].turns_left=16;
pdest->diplstates[pgiver->player_no].type=DS_CEASEFIRE;
pdest->diplstates[pgiver->player_no].turns_left=16;
- notify_player_ex(pgiver, NULL, E_TREATY_CEASEFIRE,
+ notify_player(pgiver, NULL, E_TREATY_CEASEFIRE,
_("You agree on a cease-fire with %s."),
pdest->name);
- notify_player_ex(pdest, NULL, E_TREATY_CEASEFIRE,
+ notify_player(pdest, NULL, E_TREATY_CEASEFIRE,
_("You agree on a cease-fire with %s."),
pgiver->name);
gamelog(GAMELOG_TREATY, GL_CEASEFIRE, pgiver, pdest);
@@ -443,10 +443,10 @@ void handle_diplomacy_accept_treaty_req(
MAX(DS_PEACE, pgiver->diplstates[pdest->player_no].max_state);
pdest->diplstates[pgiver->player_no].max_state =
MAX(DS_PEACE, pdest->diplstates[pgiver->player_no].max_state);
- notify_player_ex(pgiver, NULL, E_TREATY_PEACE,
+ notify_player(pgiver, NULL, E_TREATY_PEACE,
_("You agree on a peace treaty with %s."),
pdest->name);
- notify_player_ex(pdest, NULL, E_TREATY_PEACE,
+ notify_player(pdest, NULL, E_TREATY_PEACE,
_("You agree on a peace treaty with %s."),
pgiver->name);
gamelog(GAMELOG_TREATY, GL_PEACE, pgiver, pdest);
@@ -463,10 +463,10 @@ void handle_diplomacy_accept_treaty_req(
MAX(DS_ALLIANCE, pgiver->diplstates[pdest->player_no].max_state);
pdest->diplstates[pgiver->player_no].max_state =
MAX(DS_ALLIANCE, pdest->diplstates[pgiver->player_no].max_state);
- notify_player_ex(pgiver, NULL, E_TREATY_ALLIANCE,
+ notify_player(pgiver, NULL, E_TREATY_ALLIANCE,
_("You agree on an alliance with %s."),
pdest->name);
- notify_player_ex(pdest, NULL, E_TREATY_ALLIANCE,
+ notify_player(pdest, NULL, E_TREATY_ALLIANCE,
_("You agree on an alliance with %s."),
pgiver->name);
@@ -476,10 +476,10 @@ void handle_diplomacy_accept_treaty_req(
break;
case CLAUSE_VISION:
give_shared_vision(pgiver, pdest);
- notify_player_ex(pgiver, NULL, E_TREATY_SHARED_VISION,
+ notify_player(pgiver, NULL, E_TREATY_SHARED_VISION,
_("You give shared vision to %s."),
pdest->name);
- notify_player_ex(pdest, NULL, E_TREATY_SHARED_VISION,
+ notify_player(pdest, NULL, E_TREATY_SHARED_VISION,
_("%s gives you shared vision."),
pgiver->name);
gamelog(GAMELOG_TREATY, GL_VISION, pgiver, pdest);
Index: server/diplomats.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/diplomats.c,v
retrieving revision 1.91
diff -p -u -r1.91 diplomats.c
--- server/diplomats.c 22 Aug 2005 21:15:49 -0000 1.91
+++ server/diplomats.c 26 Aug 2005 19:44:51 -0000
@@ -93,7 +93,7 @@ void spy_poison(struct player *pplayer,
/* If city is too small, can't poison. */
if (pcity->size < 2) {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("Your %s could not poison the water"
" supply in %s."),
unit_name(pdiplomat->type), pcity->name);
@@ -107,10 +107,10 @@ void spy_poison(struct player *pplayer,
city_reduce_size(pcity, 1);
/* Notify everybody involved. */
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_POISON,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_POISON,
_("Your %s poisoned the water supply of %s."),
unit_name(pdiplomat->type), pcity->name);
- notify_player_ex(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_POISON,
+ notify_player(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_POISON,
_("%s is suspected of poisoning the water supply"
" of %s."), pplayer->name, pcity->name);
@@ -257,13 +257,13 @@ void diplomat_embassy(struct player *ppl
/* Check for "foul" ambassador. */
if (pdiplomat->foul) {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("Your %s was executed in %s on suspicion"
" of spying. The %s welcome future diplomatic"
" efforts providing the Ambassador is reputable."),
unit_name(pdiplomat->type),
pcity->name, get_nation_name_plural(cplayer->nation));
- notify_player_ex(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_FAILED,
+ notify_player(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_FAILED,
_("You executed a %s the %s had sent to establish"
" an embassy in %s for being untrustworthy"),
unit_name(pdiplomat->type),
@@ -274,7 +274,7 @@ void diplomat_embassy(struct player *ppl
/* Check for Barbarian response. */
if (get_player_bonus(cplayer, EFT_NO_DIPLOMACY)) {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("Your %s was executed in %s by primitive %s."),
unit_name(pdiplomat->type),
pcity->name, get_nation_name_plural(cplayer->nation));
@@ -287,10 +287,10 @@ void diplomat_embassy(struct player *ppl
establish_embassy(pplayer, cplayer);
/* Notify everybody involved. */
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_EMBASSY,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_EMBASSY,
_("You have established an embassy in %s."),
pcity->name);
- notify_player_ex(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_EMBASSY,
+ notify_player(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_EMBASSY,
_("The %s have established an embassy in %s."),
get_nation_name_plural(pplayer->nation), pcity->name);
gamelog(GAMELOG_EMBASSY, pplayer, pcity);
@@ -346,7 +346,7 @@ void spy_sabotage_unit(struct player *pp
/* If unit has too few hp, can't sabotage. */
if (pvictim->hp < 2) {
- notify_player_ex(pplayer, pvictim->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pvictim->tile, E_MY_DIPLOMAT_FAILED,
_("Your %s could not sabotage %s's %s."),
unit_name(pdiplomat->type),
unit_owner(pvictim)->name, unit_name(pvictim->type));
@@ -367,11 +367,11 @@ void spy_sabotage_unit(struct player *pp
send_unit_info(NULL, pvictim);
/* Notify everybody involved. */
- notify_player_ex(pplayer, pvictim->tile, E_MY_DIPLOMAT_SABOTAGE,
+ notify_player(pplayer, pvictim->tile, E_MY_DIPLOMAT_SABOTAGE,
_("Your %s succeeded in sabotaging %s's %s."),
unit_name(pdiplomat->type),
unit_owner(pvictim)->name, unit_name(pvictim->type));
- notify_player_ex(uplayer, pvictim->tile,
+ notify_player(uplayer, pvictim->tile,
E_ENEMY_DIPLOMAT_SABOTAGE,
_("Your %s was sabotaged by %s!"),
unit_name(pvictim->type), pplayer->name);
@@ -425,7 +425,7 @@ void diplomat_bribe(struct player *pplay
/* Check for unit from a bribable government. */
if (get_player_bonus(uplayer, EFT_UNBRIBABLE_UNITS)) {
- notify_player_ex(pplayer, pdiplomat->tile,
+ notify_player(pplayer, pdiplomat->tile,
E_MY_DIPLOMAT_FAILED,
_("You can't bribe a unit from this nation."));
return;
@@ -433,7 +433,7 @@ void diplomat_bribe(struct player *pplay
/* If player doesn't have enough gold, can't bribe. */
if (pplayer->economic.gold < pvictim->bribe_cost) {
- notify_player_ex(pplayer, pdiplomat->tile,
+ notify_player(pplayer, pdiplomat->tile,
E_MY_DIPLOMAT_FAILED,
_("You don't have enough gold to"
" bribe %s's %s."),
@@ -443,7 +443,7 @@ void diplomat_bribe(struct player *pplay
}
if (unit_flag(pvictim, F_UNBRIBABLE)) {
- notify_player_ex(pplayer, pdiplomat->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pdiplomat->tile, E_MY_DIPLOMAT_FAILED,
_("You cannot bribe %s!"), unit_name(pvictim->type));
return;
}
@@ -461,17 +461,17 @@ void diplomat_bribe(struct player *pplay
/* Notify everybody involved. */
if (vet) {
- notify_player_ex(pplayer, pvictim->tile, E_MY_DIPLOMAT_BRIBE,
+ notify_player(pplayer, pvictim->tile, E_MY_DIPLOMAT_BRIBE,
_("Your %s succeeded in bribing %s's %s"
" and became more experienced."),
unit_name(pdiplomat->type),
unit_owner(pvictim)->name, unit_name(pvictim->type));
} else {
- notify_player_ex(pplayer, pvictim->tile, E_MY_DIPLOMAT_BRIBE,
+ notify_player(pplayer, pvictim->tile, E_MY_DIPLOMAT_BRIBE,
_("Your %s succeeded in bribing %s's %s."),
unit_name(pdiplomat->type),
unit_owner(pvictim)->name, unit_name(pvictim->type));
}
- notify_player_ex(uplayer, pvictim->tile, E_ENEMY_DIPLOMAT_BRIBE,
+ notify_player(uplayer, pvictim->tile, E_ENEMY_DIPLOMAT_BRIBE,
_("Your %s was bribed by %s."),
unit_name(pvictim->type), pplayer->name);
@@ -601,17 +601,17 @@ void diplomat_get_tech(struct player *pp
if (count > 0) {
if (pcity->steal > 0 && !unit_flag (pdiplomat, F_SPY)) {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("%s was expecting your attempt to steal technology "
"again. Your %s was caught and executed."),
pcity->name, unit_name(pdiplomat->type));
} else {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("Your %s was caught in the attempt of"
" stealing technology from %s."),
unit_name(pdiplomat->type), pcity->name);
}
- notify_player_ex(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_FAILED,
+ notify_player(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_FAILED,
_("%s's %s failed to steal technology from %s."),
pplayer->name, unit_name(pdiplomat->type), pcity->name);
/* this may cause a diplomatic incident */
@@ -623,7 +623,7 @@ void diplomat_get_tech(struct player *pp
tech_stolen = steal_a_tech(pplayer, cplayer, technology);
if (tech_stolen == A_NONE) {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("No new technology found in %s."),
pcity->name);
diplomat_charge_movement (pdiplomat, pcity->tile);
@@ -679,7 +679,7 @@ void diplomat_incite(struct player *ppla
/* See if the city is subvertable. */
if (get_city_bonus(pcity, EFT_NO_INCITE) > 0) {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("You can't subvert this city."));
freelog (LOG_DEBUG, "incite: city is protected");
return;
@@ -690,7 +690,7 @@ void diplomat_incite(struct player *ppla
/* If player doesn't have enough gold, can't incite a revolt. */
if (pplayer->economic.gold < revolt_cost) {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("You don't have enough gold to"
" subvert %s."), pcity->name);
freelog(LOG_DEBUG, "incite: not enough gold");
@@ -707,11 +707,11 @@ void diplomat_incite(struct player *ppla
/* Check if the Diplomat/Spy succeeds with his/her task. */
if (myrand (100) >= game.info.diplchance) {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("Your %s was caught in the attempt"
" of inciting a revolt!"),
unit_name(pdiplomat->type));
- notify_player_ex(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_FAILED,
+ notify_player(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_FAILED,
_("You caught %s %s attempting"
" to incite a revolt in %s!"),
get_nation_name(pplayer->nation),
@@ -735,10 +735,10 @@ void diplomat_incite(struct player *ppla
/* Notify everybody involved. */
gamelog(GAMELOG_LOSECITY, cplayer, pplayer, pcity, "incited to revolt");
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_INCITE,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_INCITE,
_("Revolt incited in %s, you now rule the city!"),
pcity->name);
- notify_player_ex(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_INCITE,
+ notify_player(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_INCITE,
_("%s has revolted, %s influence suspected."),
pcity->name, get_nation_name(pplayer->nation));
@@ -818,11 +818,11 @@ void diplomat_sabotage(struct player *pp
/* Check if the Diplomat/Spy succeeds with his/her task. */
if (myrand (100) >= success_prob) {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("Your %s was caught in the attempt"
" of industrial sabotage!"),
unit_name(pdiplomat->type));
- notify_player_ex(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_SABOTAGE,
+ notify_player(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_SABOTAGE,
_("You caught %s %s attempting"
" sabotage in %s!"),
get_nation_name(pplayer->nation),
@@ -856,7 +856,7 @@ void diplomat_sabotage(struct player *pp
* If nothing to do, say so, deduct movement cost and return.
*/
if (count == 0 && pcity->shield_stock == 0) {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("Your %s could not find anything to"
" sabotage in %s."), unit_name(pdiplomat->type),
pcity->name);
@@ -898,7 +898,7 @@ void diplomat_sabotage(struct player *pp
freelog (LOG_DEBUG, "sabotage: specified target improvement: %d (%s)",
target, get_improvement_name (target));
} else {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("You cannot sabotage a %s!"),
get_improvement_name(improvement));
diplomat_charge_movement (pdiplomat, pcity->tile);
@@ -908,7 +908,7 @@ void diplomat_sabotage(struct player *pp
return;
}
} else {
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("Your %s could not find the %s to"
" sabotage in %s."), unit_name(pdiplomat->type),
get_improvement_name(improvement), pcity->name);
@@ -933,11 +933,11 @@ void diplomat_sabotage(struct player *pp
prod = unit_name(get_unit_type(pcity->production.value));
else
prod = get_improvement_name (pcity->production.value);
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_SABOTAGE,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_SABOTAGE,
_("Your %s succeeded in destroying"
" the production of %s in %s."),
unit_name(pdiplomat->type), prod, pcity->name);
- notify_player_ex(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_SABOTAGE,
+ notify_player(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_SABOTAGE,
_("The production of %s was destroyed in %s,"
" %s are suspected."), prod, pcity->name,
get_nation_name_plural(pplayer->nation));
@@ -958,10 +958,10 @@ void diplomat_sabotage(struct player *pp
* get_city_bonus(pcity, EFT_SPY_RESISTANT) / 100);
if (myrand(100) >= vulnerability) {
/* Caught! */
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_FAILED,
_("Your %s was caught in the attempt"
" of sabotage!"), unit_name(pdiplomat->type));
- notify_player_ex(cplayer, pcity->tile,
+ notify_player(cplayer, pcity->tile,
E_ENEMY_DIPLOMAT_FAILED,
_("You caught %s %s attempting"
" to sabotage the %s in %s!"),
@@ -974,11 +974,11 @@ void diplomat_sabotage(struct player *pp
}
/* Report it. */
- notify_player_ex(pplayer, pcity->tile, E_MY_DIPLOMAT_SABOTAGE,
+ notify_player(pplayer, pcity->tile, E_MY_DIPLOMAT_SABOTAGE,
_("Your %s destroyed the %s in %s."),
unit_name(pdiplomat->type),
get_improvement_name(target), pcity->name);
- notify_player_ex(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_SABOTAGE,
+ notify_player(cplayer, pcity->tile, E_ENEMY_DIPLOMAT_SABOTAGE,
_("The %s destroyed the %s in %s."),
get_nation_name_plural(pplayer->nation),
get_improvement_name(target), pcity->name);
@@ -1076,11 +1076,11 @@ static bool diplomat_infiltrate_tile(str
&& !unit_flag(punit, F_SUPERSPY)) {
/* Defending Spy/Diplomat dies. */
- notify_player_ex(cplayer, ptile, E_MY_DIPLOMAT_FAILED,
+ notify_player(cplayer, ptile, E_MY_DIPLOMAT_FAILED,
_("Your %s has been eliminated defending %s"
" against a %s."), unit_name(punit->type),
(pcity ? pcity->name : ""), unit_name(pdiplomat->type));
- notify_player_ex(pplayer, ptile, E_ENEMY_DIPLOMAT_FAILED,
+ notify_player(pplayer, ptile, E_ENEMY_DIPLOMAT_FAILED,
_("An enemy %s has been eliminated defending %s."),
unit_name(punit->type), (pcity ? pcity->name : ""));
@@ -1094,20 +1094,20 @@ static bool diplomat_infiltrate_tile(str
/* Attacking Spy/Diplomat dies. */
- notify_player_ex(pplayer, ptile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, ptile, E_MY_DIPLOMAT_FAILED,
_("Your %s was eliminated"
" by a defending %s."),
unit_name(pdiplomat->type), unit_name(punit->type));
if (vet) {
if (pcity) {
- notify_player_ex(cplayer, ptile,
+ notify_player(cplayer, ptile,
E_ENEMY_DIPLOMAT_FAILED,
_("Eliminated %s %s while infiltrating "
"%s. The defender became more experienced."),
get_nation_name(pplayer->nation),
unit_name(pdiplomat->type), pcity->name);
} else {
- notify_player_ex(cplayer, ptile,
+ notify_player(cplayer, ptile,
E_ENEMY_DIPLOMAT_FAILED,
_("Eliminated %s %s while infiltrating "
"our troops. The defender became more "
@@ -1117,13 +1117,13 @@ static bool diplomat_infiltrate_tile(str
}
} else {
if (pcity) {
- notify_player_ex(cplayer, ptile,
+ notify_player(cplayer, ptile,
E_ENEMY_DIPLOMAT_FAILED,
_("Eliminated %s %s while infiltrating "
"%s."), get_nation_name(pplayer->nation),
unit_name(pdiplomat->type), pcity->name);
} else {
- notify_player_ex(cplayer, ptile,
+ notify_player(cplayer, ptile,
E_ENEMY_DIPLOMAT_FAILED,
_("Eliminated %s %s while infiltrating "
"our troops."),
@@ -1177,13 +1177,13 @@ static void diplomat_escape(struct playe
/* may become a veteran */
vet = maybe_make_veteran(pdiplomat);
if (vet) {
- notify_player_ex(pplayer, ptile, E_MY_DIPLOMAT_ESCAPE,
+ notify_player(pplayer, ptile, E_MY_DIPLOMAT_ESCAPE,
_("Your %s has successfully completed"
" her mission and returned unharmed to %s"
" and has become more experienced."),
unit_name(pdiplomat->type), spyhome->name);
} else {
- notify_player_ex(pplayer, ptile, E_MY_DIPLOMAT_ESCAPE,
+ notify_player(pplayer, ptile, E_MY_DIPLOMAT_ESCAPE,
_("Your %s has successfully completed"
" her mission and returned unharmed to %s."),
unit_name(pdiplomat->type), spyhome->name);
@@ -1199,12 +1199,12 @@ static void diplomat_escape(struct playe
return;
} else {
if (pcity) {
- notify_player_ex(pplayer, ptile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, ptile, E_MY_DIPLOMAT_FAILED,
_("Your %s was captured after completing"
" her mission in %s."),
unit_name(pdiplomat->type), pcity->name);
} else {
- notify_player_ex(pplayer, ptile, E_MY_DIPLOMAT_FAILED,
+ notify_player(pplayer, ptile, E_MY_DIPLOMAT_FAILED,
_("Your %s was captured after completing"
" her mission."), unit_name(pdiplomat->type));
}
@@ -1235,32 +1235,32 @@ static void maybe_cause_incident(enum di
if (!pplayers_at_war(offender, victim_player)) {
switch (action) {
case DIPLOMAT_BRIBE:
- notify_player_ex(offender, victim_tile, E_DIPLOMATIC_INCIDENT,
+ notify_player(offender, victim_tile, E_DIPLOMATIC_INCIDENT,
_("You have caused an incident while bribing "
"%s's %s."),
victim_player->name,
unit_name(victim_unit->type));
- notify_player_ex(victim_player, victim_tile, E_DIPLOMATIC_INCIDENT,
+ notify_player(victim_player, victim_tile, E_DIPLOMATIC_INCIDENT,
_("%s has caused an incident while bribing "
"your %s."),
offender->name,
unit_name(victim_unit->type));
break;
case DIPLOMAT_STEAL:
- notify_player_ex(offender, victim_tile, E_DIPLOMATIC_INCIDENT,
+ notify_player(offender, victim_tile, E_DIPLOMATIC_INCIDENT,
_("You have caused an incident while stealing "
"tech from %s."),
victim_player->name);
- notify_player_ex(victim_player, victim_tile, E_DIPLOMATIC_INCIDENT,
+ notify_player(victim_player, victim_tile, E_DIPLOMATIC_INCIDENT,
_("%s has caused an incident while stealing "
"tech from you."),
offender->name);
break;
case DIPLOMAT_INCITE:
- notify_player_ex(offender, victim_tile, E_DIPLOMATIC_INCIDENT,
+ notify_player(offender, victim_tile, E_DIPLOMATIC_INCIDENT,
_("You have caused an incident while inciting a "
"revolt in %s."), victim_city->name);
- notify_player_ex(victim_player, victim_tile, E_DIPLOMATIC_INCIDENT,
+ notify_player(victim_player, victim_tile, E_DIPLOMATIC_INCIDENT,
_("%s have caused an incident while inciting a "
"revolt in %s."), offender->name, victim_city->name);
break;
Index: server/maphand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/maphand.c,v
retrieving revision 1.174
diff -p -u -r1.174 maphand.c
--- server/maphand.c 26 Aug 2005 19:40:26 -0000 1.174
+++ server/maphand.c 26 Aug 2005 19:44:52 -0000
@@ -246,7 +246,7 @@ void global_warming(int effect)
}
}
- notify_player_ex(NULL, NULL, E_GLOBAL_ECO,
+ notify_player(NULL, NULL, E_GLOBAL_ECO,
_("Global warming has occurred!"));
notify_player(NULL, NULL, E_GLOBAL_ECO,
_("Coastlines have been flooded and vast "
@@ -290,7 +290,7 @@ void nuclear_winter(int effect)
}
}
- notify_player_ex(NULL, NULL, E_GLOBAL_ECO,
+ notify_player(NULL, NULL, E_GLOBAL_ECO,
_("Nuclear winter has occurred!"));
notify_player(NULL, NULL, E_GLOBAL_ECO,
_("Wetlands have dried up and vast "
@@ -1470,7 +1470,7 @@ static void bounce_units_on_terrain_chan
"Moved %s's %s due to changing terrain at %d,%d.",
unit_owner(punit)->name, unit_name(punit->type),
punit->tile->x, punit->tile->y);
- notify_player_ex(unit_owner(punit),
+ notify_player(unit_owner(punit),
punit->tile, E_UNIT_RELOCATED,
_("Moved your %s due to changing terrain."),
unit_name(punit->type));
@@ -1487,7 +1487,7 @@ static void bounce_units_on_terrain_chan
"Disbanded %s's %s due to changing land to sea at (%d, %d).",
unit_owner(punit)->name, unit_name(punit->type),
punit->tile->x, punit->tile->y);
- notify_player_ex(unit_owner(punit),
+ notify_player(unit_owner(punit),
punit->tile, E_UNIT_LOST,
_("Disbanded your %s due to changing terrain."),
unit_name(punit->type));
Index: server/plrhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.c,v
retrieving revision 1.416
diff -p -u -r1.416 plrhand.c
--- server/plrhand.c 26 Aug 2005 19:40:26 -0000 1.416
+++ server/plrhand.c 26 Aug 2005 19:44:52 -0000
@@ -147,7 +147,7 @@ void kill_player(struct player *pplayer)
"The feared barbarian leader %s is no more");
return;
} else {
- notify_player_ex(NULL, NULL, E_DESTROYED, _("The %s are no more!"),
+ notify_player(NULL, NULL, E_DESTROYED, _("The %s are no more!"),
get_nation_name_plural(pplayer->nation));
gamelog(GAMELOG_GENO, pplayer, "%s civilization destroyed");
}
@@ -260,7 +260,7 @@ static void finish_revolution(struct pla
"Revolution finished for %s. Government is %s. Revofin %d (%d).",
pplayer->name, get_government_name(government),
pplayer->revolution_finishes, game.info.turn);
- notify_player_ex(pplayer, NULL, E_REVOLT_DONE,
+ notify_player(pplayer, NULL, E_REVOLT_DONE,
_("%s now governs the %s as a %s."),
pplayer->name,
get_nation_name_plural(pplayer->nation),
@@ -339,7 +339,7 @@ void handle_player_change_government(str
finish_revolution(pplayer);
return;
} else if (turns > 0) {
- notify_player_ex(pplayer, NULL, E_REVOLT_START,
+ notify_player(pplayer, NULL, E_REVOLT_START,
/* TRANS: this is a message event so don't make it
* too long. */
PL_("The %s have incited a revolt! "
@@ -353,7 +353,7 @@ void handle_player_change_government(str
get_government_name(pplayer->target_government));
} else {
assert(pplayer->target_government == game.government_when_anarchy);
- notify_player_ex(pplayer, NULL, E_REVOLT_START,
+ notify_player(pplayer, NULL, E_REVOLT_START,
_("Revolution: returning to anarchy."));
}
gamelog(GAMELOG_REVOLT, pplayer);
@@ -414,7 +414,7 @@ void update_revolution(struct player *pp
} else {
/* If the revolution is over but there's no target government set,
* alert the player. */
- notify_player_ex(pplayer, NULL, E_REVOLT_DONE,
+ notify_player(pplayer, NULL, E_REVOLT_DONE,
_("You should choose a new government from the "
"government menu."));
}
@@ -526,7 +526,7 @@ void handle_diplomacy_cancel_pact(struct
return;
}
remove_shared_vision(pplayer, pplayer2);
- notify_player_ex(pplayer2, NULL, E_TREATY_BROKEN,
+ notify_player(pplayer2, NULL, E_TREATY_BROKEN,
_("%s no longer gives us shared vision!"),
pplayer->name);
return;
@@ -538,7 +538,7 @@ repeat_break_treaty:
/* The senate may not allow you to break the treaty. In this case you
* must first dissolve the senate then you can break it. */
if (!pplayer_can_declare_war(pplayer, pplayer2)) {
- notify_player_ex(pplayer, NULL, E_TREATY_BROKEN,
+ notify_player(pplayer, NULL, E_TREATY_BROKEN,
_("The senate will not allow you to break treaty "
"with the %s. You must either dissolve the senate "
"or wait until a more timely moment."),
@@ -597,12 +597,12 @@ repeat_break_treaty:
* will happen but the second one will fail. */
if (get_player_bonus(pplayer, EFT_HAS_SENATE) > 0 && !repeat) {
if (pplayer->diplstates[pplayer2->player_no].has_reason_to_cancel > 0) {
- notify_player_ex(pplayer, NULL, E_TREATY_BROKEN,
+ notify_player(pplayer, NULL, E_TREATY_BROKEN,
_("The senate passes your bill because of the "
"constant provocations of the %s."),
get_nation_name_plural(pplayer2->nation));
} else if (new_type == DS_WAR) {
- notify_player_ex(pplayer, NULL, E_TREATY_BROKEN,
+ notify_player(pplayer, NULL, E_TREATY_BROKEN,
_("The senate refuses to break treaty with the %s, "
"but you have no trouble finding a new senate."),
get_nation_name_plural(pplayer2->nation));
@@ -636,13 +636,13 @@ repeat_break_treaty:
check_city_workers(pplayer);
check_city_workers(pplayer2);
- notify_player_ex(pplayer, NULL, E_TREATY_BROKEN,
+ notify_player(pplayer, NULL, E_TREATY_BROKEN,
_("The diplomatic state between the %s "
"and the %s is now %s."),
get_nation_name_plural(pplayer->nation),
get_nation_name_plural(pplayer2->nation),
diplstate_text(new_type));
- notify_player_ex(pplayer2, NULL, E_TREATY_BROKEN,
+ notify_player(pplayer2, NULL, E_TREATY_BROKEN,
_(" %s cancelled the diplomatic agreement! "
"The diplomatic state between the %s and the %s "
"is now %s."), pplayer->name,
@@ -659,7 +659,7 @@ repeat_break_treaty:
/* If an ally declares war on another ally, break off your alliance
* to the aggressor. This prevents in-alliance wars, which are not
* permitted. */
- notify_player_ex(other, NULL, E_TREATY_BROKEN,
+ notify_player(other, NULL, E_TREATY_BROKEN,
_("%s has attacked your ally %s! "
"You cancel your alliance to the aggressor."),
pplayer->name, pplayer2->name);
@@ -670,7 +670,7 @@ repeat_break_treaty:
/* We are in the same team as the agressor; we cannot break
* alliance with him. We trust our team mate and break alliance
* with the attacked player */
- notify_player_ex(other, NULL, E_TREATY_BROKEN,
+ notify_player(other, NULL, E_TREATY_BROKEN,
_("Your team mate %s declared war on %s. "
"You are obligated to cancel alliance with %s."),
pplayer->name,
@@ -752,7 +752,7 @@ void notify_conn(struct conn_list *dest,
old code, but this feature may go away - should use notify_conn(NULL)
instead.
**************************************************************************/
-void notify_player_ex(const struct player *pplayer, struct tile *ptile,
+void notify_player(const struct player *pplayer, struct tile *ptile,
enum event_type event, const char *format, ...)
{
struct conn_list *dest = pplayer ? pplayer->connections : NULL;
@@ -1157,11 +1157,11 @@ void make_contact(struct player *pplayer
pplayer1->diplstates[player2].type
= pplayer2->diplstates[player1].type
= dipstate;
- notify_player_ex(pplayer1, ptile,
+ notify_player(pplayer1, ptile,
E_FIRST_CONTACT,
_("You have made contact with the %s, ruled by %s."),
get_nation_name_plural(pplayer2->nation), pplayer2->name);
- notify_player_ex(pplayer2, ptile,
+ notify_player(pplayer2, ptile,
E_FIRST_CONTACT,
_("You have made contact with the %s, ruled by %s."),
get_nation_name_plural(pplayer1->nation), pplayer1->name);
@@ -1722,7 +1722,7 @@ void civil_war(struct player *pplayer)
freelog(LOG_VERBOSE,
"%s's nation is thrust into civil war, created AI player %s",
pplayer->name, cplayer->name);
- notify_player_ex(pplayer, NULL, E_CIVIL_WAR,
+ notify_player(pplayer, NULL, E_CIVIL_WAR,
_("Your nation is thrust into civil war, "
" %s is declared the leader of the rebel states."),
cplayer->name);
@@ -1742,7 +1742,7 @@ void civil_war(struct player *pplayer)
transfer_city(cplayer, pcity, -1, FALSE, FALSE, FALSE);
freelog(LOG_VERBOSE, "%s declares allegiance to %s",
pcity->name, cplayer->name);
- notify_player_ex(pplayer, pcity->tile, E_CITY_LOST,
+ notify_player(pplayer, pcity->tile, E_CITY_LOST,
_("%s declares allegiance to %s."),
pcity->name, cplayer->name);
i--;
Index: server/plrhand.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.h,v
retrieving revision 1.81
diff -p -u -r1.81 plrhand.h
--- server/plrhand.h 26 Aug 2005 19:40:26 -0000 1.81
+++ server/plrhand.h 26 Aug 2005 19:44:52 -0000
@@ -54,10 +54,9 @@ void vnotify_conn_ex(struct conn_list *d
va_list vargs);
void notify_conn(struct conn_list *dest, const char *format, ...)
fc__attribute((format (printf, 2, 3)));
-void notify_player_ex(const struct player *pplayer, struct tile *ptile,
- enum event_type event, const char *format, ...)
- fc__attribute((format (printf, 4, 5)));
-#define notify_player notify_player_ex
+void notify_player(const struct player *pplayer, struct tile *ptile,
+ enum event_type event, const char *format, ...)
+ fc__attribute((format (printf, 4, 5)));
void notify_embassies(struct player *pplayer, struct player *exclude,
const char *format, ...)
fc__attribute((format (printf, 3, 4)));
Index: server/spacerace.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/spacerace.c,v
retrieving revision 1.42
diff -p -u -r1.42 spacerace.c
--- server/spacerace.c 26 Aug 2005 19:40:26 -0000 1.42
+++ server/spacerace.c 26 Aug 2005 19:44:52 -0000
@@ -183,7 +183,7 @@ void handle_spaceship_launch(struct play
ship->launch_year = game.info.year;
arrival = ship->launch_year + (int) ship->travel_time;
- notify_player_ex(NULL, NULL, E_SPACESHIP,
+ notify_player(NULL, NULL, E_SPACESHIP,
_("The %s have launched a spaceship! "
"It is estimated to arrive on Alpha Centauri in %s."),
get_nation_name_plural(pplayer->nation),
@@ -348,7 +348,7 @@ void handle_spaceship_place(struct playe
**************************************************************************/
void spaceship_lost(struct player *pplayer)
{
- notify_player_ex(NULL, NULL, E_SPACESHIP,
+ notify_player(NULL, NULL, E_SPACESHIP,
_("Without guidance from the capital, the %s "
"spaceship is lost!"),
get_nation_name(pplayer->nation));
@@ -379,7 +379,7 @@ void check_spaceship_arrivals(void)
if (best_pplayer) {
best_pplayer->spaceship.state = SSHIP_ARRIVED;
server_state = GAME_OVER_STATE;
- notify_player_ex(NULL, NULL, E_SPACESHIP,
+ notify_player(NULL, NULL, E_SPACESHIP,
_("The %s spaceship has arrived "
"at Alpha Centauri."),
get_nation_name(best_pplayer->nation));
Index: server/techtools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/techtools.c,v
retrieving revision 1.20
diff -p -u -r1.20 techtools.c
--- server/techtools.c 26 Aug 2005 19:40:27 -0000 1.20
+++ server/techtools.c 26 Aug 2005 19:44:52 -0000
@@ -167,7 +167,7 @@ void do_tech_parasite_effect(struct play
}
} players_iterate_end;
if (num_players >= mod) {
- notify_player_ex(pplayer, NULL, E_TECH_GAIN,
+ notify_player(pplayer, NULL, E_TECH_GAIN,
_("%s acquired from %s!"),
get_tech_name(pplayer, i), buf);
script_signal_emit("tech_researched", 3,
@@ -227,7 +227,7 @@ static void update_player_after_tech_res
government_iterate(gov) {
if (!could_switch_to_government[gov->index]
&& can_change_to_government(plr, gov)) {
- notify_player_ex(plr, NULL, E_NEW_GOVERNMENT,
+ notify_player(plr, NULL, E_NEW_GOVERNMENT,
_("Discovery of %s makes the government form %s"
" available. You may want to start a revolution."),
get_tech_name(plr, tech_found), gov->name);
@@ -307,7 +307,7 @@ void found_new_tech(struct player *plr,
if (is_great_wonder(id) && great_wonder_was_built(id)
&& get_improvement_type(id)->obsolete_by == tech_found
&& (pcity = find_city_from_great_wonder(id))) {
- notify_player_ex(city_owner(pcity), NULL, E_WONDER_OBSOLETE,
+ notify_player(city_owner(pcity), NULL, E_WONDER_OBSOLETE,
_("Discovery of %s OBSOLETES %s in %s!"),
get_tech_name(city_owner(pcity), tech_found),
get_improvement_name(id),
@@ -694,12 +694,12 @@ Tech_type_id steal_a_tech(struct player
API_TYPE_STRING, "stolen");
gamelog(GAMELOG_TECH, pplayer, victim, stolen_tech, "steal");
- notify_player_ex(pplayer, NULL, E_TECH_GAIN,
+ notify_player(pplayer, NULL, E_TECH_GAIN,
_("You steal %s from the %s."),
get_tech_name(pplayer, stolen_tech),
get_nation_name_plural(victim->nation));
- notify_player_ex(victim, NULL, E_ENEMY_DIPLOMAT_THEFT,
+ notify_player(victim, NULL, E_ENEMY_DIPLOMAT_THEFT,
_("The %s stole %s from you!"),
get_nation_name_plural(pplayer->nation),
get_tech_name(pplayer, stolen_tech));
Index: server/unithand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unithand.c,v
retrieving revision 1.349
diff -p -u -r1.349 unithand.c
--- server/unithand.c 26 Aug 2005 19:40:27 -0000 1.349
+++ server/unithand.c 26 Aug 2005 19:44:53 -0000
@@ -360,7 +360,7 @@ void handle_unit_disband(struct player *
if (unit_flag(punit, F_UNDISBANDABLE)) {
/* refuse to kill ourselves */
- notify_player_ex(unit_owner(punit), punit->tile, E_BAD_COMMAND,
+ notify_player(unit_owner(punit), punit->tile, E_BAD_COMMAND,
_("%s refuses to disband!"), unit_name(punit->type));
return;
}
@@ -413,19 +413,19 @@ static void city_add_or_build_error(stru
switch (res) {
case AB_NOT_BUILD_LOC:
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("Can't place city here."));
break;
case AB_NOT_BUILD_UNIT:
{
const char *us = get_units_with_flag_string(F_CITIES);
if (us) {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("Only %s can build a city."),
us);
free((void *) us);
} else {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("Can't build a city."));
}
}
@@ -434,33 +434,33 @@ static void city_add_or_build_error(stru
{
const char *us = get_units_with_flag_string(F_ADD_TO_CITY);
if (us) {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("Only %s can add to a city."),
us);
free((void *) us);
} else {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("Can't add to a city."));
}
}
break;
case AB_NO_MOVES_ADD:
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("%s unit has no moves left to add to %s."),
unit_name, pcity->name);
break;
case AB_NO_MOVES_BUILD:
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("%s unit has no moves left to build city."),
unit_name);
break;
case AB_TOO_BIG:
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("%s is too big to add %s."),
pcity->name, unit_name);
break;
case AB_NO_SPACE:
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("%s needs an improvement to grow, so "
"you cannot add %s."),
pcity->name, unit_name);
@@ -469,7 +469,7 @@ static void city_add_or_build_error(stru
/* Shouldn't happen */
freelog(LOG_ERROR, "Cannot add %s to %s for unknown reason",
unit_name, pcity->name);
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("Can't add %s to %s."),
unit_name, pcity->name);
break;
@@ -493,7 +493,7 @@ static void city_add_unit(struct player
auto_arrange_workers(pcity);
wipe_unit(punit);
send_city_info(NULL, pcity);
- notify_player_ex(pplayer, pcity->tile, E_CITY_BUILD,
+ notify_player(pplayer, pcity->tile, E_CITY_BUILD,
_("%s added to aid %s in growing."),
unit_name, pcity->name);
}
@@ -510,7 +510,7 @@ static void city_build(struct player *pp
char message[1024];
if (!is_allowed_city_name(pplayer, name, message, sizeof(message))) {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
"%s", message);
return;
}
@@ -737,7 +737,7 @@ static bool unit_bombard(struct unit *pu
old_unit_vet = punit->veteran;
maybe_make_veteran(punit);
if (punit->veteran != old_unit_vet) {
- notify_player_ex(unit_owner(punit), punit->tile,
+ notify_player(unit_owner(punit), punit->tile,
E_UNIT_WIN_ATT,
_("Your bombarding %s%s became more experienced!"),
unit_name(punit->type),
@@ -780,10 +780,10 @@ static void handle_unit_attack_request(s
if (unit_flag(punit, F_NUCLEAR)) {
if ((pcity = sdi_defense_close(unit_owner(punit), def_tile))) {
- notify_player_ex(pplayer, punit->tile, E_UNIT_LOST_ATT,
+ notify_player(pplayer, punit->tile, E_UNIT_LOST_ATT,
_("Your Nuclear missile was shot down by"
" SDI defences, what a waste."));
- notify_player_ex(city_owner(pcity), def_tile, E_UNIT_WIN,
+ notify_player(city_owner(pcity), def_tile, E_UNIT_WIN,
_("The nuclear attack on %s was avoided by"
" your SDI defense."), pcity->name);
wipe_unit(punit);
@@ -850,7 +850,7 @@ static void handle_unit_attack_request(s
unit_owner(pdefender)->name, unit_type(pdefender)->name);
if (vet) {
- notify_player_ex(unit_owner(pwinner),
+ notify_player(unit_owner(pwinner),
pwinner->tile, E_UNIT_WIN,
_("Your %s%s survived the pathetic attack"
" from %s's %s and became more experienced!"),
@@ -859,7 +859,7 @@ static void handle_unit_attack_request(s
pwinner->tile),
unit_owner(plooser)->name, unit_name(plooser->type));
} else {
- notify_player_ex(unit_owner(pwinner),
+ notify_player(unit_owner(pwinner),
pwinner->tile, E_UNIT_WIN,
_("Your %s%s survived the pathetic attack"
" from %s's %s."),
@@ -869,7 +869,7 @@ static void handle_unit_attack_request(s
unit_owner(plooser)->name, unit_name(plooser->type));
}
- notify_player_ex(unit_owner(plooser),
+ notify_player(unit_owner(plooser),
def_tile, E_UNIT_LOST_ATT,
_("Your attacking %s failed "
"against %s's %s%s!"),
@@ -886,7 +886,7 @@ static void handle_unit_attack_request(s
punit->moved = TRUE; /* We moved */
if (vet && !unit_flag(punit, F_MISSILE)) {
- notify_player_ex(unit_owner(pwinner), punit->tile,
+ notify_player(unit_owner(pwinner), punit->tile,
E_UNIT_WIN_ATT,
_("Your attacking %s succeeded"
" against %s's %s%s and became more experienced!"),
@@ -895,7 +895,7 @@ static void handle_unit_attack_request(s
get_location_str_at(unit_owner(pwinner),
plooser->tile));
} else {
- notify_player_ex(unit_owner(pwinner), punit->tile,
+ notify_player(unit_owner(pwinner), punit->tile,
E_UNIT_WIN_ATT,
_("Your attacking %s succeeded"
" against %s's %s%s!"),
@@ -960,20 +960,20 @@ static bool can_unit_move_to_tile_with_n
if (reason == MR_BAD_TYPE_FOR_CITY_TAKE_OVER) {
const char *units_str = get_units_with_flag_string(F_MARINES);
if (units_str) {
- notify_player_ex(unit_owner(punit), src_tile,
+ notify_player(unit_owner(punit), src_tile,
E_BAD_COMMAND, _("Only %s can attack from sea."),
units_str);
free((void *) units_str);
} else {
- notify_player_ex(unit_owner(punit), src_tile,
+ notify_player(unit_owner(punit), src_tile,
E_BAD_COMMAND, _("Cannot attack from sea."));
}
} else if (reason == MR_NO_WAR) {
- notify_player_ex(unit_owner(punit), src_tile,
+ notify_player(unit_owner(punit), src_tile,
E_BAD_COMMAND,
_("Cannot attack unless you declare war first."));
} else if (reason == MR_ZOC) {
- notify_player_ex(unit_owner(punit), src_tile, E_BAD_COMMAND,
+ notify_player(unit_owner(punit), src_tile, E_BAD_COMMAND,
_("%s can only move into your own zone of control."),
unit_type(punit)->name);
}
@@ -1010,7 +1010,7 @@ bool handle_unit_move_request(struct uni
if (punit->moves_left<=0) {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("This unit has no moves left."));
return FALSE;
}
@@ -1063,7 +1063,7 @@ bool handle_unit_move_request(struct uni
punit->id, target_id);
return FALSE;
} else if (!can_unit_move_to_tile(punit, pdesttile, igzoc)) {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
is_ocean(tile_get_terrain(punit->tile))
? _("Unit must be on land to "
"perform diplomatic action.")
@@ -1082,7 +1082,7 @@ bool handle_unit_move_request(struct uni
/* We can attack ONLY in enemy cities */
if ((pcity && !pplayers_at_war(city_owner(pcity), pplayer))
|| (victim = is_non_attack_unit_tile(pdesttile, pplayer))) {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("You must declare war on %s first. Try using "
"players dialog (F3)."), victim == NULL ?
city_owner(pcity)->name : unit_owner(victim)->name);
@@ -1098,7 +1098,7 @@ bool handle_unit_move_request(struct uni
unit_bombard(punit, pdesttile);
return TRUE;
} else {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("This unit is being transported, and"
" so cannot bombard."));
return FALSE;
@@ -1113,7 +1113,7 @@ bool handle_unit_move_request(struct uni
if (victim) {
/* Must be physically able to attack EVERY unit there */
if (!can_unit_attack_all_at_tile(punit, pdesttile)) {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("You can't attack there."));
return FALSE;
}
@@ -1133,7 +1133,7 @@ bool handle_unit_move_request(struct uni
* If not it would have been caught in the attack case.
* FIXME: Move this check into test_unit_move_tile */
if (!COULD_OCCUPY(punit)) {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("This type of troops cannot "
"take over a city."));
return FALSE;
@@ -1151,7 +1151,7 @@ bool handle_unit_move_request(struct uni
if (pcargo->transported_by == punit->id
&& (is_non_allied_unit_tile(pdesttile, unit_owner(pcargo))
|| is_non_allied_city_tile(pdesttile, unit_owner(pcargo)))) {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("A transported unit is not allied to all "
"units or city on target tile."));
return FALSE;
@@ -1198,7 +1198,7 @@ void handle_unit_help_build_wonder(struc
} else {
text = _("Your %s helps build the %s in %s (%d surplus).");
}
- notify_player_ex(pplayer, pcity_dest->tile, E_CARAVAN_ACTION,
+ notify_player(pplayer, pcity_dest->tile, E_CARAVAN_ACTION,
text, /* Must match arguments below. */
unit_name(punit->type),
get_improvement_type(pcity_dest->production.value)->name,
@@ -1239,7 +1239,7 @@ static bool base_handle_unit_establish_t
pcity_homecity = player_find_city_by_id(pplayer, punit->homecity);
if (!pcity_homecity) {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("Sorry, your %s cannot establish"
" a trade route because it has no home city"),
unit_name(punit->type));
@@ -1249,7 +1249,7 @@ static bool base_handle_unit_establish_t
if (!can_cities_trade(pcity_homecity, pcity_dest)) {
- notify_player_ex(pplayer, pcity_dest->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity_dest->tile, E_BAD_COMMAND,
_("Sorry, your %s cannot establish"
" a trade route between %s and %s"),
unit_name(punit->type),pcity_homecity->name,
@@ -1277,10 +1277,10 @@ static bool base_handle_unit_establish_t
pcity_out_of_home = find_city_by_id(pcity_homecity->trade[slot]);
assert(pcity_out_of_home != NULL);
} else {
- notify_player_ex(pplayer, pcity_dest->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity_dest->tile, E_BAD_COMMAND,
_("Sorry, your %s cannot establish"
" a trade route here!"), unit_name(punit->type));
- notify_player_ex(pplayer, pcity_dest->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity_dest->tile, E_BAD_COMMAND,
_(" The city of %s already has %d "
"better trade routes!"), pcity_homecity->name,
NUM_TRADEROUTES);
@@ -1294,10 +1294,10 @@ static bool base_handle_unit_establish_t
pcity_out_of_dest = find_city_by_id(pcity_dest->trade[slot]);
assert(pcity_out_of_dest != NULL);
} else {
- notify_player_ex(pplayer, pcity_dest->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity_dest->tile, E_BAD_COMMAND,
_("Sorry, your %s cannot establish"
" a trade route here!"), unit_name(punit->type));
- notify_player_ex(pplayer, pcity_dest->tile, E_BAD_COMMAND,
+ notify_player(pplayer, pcity_dest->tile, E_BAD_COMMAND,
_(" The city of %s already has %d "
"better trade routes!"), pcity_dest->name,
NUM_TRADEROUTES);
@@ -1308,7 +1308,7 @@ static bool base_handle_unit_establish_t
/* Now cancel the trade route from the home city. */
if (can_establish && pcity_out_of_home) {
remove_trade_route(pcity_homecity, pcity_out_of_home);
- notify_player_ex(city_owner(pcity_out_of_home),
+ notify_player(city_owner(pcity_out_of_home),
pcity_out_of_home->tile, E_CARAVAN_ACTION,
_("Sorry, %s has canceled the trade route "
"from %s to your city %s."),
@@ -1319,7 +1319,7 @@ static bool base_handle_unit_establish_t
/* And the same for the dest city. */
if (can_establish && pcity_out_of_dest) {
remove_trade_route(pcity_dest, pcity_out_of_dest);
- notify_player_ex(city_owner(pcity_out_of_dest),
+ notify_player(city_owner(pcity_out_of_dest),
pcity_out_of_dest->tile, E_CARAVAN_ACTION,
_("Sorry, %s has canceled the trade route "
"from %s to your city %s."),
@@ -1352,7 +1352,7 @@ static bool base_handle_unit_establish_t
}
conn_list_do_buffer(pplayer->connections);
- notify_player_ex(pplayer, pcity_dest->tile, E_CARAVAN_ACTION,
+ notify_player(pplayer, pcity_dest->tile, E_CARAVAN_ACTION,
_("Your %s from %s has arrived in %s,"
" and revenues amount to %d in gold and research."),
unit_name(punit->type), pcity_homecity->name,
Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.378
diff -p -u -r1.378 unittools.c
--- server/unittools.c 26 Aug 2005 19:40:27 -0000 1.378
+++ server/unittools.c 26 Aug 2005 19:44:53 -0000
@@ -313,7 +313,7 @@ void pay_for_units(struct player *pplaye
* improvements will not help so we will have to disband */
assert(pplayer->economic.gold + potential_gold >= 0);
- notify_player_ex(pplayer, NULL, E_UNIT_LOST,
+ notify_player(pplayer, NULL, E_UNIT_LOST,
_("Not enough gold. %s disbanded"),
unit_type(punit)->name);
wipe_unit(punit);
@@ -358,7 +358,7 @@ void player_restore_units(struct player
/* This should usually only happen for heli units,
but if any other units get 0 hp somehow, catch
them too. --dwp */
- notify_player_ex(pplayer, punit->tile, E_UNIT_LOST,
+ notify_player(pplayer, punit->tile, E_UNIT_LOST,
_("Your %s has run out of hit points."),
unit_name(punit->type));
gamelog(GAMELOG_UNITLOSS, punit, NULL, "out of hp");
@@ -375,7 +375,7 @@ void player_restore_units(struct player
int loss_chance = unit_loss_pct(pplayer, punit->tile, punit);
if (myrand(100) < loss_chance) {
- notify_player_ex(pplayer, punit->tile, E_UNIT_LOST,
+ notify_player(pplayer, punit->tile, E_UNIT_LOST,
_("Your %s has been lost on the high seas."),
unit_name(punit->type));
gamelog(GAMELOG_UNITLOSS, punit, NULL, "lost at sea");
@@ -383,7 +383,7 @@ void player_restore_units(struct player
continue; /* Continue iterating... */
} else if (loss_chance > 0) {
if (maybe_make_veteran(punit)) {
- notify_player_ex(pplayer, punit->tile, E_UNIT_BECAME_VET,
+ notify_player(pplayer, punit->tile, E_UNIT_BECAME_VET,
_("Your %s survived on the high seas "
"and became more experienced!"),
unit_name(punit->type));
@@ -394,7 +394,7 @@ void player_restore_units(struct player
punit->tile, punit))) {
/* All units may have a chance of dying if they are on TER_UNSAFE
* terrain. */
- notify_player_ex(pplayer, punit->tile, E_UNIT_LOST,
+ notify_player(pplayer, punit->tile, E_UNIT_LOST,
_("Your %s has been lost on unsafe terrain."),
unit_name(punit->type));
gamelog(GAMELOG_UNITLOSS, punit, NULL, "unsafe terrain");
@@ -420,7 +420,7 @@ void player_restore_units(struct player
punit->goto_tile = itr_tile;
set_unit_activity(punit, ACTIVITY_GOTO);
(void) do_unit_goto(punit, GOTO_MOVE_ANY, FALSE);
- notify_player_ex(pplayer, punit->tile, E_UNIT_ORDERS,
+ notify_player(pplayer, punit->tile, E_UNIT_ORDERS,
_("Your %s has returned to refuel."),
unit_name(punit->type));
goto OUT;
@@ -446,7 +446,7 @@ void player_restore_units(struct player
unit_list_iterate_safe(pplayer->units, punit) {
if (is_air_unit(punit) && punit->fuel <= 0
&& unit_type(punit)->fuel > 0) {
- notify_player_ex(pplayer, punit->tile, E_UNIT_LOST,
+ notify_player(pplayer, punit->tile, E_UNIT_LOST,
_("Your %s has run out of fuel."),
unit_name(punit->type));
gamelog(GAMELOG_UNITLOSS, punit, NULL, "fuel");
@@ -631,7 +631,7 @@ static void update_unit_activity(struct
/* settler may become veteran when doing something useful */
if (activity != ACTIVITY_FORTIFYING && activity != ACTIVITY_SENTRY
&& maybe_settler_become_veteran(punit)) {
- notify_player_ex(pplayer, ptile, E_UNIT_BECAME_VET,
+ notify_player(pplayer, ptile, E_UNIT_BECAME_VET,
_("Your %s became more experienced!"), unit_name(punit->type));
}
@@ -1111,7 +1111,7 @@ bool teleport_unit_to_city(struct unit *
unit_owner(punit)->name, unit_name(punit->type),
src_tile->x, src_tile->y, pcity->name);
if (verbose) {
- notify_player_ex(unit_owner(punit), pcity->tile, E_UNIT_RELOCATED,
+ notify_player(unit_owner(punit), pcity->tile, E_UNIT_RELOCATED,
_("Teleported your %s to %s."),
unit_name(punit->type), pcity->name);
}
@@ -1140,7 +1140,7 @@ void bounce_unit(struct unit *punit, boo
} else {
/* remove it */
if (verbose) {
- notify_player_ex(unit_owner(punit), punit->tile, E_UNIT_LOST,
+ notify_player(unit_owner(punit), punit->tile, E_UNIT_LOST,
_("Disbanded your %s."),
unit_name(punit->type));
}
@@ -1566,14 +1566,14 @@ void wipe_unit_spec_safe(struct unit *pu
pcity = find_closest_owned_city(unit_owner(pcargo),
pcargo->tile, TRUE, NULL);
if (pcity && teleport_unit_to_city(pcargo, pcity, 0, FALSE)) {
- notify_player_ex(pplayer, ptile, E_UNIT_RELOCATED,
+ notify_player(pplayer, ptile, E_UNIT_RELOCATED,
_("%s escaped the destruction of %s, and "
"fled to %s."), unit_type(pcargo)->name,
ptype->name, pcity->name);
}
}
if (!unit_flag(pcargo, F_UNDISBANDABLE) || !pcity) {
- notify_player_ex(pplayer, ptile, E_UNIT_LOST,
+ notify_player(pplayer, ptile, E_UNIT_LOST,
_("%s lost when %s was lost."),
unit_type(pcargo)->name,
ptype->name);
@@ -1633,7 +1633,7 @@ void kill_unit(struct unit *pkiller, str
&& (is_ground_unit(pkiller) || is_heli_unit(pkiller)) ) {
ransom = (pplayer->economic.gold >= game.info.ransom_gold)
? game.info.ransom_gold : pplayer->economic.gold;
- notify_player_ex(destroyer, pkiller->tile, E_UNIT_WIN_ATT,
+ notify_player(destroyer, pkiller->tile, E_UNIT_WIN_ATT,
_("Barbarian leader captured, %d gold ransom paid."),
ransom);
destroyer->economic.gold += ransom;
@@ -1650,7 +1650,7 @@ void kill_unit(struct unit *pkiller, str
}
if (!is_stack_vulnerable(punit->tile) || unitcount == 1) {
- notify_player_ex(pplayer, punit->tile, E_UNIT_LOST,
+ notify_player(pplayer, punit->tile, E_UNIT_LOST,
_("%s lost to an attack by %s's %s%s."),
unit_type(punit)->name, destroyer->name,
unit_name(pkiller->type), loc_str);
@@ -1677,7 +1677,7 @@ void kill_unit(struct unit *pkiller, str
/* inform the owners */
for (i = 0; i<MAX_NUM_PLAYERS+MAX_NUM_BARBARIANS; i++) {
if (num_killed[i]>0) {
- notify_player_ex(get_player(i), punit->tile, E_UNIT_LOST,
+ notify_player(get_player(i), punit->tile, E_UNIT_LOST,
PL_("You lost %d unit to an attack "
"from %s's %s%s.",
"You lost %d units to an attack "
@@ -1691,7 +1691,7 @@ void kill_unit(struct unit *pkiller, str
/* remove the units */
unit_list_iterate(punit->tile->units, punit2) {
if (pplayers_at_war(unit_owner(pkiller), unit_owner(punit2))) {
- notify_player_ex(unit_owner(punit2),
+ notify_player(unit_owner(punit2),
punit2->tile, E_UNIT_LOST,
_("%s lost to an attack"
" from %s's %s."),
@@ -1933,12 +1933,12 @@ static void do_nuke_tile(struct player *
struct city *pcity = tile_get_city(ptile);
unit_list_iterate(ptile->units, punit) {
- notify_player_ex(unit_owner(punit), ptile, E_UNIT_LOST,
+ notify_player(unit_owner(punit), ptile, E_UNIT_LOST,
_("Your %s was nuked by %s."),
unit_name(punit->type),
pplayer == unit_owner(punit) ? _("yourself") :
pplayer->name);
if (unit_owner(punit) != pplayer) {
- notify_player_ex(pplayer,
+ notify_player(pplayer,
ptile, E_UNIT_WIN,
_("%s's %s was nuked."),
unit_owner(punit)->name,
@@ -1948,14 +1948,14 @@ static void do_nuke_tile(struct player *
} unit_list_iterate_end;
if (pcity) {
- notify_player_ex(city_owner(pcity),
+ notify_player(city_owner(pcity),
ptile, E_CITY_NUKED,
_("%s was nuked by %s."),
pcity->name,
pplayer == city_owner(pcity) ? _("yourself") :
pplayer->name);
if (city_owner(pcity) != pplayer) {
- notify_player_ex(pplayer,
+ notify_player(pplayer,
ptile, E_CITY_NUKED,
_("You nuked %s."),
pcity->name);
@@ -2020,7 +2020,7 @@ bool do_airline(struct unit *punit, stru
city1->airlift = FALSE;
city2->airlift = FALSE;
- notify_player_ex(unit_owner(punit), city2->tile, E_UNIT_RELOCATED,
+ notify_player(unit_owner(punit), city2->tile, E_UNIT_RELOCATED,
_("%s transported succesfully."),
unit_name(punit->type));
@@ -2043,7 +2043,7 @@ bool do_paradrop(struct unit *punit, str
struct player *pplayer = unit_owner(punit);
if (!unit_flag(punit, F_PARATROOPERS)) {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("This unit type can not be paradropped."));
return FALSE;
}
@@ -2053,19 +2053,19 @@ bool do_paradrop(struct unit *punit, str
}
if (get_transporter_occupancy(punit) > 0) {
- notify_player_ex(pplayer, punit->tile, E_BAD_COMMAND,
+ notify_player(pplayer, punit->tile, E_BAD_COMMAND,
_("You cannot paradrop a transporter unit."));
}
if (!map_is_known(ptile, pplayer)) {
- notify_player_ex(pplayer, ptile, E_BAD_COMMAND,
+ notify_player(pplayer, ptile, E_BAD_COMMAND,
_("The destination location is not known."));
return FALSE;
}
/* Safe terrain according to player map? */
if (!is_native_terrain(punit, map_get_player_tile(ptile, pplayer)->terrain))
{
- notify_player_ex(pplayer, ptile, E_BAD_COMMAND,
+ notify_player(pplayer, ptile, E_BAD_COMMAND,
_("This unit cannot paradrop into %s."),
get_name(map_get_player_tile(ptile, pplayer)->terrain));
return FALSE;
@@ -2075,7 +2075,7 @@ bool do_paradrop(struct unit *punit, str
&& ((ptile->city
&& pplayers_non_attack(pplayer, city_owner(ptile->city)))
|| is_non_attack_unit_tile(ptile, pplayer))) {
- notify_player_ex(pplayer, ptile, E_BAD_COMMAND,
+ notify_player(pplayer, ptile, E_BAD_COMMAND,
_("Cannot attack unless you declare war first."));
return FALSE;
}
@@ -2084,7 +2084,7 @@ bool do_paradrop(struct unit *punit, str
int range = unit_type(punit)->paratroopers_range;
int distance = real_map_distance(punit->tile, ptile);
if (distance > range) {
- notify_player_ex(pplayer, ptile, E_BAD_COMMAND,
+ notify_player(pplayer, ptile, E_BAD_COMMAND,
_("The distance to the target (%i) "
"is greater than the unit's range (%i)."),
distance, range);
@@ -2098,7 +2098,7 @@ bool do_paradrop(struct unit *punit, str
show_area(pplayer, ptile, srange);
- notify_player_ex(pplayer, ptile, E_UNIT_LOST,
+ notify_player(pplayer, ptile, E_UNIT_LOST,
_("Your %s paradropped into the %s "
"and was lost."),
unit_type(punit)->name, get_name(ptile->terrain));
@@ -2111,7 +2111,7 @@ bool do_paradrop(struct unit *punit, str
int srange = unit_type(punit)->vision_range;
show_area(pplayer, ptile, srange);
maybe_make_contact(ptile, pplayer);
- notify_player_ex(pplayer, ptile, E_UNIT_LOST_ATT,
+ notify_player(pplayer, ptile, E_UNIT_LOST_ATT,
_("Your %s was killed by enemy units at the "
"paradrop destination."),
unit_type(punit)->name);
@@ -2133,7 +2133,7 @@ bool do_paradrop(struct unit *punit, str
static void hut_get_gold(struct unit *punit, int cred)
{
struct player *pplayer = unit_owner(punit);
- notify_player_ex(pplayer, punit->tile, E_HUT_GOLD,
+ notify_player(pplayer, punit->tile, E_HUT_GOLD,
_("You found %d gold."), cred);
pplayer->economic.gold += cred;
}
@@ -2150,7 +2150,7 @@ static void hut_get_tech(struct unit *pu
new_tech = give_random_free_tech(pplayer);
tech_name = get_tech_name(pplayer, new_tech);
- notify_player_ex(pplayer, punit->tile, E_HUT_TECH,
+ notify_player(pplayer, punit->tile, E_HUT_TECH,
_("You found %s in ancient scrolls of wisdom."),
tech_name);
script_signal_emit("tech_researched", 3,
@@ -2170,7 +2170,7 @@ static void hut_get_mercenaries(struct u
{
struct player *pplayer = unit_owner(punit);
- notify_player_ex(pplayer, punit->tile, E_HUT_MERC,
+ notify_player(pplayer, punit->tile, E_HUT_MERC,
_("A band of friendly mercenaries joins your cause."));
(void) create_unit(pplayer, punit->tile,
find_a_unit_type(L_HUT, L_HUT_TECH), FALSE,
@@ -2188,7 +2188,7 @@ static bool hut_get_barbarians(struct un
if (city_exists_within_city_radius(punit->tile, TRUE)
|| unit_flag(punit, F_GAMELOSS)) {
- notify_player_ex(pplayer, punit->tile, E_HUT_BARB_CITY_NEAR,
+ notify_player(pplayer, punit->tile, E_HUT_BARB_CITY_NEAR,
_("An abandoned village is here."));
} else {
/* save coords and type in case unit dies */
@@ -2198,10 +2198,10 @@ static bool hut_get_barbarians(struct un
ok = unleash_barbarians(unit_tile);
if (ok) {
- notify_player_ex(pplayer, unit_tile, E_HUT_BARB,
+ notify_player(pplayer, unit_tile, E_HUT_BARB,
_("You have unleashed a horde of barbarians!"));
} else {
- notify_player_ex(pplayer, unit_tile, E_HUT_BARB_KILLED,
+ notify_player(pplayer, unit_tile, E_HUT_BARB_KILLED,
_("Your %s has been killed by barbarians!"),
unit_name(type));
}
@@ -2217,12 +2217,12 @@ static void hut_get_city(struct unit *pu
struct player *pplayer = unit_owner(punit);
if (city_can_be_built_here(punit->tile, NULL)) {
- notify_player_ex(pplayer, punit->tile, E_HUT_CITY,
+ notify_player(pplayer, punit->tile, E_HUT_CITY,
_("You found a friendly city."));
create_city(pplayer, punit->tile,
city_name_suggestion(pplayer, punit->tile));
} else {
- notify_player_ex(pplayer, punit->tile, E_HUT_SETTLER,
+ notify_player(pplayer, punit->tile, E_HUT_SETTLER,
_("Friendly nomads are impressed by you,"
" and join you."));
(void) create_unit(pplayer, punit->tile, get_role_unit(F_CITIES,0),
@@ -2247,7 +2247,7 @@ static bool unit_enter_hut(struct unit *
update_tile_knowledge(punit->tile);
if (game.info.hut_overflight == OVERFLIGHT_FRIGHTEN && is_air_unit(punit)) {
- notify_player_ex(pplayer, punit->tile, E_HUT_BARB,
+ notify_player(pplayer, punit->tile, E_HUT_BARB,
_("Your overflight frightens the tribe;"
" they scatter in terror."));
return ok;
@@ -2848,7 +2848,7 @@ static bool maybe_cancel_goto_due_to_ene
if (is_non_allied_unit_tile(ptile, pplayer)
|| is_non_allied_city_tile(ptile, pplayer)) {
- notify_player_ex(pplayer, punit->tile, E_UNIT_ORDERS,
+ notify_player(pplayer, punit->tile, E_UNIT_ORDERS,
_("%s aborted GOTO "
"as there are units in the way."),
unit_type(punit)->name);
@@ -2891,7 +2891,7 @@ static bool maybe_cancel_patrol_due_to_e
if (cancel) {
handle_unit_activity_request(punit, ACTIVITY_IDLE);
- notify_player_ex(unit_owner(punit), punit->tile, E_UNIT_ORDERS,
+ notify_player(unit_owner(punit), punit->tile, E_UNIT_ORDERS,
_("Your %s cancelled patrol order because it "
"encountered a foreign unit."), unit_name(punit->type));
}
@@ -2964,7 +2964,7 @@ bool execute_orders(struct unit *punit)
if (punit->orders.vigilant && maybe_cancel_patrol_due_to_enemy(punit)) {
/* "Patrol" orders are stopped if an enemy is near. */
cancel_orders(punit, " stopping because of nearby enemy");
- notify_player_ex(pplayer, punit->tile, E_UNIT_ORDERS,
+ notify_player(pplayer, punit->tile, E_UNIT_ORDERS,
_("Orders for %s aborted as there "
"are units nearby."),
unit_name(punit->type));
@@ -3016,7 +3016,7 @@ bool execute_orders(struct unit *punit)
if (player_find_unit_by_id(pplayer, unitid)) {
/* Build failed. */
cancel_orders(punit, " orders canceled; failed to build city");
- notify_player_ex(pplayer, punit->tile, E_UNIT_ORDERS,
+ notify_player(pplayer, punit->tile, E_UNIT_ORDERS,
_("Orders for %s aborted because building "
"of city failed."), unit_name(punit->type));
return TRUE;
@@ -3028,7 +3028,7 @@ bool execute_orders(struct unit *punit)
activity = order.activity;
if (!can_unit_do_activity(punit, activity)) {
cancel_orders(punit, " orders canceled because of failed activity");
- notify_player_ex(pplayer, punit->tile, E_UNIT_ORDERS,
+ notify_player(pplayer, punit->tile, E_UNIT_ORDERS,
_("Orders for %s aborted since they "
"give an invalid activity."),
unit_name(punit->type));
@@ -3042,7 +3042,7 @@ bool execute_orders(struct unit *punit)
/* Move unit */
if (!(dst_tile = mapstep(punit->tile, order.dir))) {
cancel_orders(punit, " move order sent us to invalid location");
- notify_player_ex(pplayer, punit->tile, E_UNIT_ORDERS,
+ notify_player(pplayer, punit->tile, E_UNIT_ORDERS,
_("Orders for %s aborted since they "
"give an invalid location."),
unit_name(punit->type));
@@ -3052,7 +3052,7 @@ bool execute_orders(struct unit *punit)
if (!last_order
&& maybe_cancel_goto_due_to_enemy(punit, dst_tile)) {
cancel_orders(punit, " orders canceled because of enemy");
- notify_player_ex(pplayer, punit->tile, E_UNIT_ORDERS,
+ notify_player(pplayer, punit->tile, E_UNIT_ORDERS,
_("Orders for %s aborted as there "
"are units in the way."),
unit_name(punit->type));
@@ -3078,7 +3078,7 @@ bool execute_orders(struct unit *punit)
if (!res && punit->moves_left > 0) {
/* Movement failed (ZOC, etc.) */
cancel_orders(punit, " attempt to move failed.");
- notify_player_ex(pplayer, punit->tile, E_UNIT_ORDERS,
+ notify_player(pplayer, punit->tile, E_UNIT_ORDERS,
_("Orders for %s aborted because of "
"failed move."),
unit_name(punit->type));
@@ -3119,7 +3119,7 @@ bool execute_orders(struct unit *punit)
handle_unit_change_homecity(pplayer, unitid, punit->tile->city->id);
} else {
cancel_orders(punit, " no homecity");
- notify_player_ex(pplayer, punit->tile, E_UNIT_ORDERS,
+ notify_player(pplayer, punit->tile, E_UNIT_ORDERS,
_("Attempt to change homecity for %s failed."),
unit_name(punit->type));
return TRUE;
@@ -3130,7 +3130,7 @@ bool execute_orders(struct unit *punit)
handle_unit_establish_trade(pplayer, unitid);
if (player_find_unit_by_id(pplayer, unitid)) {
cancel_orders(punit, " no trade route city");
- notify_player_ex(pplayer, punit->tile, E_UNIT_ORDERS,
+ notify_player(pplayer, punit->tile, E_UNIT_ORDERS,
_("Attempt to establish trade route for %s failed."),
unit_name(punit->type));
return TRUE;
@@ -3142,7 +3142,7 @@ bool execute_orders(struct unit *punit)
handle_unit_help_build_wonder(pplayer, unitid);
if (player_find_unit_by_id(pplayer, unitid)) {
cancel_orders(punit, " no wonder city");
- notify_player_ex(pplayer, punit->tile, E_UNIT_ORDERS,
+ notify_player(pplayer, punit->tile, E_UNIT_ORDERS,
_("Attempt to build wonder for %s failed."),
unit_name(punit->type));
return TRUE;
@@ -3151,7 +3151,7 @@ bool execute_orders(struct unit *punit)
}
case ORDER_LAST:
cancel_orders(punit, " client sent invalid order!");
- notify_player_ex(pplayer, punit->tile, E_UNIT_ORDERS,
+ notify_player(pplayer, punit->tile, E_UNIT_ORDERS,
_("Your %s has invalid orders."),
unit_name(punit->type));
return TRUE;
Index: server/scripting/api_notify.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/scripting/api_notify.c,v
retrieving revision 1.2
diff -p -u -r1.2 api_notify.c
--- server/scripting/api_notify.c 3 May 2005 15:09:05 -0000 1.2
+++ server/scripting/api_notify.c 26 Aug 2005 19:44:53 -0000
@@ -34,6 +34,6 @@ void api_notify_embassies_msg(Player *pp
void api_notify_event_msg(Player *pplayer, Tile *ptile, int event,
const char *message)
{
- notify_player_ex(pplayer, ptile, event, "%s", message);
+ notify_player(pplayer, ptile, event, "%s", message);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#13790) rename notify_player_ex,
Jason Short <=
|
|