Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_NotificationTaskName.c
Go to the documentation of this file.
1
8{
9 //------------------------------------------------------------------------------------------------
10 override string GetText(SCR_NotificationData data)
11 {
12 SCR_ETaskNotification taskNotification;
13 SCR_ETaskNotificationMsg taskNotificationMsg;
14 int factionId;
15 int baseCallsign;
16 int grid;
17 data.GetParams(taskNotification, taskNotificationMsg, factionId, baseCallsign, grid);
18
19 string taskName = GetTaskName(taskNotification, taskNotificationMsg, factionId, baseCallsign, grid);
20 if (taskName.IsEmpty())
21 return string.Empty;
22
23 data.SetNotificationTextEntries(taskName);
24 return super.GetText(data);
25 }
26
27 //------------------------------------------------------------------------------------------------
28 protected string GetTaskName(SCR_ETaskNotification taskNotification, SCR_ETaskNotificationMsg taskNotificationMsg, int factionId, int baseCallsign, int grid)
29 {
30 FactionManager factionManager = GetGame().GetFactionManager();
31 if (!factionManager)
32 return string.Empty;
33
34 SCR_GameModeCampaign campaign = SCR_GameModeCampaign.GetInstance();
35 if (!campaign)
36 return string.Empty;
37
39 if (!taskNotificationManager)
40 return string.Empty;
41
42 Faction faction = factionManager.GetFactionByIndex(factionId);
43 if (!faction)
44 return string.Empty;
45
46 SCR_TaskNotificationConfig config = taskNotificationManager.GetTaskNotificationConfig(taskNotification);
47 if (!config)
48 return string.Empty;
49
50 SCR_CampaignMilitaryBaseComponent base = campaign.GetBaseManager().FindBaseByCallsign(baseCallsign);
51 if (base)
52 return WidgetManager.Translate(config.m_sTaskName, base.GetFormattedBaseNameWithCallsign(faction));
53
54 if (grid >= 0)
55 return taskNotificationManager.GetTaskNameWithGrid(config.m_sTaskName, grid);
56
57 return config.m_sTaskName;
58 }
59}
ENotification
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
string GetText()
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
SCR_ETaskNotification
Objective and request notifications types.
SCR_ETaskNotificationMsg
Various types of task notifications for different events and states.
Get all prefabs that have the spawner data
void SCR_GameModeCampaign(IEntitySource src, IEntity parent)
void SCR_TaskNotificationManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
string GetTaskName(SCR_ETaskNotification taskNotification, SCR_ETaskNotificationMsg taskNotificationMsg, int factionId, int baseCallsign, int grid)