src/ai/api/ai_engine.hpp
branchnoai
changeset 9809 9b21c21052fa
parent 9733 49e424cd4edd
child 9829 80fbe02a4184
equal deleted inserted replaced
9808:0b40f556e051 9809:9b21c21052fa
    39 	 * @param engine_id the engine to get the cargo-type of.
    39 	 * @param engine_id the engine to get the cargo-type of.
    40 	 * @pre IsValidEngine(engine_id).
    40 	 * @pre IsValidEngine(engine_id).
    41 	 * @return the cargo-type of the engine.
    41 	 * @return the cargo-type of the engine.
    42 	 */
    42 	 */
    43 	static CargoID GetCargoType(EngineID engine_id);
    43 	static CargoID GetCargoType(EngineID engine_id);
       
    44 
       
    45 	/**
       
    46 	 * Check if the cargo of an engine can be refitted to your requested. If
       
    47 	 *  the engine already allows this cargo, the function also returns true.
       
    48 	 * @param engine_id the engine to check for refitting.
       
    49 	 * @param cargo_id the cargo to check for refitting.
       
    50 	 * @pre IsValidEngine(engine_id).
       
    51 	 * @pre AICargo::IsValidCargo(cargo_id).
       
    52 	 * @return True if the engine can carry this cargo, either via refit, or
       
    53 	 *  by default.
       
    54 	 */
       
    55 	static bool CanRefitCargo(EngineID engine_id, CargoID cargo_id);
    44 
    56 
    45 	/**
    57 	/**
    46 	 * Get the capacity of an engine. In case it can transport 2 cargos, it
    58 	 * Get the capacity of an engine. In case it can transport 2 cargos, it
    47 	 *  returns the first.
    59 	 *  returns the first.
    48 	 * @param engine_id the engine to get the capacity of.
    60 	 * @param engine_id the engine to get the capacity of.