Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_PunishKillingWhenDesguisedEditorAttribute.c
Go to the documentation of this file.
3{
4 //------------------------------------------------------------------------------------------------
5 override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
6 {
7 if (!IsGameMode(item))
8 return null;
9
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
22 }
23
24 //------------------------------------------------------------------------------------------------
25 override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
26 {
27 if (!var)
28 return;
29
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}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
void SCR_PerceivedFactionManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
static SCR_BaseEditorAttributeVar CreateInt(int value)
Attribute base for Name, icon and float value for other attributes to inherent from.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14