@@ -21,6 +21,7 @@
|
||||
#include "command_func.h"
|
||||
#include "industry.h"
|
||||
#include "station_base.h"
|
||||
#include "waypoint_base.h"
|
||||
#include "station_kdtree.h"
|
||||
#include "company_base.h"
|
||||
#include "news_func.h"
|
||||
@@ -3463,6 +3464,11 @@ CommandCost CmdDeleteTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
}
|
||||
}
|
||||
|
||||
/* Waypoints refer to towns. */
|
||||
for (const Waypoint *wp : Waypoint::Iterate()) {
|
||||
if (wp->town == t) return CMD_ERROR;
|
||||
}
|
||||
|
||||
/* Depots refer to towns. */
|
||||
for (const Depot *d : Depot::Iterate()) {
|
||||
if (d->town == t) return CMD_ERROR;
|
||||
|
Reference in New Issue
Block a user