File diff r25561:3defb050f30b → r25562:30716ba6a396
src/object_cmd.cpp
Show inline comments
 
@@ -199,7 +199,7 @@ static CommandCost ClearTile_Object(Tile
 
 * @param text unused
 
 * @return the cost of this operation or an error
 
 */
 
CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
 
CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
 
{
 
	CommandCost cost(EXPENSES_PROPERTY);
 

	
 
@@ -769,7 +769,7 @@ void GenerateObjects()
 

	
 
				default:
 
					uint8 view = RandomRange(spec->views);
 
					if (CmdBuildObject(RandomTile(), DC_EXEC | DC_AUTO | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, i, view, nullptr).Succeeded()) amount--;
 
					if (CmdBuildObject(RandomTile(), DC_EXEC | DC_AUTO | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, i, view, {}).Succeeded()) amount--;
 
					break;
 
			}
 
		}