src/player.h
branchgamebalance
changeset 9913 e79cd19772dd
parent 9912 1ac8aac92385
equal deleted inserted replaced
9912:1ac8aac92385 9913:e79cd19772dd
   147 	byte to_type;
   147 	byte to_type;
   148 
   148 
   149 };
   149 };
   150 
   150 
   151 
   151 
       
   152 /* The "steps" in loan size, in British Pounds! */
       
   153 enum {
       
   154 	LOAN_INTERVAL        = 10000,
       
   155 	LOAN_INTERVAL_OLD_AI = 50000,
       
   156 };
       
   157 
   152 typedef uint32 PlayerFace;
   158 typedef uint32 PlayerFace;
   153 
   159 
   154 struct Player {
   160 struct Player {
   155 	uint32 name_2;
   161 	uint32 name_2;
   156 	uint16 name_1;
   162 	uint16 name_1;
   329  * @param old_engine The original engine type.
   335  * @param old_engine The original engine type.
   330  * @param new_engine The replacement engine type.
   336  * @param new_engine The replacement engine type.
   331  * @param flags The calling command flags.
   337  * @param flags The calling command flags.
   332  * @return 0 on success, CMD_ERROR on failure.
   338  * @return 0 on success, CMD_ERROR on failure.
   333  */
   339  */
   334 static inline int32 AddEngineReplacementForPlayer(Player *p, EngineID old_engine, EngineID new_engine, GroupID group, uint32 flags) { return AddEngineReplacement(&p->engine_renew_list, old_engine, new_engine, group, flags); }
   340 static inline CommandCost AddEngineReplacementForPlayer(Player *p, EngineID old_engine, EngineID new_engine, GroupID group, uint32 flags) { return AddEngineReplacement(&p->engine_renew_list, old_engine, new_engine, group, flags); }
   335 
   341 
   336 /**
   342 /**
   337  * Remove an engine replacement for the player.
   343  * Remove an engine replacement for the player.
   338  * @param p Player.
   344  * @param p Player.
   339  * @param engine The original engine type.
   345  * @param engine The original engine type.
   340  * @param flags The calling command flags.
   346  * @param flags The calling command flags.
   341  * @return 0 on success, CMD_ERROR on failure.
   347  * @return 0 on success, CMD_ERROR on failure.
   342  */
   348  */
   343 static inline int32 RemoveEngineReplacementForPlayer(Player *p, EngineID engine, GroupID group, uint32 flags) {return RemoveEngineReplacement(&p->engine_renew_list, engine, group, flags); }
   349 static inline CommandCost RemoveEngineReplacementForPlayer(Player *p, EngineID engine, GroupID group, uint32 flags) {return RemoveEngineReplacement(&p->engine_renew_list, engine, group, flags); }
   344 
   350 
   345 /**
   351 /**
   346  * Reset the livery schemes to the player's primary colour.
   352  * Reset the livery schemes to the player's primary colour.
   347  * This is used on loading games without livery information and on new player start up.
   353  * This is used on loading games without livery information and on new player start up.
   348  * @param p Player to reset.
   354  * @param p Player to reset.