Notification API
Status​
Implemented.
The core game already has a native notification system:
Game/UI/Notifications/NotificationManager.csGame/UI/Notifications/NotificationPanel.csShared/Events/NotificationRequested.csShared/Events/NotificationType.cs
Lua resources can call that system directly through the client Lua Notification API.
Current Core Behavior​
The native notification system provides:
- top-right toast notifications
- severity levels:
infosuccesswarningerror
- queueing
- auto-dismiss durations
- optional persistent notifications in the core event model
Lua API​
The first version should stay minimal and map directly to the existing native system.
Notification.Show(message, options?)​
Shows a notification.
Parameters
message: stringoptions?: tabletype?: "info" | "success" | "warning" | "error"duration?: numberpersistent?: boolean
Returns
trueon successfalse, erroron failure
Notes
typedefaults to"info"durationdefaults to the native type-specific defaultpersistentdefaults tofalse
Notification.Info(message, duration?)​
Notification.Success(message, duration?)​
Notification.Warning(message, duration?)​
Notification.Error(message, duration?)​
Convenience wrappers over Notification.Show(...).
Examples​
Notification.Info("Connected to server")
Notification.Success("Map saved successfully")
Notification.Warning("Unsaved changes")
Notification.Error("Failed to open map")
Notification.Show("Bake complete", {
type = "success",
duration = 6.0
})
Notification.Show("Server disconnected", {
type = "error",
persistent = true
})
Scope​
Current scope:
- client Lua only
Not included in the first version:
- server Lua direct display API
- notification actions/buttons
- notification history
- icons exposed to Lua
- deduplication controls
Design Notes​
The Lua API stays thin.
The correct behavior is:
- Lua calls a small
Notificationbridge - the bridge forwards into the existing native notification system
- the existing core queue, styling, and durations stay authoritative
This avoids creating a second notification implementation for Lua.