Commit Graph
20 Commits
Author SHA1 Message Date
nocode b2a7f6ea60 feat(announcement): add scheduled announcements configuration
Introduce new sh_schedule.lua module for managing scheduled announcements using either interval-based (every) or cron-based scheduling. Supports both preset announcements and custom title/text combinations.

Features:
- Interval-based scheduling: every = "30m" format (s/m/h/d units)
- Cron-based scheduling: "minute hour day month weekday" format
- Preset reuse from sh_presets.lua or custom title/text
- Server timezone for cron execution
- Pre-configured examples for Discord reminders and custom tips
2026-07-20 13:36:50 +02:00
nocode aa62ea5dc7 feat(announcement): add announcement presets for scheduler and menu
Add reusable announcement presets that can be selected through the menu (/bannonce) and used by the scheduler. Includes five preset templates: restart, shutdown, maintenance, event, and discord with customizable titles, messages, styles, and durations.
2026-07-20 13:36:43 +02:00
nocode 87a8b8d104 feat(scheduler): add announcement scheduler with interval and cron support
Implement BladW.Announcement.RebuildSchedules() to manage scheduled announcements using two mechanisms:

1. Interval-based scheduling: Parse interval strings (e.g., "30m", "90s", "2h", "1d") and create repeating timers
2. Cron-based scheduling: Parse cron expressions (minute hour day month weekday) and execute on matching times

Features:
- ParseInterval() converts duration strings to seconds
- CompileCron() and CronMatches() handle cron expression parsing and matching
- Single consolidated timer monitors all cron entries with 20s tick to avoid duplicates
- Proper cleanup and hot-reload support via _timers tracking
- Validation with helpful warning messages for invalid configurations
2026-07-20 13:36:37 +02:00
nocode 77545fe2cf feat(announcement): add max length and sound configuration options
Add two new configuration options to the announcement system:
- announcement_max_length: limit message length to 80 characters
- announcement_sound: specify a sound file to play when announcement appears

Also improve alignment and clarify comments for existing options.
2026-07-20 13:36:30 +02:00
nocode 783bef2438 feat(announcement): refactor announcement system with presets and improved text handling
- Add BladW namespace and module structure
- Implement LimitChars() function for UTF-8 safe string truncation
- Add Resolve() function to handle preset-based configuration merging
- Add Broadcast() function to centralize announcement distribution logic
- Update net.Receive handler to support preset system
- Add configurable announcement max length support
- Include announcement sound file registration
- Improve text validation and default values handling
2026-07-20 13:36:23 +02:00
nocode ecc0a0aba5 feat(announcement)!: redesign announcement UI with responsive layout and timer styles
- Add responsive scaling based on screen resolution (1920x1080 baseline)
- Implement two announcement styles: "loader" (fixed border) and "simple" (border timer)
- Add text wrapping utility for responsive message rendering
- Add custom border timer drawing (DrawBorderTimer) for animated border consumption
- Create responsive fonts that rebuild on screen size changes
- Add intro/outro animations with easing (EaseOutCubic)
- Support configurable duration and style per announcement
- Support announcement sound playback on display
- Refactor Show() function to accept style and duration parameters
- Update net message to transmit style and duration from server
- Improve visual hierarchy with proper spacing, padding, and layout
- Change from fixed pixel dimensions to scaled responsive values

BREAKING CHANGE: The announcement API now requires style and duration parameters. The Show() function signature changed from Show(title, text) to Show(title, text, style, duration). Net message format changed to include style and duration fields.
2026-07-20 13:36:15 +02:00
nocode fa6435442b feat(admin_menu): add announcement presets and message length validation
- Add preset system for quick announcement creation with configurable presets
- Implement message length validation with visual feedback (red border, warning icon)
- Add character counter display and configurable max length limit
- Improve UI layout and spacing for better visual hierarchy
- Add status panel showing character count and overflow warnings
- Enhance send button with disabled state when message exceeds limit
- Fix ESC key handling to properly close menu without showing pause menu
- Add helper functions for UTF-8 character counting and warning triangle drawing
- Initialize BladW namespace for better code organization
- Send selected preset identifier to server with announcement data
2026-07-20 13:35:56 +02:00
nocode 9501bfa6f8 feat(announcement): add client-side announcement menu with simple and loader styles
Implement announcement display system with HUD integration supporting two visual styles:
- Simple: centered text announcement with logo
- Loader: announcement with progress bar showing remaining display time

Features:
- Server to client message handling via net.Receive
- Configurable display duration
- Persistent state across hot-reloads
- Integration with rndx drawing library for styled UI elements
2026-07-20 12:47:08 +02:00
nocode 8685d739f3 feat(bladw_announcement): add network strings for announcement system
Register three network strings for the announcement system:
- bladWOpenAnnouncementMenu: server to client for opening admin menu
- bladWSendAnnouncement: client admin to server for announcement request
- bladWShowAnnouncement: server to all clients for displaying announcements
2026-07-20 12:47:00 +02:00
nocode ed2157923b feat(admin_menu): add network receiver for opening announcement menu
Implement client-side network message handler that opens the announcement admin menu when receiving the 'bladWOpenAnnouncementMenu' network message from the server.
2026-07-20 12:46:55 +02:00
nocode 077a0d4357 feat(announcement): add configuration table for announcement module
Initialize the BladW.Announcement.Conf configuration table with announcement style and duration settings. The announcement_style can be set to either 'simple' or 'loader', and announcement_duration controls the display time in seconds for loader style announcements.
2026-07-20 12:46:51 +02:00
nocode a476a2e017 feat(announcement): implement server-side announcement functions
Add server-side functionality for the announcement system:
- Add bladw_amenu console command to open admin announcement menu
- Add /bannonce and !bannonce chat commands for opening the menu
- Implement bladWSendAnnouncement net message handler to broadcast announcements
- Validate admin permissions and sanitize announcement content (title max 64 chars, text max 200 chars)
- Use default title "Annonce" if not provided
2026-07-20 12:46:46 +02:00
nocode 55ad3924f2 feat(announcement): remove client menu hud announcement display
Delete the HUD announcement menu implementation that was displaying announcements on the client screen using the rndx drawing library. This feature is no longer needed or has been replaced with an alternative implementation.
2026-07-20 12:46:41 +02:00
nocode 113d99c090 feat(admin_menu): add client-side admin menu for announcements
Add a new admin menu interface that allows admins to create and send announcements.

The menu features:
- Styled DFrame with logo and title
- Input fields for announcement title and message
- Send button that transmits announcement data to server via net message
- Close button and automatic closing when game UI is opened
- Consistent theming with announcement display (colors, rounded corners, blur effect)
- Prevents multiple menu instances from stacking
2026-07-20 12:46:23 +02:00
nocode 8cd35ada39 feat(announcement): add logo asset and update menu
- add materials/nocode/announcement/logo.png
- update cl_menu.lua and bladWinRpMenu_loader.lua
2026-07-03 03:23:08 +02:00
nocode 6cc464b145 feat(loader)!: implement glob pattern matching for module discovery
Replace simple prefix matching with full glob pattern support for discovering root folders.

Changes:
- Add EscapePattern() to escape Lua magic characters
- Add GlobToPattern() to convert glob patterns (e.g., "bladw_*") to Lua regex patterns
- Refactor FindRootFolders() to support:
  • Exact matches without wildcards (e.g., "bladw_announcement")
  • Glob patterns with * in prefix/suffix/middle positions
- Update default config root from "bladw_*" to "bladw_announcement"
- Improve documentation with usage examples
- Add new announcement module with client, server, and shared files
- Update rndx.lua library (formatting/whitespace changes)

BREAKING CHANGE: The root config now expects exact folder names or glob patterns instead of simple prefixes. Existing configs using "bladw_*" will still work but the matching behavior changes from prefix-only to glob-based pattern matching.
2026-07-01 16:00:44 +02:00
nocode 024c93b17e refactor(autorun)! : remake the autorun
Now the autorun load every file and every folder and subfolder of every 'bladw_' folder
2026-06-30 12:15:41 +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