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_EnableTeamKillingPunishmentEditorAttribute.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
2
class
SCR_EnableTeamKillingPunishmentEditorAttribute
:
SCR_BaseEditorAttribute
3
{
4
//------------------------------------------------------------------------------------------------
5
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
6
{
7
if
(!
IsGameMode
(item))
8
return
null;
9
10
SCR_AdditionalGameModeSettingsComponent
additionalGameSettings =
SCR_AdditionalGameModeSettingsComponent
.GetInstance();
11
if
(!additionalGameSettings)
12
return
null;
13
14
return
SCR_BaseEditorAttributeVar
.
CreateBool
(additionalGameSettings.IsTeamKillingPunished());
15
}
16
17
//------------------------------------------------------------------------------------------------
18
override
void
UpdateInterlinkedVariables(
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
bool
isInit =
false
)
19
{
20
SCR_BaseEditorAttributeVar
perceivedFactionVar;
21
manager.GetAttributeVariable(
SCR_SetPerceivedCharacterFactionEditorAttribute
, perceivedFactionVar);
22
23
bool
perceivedFactionEnabled;
24
25
if
(perceivedFactionVar)
26
perceivedFactionEnabled = perceivedFactionVar.
GetInt
() != 0;
27
28
manager.SetAttributeEnabled(
SCR_PunishKillingWhenDesguisedEditorAttribute
, perceivedFactionEnabled && var.
GetBool
());
29
}
30
31
//------------------------------------------------------------------------------------------------
32
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
33
{
34
if
(!var)
35
return
;
36
37
SCR_AdditionalGameModeSettingsComponent
additionalGameSettings =
SCR_AdditionalGameModeSettingsComponent
.GetInstance();
38
if
(!additionalGameSettings)
39
return
;
40
41
additionalGameSettings.SetEnableTeamKillPunishment_S(var.
GetBool
(), playerID);
42
}
43
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_AdditionalGameModeSettingsComponent
void SCR_AdditionalGameModeSettingsComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_AdditionalGameModeSettingsComponent.c:356
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_BaseEditorAttributeVar::GetInt
int GetInt()
Definition
SCR_BaseEditorAttributeVar.c:20
SCR_EnableTeamKillingPunishmentEditorAttribute
Definition
SCR_EnableTeamKillingPunishmentEditorAttribute.c:3
SCR_PunishKillingWhenDesguisedEditorAttribute
Definition
SCR_PunishKillingWhenDesguisedEditorAttribute.c:3
SCR_SetPerceivedCharacterFactionEditorAttribute
Definition
SCR_SetPerceivedCharacterFactionEditorAttribute.c:3
scripts
Game
Editor
Containers
Attributes
SCR_EnableTeamKillingPunishmentEditorAttribute.c
Generated by
1.17.0