Commit Graph

13 Commits

Author SHA1 Message Date
nocode 5f35c70286 feat(sv_networkstring): add network string for announcement result feedback
Add bladWAnnouncementResult network string to communicate announcement submission results back to the admin.
2026-07-20 14:23:17 +02:00
nocode 5fafde5e31 feat(privileges): add admin permission management for announcement system
Register BladW announcement privilege with supported admin mods (SAM, ULX/ULib, FAdmin) and provide function to check player access rights. Supports multiple admin systems with fallback to base admin status.
2026-07-20 14:23:12 +02:00
nocode e357313204 feat(announcement): add access control and announcement queueing
- Add BladW.Announcement.HasAccess() permission check to menu commands and net receive
- Implement announcement queueing: prevent stacking announcements while one is already displaying
- Track active announcement duration with activeUntil timer
- Add feedback to admin: send result status and remaining queue time after broadcast attempt
- Improve chat command handling: hide command from chat for all users, only open menu if authorized
- Refactor configuration and duration retrieval for clarity
2026-07-20 14:23:08 +02:00
nocode 05864e1ed4 feat(admin_menu): add server feedback handling for announcement submissions
Implement bidirectional communication for announcement submissions:
- Display server feedback messages (e.g., announcement already in progress) in the admin menu
- Keep the menu open after sending to allow users to retry if submission fails
- Add net.Receive handler to process server responses
- Show countdown timer when announcement is already in progress
- Close menu only on successful publication, not on rejection

This improves UX by giving admins visibility into why their submission failed and allowing them to correct and resubmit without losing their input.
2026-07-20 14:22:50 +02:00
nocode 49a6a085af feat(announcement): add schedule configuration for automated announcements
Create a new schedule configuration file that allows defining automated announcements with flexible scheduling options.

Supports two scheduling methods:
- Interval-based: every X seconds/minutes/hours/days
- Cron-based: standard 5-field cron syntax for precise scheduling

Announcements can use presets (discord, restart, event) or custom title/text combinations.
Includes comprehensive documentation and commented examples.
2026-07-20 13:49:45 +02:00
nocode 00eb696e7f feat(announcement): add preset announcements for reuse
Add a new sh_presets.lua file containing reusable announcement presets including restart, shutdown, maintenance, event, and discord announcements. Each preset defines title, text, style, and duration properties that can be used by the menu and scheduler.
2026-07-20 13:49:39 +02:00
nocode 2c5a73cf49 feat(announcement): add shared configuration for announcement system
Create initial configuration file for the announcement system with settings for style, display duration, maximum message length, and sound effects.
2026-07-20 13:49:34 +02:00
nocode 8695419876 feat(scheduler): add announcement scheduler with interval and cron support
Implement a scheduler system for BladW announcements that supports both:
- Interval-based scheduling (e.g., "30m", "90s", "2h", "1d")
- Cron-based scheduling with standard 5-field format (minute hour day month weekday)

The scheduler parses configuration from BladW.Announcement.Schedules and manages timers automatically, cleaning up old timers on reload. Cron expressions are validated and compiled into matcher functions for efficient execution checking every 20 seconds.
2026-07-20 13:49:27 +02:00
nocode fd5a9703bc feat(announcement): add network string definitions for announcement system
Add network string registration for the announcement module:
- bladWOpenAnnouncementMenu: opens announcement menu on client
- bladWSendAnnouncement: receives announcement from admin
- bladWShowAnnouncement: broadcasts announcement to all players
2026-07-20 13:48:37 +02:00
nocode 7248b8c434 feat(announcement): add server-side announcement functions and handlers
Implement server-side announcement system with the following features:
- LimitChars() utility function to safely truncate strings with UTF-8 support
- bladw_amenu concommand to open announcement menu for players
- /bannonce and !bannonce chat commands as aliases for the menu
- Resolve() function to merge announcement presets with custom entries
- Broadcast() function to send announcements to all clients with proper length limits
- Net message receiver for admin announcement submissions
- Resource file declaration for sound asset download
2026-07-20 13:48:26 +02:00
nocode 904cf3566c feat(announcement): add client-side announcement menu system
Implement a responsive announcement display system with support for multiple styles (loader with progress bar and border timer). Features include:
- Dynamic font scaling based on screen resolution
- Smooth intro/outro animations with easing
- Text wrapping for multi-line messages
- Customizable styling and duration
- Border timer visualization for remaining time
- Network message handling for server-sent announcements
2026-07-20 13:48:15 +02:00
nocode b220f41c4a feat(admin_menu): add network receiver for opening announcement menu
Implement net.Receive handler to open the announcement admin menu when triggered by the server. This allows server-side code to remotely open the admin menu on client instances.
2026-07-20 13:48:10 +02:00
nocode b183517e9f feat(admin_menu): add announcement admin menu interface
Implement a custom GUI menu for administrators to send announcements with the following features:
- Support for announcement presets that auto-fill title and message fields
- Real-time character count validation with visual feedback
- Warning indicator when message exceeds max length limit
- Custom styled text input fields with placeholder text
- Rounded corners and custom color scheme matching announcement styling
- Close button and ESC key handling
- Network message handling to send announcements to server
2026-07-20 13:48:05 +02:00