Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BaseEditorAttribute Class Reference

Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attribute window. More...

Inheritance diagram for SCR_BaseEditorAttribute:
SCR_AllowEntityRefundActionEditorAttribute SCR_AmbientSoundToggleEditorAttribute SCR_AutomatedWeatherEditorAttribute SCR_BaseDuplicatableEditorAttribute SCR_BaseFloatValueHolderEditorAttribute SCR_BasePlayerBudgetEnableEditorAttribute SCR_BaseSupportStationEnableEditorAttribute SCR_BaseValueListEditorAttribute SCR_CameraFilterEditorAttribute SCR_CameraParticleEditorAttribute SCR_CharUnconsciousnessEditorAttribute SCR_DateEditorAttribute SCR_EnableArsenalAttribute SCR_EnableDeployableSpawnPointsEditorAttribute SCR_EnableGlobalResourceTypeEditorAttribute SCR_EnableMilitarySupplyAllocationByRankEditorAttribute SCR_EnableSpawnPointEditorAttribute SCR_EnableTeamKillingPunishmentEditorAttribute SCR_EntityEnableResourceEditorAttribute SCR_ExplosiveFuzeArmingAttribute SCR_GlobalUnconsciousnessEditorAttribute SCR_LoadoutSavingClearOnChangeEditorAttribute SCR_ModeOverrideEditorAttribute SCR_MortarAdvancedAimingEditorAttribute SCR_NightModeEditorAttribute SCR_OverrideCharacterMedicalEditorAttribute SCR_PlayableFactionEditorAttribute SCR_RespawnEnabledEditorAttribute SCR_SetTaskCompletionAutomaticEditorAttribute SCR_SimulateAndShowToggle SCR_SpawnAtPlayersEditorAttribute SCR_SpawnAtRadioVehicleAttribute SCR_SupplyContainerDecayAttribute SCR_TaskTextBaseEditorAttribute SCR_TaskTextEditorAttribute SCR_TestEditorAttribute SCR_TimeAdvancementEditorAttribute SCR_ToggleDamageEditorAttribute SCR_ValidTypeBaseEditorAttribute SCR_VehicleSalvageEditorAttribute SCR_WeatherUseAdvancedEditorAttribute SCR_WindAutomaticEditorAttribute SCR_WindOverrideEditorAttribute

Protected Member Functions

void ResetAttribute ()
SCR_EditorAttributeUIInfo GetUIInfo ()
int GetDynamicDescriptionArray (notnull out array< SCR_BaseAttributeDynamicDescription > dynamicDescriptionArray)
bool IsServer ()
ResourceName GetCategoryConfig ()
ResourceName GetLayout ()
bool BoolAllowDuplicate ()
bool IsSerializable ()
sealed bool SetVariable (SCR_BaseEditorAttributeVar var)
sealed void ClearVar ()
 Set var null.
sealed void ClearCopyVar ()
 Set copy var null.
sealed ScriptInvoker GetOnVarChanged ()
sealed void Enable (bool enabled)
sealed void ToggleSelected (bool selected, int index)
sealed void SetAsSubAttribute ()
bool GetInitCalled ()
void SetInitCalled (bool initCalled)
bool GetIsMultiSelect ()
void SetIsMultiSelect (bool isMultiSelect)
bool GetHasConflictingValues ()
void SetHasConflictingValues (bool hasConflictingValues)
void SetIsOverridingValues (bool isOverridingValues)
bool GetIsOverridingValues ()
bool IsEnabled ()
bool GetIsSubAttribute ()
sealed ScriptInvoker GetOnToggleEnable ()
sealed ScriptInvoker GetOnToggleButtonSelected ()
sealed ScriptInvoker GetOnSetAsSubAttribute ()
sealed SCR_BaseEditorAttributeVar GetVariable (bool createWhenNull=false)
sealed SCR_BaseEditorAttributeVar GetCopyVariable ()
sealed SCR_BaseEditorAttributeVar GetVariableOrCopy ()
sealed void CreateCopyVariable ()
sealed bool GetConflictingAttributeWasReset ()
sealed void SetConflictingAttributeWasReset (bool wasReset)
sealed SSnapshot GetSnapshot ()
sealed ScriptInvoker GetOnExternalnChange ()
sealed void StartEditing (SCR_BaseEditorAttributeVar var, SSnapshot snapshot)
 Initialise editing variables.
sealed void StopEditing ()
 Reset editing variables.
sealed void TelegraphChange (bool isReset)
SCR_BaseEditorAttributeVar CreateDefaultVariable ()
 Create a default bool (false) variable.
SCR_BaseEditorAttributeVar ReadVariable (Managed item, SCR_AttributesManagerEditorComponent manager)
void WriteVariable (Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
void PreviewVariable (bool setPreview, SCR_AttributesManagerEditorComponent manager)
void UpdateInterlinkedVariables (SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, bool isInit=false)
int GetEntries (notnull array< ref SCR_BaseEditorAttributeEntry > outEntries)
bool IsGameMode (Managed item)
void Initialize ()
 Method for initialization of base editor attribute.

Protected Attributes

ref SCR_EditorAttributeUIInfo m_UIInfo
ResourceName m_CategoryConfig
ResourceName m_Layout
ref array< ref SCR_BaseAttributeDynamicDescriptionm_aAttributeDynamicDescriptions
bool m_bAttributeEnabled = true
bool m_bIsSubAttribute
bool m_bInitCalled
bool m_bConflictingAttributeWasReset
BaseGameMode m_GameMode
bool m_bIsMultiSelect = false
bool m_bHasConflictingValues = false
bool m_bOverridingValues = false
ref SCR_BaseEditorAttributeVar m_Var
ref SCR_BaseEditorAttributeVar m_CopyVar
ref SSnapshot m_Snapshot
ref ScriptInvoker Event_OnExternalChange
ref ScriptInvoker Event_OnVarChanged = new ScriptInvoker
ref ScriptInvoker Event_OnToggleEnable = new ScriptInvoker
ref ScriptInvoker Event_OnToggleButtonSelected = new ScriptInvoker
ref ScriptInvoker Event_OnSetAsSubAttribute = new ScriptInvoker

Detailed Description

Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attribute window.

Definition at line 3 of file SCR_BaseEditorAttribute.c.

Member Function Documentation

◆ BoolAllowDuplicate()

bool SCR_BaseEditorAttribute::BoolAllowDuplicate ( )
inlineprotected

Return True if attribute is allowed to be duplicate. Only Global attributes can be duplicates. Entity Attributes that can have confliciting attributes (eg two entities are opened and both have diffrent values. Can never be duplicate!

Returns
True if allow dupplicate

Definition at line 104 of file SCR_BaseEditorAttribute.c.

◆ ClearCopyVar()

sealed void SCR_BaseEditorAttribute::ClearCopyVar ( )
inlineprotected

Set copy var null.

Definition at line 156 of file SCR_BaseEditorAttribute.c.

◆ ClearVar()

sealed void SCR_BaseEditorAttribute::ClearVar ( )
inlineprotected

Set var null.

Definition at line 149 of file SCR_BaseEditorAttribute.c.

◆ CreateCopyVariable()

sealed void SCR_BaseEditorAttribute::CreateCopyVariable ( )
inlineprotected

Get Copy variable of this attribute.

Returns
Copy Variable

Definition at line 337 of file SCR_BaseEditorAttribute.c.

◆ CreateDefaultVariable()

SCR_BaseEditorAttributeVar SCR_BaseEditorAttribute::CreateDefaultVariable ( )
inlineprotected

Create a default bool (false) variable.

Definition at line 417 of file SCR_BaseEditorAttribute.c.

◆ Enable()

sealed void SCR_BaseEditorAttribute::Enable ( bool enabled)
inlineprotected

Sends out an event which UI listens to to enable/disable UI component

Parameters
boolenable

Definition at line 172 of file SCR_BaseEditorAttribute.c.

◆ GetCategoryConfig()

ResourceName SCR_BaseEditorAttribute::GetCategoryConfig ( )
inlineprotected

Get category config file.

Returns
Path to *.conf file

Definition at line 87 of file SCR_BaseEditorAttribute.c.

◆ GetConflictingAttributeWasReset()

sealed bool SCR_BaseEditorAttribute::GetConflictingAttributeWasReset ( )
inlineprotected

Get if conflicting attribute was reset so UI knows to set default values if it was not active on reset

Returns
if attribute was reset

Definition at line 348 of file SCR_BaseEditorAttribute.c.

◆ GetCopyVariable()

sealed SCR_BaseEditorAttributeVar SCR_BaseEditorAttribute::GetCopyVariable ( )
inlineprotected

Get Copy variable of this attribute.

Returns
Copy Variable

Definition at line 318 of file SCR_BaseEditorAttribute.c.

◆ GetDynamicDescriptionArray()

int SCR_BaseEditorAttribute::GetDynamicDescriptionArray ( notnull out array< SCR_BaseAttributeDynamicDescription > dynamicDescriptionArray)
inlineprotected

Get array of dynamic descriptions

Parameters
[out]Dynamicdescriptions array
Returns
count of dynamic description array

Definition at line 66 of file SCR_BaseEditorAttribute.c.

◆ GetEntries()

int SCR_BaseEditorAttribute::GetEntries ( notnull array< ref SCR_BaseEditorAttributeEntry > outEntries)
inlineprotected

Get entries to be shown in GUI lists. To be overridden by child classes. \outEntries Entries

Returns
Number of entries

Definition at line 458 of file SCR_BaseEditorAttribute.c.

◆ GetHasConflictingValues()

bool SCR_BaseEditorAttribute::GetHasConflictingValues ( )
inlineprotected

Get has conflicting values. This can only be true when m_bIsMultiSelect is ture and means that the shared attributes have one ore more conflicting values

Returns
true if it has conflicting values

Definition at line 233 of file SCR_BaseEditorAttribute.c.

◆ GetInitCalled()

bool SCR_BaseEditorAttribute::GetInitCalled ( )
inlineprotected

Get if init is called. If it is a conflicting attribute it will set values to conflicting default if not yet called.

Returns
if is init Called

Definition at line 198 of file SCR_BaseEditorAttribute.c.

◆ GetIsMultiSelect()

bool SCR_BaseEditorAttribute::GetIsMultiSelect ( )
inlineprotected

Get is multi select var Multi select means that multiple entities where selected when editing attributes and those entities share the same attributes

Returns
is Multi Select

Definition at line 215 of file SCR_BaseEditorAttribute.c.

◆ GetIsOverridingValues()

bool SCR_BaseEditorAttribute::GetIsOverridingValues ( )
inlineprotected

Get is overriding values.

Returns
true if overriding values

Definition at line 258 of file SCR_BaseEditorAttribute.c.

◆ GetIsSubAttribute()

bool SCR_BaseEditorAttribute::GetIsSubAttribute ( )
inlineprotected

Get if The Attribute is Enabled

Returns
bool enabled

Definition at line 274 of file SCR_BaseEditorAttribute.c.

◆ GetLayout()

ResourceName SCR_BaseEditorAttribute::GetLayout ( )
inlineprotected

Get UI layout.

Returns
Path to *.layout file

Definition at line 95 of file SCR_BaseEditorAttribute.c.

◆ GetOnExternalnChange()

sealed ScriptInvoker SCR_BaseEditorAttribute::GetOnExternalnChange ( )
inlineprotected

Get event called when attribute var is changed from outside.

Returns
Script invoker

Definition at line 372 of file SCR_BaseEditorAttribute.c.

◆ GetOnSetAsSubAttribute()

sealed ScriptInvoker SCR_BaseEditorAttribute::GetOnSetAsSubAttribute ( )
inlineprotected

Get On ToggleEnable script invoker

Returns
ScriptInvoker

Definition at line 298 of file SCR_BaseEditorAttribute.c.

◆ GetOnToggleButtonSelected()

sealed ScriptInvoker SCR_BaseEditorAttribute::GetOnToggleButtonSelected ( )
inlineprotected

Get OnToggleSelected script invoker

Returns
ScriptInvoker

Definition at line 290 of file SCR_BaseEditorAttribute.c.

◆ GetOnToggleEnable()

sealed ScriptInvoker SCR_BaseEditorAttribute::GetOnToggleEnable ( )
inlineprotected

Get On ToggleEnable script invoker

Returns
ScriptInvoker

Definition at line 282 of file SCR_BaseEditorAttribute.c.

◆ GetOnVarChanged()

sealed ScriptInvoker SCR_BaseEditorAttribute::GetOnVarChanged ( )
inlineprotected

Get On Var changed script invoker

Returns
changed variable invoker

Definition at line 164 of file SCR_BaseEditorAttribute.c.

◆ GetSnapshot()

sealed SSnapshot SCR_BaseEditorAttribute::GetSnapshot ( )
inlineprotected

Get snapshot which holds original attribute's value.

Returns
Snapshot

Definition at line 364 of file SCR_BaseEditorAttribute.c.

◆ GetUIInfo()

SCR_EditorAttributeUIInfo SCR_BaseEditorAttribute::GetUIInfo ( )
inlineprotected

Get UIinfo, Description is attribute description and Icon is used when the attribute description is overridden

Returns
m_UIInfo

Definition at line 57 of file SCR_BaseEditorAttribute.c.

◆ GetVariable()

sealed SCR_BaseEditorAttributeVar SCR_BaseEditorAttribute::GetVariable ( bool createWhenNull = false)
inlineprotected

Get variable of this attribute.

Parameters
createWhenNullTrue to create the variable when none is defined
Returns
Variable

Definition at line 307 of file SCR_BaseEditorAttribute.c.

◆ GetVariableOrCopy()

sealed SCR_BaseEditorAttributeVar SCR_BaseEditorAttribute::GetVariableOrCopy ( )
inlineprotected

Get variable or copy variable of this attribute.

Returns
Variable or Copy

Definition at line 326 of file SCR_BaseEditorAttribute.c.

◆ Initialize()

void SCR_BaseEditorAttribute::Initialize ( )
inlineprotected

Method for initialization of base editor attribute.

Definition at line 473 of file SCR_BaseEditorAttribute.c.

◆ IsEnabled()

bool SCR_BaseEditorAttribute::IsEnabled ( )
inlineprotected

Get if The Attribute is Enabled

Returns
bool enabled

Definition at line 266 of file SCR_BaseEditorAttribute.c.

◆ IsGameMode()

bool SCR_BaseEditorAttribute::IsGameMode ( Managed item)
inlineprotected
Parameters
item
Returns
true if the provided item is the current gamemode

Definition at line 466 of file SCR_BaseEditorAttribute.c.

◆ IsSerializable()

bool SCR_BaseEditorAttribute::IsSerializable ( )
inlineprotected
Returns
True if the attribute value is serialized in session save file

Definition at line 111 of file SCR_BaseEditorAttribute.c.

◆ IsServer()

bool SCR_BaseEditorAttribute::IsServer ( )
inlineprotected

Check if the server should be extracted and applied on server.

Returns
True if the attribute is controlled by server.

Definition at line 79 of file SCR_BaseEditorAttribute.c.

◆ PreviewVariable()

void SCR_BaseEditorAttribute::PreviewVariable ( bool setPreview,
SCR_AttributesManagerEditorComponent manager )
protected

Preview the attribute while editing.

Parameters
managerAttribute manager which is currently managing the attribute. Will be null when the attribute is used for session saving!

◆ ReadVariable()

SCR_BaseEditorAttributeVar SCR_BaseEditorAttribute::ReadVariable ( Managed item,
SCR_AttributesManagerEditorComponent manager )
protected

Function to fill attribute's variable. It should connect to API which controls what the attribute represents (e.g., getting fuel from fuel system). To be overridden by child classes.

Parameters
itemItem from which the value is extracted from
managerAttribute manager which is currently managing the attribute. Will be null when the attribute is used for session saving!
Returns
Variable or null to ignore the attribute

◆ ResetAttribute()

void SCR_BaseEditorAttribute::ResetAttribute ( )
inlineprotected

Reset the attribute Called in SCR_AttributesManagerEditorComponent when it loops through valid attributes

Definition at line 46 of file SCR_BaseEditorAttribute.c.

◆ SetAsSubAttribute()

sealed void SCR_BaseEditorAttribute::SetAsSubAttribute ( )
inlineprotected

Sends set bool UI listens to to enable/disable UI component

Parameters
boolenable

Definition at line 189 of file SCR_BaseEditorAttribute.c.

◆ SetConflictingAttributeWasReset()

sealed void SCR_BaseEditorAttribute::SetConflictingAttributeWasReset ( bool wasReset)
inlineprotected

Sets conflicting attribute was reset so UI knows to set default values if it was not active on reset

Parameters
boolif attribute was reset

Definition at line 356 of file SCR_BaseEditorAttribute.c.

◆ SetHasConflictingValues()

void SCR_BaseEditorAttribute::SetHasConflictingValues ( bool hasConflictingValues)
inlineprotected

Set if varriable is has conflicting values. This can only be true when m_bIsMultiSelect is ture and means that the shared attributes have one ore more conflicting values

Parameters
hasConflictingValuesif has conflicting values

Definition at line 242 of file SCR_BaseEditorAttribute.c.

◆ SetInitCalled()

void SCR_BaseEditorAttribute::SetInitCalled ( bool initCalled)
inlineprotected

Set Init called

Parameters
initCalledif Init is called

Definition at line 206 of file SCR_BaseEditorAttribute.c.

◆ SetIsMultiSelect()

void SCR_BaseEditorAttribute::SetIsMultiSelect ( bool isMultiSelect)
inlineprotected

Set if variable is multiselect Multi select means that multiple entities were selected when editing attributes and those entities share the same attributes

Parameters
isMultiSelectif is Multi select

Definition at line 224 of file SCR_BaseEditorAttribute.c.

◆ SetIsOverridingValues()

void SCR_BaseEditorAttribute::SetIsOverridingValues ( bool isOverridingValues)
inlineprotected

Set is overriding values. If m_bHasConflictingValues is true

Parameters
boolis overriding values

Definition at line 250 of file SCR_BaseEditorAttribute.c.

◆ SetVariable()

sealed bool SCR_BaseEditorAttribute::SetVariable ( SCR_BaseEditorAttributeVar var)
inlineprotected

Set a variable to this attribute.

Parameters
varVariable
Returns
if attribute valid

Definition at line 120 of file SCR_BaseEditorAttribute.c.

◆ StartEditing()

sealed void SCR_BaseEditorAttribute::StartEditing ( SCR_BaseEditorAttributeVar var,
SSnapshot snapshot )
inlineprotected

Initialise editing variables.

Definition at line 379 of file SCR_BaseEditorAttribute.c.

◆ StopEditing()

sealed void SCR_BaseEditorAttribute::StopEditing ( )
inlineprotected

Reset editing variables.

Definition at line 388 of file SCR_BaseEditorAttribute.c.

◆ TelegraphChange()

sealed void SCR_BaseEditorAttribute::TelegraphChange ( bool isReset)
inlineprotected
Parameters
isReset

Definition at line 400 of file SCR_BaseEditorAttribute.c.

◆ ToggleSelected()

sealed void SCR_BaseEditorAttribute::ToggleSelected ( bool selected,
int index )
inlineprotected

Sends out an event which UI listens if is selected

Parameters
boolenable

Definition at line 181 of file SCR_BaseEditorAttribute.c.

◆ UpdateInterlinkedVariables()

void SCR_BaseEditorAttribute::UpdateInterlinkedVariables ( SCR_BaseEditorAttributeVar var,
SCR_AttributesManagerEditorComponent manager,
bool isInit = false )
protected

Updates the interlinked variables

Parameters
var
manager
isInit

◆ WriteVariable()

void SCR_BaseEditorAttribute::WriteVariable ( Managed item,
SCR_BaseEditorAttributeVar var,
SCR_AttributesManagerEditorComponent manager,
int playerID )
protected

Member Data Documentation

◆ Event_OnExternalChange

ref ScriptInvoker SCR_BaseEditorAttribute::Event_OnExternalChange
protected

Definition at line 37 of file SCR_BaseEditorAttribute.c.

◆ Event_OnSetAsSubAttribute

ref ScriptInvoker SCR_BaseEditorAttribute::Event_OnSetAsSubAttribute = new ScriptInvoker
protected

Definition at line 41 of file SCR_BaseEditorAttribute.c.

◆ Event_OnToggleButtonSelected

ref ScriptInvoker SCR_BaseEditorAttribute::Event_OnToggleButtonSelected = new ScriptInvoker
protected

Definition at line 40 of file SCR_BaseEditorAttribute.c.

◆ Event_OnToggleEnable

ref ScriptInvoker SCR_BaseEditorAttribute::Event_OnToggleEnable = new ScriptInvoker
protected

Definition at line 39 of file SCR_BaseEditorAttribute.c.

◆ Event_OnVarChanged

ref ScriptInvoker SCR_BaseEditorAttribute::Event_OnVarChanged = new ScriptInvoker
protected

Definition at line 38 of file SCR_BaseEditorAttribute.c.

◆ m_aAttributeDynamicDescriptions

ref array<ref SCR_BaseAttributeDynamicDescription> SCR_BaseEditorAttribute::m_aAttributeDynamicDescriptions
protectedattribute

Definition at line 18 of file SCR_BaseEditorAttribute.c.

◆ m_bAttributeEnabled

bool SCR_BaseEditorAttribute::m_bAttributeEnabled = true
protected

Definition at line 21 of file SCR_BaseEditorAttribute.c.

◆ m_bConflictingAttributeWasReset

bool SCR_BaseEditorAttribute::m_bConflictingAttributeWasReset
protected

Definition at line 24 of file SCR_BaseEditorAttribute.c.

◆ m_bHasConflictingValues

bool SCR_BaseEditorAttribute::m_bHasConflictingValues = false
protected

Definition at line 29 of file SCR_BaseEditorAttribute.c.

◆ m_bInitCalled

bool SCR_BaseEditorAttribute::m_bInitCalled
protected

Definition at line 23 of file SCR_BaseEditorAttribute.c.

◆ m_bIsMultiSelect

bool SCR_BaseEditorAttribute::m_bIsMultiSelect = false
protected

Definition at line 28 of file SCR_BaseEditorAttribute.c.

◆ m_bIsSubAttribute

bool SCR_BaseEditorAttribute::m_bIsSubAttribute
protected

Definition at line 22 of file SCR_BaseEditorAttribute.c.

◆ m_bOverridingValues

bool SCR_BaseEditorAttribute::m_bOverridingValues = false
protected

Definition at line 30 of file SCR_BaseEditorAttribute.c.

◆ m_CategoryConfig

ResourceName SCR_BaseEditorAttribute::m_CategoryConfig
protected

Definition at line 12 of file SCR_BaseEditorAttribute.c.

◆ m_CopyVar

ref SCR_BaseEditorAttributeVar SCR_BaseEditorAttribute::m_CopyVar
protected

Definition at line 34 of file SCR_BaseEditorAttribute.c.

◆ m_GameMode

BaseGameMode SCR_BaseEditorAttribute::m_GameMode
protected

Definition at line 25 of file SCR_BaseEditorAttribute.c.

◆ m_Layout

ResourceName SCR_BaseEditorAttribute::m_Layout
protected

Definition at line 15 of file SCR_BaseEditorAttribute.c.

◆ m_Snapshot

ref SSnapshot SCR_BaseEditorAttribute::m_Snapshot
protected

Definition at line 36 of file SCR_BaseEditorAttribute.c.

◆ m_UIInfo

ref SCR_EditorAttributeUIInfo SCR_BaseEditorAttribute::m_UIInfo
protected

Definition at line 6 of file SCR_BaseEditorAttribute.c.

◆ m_Var

ref SCR_BaseEditorAttributeVar SCR_BaseEditorAttribute::m_Var
protected

Definition at line 33 of file SCR_BaseEditorAttribute.c.


The documentation for this class was generated from the following file: