Commit Graph

19 Commits

Author SHA1 Message Date
nocode 490d5a2194 feat(admin_menu): add recipient selection dropdown to announcement admin panel
Add a new dropdown menu for selecting announcement recipients with three options:
- "Tout le monde" (Everyone): broadcasts to all players
- "Groupe" (Group): allows selecting specific user groups
- "Joueurs" (Players): allows selecting individual players

Implement an animated scrollable list panel that displays checkboxes for group or player selection based on the chosen scope. The panel height animates smoothly between collapsed and expanded states.

Extract the frequently used outline color (255, 255, 255, 60) into a COL_LINE constant. Add a DrawArrow helper function to render dropdown indicators. Update the send button validation logic to ensure at least one recipient is selected before sending.

The panel remains open after sending so the admin can keep their text and reuse it if needed.
2026-07-20 15:41:03 +02:00
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
nocode ba9e71e6ae refactor(rndx): reformat and restructure shader library code
Reorganize and reformat the rndx shader library for improved code structure and maintainability. The changes maintain all functionality while improving code organization and readability through consistent formatting and structural improvements.
2026-07-20 13:47:50 +02:00
nocode f6ec6b1236 refactor(loader): replace manual loader with generic recursive autoloader system
Replace the hardcoded module loader with a flexible, recursive autoloader (NoCode) that:

- Supports glob patterns (wildcards) for module discovery
- Recursively scans folders without depth limits
- Properly handles shared (sh_), server (sv_), and client (cl_) file prefixes
- Implements safe loading with error handling and statistics
- Searches both LUA and GAME paths simultaneously
- Sends library files to clients without auto-including them
- Adds comprehensive logging with color-coded output
- Excludes configured files/folders (template.lua, _dev, disabled)

The new system is more maintainable and allows adding new modules without modifying the loader.
2026-07-20 13:47:39 +02:00
xyoss 75428ef21d ajout de commentaire sur le code 2026-06-27 08:18:07 +02:00
xyoss 875954ac63 ajout de la lib rndx 2026-06-24 10:42:14 +02:00
xyoss d3fae3aff5 first commit 2026-06-23 11:41:04 +02:00