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_AmbientSoundToggleEditorAttribute.c
Go to the documentation of this file.
1
4
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
5
class
SCR_AmbientSoundToggleEditorAttribute
:
SCR_BaseEditorAttribute
6
{
7
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
8
{
9
//If opened in global attributes
10
if
(!
IsGameMode
(item))
11
return
null;
12
13
ChimeraWorld
world =
GetGame
().GetWorld();
14
15
if
(!world)
16
return
null;
17
18
MusicManager musicManager = world.GetMusicManager();
19
if
(!musicManager)
20
return
null;
21
22
return
SCR_BaseEditorAttributeVar
.
CreateBool
(!musicManager.ServerIsCategoryMuted(
MusicCategory
.Ambient));
23
24
}
25
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
26
{
27
if
(!var)
28
return
;
29
30
ChimeraWorld
world =
GetGame
().GetWorld();
31
32
if
(!world)
33
return
;
34
35
MusicManager musicManager = world.GetMusicManager();
36
if
(!musicManager)
37
return
;
38
39
if
(var.
GetBool
())
40
SCR_NotificationsComponent.SendToEveryone(
ENotification
.EDITOR_ATTRIBUTES_ENABLED_AMBIENT_MUSIC, playerID);
41
else
42
SCR_NotificationsComponent.SendToEveryone(
ENotification
.EDITOR_ATTRIBUTES_DISABLED_AMBIENT_MUSIC, playerID);
43
44
musicManager.RequestServerMuteCategory(
MusicCategory
.Ambient, !var.
GetBool
());
45
}
46
};
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
ChimeraWorld
Definition
ChimeraWorld.c:13
SCR_AmbientSoundToggleEditorAttribute
Definition
SCR_AmbientSoundToggleEditorAttribute.c:6
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
MusicCategory
MusicCategory
Definition
MusicCategory.c:14
scripts
Game
Editor
Containers
Attributes
SCR_AmbientSoundToggleEditorAttribute.c
Generated by
1.17.0