Commit Graph

28 Commits

Author SHA1 Message Date
nocode e794c49c84 feat(announcement_menu): add theme-aware outer border color for loader style
introduce OuterCol() function to dynamically determine the outer border color based on the announcement theme configuration (white or blue). update the loader style border to use this function instead of hardcoded white color, allowing theme consistency across the announcement menu.
2026-07-20 18:23:49 +02:00
nocode f9773bd8ba feat(admin_menu): add theme-based outer border color configuration
Introduce OuterCol() function to dynamically set the outer border color based on the announcement_theme configuration. The border will be white when theme is set to "white", otherwise it defaults to the accent color. This allows for better visual customization of the admin menu appearance.
2026-07-20 18:23:44 +02:00
nocode 082ff3eedd chore(loader): enable bladw_announcement module loading
Change root configuration from "none" (disabled) to "bladw_announcement*" to enable automatic loading of announcement modules.
2026-07-20 18:23:30 +02:00
nocode dc2835b11b refactor(loader): refactor font creation and add root pattern validation
- Refactor font creation into a loop-based approach to reduce code duplication
- Add validation for root pattern with support for "none" value to disable the loader
- Store root pattern in local variable for consistent usage throughout the module
- Add early return when loader is disabled to prevent unnecessary processing
- Improve code organization with clearer section comments
- Change default root from "bladw_announcement" to "none" (disabled state)
2026-07-20 17:17:57 +02:00
nocode cf747dd454 docs(announcement): add documentation for target option in schedule
Add documentation explaining the optional 'target' parameter that allows restricting announcements to specific usergroups like 'vip', with all users receiving the announcement by default if not specified.
2026-07-20 15:41:38 +02:00
nocode 2b56b15886 feat(announcement): add target field to announcement presets
Add 'target' field to all announcement presets to specify which users receive the announcement. The target can be 'all' for everyone or a specific usergroup like 'vip' or 'admin'.

This allows announcements to be selectively sent to different user groups.
2026-07-20 15:41:33 +02:00
nocode 6f579fb2db feat(announcement): add usergroup targeting and recipient filtering to broadcasts
Add support for targeting announcements to specific usergroups or individual players.

- Add 'target' field to store a usergroup to filter recipients
- Implement recipient filtering logic that prioritizes explicit player lists over usergroup lists over preset target
- Update net.Broadcast() to net.Send() when specific recipients are selected
- Parse scope parameter from client to determine targeting type (all/group/players)
- Return early if no valid recipients are found after filtering
2026-07-20 15:41:28 +02:00
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 e40893a290 feat(sound): add announcement audio file 2026-07-20 13:49:54 +02:00
nocode b0ab2e3e31 chore(materials): add logo image for nocode announcement 2026-07-20 13:49: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