Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
NotificationSystem Class Reference

Protected Member Functions

void NotificationSystem ()
 
NotificationData GetNotificationData (NotificationType type)
 

Static Protected Member Functions

static void InitInstance ()
 
static void CleanupInstance ()
 
static NotificationSystem GetInstance ()
 
static void SendNotificationToPlayerExtended (Man player, float show_time, string title_text, string detail_text="", string icon="")
 Send custom notification to player from server.
 
static void SendNotificationToPlayerIdentityExtended (PlayerIdentity player, float show_time, string title_text, string detail_text="", string icon="")
 Send custom notification to player identity from server.
 
static void SendNotificationToPlayer (Man player, NotificationType type, float show_time, string detail_text="")
 Send notification from default types to player from server.
 
static void SendNotificationToPlayerIdentity (PlayerIdentity player, NotificationType type, float show_time, string detail_text="")
 Send notification from default types to player identity from server.
 
static void AddNotification (NotificationType type, float show_time, string detail_text="")
 Send notification from default types to local player.
 
static void AddNotificationExtended (float show_time, string title_text, string detail_text="", string icon="")
 Send custom notification from to local player.
 
static void Update (float timeslice)
 
static void LoadNotificationData ()
 

Protected Attributes

ref array< ref NotificationRuntimeDatam_TimeArray
 
ref array< ref NotificationRuntimeDatam_DeferredArray
 
ref map< NotificationType, ref NotificationDatam_DataArray
 
float m_TimeElapsed
 
ref ScriptInvoker m_OnNotificationAdded = new ScriptInvoker()
 
ref ScriptInvoker m_OnNotificationRemoved = new ScriptInvoker()
 

Static Protected Attributes

static const string JSON_FILE_PATH = "scripts/data/notifications.json"
 
static const int MAX_NOTIFICATIONS = 5
 
static ref NotificationSystem m_Instance
 

Detailed Description

Definition at line 69 of file notificationsystem.c.

Constructor & Destructor Documentation

◆ NotificationSystem()

void NotificationSystem::NotificationSystem ( )
protected

Definition at line 109 of file notificationsystem.c.

Member Function Documentation

◆ AddNotification()

static void NotificationSystem::AddNotification ( NotificationType type,
float show_time,
string detail_text = "" )
staticprotected

Send notification from default types to local player.

Parameters
typethe type of notification to send - these can be viewed in /Scripts/Data/Notifications.json
show_timeamount of time this notification is displayed
detail_textadditional text that can be added to the notification under the title - will not display additional text if not set

Definition at line 192 of file notificationsystem.c.

◆ AddNotificationExtended()

static void NotificationSystem::AddNotificationExtended ( float show_time,
string title_text,
string detail_text = "",
string icon = "" )
staticprotected

Send custom notification from to local player.

Parameters
show_timeamount of time this notification is displayed
title_textthe title text that is displayed in the notification
detail_textadditional text that can be added to the notification under the title - will not display additional text if not set
iconthe icon that is displayed in the notification - will use default icon if not set

Definition at line 215 of file notificationsystem.c.

◆ CleanupInstance()

static void NotificationSystem::CleanupInstance ( )
staticprotected

Definition at line 99 of file notificationsystem.c.

◆ GetInstance()

static NotificationSystem NotificationSystem::GetInstance ( )
staticprotected

Definition at line 104 of file notificationsystem.c.

◆ GetNotificationData()

NotificationData NotificationSystem::GetNotificationData ( NotificationType type)
protected

Definition at line 272 of file notificationsystem.c.

◆ InitInstance()

static void NotificationSystem::InitInstance ( )
staticprotected

Definition at line 90 of file notificationsystem.c.

◆ LoadNotificationData()

static void NotificationSystem::LoadNotificationData ( )
staticprotected

Definition at line 280 of file notificationsystem.c.

◆ SendNotificationToPlayer()

static void NotificationSystem::SendNotificationToPlayer ( Man player,
NotificationType type,
float show_time,
string detail_text = "" )
staticprotected

Send notification from default types to player from server.

Parameters
playerthe target player to send notification to
typethe type of notification to send - these can be viewed in /Scripts/Data/Notifications.json
show_timeamount of time this notification is displayed
detail_textadditional text that can be added to the notification under the title - will not display additional text if not set

Definition at line 160 of file notificationsystem.c.

◆ SendNotificationToPlayerExtended()

static void NotificationSystem::SendNotificationToPlayerExtended ( Man player,
float show_time,
string title_text,
string detail_text = "",
string icon = "" )
staticprotected

Send custom notification to player from server.

Parameters
playerthe target player to send notification to
show_timeamount of time this notification is displayed
title_textthe title text that is displayed in the notification
detail_textadditional text that can be added to the notification under the title - will not display additional text if not set
iconthe icon that is displayed in the notification - will use default icon if not set

Definition at line 125 of file notificationsystem.c.

◆ SendNotificationToPlayerIdentity()

static void NotificationSystem::SendNotificationToPlayerIdentity ( PlayerIdentity player,
NotificationType type,
float show_time,
string detail_text = "" )
staticprotected

Send notification from default types to player identity from server.

Parameters
playerthe target player to send notification to - if null, will send to all players
typethe type of notification to send - these can be viewed in /Scripts/Data/Notifications.json
show_timeamount of time this notification is displayed
detail_textadditional text that can be added to the notification under the title - will not display additional text if not set

Definition at line 175 of file notificationsystem.c.

◆ SendNotificationToPlayerIdentityExtended()

static void NotificationSystem::SendNotificationToPlayerIdentityExtended ( PlayerIdentity player,
float show_time,
string title_text,
string detail_text = "",
string icon = "" )
staticprotected

Send custom notification to player identity from server.

Parameters
playerthe target player to send notification to - if null, will send to all players
show_timeamount of time this notification is displayed
title_textthe title text that is displayed in the notification
detail_textadditional text that can be added to the notification under the title - will not display additional text if not set
iconthe icon that is displayed in the notification - will use default icon if not set

Definition at line 141 of file notificationsystem.c.

◆ Update()

static void NotificationSystem::Update ( float timeslice)
staticprotected

Definition at line 233 of file notificationsystem.c.

Member Data Documentation

◆ JSON_FILE_PATH

const string NotificationSystem::JSON_FILE_PATH = "scripts/data/notifications.json"
staticprotected

Definition at line 74 of file notificationsystem.c.

◆ m_DataArray

ref map<NotificationType, ref NotificationData> NotificationSystem::m_DataArray
protected

Definition at line 83 of file notificationsystem.c.

◆ m_DeferredArray

ref array<ref NotificationRuntimeData> NotificationSystem::m_DeferredArray
protected

Definition at line 82 of file notificationsystem.c.

◆ m_Instance

ref NotificationSystem NotificationSystem::m_Instance
staticprotected

Definition at line 79 of file notificationsystem.c.

◆ m_OnNotificationAdded

ref ScriptInvoker NotificationSystem::m_OnNotificationAdded = new ScriptInvoker()
protected

Definition at line 87 of file notificationsystem.c.

◆ m_OnNotificationRemoved

ref ScriptInvoker NotificationSystem::m_OnNotificationRemoved = new ScriptInvoker()
protected

Definition at line 88 of file notificationsystem.c.

◆ m_TimeArray

ref array<ref NotificationRuntimeData> NotificationSystem::m_TimeArray
protected

Definition at line 81 of file notificationsystem.c.

◆ m_TimeElapsed

float NotificationSystem::m_TimeElapsed
protected

Definition at line 85 of file notificationsystem.c.

◆ MAX_NOTIFICATIONS

const int NotificationSystem::MAX_NOTIFICATIONS = 5
staticprotected

Definition at line 75 of file notificationsystem.c.


The documentation for this class was generated from the following file: