summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-05-26 14:16:38 +0000
committerfrosch <frosch@openttd.org>2012-05-26 14:16:38 +0000
commit8dc553a039ae1b706bd8fd6086b0eeb966695054 (patch)
treef0f93ed762aea9df072fbcee68fb6700c5a43c09 /src/town_cmd.cpp
parent66a37e28a69411f4666158cce03c6fd29e9a15e1 (diff)
downloadopenttd-8dc553a039ae1b706bd8fd6086b0eeb966695054.tar.xz
(svn r24290) -Add: [Script] ScriptEventExclusiveTransportRights.
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r--src/town_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index dbff6dbc5..59dee9e6e 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -2833,6 +2833,8 @@ static CommandCost TownActionBuyRights(Town *t, DoCommandFlag flags)
SetDParam(2, t->index);
SetDParamStr(3, cni->company_name);
AddNewsItem(STR_MESSAGE_NEWS_FORMAT, NT_GENERAL, NF_COMPANY, NR_TOWN, t->index, NR_NONE, UINT32_MAX, cni);
+ AI::BroadcastNewEvent(new ScriptEventExclusiveTransportRights((ScriptCompany::CompanyID)(Owner)_current_company, t->index));
+ Game::NewEvent(new ScriptEventExclusiveTransportRights((ScriptCompany::CompanyID)(Owner)_current_company, t->index));
}
return CommandCost();
}