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_PunishKillingWhenDesguisedEditorAttribute.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
2
class
SCR_PunishKillingWhenDesguisedEditorAttribute
:
SCR_BaseFloatValueHolderEditorAttribute
3
{
4
//------------------------------------------------------------------------------------------------
5
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
6
{
7
if
(!
IsGameMode
(item))
8
return
null;
9
10
SCR_PerceivedFactionManagerComponent
perceivedManager =
SCR_PerceivedFactionManagerComponent
.GetInstance();
11
if
(!perceivedManager)
12
return
null;
13
14
int
index
=
ConvertValueToIndex
(perceivedManager.GetPunishmentKillingWhileDisguisedFlags());
15
if
(
index
<= -1)
16
{
17
Print
(
"'SCR_PunishKillingWhenDesguisedEditorAttribute' trying to get the flag values but the combination of flags does not exist in the attribute data. Make sure to add the value to the attribute"
,
LogLevel
.WARNING);
18
index
= 0;
19
}
20
21
return
SCR_BaseEditorAttributeVar
.
CreateInt
(
index
);
22
}
23
24
//------------------------------------------------------------------------------------------------
25
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
26
{
27
if
(!var)
28
return
;
29
30
SCR_PerceivedFactionManagerComponent
perceivedManager =
SCR_PerceivedFactionManagerComponent
.GetInstance();
31
if
(!perceivedManager)
32
return
;
33
34
float
value;
35
if
(!
ConvertIndexToValue
(var.
GetInt
(), value))
36
return
;
37
38
perceivedManager.SetPunishmentKillingWhileDisguisedFlags_S(value, playerID);
39
}
40
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition
SCR_DestructionSynchronizationComponent.c:17
SCR_PerceivedFactionManagerComponent
void SCR_PerceivedFactionManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_PerceivedFactionManagerComponent.c:269
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::CreateInt
static SCR_BaseEditorAttributeVar CreateInt(int value)
Definition
SCR_BaseEditorAttributeVar.c:107
SCR_BaseEditorAttributeVar::GetInt
int GetInt()
Definition
SCR_BaseEditorAttributeVar.c:20
SCR_BaseFloatValueHolderEditorAttribute
Attribute base for Name, icon and float value for other attributes to inherent from.
Definition
SCR_BaseFloatValueHolderEditorAttribute.c:4
SCR_BaseFloatValueHolderEditorAttribute::ConvertIndexToValue
bool ConvertIndexToValue(int index, out float outValue)
Definition
SCR_BaseFloatValueHolderEditorAttribute.c:28
SCR_BaseFloatValueHolderEditorAttribute::ConvertValueToIndex
int ConvertValueToIndex(float value)
Definition
SCR_BaseFloatValueHolderEditorAttribute.c:16
SCR_PunishKillingWhenDesguisedEditorAttribute
Definition
SCR_PunishKillingWhenDesguisedEditorAttribute.c:3
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
scripts
Game
Editor
Containers
Attributes
SCR_PunishKillingWhenDesguisedEditorAttribute.c
Generated by
1.17.0