Mercurial > hg > openttd
changeset 15090:b3e12e335b99 draft
(svn r19716) -Documentation: Add comments for lock building and removal functions.
author | terkhen <terkhen@openttd.org> |
---|---|
date | Sun, 25 Apr 2010 13:44:49 +0000 |
parents | e0fd48f3f61b |
children | 7ae492c43c9a |
files | src/water_cmd.cpp |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -190,7 +190,12 @@ return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_CLEAR_DEPOT_SHIP]); } -/** build a lock */ +/** Builds a lock. + * @param tile Central tile of the lock. + * @param dir Uphill direction. + * @param flags Operation to perform. + * @return The cost in case of success, or an error code if it failed. + */ static CommandCost DoBuildLock(TileIndex tile, DiagDirection dir, DoCommandFlag flags) { /* middle tile */ @@ -234,6 +239,11 @@ return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_CLEAR_WATER] * 22 >> 3); } +/** Remove a lock. + * @param tile Central tile of the lock. + * @param flags Operation to perform. + * @return The cost in case of success, or an error code if it failed. + */ static CommandCost RemoveLock(TileIndex tile, DoCommandFlag flags) { if (GetTileOwner(tile) != OWNER_NONE) { @@ -262,7 +272,7 @@ return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_CLEAR_WATER] * 2); } -/** Builds a lock (ship-lift) +/** Builds a lock. * @param tile tile where to place the lock * @param flags type of operation * @param p1 unused