src/misc_cmd.cpp
branchnoai
changeset 9601 b499fdd106d5
parent 9462 a4f49aab1367
child 9628 b5c2449616b5
equal deleted inserted replaced
9600:59cc173953ae 9601:b499fdd106d5
    18 #include "livery.h"
    18 #include "livery.h"
    19 #include "player_face.h"
    19 #include "player_face.h"
    20 
    20 
    21 /** Change the player's face.
    21 /** Change the player's face.
    22  * @param tile unused
    22  * @param tile unused
       
    23  * @param flags operation to perform
    23  * @param p1 unused
    24  * @param p1 unused
    24  * @param p2 face bitmasked
    25  * @param p2 face bitmasked
    25  */
    26  */
    26 int32 CmdSetPlayerFace(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
    27 int32 CmdSetPlayerFace(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
    27 {
    28 {
    36 	return 0;
    37 	return 0;
    37 }
    38 }
    38 
    39 
    39 /** Change the player's company-colour
    40 /** Change the player's company-colour
    40  * @param tile unused
    41  * @param tile unused
       
    42  * @param flags operation to perform
    41  * @param p1 bitstuffed:
    43  * @param p1 bitstuffed:
    42  * p1 bits 0-7 scheme to set
    44  * p1 bits 0-7 scheme to set
    43  * p1 bits 8-9 set in use state or first/second colour
    45  * p1 bits 8-9 set in use state or first/second colour
    44  * @param p2 new colour for vehicles, property, etc.
    46  * @param p2 new colour for vehicles, property, etc.
    45  */
    47  */
   115 	return 0;
   117 	return 0;
   116 }
   118 }
   117 
   119 
   118 /** Increase the loan of your company.
   120 /** Increase the loan of your company.
   119  * @param tile unused
   121  * @param tile unused
       
   122  * @param flags operation to perform
   120  * @param p1 amount to increase the loan with, multitude of LOAN_INTERVAL. Only used when p2 == 2.
   123  * @param p1 amount to increase the loan with, multitude of LOAN_INTERVAL. Only used when p2 == 2.
   121  * @param p2 when 0: loans LOAN_INTERVAL
   124  * @param p2 when 0: loans LOAN_INTERVAL
   122  *           when 1: loans the maximum loan permitting money (press CTRL),
   125  *           when 1: loans the maximum loan permitting money (press CTRL),
   123  *           when 2: loans the amount specified in p1
   126  *           when 2: loans the amount specified in p1
   124  */
   127  */
   162 	return 0;
   165 	return 0;
   163 }
   166 }
   164 
   167 
   165 /** Decrease the loan of your company.
   168 /** Decrease the loan of your company.
   166  * @param tile unused
   169  * @param tile unused
       
   170  * @param flags operation to perform
   167  * @param p1 amount to decrease the loan with, multitude of LOAN_INTERVAL. Only used when p2 == 2.
   171  * @param p1 amount to decrease the loan with, multitude of LOAN_INTERVAL. Only used when p2 == 2.
   168  * @param p2 when 0: pays back LOAN_INTERVAL
   172  * @param p2 when 0: pays back LOAN_INTERVAL
   169  *           when 1: pays back the maximum loan permitting money (press CTRL),
   173  *           when 1: pays back the maximum loan permitting money (press CTRL),
   170  *           when 2: pays back the amount specified in p1
   174  *           when 2: pays back the amount specified in p1
   171  */
   175  */
   205 	return 0;
   209 	return 0;
   206 }
   210 }
   207 
   211 
   208 /** Change the name of the company.
   212 /** Change the name of the company.
   209  * @param tile unused
   213  * @param tile unused
       
   214  * @param flags operation to perform
   210  * @param p1 unused
   215  * @param p1 unused
   211  * @param p2 unused
   216  * @param p2 unused
   212  */
   217  */
   213 int32 CmdChangeCompanyName(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   218 int32 CmdChangeCompanyName(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   214 {
   219 {
   232 	return 0;
   237 	return 0;
   233 }
   238 }
   234 
   239 
   235 /** Change the name of the president.
   240 /** Change the name of the president.
   236  * @param tile unused
   241  * @param tile unused
       
   242  * @param flags operation to perform
   237  * @param p1 unused
   243  * @param p1 unused
   238  * @param p2 unused
   244  * @param p2 unused
   239  */
   245  */
   240 int32 CmdChangePresidentName(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   246 int32 CmdChangePresidentName(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   241 {
   247 {
   270 /** Pause/Unpause the game (server-only).
   276 /** Pause/Unpause the game (server-only).
   271  * Increase or decrease the pause counter. If the counter is zero,
   277  * Increase or decrease the pause counter. If the counter is zero,
   272  * the game is unpaused. A counter is used instead of a boolean value
   278  * the game is unpaused. A counter is used instead of a boolean value
   273  * to have more control over the game when saving/loading, etc.
   279  * to have more control over the game when saving/loading, etc.
   274  * @param tile unused
   280  * @param tile unused
       
   281  * @param flags operation to perform
   275  * @param p1 0 = decrease pause counter; 1 = increase pause counter
   282  * @param p1 0 = decrease pause counter; 1 = increase pause counter
   276  * @param p2 unused
   283  * @param p2 unused
   277  */
   284  */
   278 int32 CmdPause(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   285 int32 CmdPause(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   279 {
   286 {
   288 
   295 
   289 /** Change the financial flow of your company.
   296 /** Change the financial flow of your company.
   290  * This is normally only enabled in offline mode, but if there is a debug
   297  * This is normally only enabled in offline mode, but if there is a debug
   291  * build, you can cheat (to test).
   298  * build, you can cheat (to test).
   292  * @param tile unused
   299  * @param tile unused
       
   300  * @param flags operation to perform
   293  * @param p1 the amount of money to receive (if negative), or spend (if positive)
   301  * @param p1 the amount of money to receive (if negative), or spend (if positive)
   294  * @param p2 unused
   302  * @param p2 unused
   295  */
   303  */
   296 int32 CmdMoneyCheat(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   304 int32 CmdMoneyCheat(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   297 {
   305 {
   305 /** Transfer funds (money) from one player to another.
   313 /** Transfer funds (money) from one player to another.
   306  * To prevent abuse in multiplayer games you can only send money to other
   314  * To prevent abuse in multiplayer games you can only send money to other
   307  * players if you have paid off your loan (either explicitely, or implicitely
   315  * players if you have paid off your loan (either explicitely, or implicitely
   308  * given the fact that you have more money than loan).
   316  * given the fact that you have more money than loan).
   309  * @param tile unused
   317  * @param tile unused
       
   318  * @param flags operation to perform
   310  * @param p1 the amount of money to transfer; max 20.000.000
   319  * @param p1 the amount of money to transfer; max 20.000.000
   311  * @param p2 the player to transfer the money to
   320  * @param p2 the player to transfer the money to
   312  */
   321  */
   313 int32 CmdGiveMoney(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   322 int32 CmdGiveMoney(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   314 {
   323 {
   336 /** Change difficulty level/settings (server-only).
   345 /** Change difficulty level/settings (server-only).
   337  * We cannot really check for valid values of p2 (too much work mostly); stored
   346  * We cannot really check for valid values of p2 (too much work mostly); stored
   338  * in file 'settings_gui.c' _game_setting_info[]; we'll just trust the server it knows
   347  * in file 'settings_gui.c' _game_setting_info[]; we'll just trust the server it knows
   339  * what to do and does this correctly
   348  * what to do and does this correctly
   340  * @param tile unused
   349  * @param tile unused
       
   350  * @param flags operation to perform
   341  * @param p1 the difficulty setting being changed. If it is -1, the difficulty level
   351  * @param p1 the difficulty setting being changed. If it is -1, the difficulty level
   342  *           itself is changed. The new value is inside p2
   352  *           itself is changed. The new value is inside p2
   343  * @param p2 new value for a difficulty setting or difficulty level
   353  * @param p2 new value for a difficulty setting or difficulty level
   344  */
   354  */
   345 int32 CmdChangeDifficultyLevel(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
   355 int32 CmdChangeDifficultyLevel(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)