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_CampaignTaskSupportEntity.c
Go to the documentation of this file.
1
//------------------------------------------------------------------------------------------------
2
//[Obsolete(), EntityEditorProps(category: "GameScripted/Tasks", description: "Campaign task support entity.", color: "0 0 255 255")]
3
//class SCR_CampaignTaskSupportEntityClass: SCR_CampaignBaseTaskSupportEntityClass
4
//{
5
//};
6
7
//------------------------------------------------------------------------------------------------
8
//[Obsolete()]
9
//class SCR_CampaignTaskSupportEntity : SCR_CampaignBaseTaskSupportEntity
10
//{
11
// //------------------------------------------------------------------------------------------------
12
// //! Returns the found task if it exists.
13
// //TODO: Remove this method after no longer needed.
14
// SCR_CampaignTask GetTask(SCR_CampaignMilitaryBaseComponent targetBase, Faction targetFaction, SCR_CampaignTaskType type)
15
// {
16
// if (!GetTaskManager())
17
// return null;
18
//
19
// array<SCR_BaseTask> tasks = {};
20
// int count = GetTaskManager().GetTasks(tasks);
21
//
22
// for (int i = count - 1; i >= 0; i--)
23
// {
24
// SCR_CampaignTask castTask = SCR_CampaignTask.Cast(tasks[i]);
25
//
26
// if (!castTask)
27
// continue;
28
//
29
// if (castTask.GetType() == type && castTask.GetTargetBase() == targetBase && castTask.GetTargetFaction() == targetFaction)
30
// return castTask;
31
// }
32
// return null;
33
// }
34
//
35
// //------------------------------------------------------------------------------------------------
36
// //! Server side
37
// //! Called after a new base has been captured or a mobile HQ deployed
38
// //! Creates capture tasks for small, major and main bases in newly gained range
39
// void GenerateCaptureTasks(notnull SCR_CampaignMilitaryBaseComponent base)
40
// {
41
// if (!base.IsInitialized())
42
// return;
43
//
44
// if ((base.IsHQ() || (base.CanBeHQ() && base.GetDisableWhenUnusedAsHQ())))
45
// return;
46
//
47
// SCR_CampaignFaction baseFaction = base.GetCampaignFaction();
48
//
49
// if (!baseFaction)
50
// return;
51
//
52
// array<Faction> factions = {};
53
// GetGame().GetFactionManager().GetFactionsList(factions);
54
// SCR_CampaignFaction campaignFaction;
55
//
56
// foreach (Faction faction : factions)
57
// {
58
// campaignFaction = SCR_CampaignFaction.Cast(faction);
59
//
60
// if (!campaignFaction || !campaignFaction.IsPlayable())
61
// continue;
62
//
63
// if (baseFaction == campaignFaction)
64
// continue;
65
//
66
// if (!base.IsHQRadioTrafficPossible(campaignFaction))
67
// continue;
68
//
69
// if (GetTask(base, campaignFaction, SCR_CampaignTaskType.CAPTURE))
70
// continue;
71
//
72
// CreateNewCampaignTask(SCR_CampaignTaskType.CAPTURE, base, campaignFaction);
73
// }
74
// }
75
//
76
// //------------------------------------------------------------------------------------------------
77
// //! Creates a new conflict task.
78
// protected SCR_CampaignTask CreateNewCampaignTask(SCR_CampaignTaskType type, notnull SCR_CampaignMilitaryBaseComponent base, notnull Faction faction)
79
// {
80
// SCR_CampaignTask task = SCR_CampaignTask.Cast(CreateTask());
81
// if (!task)
82
// return null;
83
//
84
// SetTargetFaction(task, faction); // Replicated internally
85
// SetTargetBase(task, base); // Replicated internally
86
// SetTaskType(task, type); // Replicated internally
87
//
88
// SCR_GameModeCampaign campaign = SCR_GameModeCampaign.GetInstance();
89
// if (campaign && SCR_FactionManager.SGetLocalPlayerFaction() == faction)
90
// {
91
// string text = task.TASK_AVAILABLE_TEXT + " " + task.GetTitle();
92
// string baseName;
93
//
94
// if (task.GetTargetBase())
95
// baseName = task.GetTargetBase().GetBaseNameUpperCase();
96
//
97
// SCR_PopUpNotification.GetInstance().PopupMsg(text, prio: SCR_ECampaignPopupPriority.TASK_AVAILABLE, param1: baseName, text2: task.TASK_HINT_TEXT, text2param1: SCR_PopUpNotification.TASKS_KEY_IMAGE_FORMAT, sound: SCR_SoundEvent.TASK_CREATED);
98
// }
99
//
100
// return task;
101
// }
102
//
103
// //------------------------------------------------------------------------------------------------
104
// void SetTaskType(notnull SCR_CampaignTask task, SCR_CampaignTaskType type)
105
// {
106
// if (!GetTaskManager())
107
// return;
108
//
109
// int taskID = task.GetTaskID();
110
//
111
// Rpc(RPC_SetTaskType, taskID, type);
112
// RPC_SetTaskType(taskID, type);
113
// }
114
//
115
// //------------------------------------------------------------------------------------------------
116
// [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
117
// void RPC_SetTaskType(int taskID, SCR_CampaignTaskType type)
118
// {
119
// if (!GetTaskManager())
120
// return;
121
//
122
// SCR_CampaignTask task = SCR_CampaignTask.Cast(GetTaskManager().GetTask(taskID));
123
// if (!task)
124
// return;
125
//
126
// task.SetType(type);
127
// }
128
//};
scripts
Game
Tasks
SupportEntities
SCR_CampaignTaskSupportEntity.c
Generated by
1.17.0