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_ScenarioFrameworkVehicleActionResourceUnloadAction.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_ScenarioFrameworkVehicleActionResourceUnloadAction
:
SCR_ScenarioFrameworkVehicleActionBase
3
{
4
[
Attribute
(defvalue:
"0"
,
desc
:
"Resource Type"
, uiwidget:
UIWidgets
.ComboBox, enumType:
EResourceType
)]
5
EResourceType
m_eResourceType;
6
7
[
Attribute
(defvalue:
"0"
,
desc
:
"Resources To Unload"
,
params
:
"0 inf 0.01"
)]
8
float
m_fResourcesToUnload;
9
10
//------------------------------------------------------------------------------------------------
13
override
void
Init
(
Vehicle
vehicle)
14
{
15
// Here you can step out to the OnActivate method and debug this specific action if m_bDebug attribute is set to true.
16
// This can be also adjusted during runtime via Debug Menu > ScenarioFramework > Action Inspector
17
if
(m_bDebug)
18
Print
(
"[SCR_ScenarioFrameworkVehicleActionBase.Init] debug line ("
+ __FILE__ +
" L"
+ __LINE__ +
")"
,
LogLevel
.WARNING);
19
20
SCR_ResourceComponent resourceComp = SCR_ResourceComponent.Cast(vehicle.FindComponent(SCR_ResourceComponent));
21
if
(!resourceComp)
22
return
;
23
24
SCR_ResourceGenerator
resourceGen = resourceComp.GetGenerator(
EResourceGeneratorID
.VEHICLE_UNLOAD, m_eResourceType);
25
if
(!resourceGen)
26
return
;
27
28
SCR_ResourceConsumer resourceCon = resourceComp.GetConsumer(
EResourceGeneratorID
.VEHICLE_UNLOAD, m_eResourceType);
29
if
(!resourceCon)
30
return
;
31
32
float
resourcesToUnload = m_fResourcesToUnload;
33
SCR_ResourceConsumtionResponse
response = resourceCon.RequestConsumtion(resourcesToUnload);
34
if
(response.GetReason() !=
EResourceReason
.SUFFICIENT)
35
resourcesToUnload = response.GetAvailableSupply();
36
37
SCR_ResourceGeneratorActionDropContainers
action =
new
SCR_ResourceGeneratorActionDropContainers
();
38
if
(action)
39
action.
PerformAction
(resourceGen, resourcesToUnload);
40
}
41
}
Init
override void Init()
Definition
CharacterCameraHandlerComponent.c:40
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_ResourceConsumtionResponse
void SCR_ResourceConsumtionResponse(float availableResource=0, float resourceMultiplier=0, float range=0, EResourceReason reasonCode=EResourceReason.UNAVAILABLE)
Definition
SCR_ResourceConsumtionResponse.c:17
EResourceReason
EResourceReason
Definition
SCR_ResourceConsumtionResponse.c:2
EResourceType
EResourceType
Definition
SCR_ResourceContainer.c:2
EResourceGeneratorID
EResourceGeneratorID
Definition
SCR_ResourceGenerator.c:2
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
SCR_ResourceGeneratorActionDropContainers
Definition
SCR_ResourceGeneratorActionDropContainers.c:3
SCR_ResourceGeneratorActionDropContainers::PerformAction
override void PerformAction(notnull SCR_ResourceGenerator generator, inout float resourceValue)
Definition
SCR_ResourceGeneratorActionDropContainers.c:102
SCR_ResourceGenerator
Definition
SCR_ResourceGenerator.c:80
SCR_ScenarioFrameworkVehicleActionBase
Definition
SCR_ScenarioFrameworkVehicleActionBase.c:3
SCR_ScenarioFrameworkVehicleActionResourceUnloadAction
Definition
SCR_ScenarioFrameworkVehicleActionResourceUnloadAction.c:3
UIWidgets
Definition
attributes.c:40
Vehicle
enum EPhysicsLayerPresets Vehicle
Definition
gameLib.c:24
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
VehicleActions
SCR_ScenarioFrameworkVehicleActionResourceUnloadAction.c
Generated by
1.17.0