Codechange: Template script command calls.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "script_error.hpp"
|
||||
#include "../../subsidy_base.h"
|
||||
#include "../../station_base.h"
|
||||
#include "../../subsidy_cmd.h"
|
||||
|
||||
#include "../../safeguards.h"
|
||||
|
||||
@@ -38,7 +39,7 @@
|
||||
EnforcePrecondition(false, (from_type == SPT_INDUSTRY && ScriptIndustry::IsValidIndustry(from_id)) || (from_type == SPT_TOWN && ScriptTown::IsValidTown(from_id)));
|
||||
EnforcePrecondition(false, (to_type == SPT_INDUSTRY && ScriptIndustry::IsValidIndustry(to_id)) || (to_type == SPT_TOWN && ScriptTown::IsValidTown(to_id)));
|
||||
|
||||
return ScriptObject::DoCommand(0, from_type | (from_id << 8) | (cargo_type << 24), to_type | (to_id << 8), CMD_CREATE_SUBSIDY);
|
||||
return ScriptObject::Command<CMD_CREATE_SUBSIDY>::Do(0, from_type | (from_id << 8) | (cargo_type << 24), to_type | (to_id << 8), {});
|
||||
}
|
||||
|
||||
/* static */ ScriptCompany::CompanyID ScriptSubsidy::GetAwardedTo(SubsidyID subsidy_id)
|
||||
|
Reference in New Issue
Block a user