13 bool m_bPriorityNotification;
15 [
Attribute(
"0",
desc:
"If true will add the (Friendly) indicator to any entities named in the notification that are friendly towards the local player that recieved the notification")]
18 [
Attribute(
desc:
"Holds the display information of the notification, Fill in Name and Color. Optional: Icon")]
57 colorEnum =
m_info.GetNotificationColor();
60 colorEnum =
data.GetFactionRelatedColor();
78 colorEnum =
data.GetFactionRelatedTextColor();
94 if (!splitNotificationUIInfo)
98 data.GetSplitFactionRelatedColor(leftFactionColor, rightFactionColor);
103 leftTextColorEnum = leftFactionColor;
108 rightTextColorEnum = rightFactionColor;
146 return m_bPriorityNotification;
163 if (!playerName.IsEmpty())
175 playerName = trimedName +
"...";
181 if (!playerName.IsEmpty() && playerPlatform ==
PlatformKind.PSN)
183 if (playerManager.GetPlatformKind(playerID) ==
PlatformKind.PSN)
184 playerName =
string.Format(
"<color rgba=%1><image set='%2' name='%3' scale='%4'/></color>",
UIColors.FormatColor(GUIColors.ENABLED),
UIConstants.ICONS_IMAGE_SET,
UIConstants.PLATFROM_PLAYSTATION_ICON_NAME,
PLATFORM_ICON_SIZE) + playerName;
194 return !playerName.IsEmpty();
201 if (!entityName.IsEmpty())
211 RplComponent rplComponent = RplComponent.Cast(
Replication.FindItem(entityRplID));
213 entity = rplComponent.GetEntity();
228 if (useCharacterName)
230 if (SCR_EditableCharacterComponent.Cast(editableEntity))
232 string format, firstname, alias, surname;
235 entityName =
WidgetManager.Translate(format, firstname, alias, surname);
236 if (!entityName.IsEmpty())
264 return !entityName.IsEmpty();
278 Faction notificationPlayerFaction = factionManager.GetPlayerFaction(notificationPlayerID);
279 if (!notificationPlayerFaction)
280 return friendlyIfNoFaction;
283 Faction playerSelfFaction = factionManager.GetLocalPlayerFaction();
284 if (!playerSelfFaction)
285 return friendlyIfNoFaction;
287 return playerSelfFaction.IsFactionFriendly(notificationPlayerFaction);
301 Faction notificationEntityFaction;
304 SCR_ChimeraCharacter notificationEntityChimera = SCR_ChimeraCharacter.Cast(notificationEntity);
305 if (notificationEntityChimera)
307 notificationEntityFaction = notificationEntityChimera.GetFaction();
311 FactionAffiliationComponent factionAffiliationComponent = FactionAffiliationComponent.Cast(notificationEntity.
FindComponent(FactionAffiliationComponent));
312 if (factionAffiliationComponent)
313 notificationEntityFaction = factionAffiliationComponent.GetAffiliatedFaction();
316 if (!notificationEntityFaction)
317 return friendlyIfNoFaction;
320 Faction playerSelfFaction = factionManager.GetLocalPlayerFaction();
321 if (!playerSelfFaction)
322 return friendlyIfNoFaction;
324 return playerSelfFaction.IsFactionFriendly(notificationEntityFaction);
332 if (!factionName.IsEmpty())
335 FactionManager factionManager =
GetGame().GetFactionManager();
339 Faction faction = factionManager.GetFactionByIndex(factionIndex);
343 factionName = faction.GetFactionName();
344 return !factionName.IsEmpty();
348 protected bool GetCharacterName(
int entityRplID, out
string format, out
string firstname, out
string alias, out
string surname)
357 RplComponent rplComponent = RplComponent.Cast(
Replication.FindItem(entityRplID));
359 entity = rplComponent.GetEntity();
368 SCR_CharacterIdentityComponent charIdentity = SCR_CharacterIdentityComponent.Cast(editableEntity.GetOwner().FindComponent(SCR_CharacterIdentityComponent));
372 charIdentity.GetFormattedFullName(format, firstname, alias, surname);
381 if (!callsign.IsEmpty())
406 if (!callsignComponent)
409 string company, platoon, squad, character, format;
410 if (!callsignComponent.
GetCallsignNames(company, platoon, squad, character, format))
414 callsign =
WidgetManager.Translate(format, company, platoon, squad, character);
427 aiGroup = groupsManager.FindGroup(playerGroupId);
445 if (!itemName.IsEmpty())
448 RplComponent itemRplcComp = RplComponent.Cast(
Replication.FindItem(rplId));
452 IEntity itemEntity = itemRplcComp.GetEntity();
461 if (!attributeCollection)
464 UIInfo uiInfo = attributeCollection.GetUIInfo();
468 itemName = uiInfo.GetName();
470 return !itemName.IsEmpty();
541 if (!targetEntity)
return;
571 Faction notificationPlayerFaction = factionManager.GetPlayerFaction(notificationPlayerID);
576 if (!notificationPlayerFaction)
579 int factionIndex = factionManager.GetFactionIndex(notificationPlayerFaction);
582 return (factionIndex +1) * -1;
589 Faction playerSelfFaction = factionManager.GetLocalPlayerFaction();
591 if (!playerSelfFaction || !notificationPlayerFaction)
595 if (playerSelfFaction.IsFactionFriendly(notificationPlayerFaction))
637 if (!notificationEntity)
641 SCR_ChimeraCharacter notificationEntityChimera = SCR_ChimeraCharacter.Cast(notificationEntity.GetOwner());
642 if (!notificationEntityChimera)
645 Faction notificationEntityFaction = notificationEntityChimera.GetFaction();
650 if (!notificationEntityFaction)
653 int factionIndex = factionManager.GetFactionIndex(notificationEntityFaction);
656 return (factionIndex +1) * -1;
660 Faction playerSelfFaction = factionManager.GetLocalPlayerFaction();
662 if (!playerSelfFaction || !notificationEntityFaction)
666 if (playerSelfFaction.IsFactionFriendly(notificationEntityFaction))
695 protected bool AreEntitiesFriendly(
int entity1ID,
bool entity1IsPlayer,
int entity2ID,
bool entity2IsPlayer)
701 if (entity1IsPlayer || entity2IsPlayer)
708 SCR_ChimeraCharacter entityChimera;
715 faction1 = factionManager.GetPlayerFaction(entity1ID);
724 entityChimera = SCR_ChimeraCharacter.Cast(entity.GetOwner());
728 faction1 = entityChimera.GetFaction();
734 faction2 = factionManager.GetPlayerFaction(entity2ID);
743 entityChimera = SCR_ChimeraCharacter.Cast(entity.GetOwner());
747 faction2 = entityChimera.GetFaction();
750 if (!faction1 || !faction2)
753 return faction1.IsFactionFriendly(faction2);
ENotificationSetPositionData
ArmaReforgerScripted GetGame()
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Get all prefabs that have the spawner data
void SCR_FactionManager(IEntitySource src, IEntity parent)
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
Replication item identifier.
Component of assigning and storing squad names.
bool GetCallsignNames(out string company, out string platoon, out string squad, out string character, out string format)
ENotificationColor GetNotificationTextColor()
static SCR_EditableEntityComponent GetEditableEntity(IEntity owner)
bool GetPos(out vector pos)
EEditableEntityType GetEntityType(IEntity owner=null)
LocalizedString GetObjectiveTypeName()
SCR_UINotificationInfo GetNotificationUIInfo()
void SetPositionDataEditablePlayer(int playerID, SCR_NotificationData data)
bool GetPosition(SCR_NotificationData data, out vector position)
void SetPosition(SCR_NotificationData data)
ENotificationColor GetFactionRelatedColorEntity(int notificationEntityID, ENotificationColor colorType)
void GetSplitNotificationTextColors(SCR_NotificationData data, out ENotificationColor leftTextColorEnum=ENotificationColor.NEUTRAL, out ENotificationColor rightTextColorEnum=ENotificationColor.NEUTRAL)
bool IsEntityFriendlyToLocalPlayer(IEntity notificationEntity, bool friendlyIfNoFaction=false)
void GetDisplayVisualizationData(SCR_NotificationData data, out SCR_UINotificationInfo info=null, out ENotificationColor colorEnum=ENotificationColor.NEUTRAL)
void SetPositionDataEditableEntity(int enditableEntityID, SCR_NotificationData data)
string GetText(SCR_NotificationData data)
const int MAX_USERNAME_CHARACTERS
bool GetEntityCallsign(int rplID, out string callsign)
ref SCR_UINotificationInfo m_info
void SetFactionRelatedColor(SCR_NotificationData data)
bool m_bAddFriendlyIndicator
const LocalizedString FRIENDLY_INDICATOR
String used to indicate friendly entities together with the name eg: (Friendly) [PlayerName]....
bool GetCharacterName(int entityRplID, out string format, out string firstname, out string alias, out string surname)
const LocalizedString LOCAL_PLAYER_INDICATOR
ENotificationColor GetTextColor(SCR_NotificationData data)
void SetInitialDisplayData(SCR_NotificationData data)
bool GetInventoryItemName(RplId rplId, out string itemName)
bool GetPlayerName(int playerID, out string playerName)
bool IsPlayerFriendlyToLocalPlayer(int notificationPlayerID, bool friendlyIfNoFaction=false)
bool GetFactionName(int factionIndex, out string factionName)
bool AreEntitiesFriendly(int entity1ID, bool entity1IsPlayer, int entity2ID, bool entity2IsPlayer)
bool GetGroupNameFromGroupID(int playerGroupId, out string groupName)
bool GetEditableEntityName(int entityRplID, out string entityName, bool useCharacterName=false)
bool CanSetPosition(SCR_NotificationData data)
ENotificationColor GetFactionRelatedColorPlayer(int notificationPlayerID, ENotificationColor colorType)
static const float PLATFORM_ICON_SIZE
static int GetLocalPlayerId()
Returns either a valid ID of local player or 0.
static IEntity GetLocalControlledEntity()
ENotificationColor GetLeftTextColor()
bool ShouldReplaceLeftColorWithRightColorIfAlly()
ENotificationColor GetRightTextColor()
static bool IsEmptyOrWhiteSpace(string input)
UIInfo used by the Notifications system.
proto external GenericEntity GetOwner()
Get owner entity.
UIInfo - allows to define UI elements.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
SCR_FieldOfViewSettings Attribute
proto external PlayerController GetPlayerController()