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_TimeAdvancementEditorAttribute.c
Go to the documentation of this file.
1
// Script File
5
// Script File
6
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
7
class
SCR_TimeAdvancementEditorAttribute
:
SCR_BaseEditorAttribute
8
{
9
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
10
{
11
//If opened in global attributes
12
if
(!
IsGameMode
(item))
return
null;
13
14
GenericEntity
ent =
GenericEntity
.Cast(item);
15
ChimeraWorld
world = ent.
GetWorld
();
16
TimeAndWeatherManagerEntity
weatherManager = world.GetTimeAndWeatherManager();
17
if
(!weatherManager)
return
null;
18
19
return
SCR_BaseEditorAttributeVar
.
CreateBool
(weatherManager.GetIsDayAutoAdvanced());
20
}
21
22
//Disable respawn time if respawning is disabled
23
override
void
UpdateInterlinkedVariables(
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
bool
isInit =
false
)
24
{
25
if
(isInit)
26
manager.SetAttributeAsSubAttribute(
SCR_DayDurationEditorAttribute
);
27
28
manager.SetAttributeEnabled(
SCR_DayDurationEditorAttribute
, var && var.
GetBool
());
29
}
30
31
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
32
{
33
GenericEntity
ent =
GenericEntity
.Cast(item);
34
ChimeraWorld
world = ent.
GetWorld
();
35
TimeAndWeatherManagerEntity
weatherManager = world.GetTimeAndWeatherManager();
36
if
(!weatherManager)
37
return
;
38
39
bool
value = var.
GetBool
();
40
weatherManager.SetIsDayAutoAdvanced(value);
41
42
if
(item)
43
{
44
if
(value)
45
SCR_NotificationsComponent.SendToUnlimitedEditorPlayers(
ENotification
.EDITOR_ATTRIBUTES_DAY_ADVANCE_ENABLED, playerID);
46
else
47
SCR_NotificationsComponent.SendToUnlimitedEditorPlayers(
ENotification
.EDITOR_ATTRIBUTES_DAY_ADVANCE_DISABLED, playerID);
48
}
49
}
50
};
ENotification
ENotification
Definition
ENotification.c:5
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
ChimeraWorld
Definition
ChimeraWorld.c:13
GenericEntity
Definition
GenericEntity.c:16
IEntity::GetWorld
proto external BaseWorld GetWorld()
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_BaseEditorAttribute::IsGameMode
bool IsGameMode(Managed item)
Definition
SCR_BaseEditorAttribute.c:466
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_DayDurationEditorAttribute
Definition
SCR_DayDurationEditorAttribute.c:6
SCR_TimeAdvancementEditorAttribute
Definition
SCR_TimeAdvancementEditorAttribute.c:8
TimeAndWeatherManagerEntity
Definition
TimeAndWeatherManagerEntity.c:26
scripts
Game
Editor
Containers
Attributes
SCR_TimeAdvancementEditorAttribute.c
Generated by
1.17.0