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. |