Loading

Revision differences

Old revision #px2mrnq7qNew revision #pwdejvohy
1enum ScriptSlotFlags {  1enum ScriptSlotFlags {  
2    SCRIPTSLOT_NONE                         = 0,                                             ///< No Company or Game Script started in this slot  2    SST_GAMEMODE   = 0x1,  ///< _game_mode == GM_NORMAL or _game_mode != GM_NORMAL
3    SCRIPTSLOT_HU_STARTED                   = 1,                                             ///< Human Company started in this slot  3    SST_SLOT       = 0x2,  ///< slot == OWNER_DEITY or slot != OWNER_DEITY
4    SCRIPTSLOT_AI_STARTED                   = 2,                                             ///< AI Company started in this slot  4    SST_GSSTATE    = 0x4,  ///< Game::GetInstance()->IsDead() or !Game::GetInstance()->IsDead()
5    SCRIPTSLOT_GS_STARTED                   = 3,                                             ///< Game Script started in this slot  5    SST_AICOMPANY  = 0x8,  ///< Company::IsValidAiID(slot) or !Company::IsValidAiID(slot)
6     6    SST_AISTATE    = 0x10, ///< Company::Get(slot)->ai_instance->IsDead() or !Company::Get(slot)->ai_instance->IsDead()
7    SCRIPTSLOT_SCRIPT_STARTED               = SCRIPTSLOT_AI_STARTED | SCRIPTSLOT_GS_STARTED, ///< A script started in this slot, regardless if it's AI or GS  7    SST_INGAME     = 0x20, ///< (config_item.flags & SCRIPTCONFIG_INGAME) == 0 or (config_item.flags & SCRIPTCONFIG_INGAME) != 0
8     8};
9    SCRIPTSLOT_DEAD                         = 4,                                             ///<  9
10     10---------
11    SCRIPTSLOT_SCRIPT_DEAD                  = SCRIPTSLOT_SCRIPT_STARTED & SCRIPTSLOT_DEAD,   ///< A script is dead.  115
12}; 12_game_mode == GM_NORMAL
   13_game_mode != GM_NORMAL
   14
   154
   16slot == OWNER_DEITY
   17slot != OWNER_DEITY
   18
   193
   20Game::GetInstance()->IsDead()
   21!Game::GetInstance()->IsDead()
   22
   232
   24Company::IsValidAiID(slot)
   25!Company::IsValidAiID(slot)
   26
   271
   28Company::Get(slot)->ai_instance->IsDead()
   29!Company::Get(slot)->ai_instance->IsDead()
   30
   310
   32(config_item.flags & SCRIPTCONFIG_INGAME) == 0
   33(config_item.flags & SCRIPTCONFIG_INGAME) != 0
   34
   355 4 3 2 1 0
   36===========
   370 0 0 x x 1 - dead gs in a game, edit all parameters
   380 0 1 x x 0 - alive gs in a game, edit some parameters
   39
   400 1 x 0 0 1 - dead ai in a game, edit all parameters
   410 1 x 0 1 0 - alive ai in a game, edit some parameters
   42
   430 1 x 1 x 1 - human or none in a game, edit all parameters
   44
   451 0 x x x 1 - gs in main menu, edit all parameters
   461 1 x 1 x 1 - ai in main menu, edit all parameters