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:
1 parent
2ad1f4669c
commit
ca11f2954e
3 files changed
+155
-158
No files matched your search
@@ -156,49 +156,47 @@ Callback.Register('community_bridge:cb:GetAppearance', function(source)
|
|||||||
return Clothing.GetAppearance(src)
|
return Clothing.GetAppearance(src)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- All the this below should go in unit tests if we are to continue using them.
|
||||||
RegisterCommand('clothing:debug', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:debug', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
Clothing.SetAppearance(src, {
|
-- Clothing.SetAppearance(src, {
|
||||||
components = {
|
-- components = {
|
||||||
{ component_id = 1, 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 = 2, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ component_id = 3, 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 = 4, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ component_id = 5, 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 = 6, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ component_id = 7, 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 = 8, drawable = math.random(0, 50), texture = 0 },
|
||||||
},
|
-- },
|
||||||
props = {
|
-- props = {
|
||||||
{ prop_id = 3, drawable = 0, texture = 0 },
|
-- { prop_id = 3, drawable = 0, texture = 0 },
|
||||||
{ prop_id = 1, drawable = 0, texture = 0 },
|
-- { prop_id = 1, drawable = 0, texture = 0 },
|
||||||
{ prop_id = 2, drawable = 0, texture = 0 },
|
-- { prop_id = 2, drawable = 0, texture = 0 },
|
||||||
}
|
-- }
|
||||||
}, false, true)
|
-- }, false, true)
|
||||||
end, false)
|
-- end, false)
|
||||||
|
|
||||||
|
|
||||||
RegisterCommand('clothing:revert', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:revert', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
Clothing.Revert(src)
|
-- Clothing.Revert(src)
|
||||||
end, false)
|
-- end, false)
|
||||||
|
|
||||||
|
|
||||||
RegisterCommand('clothing:current', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:current', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
local currentClothing = Clothing.GetAppearance(src)
|
-- local currentClothing = Clothing.GetAppearance(src)
|
||||||
if not currentClothing then return end
|
-- if not currentClothing then return end
|
||||||
print(json.encode(currentClothing, { indent = true }))
|
-- print(json.encode(currentClothing, { indent = true }))
|
||||||
end, false)
|
-- end, false)
|
||||||
|
|
||||||
RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
Clothing.OpenMenu(src)
|
-- Clothing.OpenMenu(src)
|
||||||
end, false)
|
-- end, false)
|
||||||
|
|
||||||
|
|
||||||
-- This should be moved into unit tests
|
|
||||||
-- RegisterCommand('clothing:crowley', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:crowley', function(source, args, rawCommand)
|
||||||
-- local src = source
|
-- local src = source
|
||||||
-- Clothing.SetAppearance(src, {
|
-- Clothing.SetAppearance(src, {
|
||||||
|
|||||||
@@ -158,96 +158,96 @@ Callback.Register('community_bridge:cb:GetAppearance', function(source)
|
|||||||
return Clothing.GetAppearance(src)
|
return Clothing.GetAppearance(src)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- The below Should go to unit test
|
-- All the this below should go in unit tests if we are to continue using them.
|
||||||
RegisterCommand('clothing:debug', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:debug', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
Clothing.SetAppearance(src, {
|
-- Clothing.SetAppearance(src, {
|
||||||
components = {
|
-- components = {
|
||||||
{ component_id = 0, drawable = math.random(0, 50), texture = 0 },
|
-- { component_id = 0, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ component_id = 1, 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 = 2, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ component_id = 3, 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 = 4, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ component_id = 5, 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 = 6, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ component_id = 7, 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 = 8, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ component_id = 9, 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 = 10, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ component_id = 11, drawable = math.random(0, 50), texture = 0 },
|
-- { component_id = 11, drawable = math.random(0, 50), texture = 0 },
|
||||||
},
|
-- },
|
||||||
props = {
|
-- props = {
|
||||||
{ prop_id = 0, drawable = math.random(0, 50), texture = 0 },
|
-- { prop_id = 0, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ prop_id = 1, 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 = 2, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ prop_id = 3, 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 = 4, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ prop_id = 5, 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 = 6, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ prop_id = 7, 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 = 8, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ prop_id = 9, 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 = 10, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ prop_id = 11, 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 = 12, drawable = math.random(0, 50), texture = 0 },
|
||||||
{ prop_id = 13, drawable = math.random(0, 50), texture = 0 },
|
-- { prop_id = 13, drawable = math.random(0, 50), texture = 0 },
|
||||||
}
|
-- }
|
||||||
}, false, true)
|
-- }, false, true)
|
||||||
end, false)
|
-- end, false)
|
||||||
|
|
||||||
|
|
||||||
RegisterCommand('clothing:revert', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:revert', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
Clothing.Revert(src)
|
-- Clothing.Revert(src)
|
||||||
end, false)
|
-- end, false)
|
||||||
|
|
||||||
|
|
||||||
RegisterCommand('clothing:current', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:current', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
local currentClothing = Clothing.GetAppearance(src)
|
-- local currentClothing = Clothing.GetAppearance(src)
|
||||||
if not currentClothing then return end
|
-- if not currentClothing then return end
|
||||||
print(json.encode(currentClothing, { indent = true }))
|
-- print(json.encode(currentClothing, { indent = true }))
|
||||||
end, false)
|
-- end, false)
|
||||||
|
|
||||||
RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
Clothing.OpenMenu(src)
|
-- Clothing.OpenMenu(src)
|
||||||
end, false)
|
-- end, false)
|
||||||
|
|
||||||
|
|
||||||
RegisterCommand('clothing:crowley', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:crowley', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
Clothing.SetAppearance(src, {
|
-- Clothing.SetAppearance(src, {
|
||||||
components = {
|
-- components = {
|
||||||
{ drawable = 0, texture = 0, component_id = 0 },
|
-- { drawable = 0, texture = 0, component_id = 0 },
|
||||||
{ drawable = 0, texture = 0, component_id = 1 },
|
-- { drawable = 0, texture = 0, component_id = 1 },
|
||||||
{ drawable = 19, texture = 0, component_id = 2 },
|
-- { drawable = 19, texture = 0, component_id = 2 },
|
||||||
{ drawable = 6, texture = 0, component_id = 3 },
|
-- { drawable = 6, texture = 0, component_id = 3 },
|
||||||
{ drawable = 0, texture = 0, component_id = 4 },
|
-- { drawable = 0, texture = 0, component_id = 4 },
|
||||||
{ drawable = 0, texture = 0, component_id = 5 },
|
-- { drawable = 0, texture = 0, component_id = 5 },
|
||||||
{ drawable = 0, texture = 0, component_id = 6 },
|
-- { drawable = 0, texture = 0, component_id = 6 },
|
||||||
{ drawable = 0, texture = 0, component_id = 7 },
|
-- { drawable = 0, texture = 0, component_id = 7 },
|
||||||
{ drawable = 23, texture = 0, component_id = 8 },
|
-- { drawable = 23, texture = 0, component_id = 8 },
|
||||||
{ drawable = 0, texture = 0, component_id = 9 },
|
-- { drawable = 0, texture = 0, component_id = 9 },
|
||||||
{ drawable = 0, texture = 0, component_id = 10 },
|
-- { drawable = 0, texture = 0, component_id = 10 },
|
||||||
{ drawable = 4, texture = 2, component_id = 11 }
|
-- { drawable = 4, texture = 2, component_id = 11 }
|
||||||
},
|
-- },
|
||||||
props = {
|
-- props = {
|
||||||
{ drawable = 27, prop_id = 0, texture = 0 },
|
-- { drawable = 27, prop_id = 0, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 1, texture = 0 },
|
-- { drawable = 0, prop_id = 1, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 2, texture = 0 },
|
-- { drawable = 0, prop_id = 2, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 3, texture = 0 },
|
-- { drawable = 0, prop_id = 3, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 4, texture = 0 },
|
-- { drawable = 0, prop_id = 4, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 5, texture = 0 },
|
-- { drawable = 0, prop_id = 5, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 6, texture = 0 },
|
-- { drawable = 0, prop_id = 6, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 7, texture = 0 },
|
-- { drawable = 0, prop_id = 7, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 8, texture = 0 },
|
-- { drawable = 0, prop_id = 8, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 9, texture = 0 },
|
-- { drawable = 0, prop_id = 9, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 10, texture = 0 },
|
-- { drawable = 0, prop_id = 10, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 11, texture = 0 },
|
-- { drawable = 0, prop_id = 11, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 12, texture = 0 },
|
-- { drawable = 0, prop_id = 12, texture = 0 },
|
||||||
{ drawable = 0, prop_id = 13, texture = 0 }
|
-- { drawable = 0, prop_id = 13, texture = 0 }
|
||||||
|
|
||||||
}
|
-- }
|
||||||
}, false, true)
|
-- }, false, true)
|
||||||
end, false)
|
-- end, false)
|
||||||
@@ -166,47 +166,46 @@ Callback.Register('community_bridge:cb:GetAppearance', function(source)
|
|||||||
return Clothing.GetAppearance(src)
|
return Clothing.GetAppearance(src)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
--[[
|
-- All the this below should go in unit tests if we are to continue using them.
|
||||||
RegisterCommand('clothing:debug', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:debug', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
Clothing.SetAppearance(src, {
|
-- Clothing.SetAppearance(src, {
|
||||||
components ={
|
-- components ={
|
||||||
{component_id = 1, 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 = 2, drawable = math.random(0, 50), texture = 0},
|
||||||
{component_id = 3, 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 = 4, drawable = math.random(0, 50), texture = 0},
|
||||||
{component_id = 5, 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 = 6, drawable = math.random(0, 50), texture = 0},
|
||||||
{component_id = 7, 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 = 8, drawable = math.random(0, 50), texture = 0},
|
||||||
},
|
-- },
|
||||||
props = {
|
-- props = {
|
||||||
{prop_id = 3, drawable = 0, texture = 0},
|
-- {prop_id = 3, drawable = 0, texture = 0},
|
||||||
{prop_id = 1, drawable = 0, texture = 0},
|
-- {prop_id = 1, drawable = 0, texture = 0},
|
||||||
{prop_id = 2, drawable = 0, texture = 0},
|
-- {prop_id = 2, drawable = 0, texture = 0},
|
||||||
}
|
-- }
|
||||||
}, false, true)
|
-- }, false, true)
|
||||||
end, false)
|
-- end, false)
|
||||||
|
|
||||||
|
|
||||||
RegisterCommand('clothing:revert', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:revert', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
Clothing.Revert(src)
|
-- Clothing.Revert(src)
|
||||||
end, false)
|
-- end, false)
|
||||||
|
|
||||||
|
|
||||||
RegisterCommand('clothing:current', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:current', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
local currentClothing = Clothing.GetAppearance(src)
|
-- local currentClothing = Clothing.GetAppearance(src)
|
||||||
if not currentClothing then return end
|
-- if not currentClothing then return end
|
||||||
print(json.encode(currentClothing, { indent = true }))
|
-- print(json.encode(currentClothing, { indent = true }))
|
||||||
end, false)
|
-- end, false)
|
||||||
|
|
||||||
RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
|
||||||
local src = source
|
-- local src = source
|
||||||
Clothing.OpenMenu(src)
|
-- Clothing.OpenMenu(src)
|
||||||
end, false)
|
-- end, false)
|
||||||
--]]
|
|
||||||
|
|
||||||
-- RegisterCommand('clothing:crowley', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:crowley', function(source, args, rawCommand)
|
||||||
-- local src = source
|
-- local src = source
|
||||||
|
|||||||
Reference in new issue
Block a user