|
@@ -282,43 +282,43 @@ static CommandCost ClearTile_Unmovable(T
|
|
|
TownID town = GetStatueTownID(tile);
|
|
|
ClrBit(Town::Get(town)->statues, GetTileOwner(tile));
|
|
|
InvalidateWindow(WC_TOWN_AUTHORITY, town);
|
|
|
}
|
|
|
|
|
|
if (flags & DC_EXEC) {
|
|
|
DoClearSquare(tile);
|
|
|
}
|
|
|
|
|
|
return CommandCost();
|
|
|
}
|
|
|
|
|
|
static void GetAcceptedCargo_Unmovable(TileIndex tile, AcceptedCargo ac)
|
|
|
static void AddAcceptedCargo_Unmovable(TileIndex tile, AcceptedCargo ac)
|
|
|
{
|
|
|
if (!IsCompanyHQ(tile)) return;
|
|
|
|
|
|
/* HQ accepts passenger and mail; but we have to divide the values
|
|
|
* between 4 tiles it occupies! */
|
|
|
|
|
|
/* HQ level (depends on company performance) in the range 1..5. */
|
|
|
uint level = GetCompanyHQSize(tile) + 1;
|
|
|
|
|
|
/* Top town building generates 10, so to make HQ interesting, the top
|
|
|
* type makes 20. */
|
|
|
ac[CT_PASSENGERS] = max(1U, level);
|
|
|
ac[CT_PASSENGERS] += max(1U, level);
|
|
|
|
|
|
/* Top town building generates 4, HQ can make up to 8. The
|
|
|
* proportion passengers:mail is different because such a huge
|
|
|
* commercial building generates unusually high amount of mail
|
|
|
* correspondence per physical visitor. */
|
|
|
ac[CT_MAIL] = max(1U, level / 2);
|
|
|
ac[CT_MAIL] += max(1U, level / 2);
|
|
|
}
|
|
|
|
|
|
|
|
|
static void GetTileDesc_Unmovable(TileIndex tile, TileDesc *td)
|
|
|
{
|
|
|
td->str = GetUnmovableSpec(GetUnmovableType(tile))->name;
|
|
|
td->owner[0] = GetTileOwner(tile);
|
|
|
}
|
|
|
|
|
|
static void AnimateTile_Unmovable(TileIndex tile)
|
|
|
{
|
|
|
/* not used */
|
|
@@ -492,24 +492,24 @@ static CommandCost TerraformTile_Unmovab
|
|
|
|
|
|
if (AutoslopeEnabled() && (IsStatue(tile) || IsCompanyHQ(tile))) {
|
|
|
if (!IsSteepSlope(tileh_new) && (z_new + GetSlopeMaxZ(tileh_new) == GetTileMaxZ(tile))) return CommandCost(EXPENSES_CONSTRUCTION, _price.terraform);
|
|
|
}
|
|
|
|
|
|
return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
|
|
|
}
|
|
|
|
|
|
extern const TileTypeProcs _tile_type_unmovable_procs = {
|
|
|
DrawTile_Unmovable, // draw_tile_proc
|
|
|
GetSlopeZ_Unmovable, // get_slope_z_proc
|
|
|
ClearTile_Unmovable, // clear_tile_proc
|
|
|
GetAcceptedCargo_Unmovable, // get_accepted_cargo_proc
|
|
|
AddAcceptedCargo_Unmovable, // add_accepted_cargo_proc
|
|
|
GetTileDesc_Unmovable, // get_tile_desc_proc
|
|
|
GetTileTrackStatus_Unmovable, // get_tile_track_status_proc
|
|
|
ClickTile_Unmovable, // click_tile_proc
|
|
|
AnimateTile_Unmovable, // animate_tile_proc
|
|
|
TileLoop_Unmovable, // tile_loop_clear
|
|
|
ChangeTileOwner_Unmovable, // change_tile_owner_clear
|
|
|
NULL, // get_produced_cargo_proc
|
|
|
NULL, // vehicle_enter_tile_proc
|
|
|
GetFoundation_Unmovable, // get_foundation_proc
|
|
|
TerraformTile_Unmovable, // terraform_tile_proc
|
|
|
};
|