enum ScriptSlotFlags {
SST_GAMEMODE = 0x1, ///< _game_mode == GM_NORMAL or _game_mode != GM_NORMAL
SST_SLOT = 0x2, ///< slot == OWNER_DEITY or slot != OWNER_DEITY
SST_GSSTATE = 0x4, ///< Game::GetInstance()->IsDead() or !Game::GetInstance()->IsDead()
SST_AICOMPANY = 0x8, ///< Company::IsValidAiID(slot) or !Company::IsValidAiID(slot)
SST_AISTATE = 0x10, ///< Company::Get(slot)->ai_instance->IsDead() or !Company::Get(slot)->ai_instance->IsDead()
SST_INGAME = 0x20, ///< (config_item.flags & SCRIPTCONFIG_INGAME) == 0 or (config_item.flags & SCRIPTCONFIG_INGAME) != 0
};
---------
5
_game_mode == GM_NORMAL
_game_mode != GM_NORMAL
4
slot == OWNER_DEITY
slot != OWNER_DEITY
3
Game::GetInstance()->IsDead()
!Game::GetInstance()->IsDead()
2
Company::IsValidAiID(slot)
!Company::IsValidAiID(slot)
1
Company::Get(slot)->ai_instance->IsDead()
!Company::Get(slot)->ai_instance->IsDead()
0
(config_item.flags & SCRIPTCONFIG_INGAME) == 0
(config_item.flags & SCRIPTCONFIG_INGAME) != 0
5 4 3 2 1 0
===========
0 0 0 x x 1 - dead gs in a game, edit all parameters
0 0 1 x x 0 - alive gs in a game, edit some parameters
0 1 x 0 0 1 - dead ai in a game, edit all parameters
0 1 x 0 1 0 - alive ai in a game, edit some parameters
0 1 x 1 x 1 - human or none in a game, edit all parameters
1 0 x x x 1 - gs in main menu, edit all parameters
1 1 x 1 x 1 - ai in main menu, edit all parameters