diff options
author | truelight <truelight@openttd.org> | 2005-11-23 15:08:29 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-11-23 15:08:29 +0000 |
commit | 8315736569fc09518d7e2193c6c2f2f7986d0575 (patch) | |
tree | 39b2634d00d2ef0c50327795368bd790f4a2d3af /station_cmd.c | |
parent | 062d654df11a2a5d2bfa62a12781ed8665ed394f (diff) | |
download | openttd-8315736569fc09518d7e2193c6c2f2f7986d0575.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.c | 4 |
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; } |