station_cmd.c
changeset 2690 2f810b43cb7f
parent 2685 00111d5ca47f
child 2737 f16e0a808897
--- a/station_cmd.c	Wed Nov 23 13:45:12 2005 +0000
+++ b/station_cmd.c	Wed Nov 23 15:08:29 2005 +0000
@@ -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 @@
 		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;
 }