Disable debug commands.

All the this below should go in unit tests if we are to continue using them.

None of these were harmful but its a good thing to watch out for going forward.
This commit is contained in:
MrNewb committed 2025-07-24 20:02:33 -04:00
1 parent 2ad1f4669c
commit ca11f2954e
3 files changed
+155 -158

No files matched your search

+35 -37
View File
@@ -156,49 +156,47 @@ Callback.Register('community_bridge:cb:GetAppearance', function(source)
return Clothing.GetAppearance(src)
end)
RegisterCommand('clothing:debug', function(source, args, rawCommand)
local src = source
Clothing.SetAppearance(src, {
components = {
{ component_id = 1, drawable = math.random(0, 50), texture = 0 },
{ component_id = 2, drawable = math.random(0, 50), texture = 0 },
{ component_id = 3, drawable = math.random(0, 50), texture = 0 },
{ component_id = 4, drawable = math.random(0, 50), texture = 0 },
{ component_id = 5, drawable = math.random(0, 50), texture = 0 },
{ component_id = 6, drawable = math.random(0, 50), texture = 0 },
{ component_id = 7, drawable = math.random(0, 50), texture = 0 },
{ component_id = 8, drawable = math.random(0, 50), texture = 0 },
},
props = {
{ prop_id = 3, drawable = 0, texture = 0 },
{ prop_id = 1, drawable = 0, texture = 0 },
{ prop_id = 2, drawable = 0, texture = 0 },
}
}, false, true)
end, false)
-- All the this below should go in unit tests if we are to continue using them.
-- RegisterCommand('clothing:debug', function(source, args, rawCommand)
-- local src = source
-- Clothing.SetAppearance(src, {
-- components = {
-- { component_id = 1, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 2, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 3, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 4, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 5, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 6, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 7, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 8, drawable = math.random(0, 50), texture = 0 },
-- },
-- props = {
-- { prop_id = 3, drawable = 0, texture = 0 },
-- { prop_id = 1, drawable = 0, texture = 0 },
-- { prop_id = 2, drawable = 0, texture = 0 },
-- }
-- }, false, true)
-- end, false)
RegisterCommand('clothing:revert', function(source, args, rawCommand)
local src = source
Clothing.Revert(src)
end, false)
-- RegisterCommand('clothing:revert', function(source, args, rawCommand)
-- local src = source
-- Clothing.Revert(src)
-- end, false)
RegisterCommand('clothing:current', function(source, args, rawCommand)
local src = source
local currentClothing = Clothing.GetAppearance(src)
if not currentClothing then return end
print(json.encode(currentClothing, { indent = true }))
end, false)
-- RegisterCommand('clothing:current', function(source, args, rawCommand)
-- local src = source
-- local currentClothing = Clothing.GetAppearance(src)
-- if not currentClothing then return end
-- print(json.encode(currentClothing, { indent = true }))
-- end, false)
RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
local src = source
Clothing.OpenMenu(src)
end, false)
-- RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
-- local src = source
-- Clothing.OpenMenu(src)
-- end, false)
-- This should be moved into unit tests
-- RegisterCommand('clothing:crowley', function(source, args, rawCommand)
-- local src = source
-- Clothing.SetAppearance(src, {
+85 -85
View File
@@ -158,96 +158,96 @@ Callback.Register('community_bridge:cb:GetAppearance', function(source)
return Clothing.GetAppearance(src)
end)
-- The below Should go to unit test
RegisterCommand('clothing:debug', function(source, args, rawCommand)
local src = source
Clothing.SetAppearance(src, {
components = {
{ component_id = 0, drawable = math.random(0, 50), texture = 0 },
{ component_id = 1, drawable = math.random(0, 50), texture = 0 },
{ component_id = 2, drawable = math.random(0, 50), texture = 0 },
{ component_id = 3, drawable = math.random(0, 50), texture = 0 },
{ component_id = 4, drawable = math.random(0, 50), texture = 0 },
{ component_id = 5, drawable = math.random(0, 50), texture = 0 },
{ component_id = 6, drawable = math.random(0, 50), texture = 0 },
{ component_id = 7, drawable = math.random(0, 50), texture = 0 },
{ component_id = 8, drawable = math.random(0, 50), texture = 0 },
{ component_id = 9, drawable = math.random(0, 50), texture = 0 },
{ component_id = 10, drawable = math.random(0, 50), texture = 0 },
{ component_id = 11, drawable = math.random(0, 50), texture = 0 },
},
props = {
{ prop_id = 0, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 1, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 2, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 3, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 4, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 5, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 6, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 7, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 8, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 9, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 10, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 11, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 12, drawable = math.random(0, 50), texture = 0 },
{ prop_id = 13, drawable = math.random(0, 50), texture = 0 },
}
}, false, true)
end, false)
-- All the this below should go in unit tests if we are to continue using them.
-- RegisterCommand('clothing:debug', function(source, args, rawCommand)
-- local src = source
-- Clothing.SetAppearance(src, {
-- components = {
-- { component_id = 0, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 1, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 2, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 3, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 4, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 5, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 6, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 7, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 8, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 9, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 10, drawable = math.random(0, 50), texture = 0 },
-- { component_id = 11, drawable = math.random(0, 50), texture = 0 },
-- },
-- props = {
-- { prop_id = 0, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 1, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 2, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 3, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 4, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 5, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 6, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 7, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 8, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 9, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 10, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 11, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 12, drawable = math.random(0, 50), texture = 0 },
-- { prop_id = 13, drawable = math.random(0, 50), texture = 0 },
-- }
-- }, false, true)
-- end, false)
RegisterCommand('clothing:revert', function(source, args, rawCommand)
local src = source
Clothing.Revert(src)
end, false)
-- RegisterCommand('clothing:revert', function(source, args, rawCommand)
-- local src = source
-- Clothing.Revert(src)
-- end, false)
RegisterCommand('clothing:current', function(source, args, rawCommand)
local src = source
local currentClothing = Clothing.GetAppearance(src)
if not currentClothing then return end
print(json.encode(currentClothing, { indent = true }))
end, false)
-- RegisterCommand('clothing:current', function(source, args, rawCommand)
-- local src = source
-- local currentClothing = Clothing.GetAppearance(src)
-- if not currentClothing then return end
-- print(json.encode(currentClothing, { indent = true }))
-- end, false)
RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
local src = source
Clothing.OpenMenu(src)
end, false)
-- RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
-- local src = source
-- Clothing.OpenMenu(src)
-- end, false)
RegisterCommand('clothing:crowley', function(source, args, rawCommand)
local src = source
Clothing.SetAppearance(src, {
components = {
{ drawable = 0, texture = 0, component_id = 0 },
{ drawable = 0, texture = 0, component_id = 1 },
{ drawable = 19, texture = 0, component_id = 2 },
{ drawable = 6, texture = 0, component_id = 3 },
{ drawable = 0, texture = 0, component_id = 4 },
{ drawable = 0, texture = 0, component_id = 5 },
{ drawable = 0, texture = 0, component_id = 6 },
{ drawable = 0, texture = 0, component_id = 7 },
{ drawable = 23, texture = 0, component_id = 8 },
{ drawable = 0, texture = 0, component_id = 9 },
{ drawable = 0, texture = 0, component_id = 10 },
{ drawable = 4, texture = 2, component_id = 11 }
},
props = {
{ drawable = 27, prop_id = 0, texture = 0 },
{ drawable = 0, prop_id = 1, texture = 0 },
{ drawable = 0, prop_id = 2, texture = 0 },
{ drawable = 0, prop_id = 3, texture = 0 },
{ drawable = 0, prop_id = 4, texture = 0 },
{ drawable = 0, prop_id = 5, texture = 0 },
{ drawable = 0, prop_id = 6, texture = 0 },
{ drawable = 0, prop_id = 7, texture = 0 },
{ drawable = 0, prop_id = 8, texture = 0 },
{ drawable = 0, prop_id = 9, texture = 0 },
{ drawable = 0, prop_id = 10, texture = 0 },
{ drawable = 0, prop_id = 11, texture = 0 },
{ drawable = 0, prop_id = 12, texture = 0 },
{ drawable = 0, prop_id = 13, texture = 0 }
-- RegisterCommand('clothing:crowley', function(source, args, rawCommand)
-- local src = source
-- Clothing.SetAppearance(src, {
-- components = {
-- { drawable = 0, texture = 0, component_id = 0 },
-- { drawable = 0, texture = 0, component_id = 1 },
-- { drawable = 19, texture = 0, component_id = 2 },
-- { drawable = 6, texture = 0, component_id = 3 },
-- { drawable = 0, texture = 0, component_id = 4 },
-- { drawable = 0, texture = 0, component_id = 5 },
-- { drawable = 0, texture = 0, component_id = 6 },
-- { drawable = 0, texture = 0, component_id = 7 },
-- { drawable = 23, texture = 0, component_id = 8 },
-- { drawable = 0, texture = 0, component_id = 9 },
-- { drawable = 0, texture = 0, component_id = 10 },
-- { drawable = 4, texture = 2, component_id = 11 }
-- },
-- props = {
-- { drawable = 27, prop_id = 0, texture = 0 },
-- { drawable = 0, prop_id = 1, texture = 0 },
-- { drawable = 0, prop_id = 2, texture = 0 },
-- { drawable = 0, prop_id = 3, texture = 0 },
-- { drawable = 0, prop_id = 4, texture = 0 },
-- { drawable = 0, prop_id = 5, texture = 0 },
-- { drawable = 0, prop_id = 6, texture = 0 },
-- { drawable = 0, prop_id = 7, texture = 0 },
-- { drawable = 0, prop_id = 8, texture = 0 },
-- { drawable = 0, prop_id = 9, texture = 0 },
-- { drawable = 0, prop_id = 10, texture = 0 },
-- { drawable = 0, prop_id = 11, texture = 0 },
-- { drawable = 0, prop_id = 12, texture = 0 },
-- { drawable = 0, prop_id = 13, texture = 0 }
}
}, false, true)
end, false)
-- }
-- }, false, true)
-- end, false)
+35 -36
View File
@@ -166,47 +166,46 @@ Callback.Register('community_bridge:cb:GetAppearance', function(source)
return Clothing.GetAppearance(src)
end)
--[[
RegisterCommand('clothing:debug', function(source, args, rawCommand)
local src = source
Clothing.SetAppearance(src, {
components ={
{component_id = 1, drawable = math.random(0, 50), texture = 0},
{component_id = 2, drawable = math.random(0, 50), texture = 0},
{component_id = 3, drawable = math.random(0, 50), texture = 0},
{component_id = 4, drawable = math.random(0, 50), texture = 0},
{component_id = 5, drawable = math.random(0, 50), texture = 0},
{component_id = 6, drawable = math.random(0, 50), texture = 0},
{component_id = 7, drawable = math.random(0, 50), texture = 0},
{component_id = 8, drawable = math.random(0, 50), texture = 0},
},
props = {
{prop_id = 3, drawable = 0, texture = 0},
{prop_id = 1, drawable = 0, texture = 0},
{prop_id = 2, drawable = 0, texture = 0},
}
}, false, true)
end, false)
-- All the this below should go in unit tests if we are to continue using them.
-- RegisterCommand('clothing:debug', function(source, args, rawCommand)
-- local src = source
-- Clothing.SetAppearance(src, {
-- components ={
-- {component_id = 1, drawable = math.random(0, 50), texture = 0},
-- {component_id = 2, drawable = math.random(0, 50), texture = 0},
-- {component_id = 3, drawable = math.random(0, 50), texture = 0},
-- {component_id = 4, drawable = math.random(0, 50), texture = 0},
-- {component_id = 5, drawable = math.random(0, 50), texture = 0},
-- {component_id = 6, drawable = math.random(0, 50), texture = 0},
-- {component_id = 7, drawable = math.random(0, 50), texture = 0},
-- {component_id = 8, drawable = math.random(0, 50), texture = 0},
-- },
-- props = {
-- {prop_id = 3, drawable = 0, texture = 0},
-- {prop_id = 1, drawable = 0, texture = 0},
-- {prop_id = 2, drawable = 0, texture = 0},
-- }
-- }, false, true)
-- end, false)
RegisterCommand('clothing:revert', function(source, args, rawCommand)
local src = source
Clothing.Revert(src)
end, false)
-- RegisterCommand('clothing:revert', function(source, args, rawCommand)
-- local src = source
-- Clothing.Revert(src)
-- end, false)
RegisterCommand('clothing:current', function(source, args, rawCommand)
local src = source
local currentClothing = Clothing.GetAppearance(src)
if not currentClothing then return end
print(json.encode(currentClothing, { indent = true }))
end, false)
-- RegisterCommand('clothing:current', function(source, args, rawCommand)
-- local src = source
-- local currentClothing = Clothing.GetAppearance(src)
-- if not currentClothing then return end
-- print(json.encode(currentClothing, { indent = true }))
-- end, false)
RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
local src = source
Clothing.OpenMenu(src)
end, false)
--]]
-- RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
-- local src = source
-- Clothing.OpenMenu(src)
-- end, false)
-- RegisterCommand('clothing:crowley', function(source, args, rawCommand)
-- local src = source