Ark Server API (ASA) - Wiki
|
Messaging manager. Allows to send server messages, notifications and chat messages. More...
#include <MessagingManager.h>
Public Member Functions | |
template<typename T , typename... Args> | |
FORCEINLINE void | SendServerMessage (AShooterPlayerController *player_controller, FLinearColor msg_color, const T *msg, Args &&... args) |
Sends server message to the specific player. Using fmt::format. | |
template<typename T , typename... Args> | |
FORCEINLINE void | SendNotification (AShooterPlayerController *player_controller, FLinearColor color, float display_scale, float display_time, UTexture2D *icon, const T *msg, Args &&... args) |
Sends notification (on-screen message) to the specific player. Using fmt::format. | |
template<typename T , typename... Args> | |
FORCEINLINE void | SendChatMessage (AShooterPlayerController *player_controller, const FString &sender_name, const T *msg, Args &&... args) |
Sends chat message to the specific player. Using fmt::format. | |
template<typename T , typename... Args> | |
FORCEINLINE void | SendServerMessageToAll (FLinearColor msg_color, const T *msg, Args &&... args) |
Sends server message to all players. Using fmt::format. | |
template<typename T , typename... Args> | |
FORCEINLINE void | SendNotificationToAll (FLinearColor color, float display_scale, float display_time, UTexture2D *icon, const T *msg, Args &&... args) |
Sends notification (on-screen message) to all players. Using fmt::format. | |
template<typename T , typename... Args> | |
FORCEINLINE void | SendChatMessageToAll (const FString &sender_name, const T *msg, Args &&... args) |
Sends chat message to all players. Using fmt::format. | |
virtual std::optional< std::string > | MeetsRequirementsToWork () |
Returns wether this messaging manager is able to work in the current session. | |
void | SetWorldContext (UWorld *world_context) |
Sets the world context. This is called by the API automatically. | |
Protected Member Functions | |
virtual void | SendChatMessage_Impl (AShooterPlayerController *player_controller, const FString &sender_name, const FString &msg) |
virtual void | SendNotification_Impl (AShooterPlayerController *player_controller, FLinearColor color, float display_scale, float display_time, UTexture2D *icon, const FString &msg) |
Protected Attributes | |
: virtual void SendServerMessage_Impl(AShooterPlayerController* player_controller | |
FLinearColor | msg_color |
FLinearColor const FString & | msg |
player_controller ClientServerChatDirectMessage & | msg |
: UWorld* WorldContext = nullptr | |
Messaging manager. Allows to send server messages, notifications and chat messages.
Usage:
Definition at line 12 of file MessagingManager.h.
|
inlinevirtual |
Returns wether this messaging manager is able to work in the current session.
The default one does not depend in any mod or external service so it always returns true.
Subclasses should redefine this function if they depend on any external service.
If it returns an error, it will be removed and the plugin will fall back to the default API messaging manager.
Reimplemented in AsaApiUtilsMessagingManager.
Definition at line 156 of file MessagingManager.h.
|
inline |
Sends chat message to the specific player. Using fmt::format.
T | Either a a char or wchar_t |
Args | Optional arguments types |
player_controller | Player |
sender_name | Name of the sender |
msg | Message |
args | Optional arguments |
Definition at line 67 of file MessagingManager.h.
|
inlineprotectedvirtual |
Definition at line 181 of file MessagingManager.h.
|
inline |
Sends chat message to all players. Using fmt::format.
T | Either a a char or wchar_t |
Args | Optional arguments types |
sender_name | Name of the sender |
msg | Message |
args | Optional arguments |
Definition at line 130 of file MessagingManager.h.
|
inline |
Sends notification (on-screen message) to the specific player. Using fmt::format.
T | Either a a char or wchar_t |
Args | Optional arguments types |
player_controller | Player |
color | Message color |
display_scale | Size of text |
display_time | Display time |
icon | Message icon (optional) |
msg | Message |
args | Optional arguments |
Definition at line 47 of file MessagingManager.h.
|
inlineprotectedvirtual |
Reimplemented in AsaApiUtilsMessagingManager.
Definition at line 190 of file MessagingManager.h.
|
inline |
Sends notification (on-screen message) to all players. Using fmt::format.
T | Either a a char or wchar_t |
Args | Optional arguments types |
color | Message color |
display_scale | Size of text |
display_time | Display time |
icon | Message icon (optional) |
msg | Message |
args | Optional arguments |
Definition at line 107 of file MessagingManager.h.
|
inline |
Sends server message to the specific player. Using fmt::format.
T | Either a a char or wchar_t |
Args | Optional arguments types |
player_controller | Player |
msg_color | Message color |
msg | Message |
args | Optional arguments |
Definition at line 25 of file MessagingManager.h.
|
inline |
Sends server message to all players. Using fmt::format.
T | Either a a char or wchar_t |
Args | Optional arguments types |
msg_color | Message color |
msg | Message |
args | Optional arguments |
Definition at line 86 of file MessagingManager.h.
Sets the world context. This is called by the API automatically.
world_context | World context |
Definition at line 167 of file MessagingManager.h.
|
protected |
Definition at line 167 of file MessagingManager.h.
|
protected |
Definition at line 190 of file MessagingManager.h.
|
protected |
Definition at line 175 of file MessagingManager.h.
|
protected |
Definition at line 178 of file MessagingManager.h.
|
protected |
Definition at line 175 of file MessagingManager.h.