Skip to content

Commit

Permalink
message for pirating civ about the gold captured:
Browse files Browse the repository at this point in the history
find -name info_str.txt | xargs sed -i '/^TRADE_PIRATED/aTRADE_PIRATE_GOLD                   "{gold[0].value} gold was pirated on the trade route from {city[0].name} to {city[1].name} owned by {player[0].civ_name_plural}."'
  • Loading branch information
LynxAbraxas committed Jan 27, 2019
1 parent 9371b6c commit 2fe17dc
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 2 deletions.
15 changes: 14 additions & 1 deletion ctp2_code/gs/gameobj/ArmyData.cpp
Expand Up @@ -1656,9 +1656,22 @@ void ArmyData::BeginTurn()
for(i = 0; i < cell->GetNumTradeRoutes(); i++) {
TradeRoute route = cell->GetTradeRoute(i);
if(route->GetPiratingArmy().m_id == m_id) {
g_player[m_owner]->AddGold(static_cast<sint32>(route->GetValue() * g_theConstDB->Get(0)->GetPiracyWasteCoefficient()));
sint32 pgold = static_cast<sint32>(route->GetValue() * g_theConstDB->Get(0)->GetPiracyWasteCoefficient());
g_player[m_owner]->AddGold(pgold);
//added pirated strategic good?
piratedByMe++;

Unit fromCity, toCity;
fromCity = route.GetSource();
toCity = route.GetDestination();

SlicObject * so = new SlicObject("044TradePirateGold");
so->AddRecipient(GetOwner());
so->AddGold(pgold) ;
so->AddCity(fromCity);
so->AddCity(toCity);
so->AddCivilisation(fromCity.GetOwner());
g_slicEngine->Execute(so);
}
}
if(piratedByMe < 1) {
Expand Down
1 change: 1 addition & 0 deletions ctp2_data/chinese/gamedata/info_str.txt
Expand Up @@ -152,6 +152,7 @@ WAR_OVER "{player[0].civ_name_plural}

## Trade Messages ##
TRADE_PIRATED "{player[0].sir_cap}����{city[0].name}��{city[1].name}��ó��·���⵽{player[1].civ_name_plural}�����١�"
TRADE_PIRATE_GOLD "{gold[0].value} gold was pirated on the trade route from {city[0].name} to {city[1].name} owned by {player[0].civ_name_plural}."
TRADE_ROUTES_BROKEN_BY_EMBARGO "{player[0].sir_cap}��{player[1].civ_name_plural}���Ҳ�ȡó�׽��ˣ�ͨ��{player[1].country_name}��ó��·�߹رգ��̶�Ϥ���⵽û�ա�"
TRADE_ROUTES_BROKEN_BY_WAR "����һ������Ϣ��{player[0].sir}�������ҹ���{player[1].country_name}�������dz�ͻ��ͨ��{player[1].civ_name_singular}��ó��·�߹رգ��̶�Ϥ����û�ա�"
SENDER_KILLED_TRADE_ROUTE "{player[0].leader_name}ȡ���˴�{city[0].name}��{city[1].name}��{good[0].name}ó��·�ߡ�"
Expand Down
5 changes: 5 additions & 0 deletions ctp2_data/default/gamedata/script.slc
Expand Up @@ -1740,6 +1740,11 @@ messagebox '040GrossPolluter' {
EyePoint(city[0], city[0].owner, 'OpenProductionCallback');//Added by MG
}

messagebox '044TradePirateGold' {
Text(ID_TRADE_PIRATE_GOLD);
MessageType("TRADE");
}

messagebox '045TradePirated' {
Text(ID_TRADE_PIRATED) ;
MessageType("PIRATE");
Expand Down
4 changes: 3 additions & 1 deletion ctp2_data/english/gamedata/info_str.txt
Expand Up @@ -151,7 +151,9 @@ WAR_OVER "The {player[0].civ_name_plural} are no longer at war with the {play


## Trade Messages ##
TRADE_PIRATED "{player[0].sir_cap}, our trade route from {city[0].name} to {city[1].name} has been pirated by the {player[1].civ_name_plural]."
TRADE_PIRATED "{player[0].sir_cap}, our trade route from {city[0].name} to {city[1].name} has been pirated by the {player[1].civ_name_plural}."
TRADE_PIRATE_GOLD "{gold[0].value} gold was pirated on the trade route from {city[0].name} to {city[1].name} owned by {player[0].civ_name_plural}."
TRADE_PIRATE_GOLD "{gold[0].value} gold was pirated on the trade route from {city[0].name} to {city[1].name} owned by {player[0].civ_name_plural}."
TRADE_ROUTES_BROKEN_BY_EMBARGO "{player[0].sir_cap}, the {player[1].civ_name_plural} have placed an embargo on all of our trade into their nations. All existing trade routes to {player[1].country_name} have been broken! We have lost all of the caravans on those routes as well."
TRADE_ROUTES_BROKEN_BY_WAR "Troubling news, {player[0].sir}. Due to the sparking of conflict between us and {player[1].country_name}, all of our trade routes to {player[1].civ_name_singular} cities have been broken. All caravans assigned to those routes have been lost as well."
SENDER_KILLED_TRADE_ROUTE "{player[0].leader_name} has cancelled the trade route carrying {good[0].name} from {city[0].name} to {city[1].name}."
Expand Down
1 change: 1 addition & 0 deletions ctp2_data/german/gamedata/info_str.txt
Expand Up @@ -152,6 +152,7 @@ WAR_OVER "Die {player[0].civ_name_plural} f

## Trade Messages ##
TRADE_PIRATED "{player[0].leader_name#SIR_CAP}, unser Handelsweg von {city[0].name} nach {city[1].name} wurde von den {player[1].civ_name_plural#DAT} �berfallen."
TRADE_PIRATE_GOLD "Wir erbeuteten {gold[0].value} Gold als wir den Handelsweg von {city[0].name} nach {city[1].name} von {player[0].civ_name_plural#DAT} �berfiehlen."
TRADE_ROUTES_BROKEN_BY_EMBARGO "{player[0].leader_name#SIR_CAP}, die {player[1].civ_name_plural} haben ein Handelsembargo gegen uns verhengt. Der Handel auf allen Handelswege {player[1].country_name#TOWARDS} wurde eingestellt! Au�erdem haben wir alle Karawanen auf diesen Routen verloren."
TRADE_ROUTES_BROKEN_BY_WAR "Es gibt beunruhigende Neuigkeiten, {player[0].leader_name#SIR_CAP}. Wegen des zwischen uns und {player[1].country_name#DAT} entbrannten Konflikts wurde der Handel auf unseren Handelswegen, die in {player[1].civ_name_singular#UNDEF_PLURAL_ACC} St�dte f�hren, eingestellt. Au�erdem haben wir alle Karawanen, die dort unterwegs waren, verloren."
SENDER_KILLED_TRADE_ROUTE "{player[0].leader_name} hat den Handelsweg f�r den Handel mit {good[0].name#PLURAL} von {city[0].name} nach {city[1].name} eingestellt."
Expand Down
1 change: 1 addition & 0 deletions ctp2_data/italian/gamedata/info_str.txt
Expand Up @@ -152,6 +152,7 @@ WAR_OVER "{player[0].civ_name_plural#ARTICLE_CAP} non sono pi

## Trade Messages ##
TRADE_PIRATED "{player[0].sir_cap}, la nostra rotta commerciale da {city[0].name} verso {city[1].name} � stata colpita dagli atti di pirateria {player[1].civ_name_plural#PREPOSITION}."
TRADE_PIRATE_GOLD "{gold[0].value} gold was pirated on the trade route from {city[0].name} to {city[1].name} owned by {player[0].civ_name_plural}."
TRADE_ROUTES_BROKEN_BY_EMBARGO "{player[0].sir_cap}, {player[1].civ_name_plural#ARTICLE} hanno deciso l'embargo contro di noi in ogni loro nazione. Tutte le rotte esistenti verso {player[1].country_name#ARTICLE} sono state eliminate! Inoltra, abbiamo perso tutte le carovane che si trovavano su quelle vie."
TRADE_ROUTES_BROKEN_BY_WAR "Brutte notizie, {player[0].sir}. A causa del conflitto scoppiato fra noi e {player[1].civ_name_plural#ARTICLE}, tutte le nostre rotte commerciali verso le citt� {player[1].country_name#ARTICLED_PREPOSITION} sono state bloccate. Tutte le carovane presenti su quelle rotte sono andate perse."
SENDER_KILLED_TRADE_ROUTE "{player[0].leader_name} ha chiuso la rotta commerciale che trasportava {good[0].name} da {city[0].name} a {city[1].name}."
Expand Down
1 change: 1 addition & 0 deletions ctp2_data/spanish/gamedata/info_str.txt
Expand Up @@ -152,6 +152,7 @@ WAR_OVER "Los {player[0].civ_name_plural} ya no est

## Trade Messages ##
TRADE_PIRATED "{player[0].sir_cap}, nuestra ruta comercial de {city[0].name} a {city[1].name} ha sido pirateada por los {player[1].civ_name_plural]."
TRADE_PIRATE_GOLD "{gold[0].value} gold was pirated on the trade route from {city[0].name} to {city[1].name} owned by {player[0].civ_name_plural}."
TRADE_ROUTES_BROKEN_BY_EMBARGO "{player[0].sir_cap}, los {player[1].civ_name_plural} han impuesto un embargo sobre todas nuestras relaciones comerciales en todas sus naciones. �Han cortado todas nuestras rutas comerciales con {player[1].country_name}. Adem�s hemos perdido todas las caravanas que estaban en esas rutas."
TRADE_ROUTES_BROKEN_BY_WAR "Malas noticias, {player[0].sir}. Debido al conflicto que ha brotado entre nosotros y {player[1].country_name}, se han cortado todas las rutas comerciales con las ciudades de {player[1].civ_name_singular}. Y adem�s hemos perdido las caravanas que estaban en esas rutas."
SENDER_KILLED_TRADE_ROUTE "{player[0].leader_name} ha cancelado la ruta comercial por la que se lleva {good[0].name} de {city[0].name} a {city[1].name}."
Expand Down

0 comments on commit 2fe17dc

Please sign in to comment.