Loading

Revision differences

Old revision #p65cplx9wNew revision #pbh42bouj
1enum ScriptSlotFlags {  1enum ScriptSlotFlags {  
2    SCRIPTSLOT_NONE                         = 0, ///<  2    SST_GAMEMODE   = 0x1,  ///< _game_mode == GM_NORMAL or _game_mode != GM_NORMAL
3    SCRIPTSLOT_HU_STARTED                   = 1, ///<  3    SST_SLOT       = 0x2,  ///< slot == OWNER_DEITY or slot != OWNER_DEITY
4    SCRIPTSLOT_AI_STARTED                   = 2, ///<  4    SST_GSSTATE    = 0x4,  ///< Game::GetInstance()->IsDead() or !Game::GetInstance()->IsDead()
5    SCRIPTSLOT_GS_STARTED                   = 3, ///<  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, 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  
9}; 10---------
   115
   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
   390 0 1 x x 1 - alive gs in a game, edit all parameters
   40
   410 1 x 0 0 1 - dead ai in a game, edit all parameters
   420 1 x 0 1 0 - alive ai in a game, edit some parameters
   430 1 x 0 1 1 - alive ai in a game, edit all parameters
   44
   450 1 x 1 x 1 - human or none in a game, edit all parameters
   46
   471 0 x x x 1 - gs in main menu, edit all parameters
   481 1 x 1 x 1 - ai in main menu, edit all parameters