mirror of
https://github.com/CapsAdmin/pac3.git
synced 2025-03-04 03:03:01 -05:00
fix for material parts on master
lower case and replace spaces in the convar's name
This commit is contained in:
parent
44a8e67222
commit
82e0279d89
@ -86,7 +86,8 @@ function pac.RegisterPart(META)
|
||||
assert(istable(META.StorableVars), "Part " .. META.ClassName .. " has no StorableVars")
|
||||
|
||||
do
|
||||
local cvar = CreateClientConVar("pac_enable_" .. META.ClassName, "1", true)
|
||||
local cvarName = "pac_enable_" .. string.Replace(META.ClassName, " ", "_"):lower()
|
||||
local cvar = CreateClientConVar(cvarName, "1", true)
|
||||
|
||||
cvars.AddChangeCallback("pac_enable_" .. META.ClassName, function(name, old, new)
|
||||
local enable = tobool(new)
|
||||
|
Loading…
Reference in New Issue
Block a user