# ai_group.hpp

Go to the documentation of this file.

    00001 /* $Id: ai_group.hpp 15123 2009-01-17 15:31:30Z truebrain $ */
    00002
    00005 #ifndef AI_GROUP_HPP
    00006 #define AI_GROUP_HPP
    00007
    00008 #include "ai_object.hpp"
    00009 #include "ai_vehicle.hpp"
    00010
    00014 class AIGroup : public AIObject {
    00015 public:
    00016   static const char *GetClassName() { return "AIGroup"; }
    00017
    00021   enum GroupID {
    00022     /* Values are important, as they represent the internal state of the game (see group_type.h). */
    00023     GROUP_ALL = 0xFFFD,
    00024     GROUP_DEFAULT = 0xFFFE,
    00025     GROUP_INVALID = 0xFFFF,
    00026   };
    00027
    00034   static bool IsValidGroup(GroupID group_id);
    00035
    00043   static GroupID CreateGroup(AIVehicle::VehicleType vehicle_type);
    00044
    00052   static bool DeleteGroup(GroupID group_id);
    00053
    00060   static AIVehicle::VehicleType GetVehicleType(GroupID group_id);
    00061
    00072   static bool SetName(GroupID group_id, const char *name);
    00073
    00080   static char *GetName(GroupID group_id);
    00081
    00090   static bool EnableAutoReplaceProtection(GroupID group_id, bool enable);
    00091
    00098   static bool GetAutoReplaceProtection(GroupID group_id);
    00099
    00107   static int32 GetNumEngines(GroupID group_id, EngineID engine_id);
    00108
    00120   static bool MoveVehicle(GroupID group_id, VehicleID vehicle_id);
    00121
    00130   static bool EnableWagonRemoval(bool keep_length);
    00131
    00136   static bool HasWagonRemoval();
    00137
    00148   static bool SetAutoReplace(GroupID group_id, EngineID engine_id_old, EngineID engine_id_new);
    00149
    00158   static EngineID GetEngineReplacement(GroupID group_id, EngineID engine_id);
    00159
    00167   static bool StopAutoReplace(GroupID group_id, EngineID engine_id);
    00168 };
    00169
    00170 #endif /* AI_GROUP_HPP */