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.
10 lines
233 B
Lua
10 lines
233 B
Lua
local rndx = include("lib/rndx.lua")
|
|
|
|
hook.Add("HUDPaint", "BladeWin:Announcement", function()
|
|
local ply = LocalPlayer()
|
|
|
|
if not IsValid(ply) then return end
|
|
|
|
rndx.Draw(100, 343, 133, 788, 38, Color(30, 30, 30))
|
|
|
|
end) |