Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_NotificationPerceivedFactionKillPunishment.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Text shown in the notification when a disguise punishement type is set")]
5 protected ref array<ref SCR_FactionKillPunishmentTypes> m_aNotificationTextForPunishmentType;
6
8 {
9 int playerID, punishmentFlags;
10 data.GetParams(playerID, punishmentFlags);
11
12 string playerName;
13 data.GetNotificationTextEntries(playerName);
14 if (!GetPlayerName(playerID, playerName))
15 return string.Empty;
16
17 //~ Get notification string to set which type is set
18 string punishmentTypeString;
19 foreach (SCR_FactionKillPunishmentTypes punishmentType : m_aNotificationTextForPunishmentType)
20 {
21 if (punishmentFlags != punishmentType.m_ePunishmentKillingWhileDisguised || punishmentType.m_sNotificationText.IsEmpty())
22 continue;
23
24 punishmentTypeString = punishmentType.m_sNotificationText;
25 }
26
27 if (punishmentTypeString.IsEmpty())
28 {
29 Print("'SCR_NotificationPerceivedFactionKillPunishment' could not find given punishment type in the notification text array. Make sure any new punishment types are added to the notification. (Or the given string is empty)", LogLevel.ERROR);
30 return string.Empty;
31 }
32
33 data.SetNotificationTextEntries(playerName, punishmentTypeString);
34 return super.GetText(data);
35 }
36}
37
39class SCR_FactionKillPunishmentTypes
41 [Attribute("0", desc: "String will be added to the notification if all flags are valid", uiwidget: UIWidgets.Flags, enumType: SCR_EDisguisedKillingPunishment)]
42 SCR_EDisguisedKillingPunishment m_ePunishmentKillingWhileDisguised;
43
44 [Attribute(desc: "Text shown in the notification when the flags are set")]
45 LocalizedString m_sNotificationText;
46}
47
ENotification
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Get all prefabs that have the spawner data
SCR_NotificationPerceivedFactionKillPunishment SCR_NotificationPlayer BaseContainerProps()] class SCR_FactionKillPunishmentTypes
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
bool GetPlayerName(int playerID, out string playerName)
ref array< ref SCR_FactionKillPunishmentTypes > m_aNotificationTextForPunishmentType
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute