src/signs.cpp
branchgamebalance
changeset 9913 e79cd19772dd
parent 9912 1ac8aac92385
equal deleted inserted replaced
9912:1ac8aac92385 9913:e79cd19772dd
   120  * @param tile tile to place sign at
   120  * @param tile tile to place sign at
   121  * @param flags type of operation
   121  * @param flags type of operation
   122  * @param p1 unused
   122  * @param p1 unused
   123  * @param p2 unused
   123  * @param p2 unused
   124  */
   124  */
   125 int32 CmdPlaceSign(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   125 CommandCost CmdPlaceSign(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   126 {
   126 {
   127 	Sign *si;
   127 	Sign *si;
   128 
   128 
   129 	/* Try to locate a new sign */
   129 	/* Try to locate a new sign */
   130 	si = AllocateSign();
   130 	si = AllocateSign();
   157  * @param flags type of operation
   157  * @param flags type of operation
   158  * @param p1 index of the sign to be renamed/removed
   158  * @param p1 index of the sign to be renamed/removed
   159  * @param p2 unused
   159  * @param p2 unused
   160  * @return 0 if succesfull, otherwise CMD_ERROR
   160  * @return 0 if succesfull, otherwise CMD_ERROR
   161  */
   161  */
   162 int32 CmdRenameSign(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   162 CommandCost CmdRenameSign(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   163 {
   163 {
   164 	if (!IsValidSignID(p1)) return CMD_ERROR;
   164 	if (!IsValidSignID(p1)) return CMD_ERROR;
   165 
   165 
   166 	/* If _cmd_text 0 means the new text for the sign is non-empty.
   166 	/* If _cmd_text 0 means the new text for the sign is non-empty.
   167 	 * So rename the sign. If it is empty, it has no name, so delete it */
   167 	 * So rename the sign. If it is empty, it has no name, so delete it */