Simulator::cToolManager class

Base classes

class cStrategy
class App::IUnmanagedMessageListener
Same as App::IMessageListener, but this one does not use ref-counting.

Public types

enum ToolFailText { kCantUseInThisSystem = 0, kMustUseOnPlanet = 1, kRanOutOfAmmo = 2, kRecharging = 3, kMustBeUsedOnEmpirePlanet = 4, kMustBeUsedOnAlienColony = 5, kMustBeUsedOnYourColony = 6, kCanOnlyHaveOnePerPlanet = 7, kNoRoomInFleet = 8, kAlreadyHaveMiniU = 9, kSystemMustHaveTradeRoute = 0x0A, kMustBeOnHighestTech = 0x0B, kAnimalMustBePresentOnPlanet = 0x0C, kCannotUseMonolith = 0x0D, kCantUseOnEmpireSystems = 0x0E, kCantUseOnWildlifeSanctuary = 0x0F, kMustBeOnWildPlanets = 0x10, kNeedHigherTerrascore = 0x11, kCantUseOnHomeworld = 0x12, kEnergyIsFull = 0x13, kHealthIsFull = 0x14, kCantUseOverWater = 0x15, kCantUseAboveACity = 0x16, kYouAreTooHighUp = 0x17, kStarSystemAlreadyHasSentient = 0x18, kCantPlaceMoreColoniesWithCurrentTScore = 0x19 }
enum Messages { kMsgToolActivated = 0x61DAE5C, kMsgToolDeactivated = 0x61DAE65 }

Public static functions

static auto Get() -> cToolManager*
Returns the active Simulator tool manager.

Public functions

auto LoadTool(const ResourceKey& id, intrusive_ptr<cSpaceToolData>& dst) -> bool
auto GetStrategy(uint32_t strategyID) -> cToolStrategy*
void AddStrategy(cToolStrategy* pStrategy, uint32_t id)
auto GetToolFailText(ToolFailText index) -> const char16_t*
auto ActivateTool(cSpaceToolData* pTool) -> bool
auto DeactivateTool(cSpaceToolData* pTool) -> bool
auto OnMouseUp(cSpaceToolData* pTool) -> bool

Protected variables

int field_20
int field_24
int field_28
Math::Vector3 field_2C
hash_map<uint32_t, intrusive_ptr<cToolStrategy>> mStrategies
map<int, int> field_58
LocalizedString mToolFailTexts
int field_27C
int field_280
int field_284
int field_288
int field_28C
Math::Vector3 field_290