7 BaseGameMode gamemode = BaseGameMode.Cast(item);
11 SCR_NightModeGameModeComponent nightModeComponent = SCR_NightModeGameModeComponent.Cast(gamemode.FindComponent(SCR_NightModeGameModeComponent));
12 if (!nightModeComponent || !nightModeComponent.IsGlobalNightModeAllowed() || !nightModeComponent.CanEnableNightMode())
19 override void WriteVariable(Managed item,
SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager,
int playerID)
24 BaseGameMode gamemode = BaseGameMode.Cast(item);
28 SCR_NightModeGameModeComponent nightModeComponent = SCR_NightModeGameModeComponent.Cast(gamemode.FindComponent(SCR_NightModeGameModeComponent));
29 if (!nightModeComponent || !nightModeComponent.IsGlobalNightModeAllowed() || !nightModeComponent.CanEnableNightMode())
32 nightModeComponent.EnableGlobalNightMode(var.GetBool(), playerID);