From ca11f2954efe7be3d1d3099e45f7344ec67525de Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Thu, 24 Jul 2025 20:02:33 -0400 Subject: [PATCH] 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. --- modules/clothing/fivem-appearance/server.lua | 72 ++++---- .../clothing/illenium-appearance/server.lua | 170 +++++++++--------- modules/clothing/qb-clothing/server.lua | 71 ++++---- 3 files changed, 155 insertions(+), 158 deletions(-) diff --git a/modules/clothing/fivem-appearance/server.lua b/modules/clothing/fivem-appearance/server.lua index 8b321f7..0520880 100644 --- a/modules/clothing/fivem-appearance/server.lua +++ b/modules/clothing/fivem-appearance/server.lua @@ -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, { diff --git a/modules/clothing/illenium-appearance/server.lua b/modules/clothing/illenium-appearance/server.lua index 7f0b5a6..c65879d 100644 --- a/modules/clothing/illenium-appearance/server.lua +++ b/modules/clothing/illenium-appearance/server.lua @@ -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) diff --git a/modules/clothing/qb-clothing/server.lua b/modules/clothing/qb-clothing/server.lua index 7424c7a..9f3113c 100644 --- a/modules/clothing/qb-clothing/server.lua +++ b/modules/clothing/qb-clothing/server.lua @@ -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