Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_NotificationTaskCreationText.c
Go to the documentation of this file.
1
8{
9 //------------------------------------------------------------------------------------------------
10 override string GetText(SCR_NotificationData data)
11 {
12 FactionManager factionManager = GetGame().GetFactionManager();
13 if (!factionManager)
14 return string.Empty;
15
16 SCR_GameModeCampaign campaign = SCR_GameModeCampaign.GetInstance();
17 if (!campaign)
18 return string.Empty;
19
21 if (!taskNotificationManager)
22 return string.Empty;
23
24 SCR_ETaskNotification taskNotification;
25 int factionId;
26 int baseCallsign;
27 int callerGroupId;
28 data.GetParams(taskNotification, factionId, baseCallsign, callerGroupId);
29
30 Faction faction = factionManager.GetFactionByIndex(factionId);
31 if (!faction)
32 return string.Empty;
33
34 SCR_MinorRequestedTaskNotificationData requestedNotificationData = SCR_MinorRequestedTaskNotificationData.Cast(taskNotificationManager.GetTaskNotificationData(taskNotification, SCR_ETaskNotificationMsg.MINOR_CREATION));
35 if (requestedNotificationData)
36 return requestedNotificationData.GetCreationText(callerGroupId);
37
38 SCR_MinorTaskNotificationData notificationData = SCR_MinorTaskNotificationData.Cast(taskNotificationManager.GetTaskNotificationData(taskNotification, SCR_ETaskNotificationMsg.MINOR_CREATION));
39 if (!notificationData)
40 return string.Empty;
41
42 SCR_CampaignMilitaryBaseComponent base = campaign.GetBaseManager().FindBaseByCallsign(baseCallsign);
43 if (base)
44 return WidgetManager.Translate(notificationData.m_sText, base.GetFormattedBaseNameWithCallsign(faction));
45
46 return notificationData.m_sText;
47 }
48}
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)