equal
deleted
inserted
replaced
199 * @param p2 unused |
199 * @param p2 unused |
200 * |
200 * |
201 * @todo When checking for the tile slope, |
201 * @todo When checking for the tile slope, |
202 * distingush between "Flat land required" and "land sloped in wrong direction" |
202 * distingush between "Flat land required" and "land sloped in wrong direction" |
203 */ |
203 */ |
204 int32 CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
204 CommandCost CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
205 { |
205 { |
206 Waypoint *wp; |
206 Waypoint *wp; |
207 Slope tileh; |
207 Slope tileh; |
208 Axis axis; |
208 Axis axis; |
209 |
209 |
293 * @param tile from which to remove waypoint |
293 * @param tile from which to remove waypoint |
294 * @param flags type of operation |
294 * @param flags type of operation |
295 * @param justremove will indicate if it is removed from rail or if rails are removed too |
295 * @param justremove will indicate if it is removed from rail or if rails are removed too |
296 * @return cost of operation or error |
296 * @return cost of operation or error |
297 */ |
297 */ |
298 int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove) |
298 CommandCost RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove) |
299 { |
299 { |
300 Waypoint *wp; |
300 Waypoint *wp; |
301 |
301 |
302 /* Make sure it's a waypoint */ |
302 /* Make sure it's a waypoint */ |
303 if (!IsTileType(tile, MP_RAILWAY) || |
303 if (!IsTileType(tile, MP_RAILWAY) || |
333 * @param flags type of operation |
333 * @param flags type of operation |
334 * @param p1 unused |
334 * @param p1 unused |
335 * @param p2 unused |
335 * @param p2 unused |
336 * @return cost of operation or error |
336 * @return cost of operation or error |
337 */ |
337 */ |
338 int32 CmdRemoveTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
338 CommandCost CmdRemoveTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
339 { |
339 { |
340 SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION); |
340 SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION); |
341 return RemoveTrainWaypoint(tile, flags, true); |
341 return RemoveTrainWaypoint(tile, flags, true); |
342 } |
342 } |
343 |
343 |
347 * @param flags type of operation |
347 * @param flags type of operation |
348 * @param p1 id of waypoint |
348 * @param p1 id of waypoint |
349 * @param p2 unused |
349 * @param p2 unused |
350 * @return cost of operation or error |
350 * @return cost of operation or error |
351 */ |
351 */ |
352 int32 CmdRenameWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
352 CommandCost CmdRenameWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
353 { |
353 { |
354 Waypoint *wp; |
354 Waypoint *wp; |
355 |
355 |
356 if (!IsValidWaypointID(p1)) return CMD_ERROR; |
356 if (!IsValidWaypointID(p1)) return CMD_ERROR; |
357 |
357 |