Codechange: Template script command calls.
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
#include "script_station.hpp"
|
||||
#include "../../station_base.h"
|
||||
#include "../../town.h"
|
||||
#include "../../landscape_cmd.h"
|
||||
#include "../../station_cmd.h"
|
||||
|
||||
#include "../../safeguards.h"
|
||||
|
||||
@@ -77,7 +79,7 @@
|
||||
|
||||
uint p2 = station_id == ScriptStation::STATION_JOIN_ADJACENT ? 0 : 1;
|
||||
p2 |= (ScriptStation::IsValidStation(station_id) ? station_id : INVALID_STATION) << 16;
|
||||
return ScriptObject::DoCommand(tile, type, p2, CMD_BUILD_AIRPORT);
|
||||
return ScriptObject::Command<CMD_BUILD_AIRPORT>::Do(tile, type, p2, {});
|
||||
}
|
||||
|
||||
/* static */ bool ScriptAirport::RemoveAirport(TileIndex tile)
|
||||
@@ -86,7 +88,7 @@
|
||||
EnforcePrecondition(false, ::IsValidTile(tile))
|
||||
EnforcePrecondition(false, IsAirportTile(tile) || IsHangarTile(tile));
|
||||
|
||||
return ScriptObject::DoCommand(tile, 0, 0, CMD_LANDSCAPE_CLEAR);
|
||||
return ScriptObject::Command<CMD_LANDSCAPE_CLEAR>::Do(tile, 0, 0, {});
|
||||
}
|
||||
|
||||
/* static */ int32 ScriptAirport::GetNumHangars(TileIndex tile)
|
||||
|
Reference in New Issue
Block a user