summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-11-23 15:08:29 +0000
committertruelight <truelight@openttd.org>2005-11-23 15:08:29 +0000
commit8733f49e883249117580bb8457266cde858f6bac (patch)
tree39b2634d00d2ef0c50327795368bd790f4a2d3af /station_cmd.c
parentb8f8f3869d3e16aa914133c3ba2c4a66a94068bc (diff)
downloadopenttd-8733f49e883249117580bb8457266cde858f6bac.tar.xz
(svn r3232) -Add: implemented the event-system for AIs
-Add: added several hooks (event-callbacks) for road-related-stuff
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/station_cmd.c b/station_cmd.c
index 31391d077..631ac9214 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -27,6 +27,7 @@
#include "depot.h"
#include "pbs.h"
#include "train.h"
+#include "ai/ai_event.h"
enum {
/* Max stations: 64000 (64 * 1000) */
@@ -1463,6 +1464,9 @@ int32 CmdBuildRoadStop(int x, int y, uint32 flags, uint32 p1, uint32 p2)
UpdateStationVirtCoordDirty(st);
UpdateStationAcceptance(st, false);
InvalidateWindow(WC_STATION_LIST, st->owner);
+
+ ai_event(_current_player, ottd_Event_BuildStation, st->index, tile);
+ ai_event(_current_player, ottd_Event_BuildRoadStation, st->index, tile);
}
return cost;
}