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_RespawnTimeEditorAttribute.c
Go to the documentation of this file.
1
4
// Script File
5
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
6
class
SCR_RespawnTimeEditorAttribute
:
SCR_BaseValueListEditorAttribute
7
{
8
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
9
{
10
//If opened in global attributes
11
if
(!
IsGameMode
(item))
return
null;
12
13
SCR_BaseGameMode
gameMode =
SCR_BaseGameMode
.Cast(
GetGame
().
GetGameMode
());
14
if
(!gameMode)
return
null;
15
SCR_RespawnTimerComponent
respawnTimeComponent =
SCR_RespawnTimerComponent
.Cast(gameMode.FindComponent(
SCR_RespawnTimerComponent
));
16
if
(!respawnTimeComponent)
return
null;
17
18
float
value = respawnTimeComponent.GetRespawnTime();
19
return
SCR_BaseEditorAttributeVar
.
CreateFloat
(value);
20
}
21
22
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
23
{
24
if
(!var)
return
;
25
26
SCR_BaseGameMode
gameMode =
SCR_BaseGameMode
.Cast(
GetGame
().
GetGameMode
());
27
if
(!gameMode)
return
;
28
SCR_RespawnTimerComponent
respawnTimeComponent =
SCR_RespawnTimerComponent
.Cast(gameMode.FindComponent(
SCR_RespawnTimerComponent
));
29
if
(!respawnTimeComponent)
return
;
30
float
value = var.
GetFloat
();
31
32
33
if
(value != respawnTimeComponent.GetRespawnTime())
34
{
35
SCR_NotificationsComponent.SendToEveryone(
ENotification
.EDITOR_ATTRIBUTES_RESPAWN_TIME_CHANGED, playerID, value * 1000);
36
}
37
38
respawnTimeComponent.SetRespawnTime(value);
39
}
40
};
ENotification
ENotification
Definition
ENotification.c:5
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
GetGameMode
SCR_BaseGameMode GetGameMode()
Definition
SCR_BaseGameModeComponent.c:15
SCR_RespawnTimerComponent
void SCR_RespawnTimerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_RespawnTimerComponent.c:335
SCR_BaseEditorAttributeCustomTitle
Definition
SCR_BaseEditorAttribute.c:876
SCR_BaseEditorAttribute::IsGameMode
bool IsGameMode(Managed item)
Definition
SCR_BaseEditorAttribute.c:466
SCR_BaseEditorAttributeVar
Definition
SCR_BaseEditorAttributeVar.c:2
SCR_BaseEditorAttributeVar::GetFloat
float GetFloat()
Definition
SCR_BaseEditorAttributeVar.c:38
SCR_BaseEditorAttributeVar::CreateFloat
static SCR_BaseEditorAttributeVar CreateFloat(float value)
Definition
SCR_BaseEditorAttributeVar.c:113
SCR_BaseGameMode
Definition
SCR_BaseGameMode.c:139
SCR_BaseValueListEditorAttribute
Definition
SCR_BaseValueListEditorAttribute.c:6
SCR_RespawnTimeEditorAttribute
Definition
SCR_RespawnTimeEditorAttribute.c:7
scripts
Game
Editor
Containers
Attributes
SCR_RespawnTimeEditorAttribute.c
Generated by
1.17.0