Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_EnableTeamKillingPunishmentEditorAttribute.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 (!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
38 if (!additionalGameSettings)
39 return;
40
41 additionalGameSettings.SetEnableTeamKillPunishment_S(var.GetBool(), playerID);
42 }
43}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
void SCR_AdditionalGameModeSettingsComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
static SCR_BaseEditorAttributeVar CreateBool(bool value)