diff options
author | Tyler Trahan <tyler@tylertrahan.com> | 2021-11-08 03:12:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-08 08:12:15 +0000 |
commit | e9cb9c11357133ed4695a434bf5d6b927059e9ff (patch) | |
tree | 114e2672799b3546cb1a579db11732650ffeb87f | |
parent | c38af729787f25e56cb19fce90d89eebf3067c66 (diff) | |
download | openttd-e9cb9c11357133ed4695a434bf5d6b927059e9ff.tar.xz |
Fix #9579: Object and HQ construction is Construction cost, not Property Maintenance (#9673)
-rw-r--r-- | regression/regression/result.txt | 2 | ||||
-rw-r--r-- | src/object_cmd.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/regression/regression/result.txt b/regression/regression/result.txt index 69322b1d2..984c1de82 100644 --- a/regression/regression/result.txt +++ b/regression/regression/result.txt @@ -639,7 +639,7 @@ ERROR: IsEnd() is invalid as Begin() is never called GetQuarterlyCompanyValue(): -1 Quarter: 0 GetQuarterlyIncome(): 0 - GetQuarterlyExpenses(): -210 + GetQuarterlyExpenses(): 0 GetQuarterlyCargoDelivered(): 0 GetQuarterlyPerformanceRating(): -1 GetQuarterlyCompanyValue(): 1 diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index cd080ca53..7e1e36c1f 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -204,7 +204,7 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags); */ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text) { - CommandCost cost(EXPENSES_PROPERTY); + CommandCost cost(EXPENSES_CONSTRUCTION); ObjectType type = (ObjectType)GB(p1, 0, 16); if (type >= NUM_OBJECTS) return CMD_ERROR; @@ -526,7 +526,7 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags) } /* cost of relocating company is 1% of company value */ - cost = CommandCost(EXPENSES_PROPERTY, CalculateCompanyValue(c) / 100); + cost = CommandCost(EXPENSES_CONSTRUCTION, CalculateCompanyValue(c) / 100); break; } |