Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkSlotBase.c File Reference

Go to the source code of this file.

Classes

class  SCR_ScenarioFrameworkSlotBaseClass

Functions

SCR_ScenarioFrameworkSlotBaseClass SCR_ScenarioFrameworkLayerBaseClass Attribute (params:"et", desc:"Resource name of the object to be spawned", category:"Asset")
void OnObjectDamage (EDamageState state)
void OnInventoryParentChanged (InventoryStorageSlot oldSlot, InventoryStorageSlot newSlot)
void OnCompartmentEntered (IEntity vehicle, BaseCompartmentManagerComponent mgr, IEntity occupant, int managerId, int slotID)
string GetOverriddenObjectDisplayName ()
void SetOverriddenObjectDisplayName (string name)
string GetSpawnedEntityDisplayName ()
bool GetEntity (notnull IEntity entity)
SCR_ScenarioFrameworkArea GetAreaWB ()
string GetSpawnedObjectName ()
ResourceName GetObjectToSpawn ()
ResourceName GetSelectedObjectToSpawn ()
ResourceName GetRandomlySpawnedObject ()
void SetRandomlySpawnedObject (ResourceName name)
override void RestoreToDefault (bool includeChildren=false, bool reinitAfterRestoration=false, bool affectRandomization=true, bool deleteSpawnedEntities=true)
override void DynamicDespawn (SCR_ScenarioFrameworkLayerBase layer)
override bool InitAlreadyHappened ()
bool InitEntitySpawnCheck ()
void InitSelectedObjectToSpawn ()
 If m_bRandomizePerFaction, then catalog system will ignore m_sObjectToSpawn if it has a catalog match. Otherwise it falls back to m_sObjectToSpawn.
void InitSelectedObjectToPreview ()
bool InitEntitySpawn ()
override bool InitOtherThings ()
override void FinishInit ()
 Finishes initialization, assigns unique ID, sets up damage manager, event handlers, inventory, and garbage system if applicable.
override void Init (SCR_ScenarioFrameworkArea area=null, SCR_ScenarioFrameworkEActivationType activation=SCR_ScenarioFrameworkEActivationType.SAME_AS_PARENT)
override void AfterAllChildrenSpawned (SCR_ScenarioFrameworkLayerBase layer)
override void SpawnChildren (bool previouslyRandomized=false)
ResourceName GetRandomAsset (out ResourceName prefab)
IEntity SpawnAsset ()
void SCR_ScenarioFrameworkSlotBase (IEntityComponentSource src, IEntity ent, IEntity parent)
void ~SCR_ScenarioFrameworkSlotBase ()
 Deletes preview entity in workbench mode, returns if in edit mode, otherwise despawns scenario slot base.

Function Documentation

◆ AfterAllChildrenSpawned()

override void AfterAllChildrenSpawned ( SCR_ScenarioFrameworkLayerBase layer)
protected

Initializes plugins, actions, and checks if parent layer has all children spawned after all children have spawned in scenario framework

Parameters
[in]layerInitializes layer, sets up plugins, actions, and checks parent layer spawning status.

Definition at line 475 of file SCR_ScenarioFrameworkSlotBase.c.

◆ Attribute()

SCR_ScenarioFrameworkSlotBaseClass SCR_ScenarioFrameworkLayerBaseClass Attribute ( params:"et" ,
desc:"Resource name of the object to be spawned" ,
category:"Asset"  )

Queries nearby objects within range for the owner entity.

Parameters
[in]fRangeRepresents search radius for objects in range query.

Definition at line 1 of file SCR_ScenarioFrameworkSlotBase.c.

◆ DynamicDespawn()

override void DynamicDespawn ( SCR_ScenarioFrameworkLayerBase layer)
protected

//! Dynamically despawns this layer.

Parameters
[in]layerLayer represents the scenario framework layer where dynamic despawning occurs.

Definition at line 291 of file SCR_ScenarioFrameworkSlotBase.c.

◆ FinishInit()

override void FinishInit ( )
protected

Finishes initialization, assigns unique ID, sets up damage manager, event handlers, inventory, and garbage system if applicable.

Definition at line 413 of file SCR_ScenarioFrameworkSlotBase.c.

◆ GetAreaWB()

SCR_ScenarioFrameworkArea GetAreaWB ( )
protected
Returns
the ScenarioFrameworkArea component from the parent entity or owner, or null if not found.

Definition at line 209 of file SCR_ScenarioFrameworkSlotBase.c.

◆ GetEntity()

bool GetEntity ( notnull IEntity entity)
protected

Checks if entity matches prefab data, if not, checks if it matches object to spawn, if not, returns true

Parameters
[in]entityto be outed
Returns
whether the provided entity matches the expected entity based on prefab data or object name.

Definition at line 158 of file SCR_ScenarioFrameworkSlotBase.c.

◆ GetObjectToSpawn()

ResourceName GetObjectToSpawn ( )
protected
Returns
spawned object ResourceName.

Definition at line 234 of file SCR_ScenarioFrameworkSlotBase.c.

◆ GetOverriddenObjectDisplayName()

string GetOverriddenObjectDisplayName ( )
Returns
the display name for an overridden object.

Definition at line 128 of file SCR_ScenarioFrameworkSlotBase.c.

◆ GetRandomAsset()

ResourceName GetRandomAsset ( out ResourceName prefab)
protected

Randomly selects an entity from a catalog based on provided parameters, handles error cases, and returns the prefab of the

Parameters
[out]prefabRandomly selected prefab from entity catalog for randomized spawning.
Returns
The return value represents a randomly selected prefab from the entity catalog based on the applied labels and filters.

Definition at line 503 of file SCR_ScenarioFrameworkSlotBase.c.

◆ GetRandomlySpawnedObject()

ResourceName GetRandomlySpawnedObject ( )
protected
Returns
Randomly spawned object ResourceName.

Definition at line 263 of file SCR_ScenarioFrameworkSlotBase.c.

◆ GetSelectedObjectToSpawn()

ResourceName GetSelectedObjectToSpawn ( )
protected

First attempts to get get teh Fction Switched Object for the provided faciton key, then falls back to m_sObjectToSpawn. Init does not include Catalog entities as the catalog manager has not been initialised yet. If m_bRandomizePerFaction, then catalog system will ignore m_sObjectToSpawn if it has a catalog match. Otherwise it falls back to m_sObjectToSpawn.

Definition at line 243 of file SCR_ScenarioFrameworkSlotBase.c.

◆ GetSpawnedEntityDisplayName()

string GetSpawnedEntityDisplayName ( )
Returns
the display name of the spawned entity or overridden display name if provided, otherwise returns an empty string.

Definition at line 142 of file SCR_ScenarioFrameworkSlotBase.c.

◆ GetSpawnedObjectName()

string GetSpawnedObjectName ( )
protected
Returns
The spawned object's unique identifier as a string.

Definition at line 227 of file SCR_ScenarioFrameworkSlotBase.c.

◆ Init()

Initializes scenario framework slot

Parameters
[in]areathat this slot is nested into.
[in]activationActivates scenario framework action type, sets up for children spawning.

Definition at line 464 of file SCR_ScenarioFrameworkSlotBase.c.

◆ InitAlreadyHappened()

override bool InitAlreadyHappened ( )
protected

Initializes whether an init has already happened, but for slots it always returns false.

Returns
false, indicating that the init has not yet occurred.

Definition at line 326 of file SCR_ScenarioFrameworkSlotBase.c.

◆ InitEntitySpawn()

bool InitEntitySpawn ( )
protected

Spawns entity if not existing or queries objects in range, checks initiation success.

Returns
true if entity spawning is successful.

Definition at line 372 of file SCR_ScenarioFrameworkSlotBase.c.

◆ InitEntitySpawnCheck()

bool InitEntitySpawnCheck ( )
protected

Checks if entity is spawned, if not, waits for all children to spawn then checks again.

Returns
true if all children entities have been spawned, false otherwise.

Definition at line 335 of file SCR_ScenarioFrameworkSlotBase.c.

◆ InitOtherThings()

override bool InitOtherThings ( )
protected

Initializes selected object, repeatable spawn, and entity spawn.

Returns
true if all initialization steps succeed, false otherwise.

Definition at line 401 of file SCR_ScenarioFrameworkSlotBase.c.

◆ InitSelectedObjectToPreview()

void InitSelectedObjectToPreview ( )
protected

If m_bRandomizePerFaction, then it will set m_sObjectToSpawn to empty because the the catalog system has not been initialised. It would be incorect to show the manually set object or the faction switched object because the catalog will take preference at runtime.

Definition at line 357 of file SCR_ScenarioFrameworkSlotBase.c.

◆ InitSelectedObjectToSpawn()

void InitSelectedObjectToSpawn ( )
protected

If m_bRandomizePerFaction, then catalog system will ignore m_sObjectToSpawn if it has a catalog match. Otherwise it falls back to m_sObjectToSpawn.

Definition at line 349 of file SCR_ScenarioFrameworkSlotBase.c.

◆ OnCompartmentEntered()

void OnCompartmentEntered ( IEntity vehicle,
BaseCompartmentManagerComponent mgr,
IEntity occupant,
int managerId,
int slotID )

Excludes vehicle from dynamic despawning when entering a component.

Parameters
[in]vehicleExcludes vehicle from dynamic despawning when entering a component.
[in]mgrBaseCompartmentManagerComponent represents an entity component managing cargo, passengers, and other objects in a vehicle.
[in]occupantOccupant represents the entity currently inside the vehicle when the method is called.
[in]managerIdManagerId represents the unique identifier for the comparment manager in the vehicle.
[in]slotIDSlotID represents the specific seat.

Definition at line 121 of file SCR_ScenarioFrameworkSlotBase.c.

◆ OnInventoryParentChanged()

void OnInventoryParentChanged ( InventoryStorageSlot oldSlot,
InventoryStorageSlot newSlot )

Method changes inventory parent slot and sets dynamic despawn exclusion for an entity.

Parameters
[in]oldSlotRepresents previous inventory slot where item was before being moved.
[in]newSlotRepresents new inventory slot for item transfer.

Definition at line 105 of file SCR_ScenarioFrameworkSlotBase.c.

◆ OnObjectDamage()

void OnObjectDamage ( EDamageState state)
Parameters
[in]stateChecks if object is destroyed, removes damage state change listener, and terminates object if repeated spawn is not enabled and run out of numbers

Definition at line 88 of file SCR_ScenarioFrameworkSlotBase.c.

◆ RestoreToDefault()

override void RestoreToDefault ( bool includeChildren = false,
bool reinitAfterRestoration = false,
bool affectRandomization = true,
bool deleteSpawnedEntities = true )
protected

Restores default settings, clears random object, resets position, calls superclass method.

Parameters
[in]includeChildrenIncludes children objects in default restoration process.
[in]reinitAfterRestorationRestores object state after restoration, resetting internal variables.
[in]affectRandomizationAffects randomization during object restoration.

Definition at line 280 of file SCR_ScenarioFrameworkSlotBase.c.

◆ SCR_ScenarioFrameworkSlotBase()

void SCR_ScenarioFrameworkSlotBase ( IEntityComponentSource src,
IEntity ent,
IEntity parent )
protected
Parameters
[in]src
[in]ent
[in]parent

Definition at line 717 of file SCR_ScenarioFrameworkSlotBase.c.

◆ SetOverriddenObjectDisplayName()

void SetOverriddenObjectDisplayName ( string name)
Parameters
[in]nameSets object display name override.

Definition at line 135 of file SCR_ScenarioFrameworkSlotBase.c.

◆ SetRandomlySpawnedObject()

void SetRandomlySpawnedObject ( ResourceName name)
protected
Parameters
[in]nameRepresents an object to spawn randomly in the world.

Definition at line 270 of file SCR_ScenarioFrameworkSlotBase.c.

◆ SpawnAsset()

IEntity SpawnAsset ( )
protected

Spawns random asset, sets position, ignores terrain orientation, requests navmesh rebuild, adds to spawned entities

Returns
an entity spawned from the specified resource.

Definition at line 579 of file SCR_ScenarioFrameworkSlotBase.c.

◆ SpawnChildren()

override void SpawnChildren ( bool previouslyRandomized = false)
protected

Slot cannot have children

Parameters
[in]previouslyRandomizedPreviouslyRandomized: Boolean indicating if children were previously randomized before spawning.

Definition at line 495 of file SCR_ScenarioFrameworkSlotBase.c.

◆ ~SCR_ScenarioFrameworkSlotBase()

void ~SCR_ScenarioFrameworkSlotBase ( )
protected

Deletes preview entity in workbench mode, returns if in edit mode, otherwise despawns scenario slot base.

Definition at line 724 of file SCR_ScenarioFrameworkSlotBase.c.