Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_NightModeEditorAttribute.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
2
class
SCR_NightModeEditorAttribute
:
SCR_BaseEditorAttribute
3
{
4
//------------------------------------------------------------------------------------------------
5
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
6
{
7
BaseGameMode gamemode = BaseGameMode.Cast(item);
8
if
(!gamemode)
9
return
null;
10
11
SCR_NightModeGameModeComponent nightModeComponent = SCR_NightModeGameModeComponent.Cast(gamemode.FindComponent(SCR_NightModeGameModeComponent));
12
if
(!nightModeComponent || !nightModeComponent.IsGlobalNightModeAllowed() || !nightModeComponent.CanEnableNightMode())
13
return
null;
14
15
return
SCR_BaseEditorAttributeVar
.
CreateBool
(nightModeComponent.IsGlobalNightModeEnabled());
16
}
17
18
//------------------------------------------------------------------------------------------------
19
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
20
{
21
if
(!var)
22
return
;
23
24
BaseGameMode gamemode = BaseGameMode.Cast(item);
25
if
(!gamemode)
26
return
;
27
28
SCR_NightModeGameModeComponent nightModeComponent = SCR_NightModeGameModeComponent.Cast(gamemode.FindComponent(SCR_NightModeGameModeComponent));
29
if
(!nightModeComponent || !nightModeComponent.IsGlobalNightModeAllowed() || !nightModeComponent.CanEnableNightMode())
30
return
;
31
32
nightModeComponent.EnableGlobalNightMode(var.
GetBool
(), playerID);
33
}
34
};
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_BaseEditorAttributeCustomTitle
Definition
SCR_BaseEditorAttribute.c:876
SCR_BaseEditorAttribute
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
Definition
SCR_BaseEditorAttribute.c:4
SCR_BaseEditorAttributeVar
Definition
SCR_BaseEditorAttributeVar.c:2
SCR_BaseEditorAttributeVar::CreateBool
static SCR_BaseEditorAttributeVar CreateBool(bool value)
Definition
SCR_BaseEditorAttributeVar.c:119
SCR_BaseEditorAttributeVar::GetBool
bool GetBool()
Definition
SCR_BaseEditorAttributeVar.c:56
SCR_NightModeEditorAttribute
Definition
SCR_NightModeEditorAttribute.c:3
scripts
Game
Editor
Containers
Attributes
SCR_NightModeEditorAttribute.c
Generated by
1.17.0