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_ScenarioFrameworkActionMoveIntoInventory.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_ContainerActionTitle
()]
2
class
SCR_ScenarioFrameworkActionMoveIntoInventory
:
SCR_ScenarioFrameworkActionBase
3
{
4
[
Attribute
(
desc
:
"Target entity to move into inventory)"
)]
5
ref
SCR_ScenarioFrameworkGet
m_EntityGetter;
6
7
[
Attribute
(
desc
:
"Target entity with inventory)"
)]
8
ref
SCR_ScenarioFrameworkGet
m_TargetGetter;
9
10
//------------------------------------------------------------------------------------------------
11
override
void
OnActivate
(
IEntity
object
)
12
{
13
if
(!CanActivate())
14
return
;
15
16
IEntity
entity;
17
if
(!ValidateInputEntity(
object
, m_EntityGetter, entity))
18
return
;
19
20
IEntity
targetEntity;
21
if
(!ValidateInputEntity(
object
, m_TargetGetter, targetEntity))
22
return
;
23
24
if
(entity == targetEntity)
25
{
26
Print
(
string
.Format(
"SCR_ScenarioFrameworkActionMoveIntoInventory: Entity is same as target for action %1"
,
this
),
LogLevel
.ERROR);
27
return
;
28
}
29
30
ScriptedInventoryStorageManagerComponent storageManager = ScriptedInventoryStorageManagerComponent.Cast(targetEntity.
FindComponent
(ScriptedInventoryStorageManagerComponent));
31
if
(!storageManager)
32
{
33
Print
(
string
.Format(
"SCR_ScenarioFrameworkActionMoveIntoInventory: Target Entity %2 doesn't have storage StorageManagerComponent for action %1"
,
this
, m_TargetGetter),
LogLevel
.ERROR);
34
return
;
35
}
36
37
if
(!storageManager.TryInsertItem(entity))
38
Print
(
string
.Format(
"SCR_ScenarioFrameworkActionMoveIntoInventory: Insertion of entity %2 for action %1 failed."
,
this
, m_TargetGetter),
LogLevel
.WARNING);
39
}
40
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
OnActivate
override void OnActivate()
Definition
SCR_CharacterCommandLoiter.c:31
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_ContainerActionTitle
Definition
SCR_ContainerActionTitle.c:2
SCR_ScenarioFrameworkActionBase
Definition
SCR_ScenarioFrameworkActionBase.c:3
SCR_ScenarioFrameworkActionMoveIntoInventory
Definition
SCR_ScenarioFrameworkActionMoveIntoInventory.c:3
SCR_ScenarioFrameworkGet
Definition
SCR_ScenarioFrameworkGet.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
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
ScenarioFramework
Actions
SCR_ScenarioFrameworkActionMoveIntoInventory.c
Generated by
1.17.0