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_Tutorial_CombatEngineering_EnterBuilding_2.c
Go to the documentation of this file.
1
[
EntityEditorProps
(insertable:
false
)]
2
class
SCR_Tutorial_CombatEngineering_EnterBuilding_2Class
:
SCR_BaseTutorialStageClass
3
{
4
}
5
6
class
SCR_Tutorial_CombatEngineering_EnterBuilding_2 :
SCR_BaseTutorialStage
7
{
8
//------------------------------------------------------------------------------------------------
9
override
protected
void
Setup
()
10
{
11
SCR_HintManagerComponent.HideHint();
12
SCR_HintManagerComponent.ClearLatestHint();
13
14
SCR_TutorialLogic_CombatEngineering
logic =
SCR_TutorialLogic_CombatEngineering
.Cast(m_Logic);
15
if
(!logic)
16
return
;
17
18
IEntity
truck =
GetGame
().
GetWorld
().FindEntityByName(
"BUILDING_VEHICLE"
);
19
if
(!truck)
20
return
;
21
22
RegisterWaypoint
(truck,
""
,
"CUSTOM"
);
23
24
SCR_VoiceoverSystem
.
GetInstance
().
RegisterActor
(
GetGame
().
GetWorld
().FindEntityByName(
"COMBATENGINEERING_Instructor_E"
));
25
26
if
(!logic.m_bBuildingVoiceLinePlayed)
27
{
28
PlayNarrativeCharacterStage
(
"COMBATENGINEERING_Instructor_E"
, 1);
29
}
30
else
31
{
32
RegenerateSupplies
();
//Hotfix for refund now working
33
ShowHint
();
34
}
35
36
SlotManagerComponent slotMan = SlotManagerComponent.Cast(truck.
FindComponent
(SlotManagerComponent));
37
if
(!slotMan)
38
return
;
39
40
EntitySlotInfo slot = slotMan.GetSlotByName(
"EngineerBox"
);
41
if
(!slot)
42
return
;
43
44
IEntity
box = slot.GetAttachedEntity();
45
if
(box)
46
m_TutorialComponent
.BlockBuildingModeAccess(box,
false
);
47
}
48
49
//------------------------------------------------------------------------------------------------
50
override
protected
void
OnStageFinished
()
51
{
52
SCR_TutorialLogic_CombatEngineering
logic =
SCR_TutorialLogic_CombatEngineering
.Cast(m_Logic);
53
if
(logic)
54
logic.m_bBuildingVoiceLinePlayed =
true
;
55
56
super.OnStageFinished();
57
}
58
59
//------------------------------------------------------------------------------------------------
60
override
protected
bool
GetIsFinished
()
61
{
62
return
IsBuildingModeOpen
();
63
}
64
65
//------------------------------------------------------------------------------------------------
66
protected
void
RegenerateSupplies
()
67
{
68
IEntity
supplyTruck =
GetGame
().
GetWorld
().FindEntityByName(
"BUILDING_VEHICLE"
);
69
if
(!supplyTruck)
70
return
;
71
72
SlotManagerComponent slotManager = SlotManagerComponent.Cast(supplyTruck.
FindComponent
(SlotManagerComponent));
73
if
(!slotManager)
74
return
;
75
76
EntitySlotInfo
slotInfo = slotManager.GetSlotByName(
"EngineerBox"
);
77
if
(!slotInfo)
78
return
;
79
80
IEntity
cargo = slotInfo.GetAttachedEntity();
81
if
(!cargo)
82
return
;
83
84
SCR_ResourceComponent resourceComp = SCR_ResourceComponent.FindResourceComponent(cargo);
85
if
(!resourceComp)
86
return
;
87
88
SCR_ResourceContainer
supplyContainer = resourceComp.GetContainer(
EResourceType
.SUPPLIES);
89
if
(supplyContainer)
90
supplyContainer.
SetResourceValue
(supplyContainer.
GetMaxResourceValue
());
91
}
92
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
EntityEditorProps
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
Definition
SCR_CompassComponent.c:10
ShowHint
void ShowHint()
Definition
SCR_PerceivedFactionManagerComponent.c:54
EResourceType
EResourceType
Definition
SCR_ResourceContainer.c:2
RegenerateSupplies
void RegenerateSupplies()
Definition
SCR_Tutorial_CombatEngineering_EnterBuilding_2.c:66
m_TutorialComponent
SCR_TutorialGamemodeComponent m_TutorialComponent
Definition
SCR_TutorialInstructorComponent.c:10
IEntity
enum EVehicleType IEntity
EntitySlotInfo
Adds ability to attach an object to a slot.
Definition
EntitySlotInfo.c:9
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
IEntity::GetWorld
proto external BaseWorld GetWorld()
SCR_BaseTutorialStageClass
Definition
SCR_BaseTutorialStage.c:3
SCR_BaseTutorialStage
Definition
SCR_BaseTutorialStage.c:8
SCR_BaseTutorialStage::Setup
void Setup()
Definition
SCR_BaseTutorialStage.c:208
SCR_BaseTutorialStage::OnStageFinished
void OnStageFinished()
Definition
SCR_BaseTutorialStage.c:427
SCR_BaseTutorialStage::IsBuildingModeOpen
bool IsBuildingModeOpen()
Definition
SCR_BaseTutorialStage.c:343
SCR_BaseTutorialStage::GetIsFinished
bool GetIsFinished()
Definition
SCR_BaseTutorialStage.c:214
SCR_BaseTutorialStage::RegisterWaypoint
SCR_Waypoint RegisterWaypoint(string entityName, string title=string.Empty, string icon="MISC")
Definition
SCR_BaseTutorialStage.c:293
SCR_BaseTutorialStage::PlayNarrativeCharacterStage
void PlayNarrativeCharacterStage(string characterName, int stage)
Definition
SCR_BaseTutorialStage.c:510
SCR_ResourceContainer
Definition
SCR_ResourceContainer.c:35
SCR_ResourceContainer::SetResourceValue
bool SetResourceValue(float value, bool notifyChange=true)
Definition
SCR_ResourceContainer.c:411
SCR_ResourceContainer::GetMaxResourceValue
float GetMaxResourceValue()
Definition
SCR_ResourceContainer.c:101
SCR_Tutorial_CombatEngineering_EnterBuilding_2Class
Definition
SCR_Tutorial_CombatEngineering_EnterBuilding_2.c:3
SCR_TutorialLogic_CombatEngineering
Definition
SCR_TutorialLogic_CombatEngineering.c:3
SCR_VoiceoverSystem
Definition
SCR_VoiceoverSystem.c:3
SCR_VoiceoverSystem::RegisterActor
void RegisterActor(notnull IEntity entity)
Definition
SCR_VoiceoverSystem.c:556
SCR_VoiceoverSystem::GetInstance
static SCR_VoiceoverSystem GetInstance()
Definition
SCR_VoiceoverSystem.c:159
scripts
Game
GameMode
Tutorial
Stages
CombatEngineeringCourse
SCR_Tutorial_CombatEngineering_EnterBuilding_2.c
Generated by
1.17.0