mirror of https://github.com/OpenTTD/OpenTTD
Just in case you want to move it SLIGHTLY to the right.pull/8511/head
parent
a4e34e824c
commit
28c13ec90f
|
@ -426,7 +426,7 @@ function Regression::Company()
|
||||||
print(" GetCompanyHQ(): " + AICompany.GetCompanyHQ(AICompany.COMPANY_SELF));
|
print(" GetCompanyHQ(): " + AICompany.GetCompanyHQ(AICompany.COMPANY_SELF));
|
||||||
print(" BuildCompanyHQ(): " + AICompany.BuildCompanyHQ(AIMap.GetTileIndex(129, 129)));
|
print(" BuildCompanyHQ(): " + AICompany.BuildCompanyHQ(AIMap.GetTileIndex(129, 129)));
|
||||||
print(" GetCompanyHQ(): " + AICompany.GetCompanyHQ(AICompany.COMPANY_SELF));
|
print(" GetCompanyHQ(): " + AICompany.GetCompanyHQ(AICompany.COMPANY_SELF));
|
||||||
print(" BuildCompanyHQ(): " + AICompany.BuildCompanyHQ(AIMap.GetTileIndex(129, 128)));
|
print(" BuildCompanyHQ(): " + AICompany.BuildCompanyHQ(AIMap.GetTileIndex(239, 76)));
|
||||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||||
print(" GetAutoRenewStatus(); " + AICompany.GetAutoRenewStatus(AICompany.COMPANY_SELF));
|
print(" GetAutoRenewStatus(); " + AICompany.GetAutoRenewStatus(AICompany.COMPANY_SELF));
|
||||||
print(" SetAutoRenewStatus(true); " + AICompany.SetAutoRenewStatus(true));
|
print(" SetAutoRenewStatus(true); " + AICompany.SetAutoRenewStatus(true));
|
||||||
|
|
|
@ -248,7 +248,14 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||||
} else {
|
} else {
|
||||||
if (!allow_ground) return_cmd_error(STR_ERROR_MUST_BE_BUILT_ON_WATER);
|
if (!allow_ground) return_cmd_error(STR_ERROR_MUST_BE_BUILT_ON_WATER);
|
||||||
/* For non-water tiles, we'll have to clear it before building. */
|
/* For non-water tiles, we'll have to clear it before building. */
|
||||||
cost.AddCost(DoCommand(t, 0, 0, flags & ~DC_EXEC, CMD_LANDSCAPE_CLEAR));
|
|
||||||
|
/* When relocating HQ, allow it to be relocated (partial) on itself. */
|
||||||
|
if (!(type == OBJECT_HQ &&
|
||||||
|
IsTileType(t, MP_OBJECT) &&
|
||||||
|
IsTileOwner(t, _current_company) &&
|
||||||
|
IsObjectType(t, OBJECT_HQ))) {
|
||||||
|
cost.AddCost(DoCommand(t, 0, 0, flags & ~DC_EXEC, CMD_LANDSCAPE_CLEAR));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue