From a1e6560440d884c4ae81d5222f6c23d8c5e888b8 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Tue, 28 Feb 2023 18:22:03 +0100 Subject: [PATCH] removal of unneeded option panel code --- src/core/Global.ttslua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index 26eed36f..ec157987 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -856,10 +856,10 @@ function applyOptionPanelChange(id, state) -- option: Show hand helper for each player elseif id == "showHandHelper" then - optionPanel[id][1] = spawnOrRemoveHelper(state, "Hand Helper", {-50.85, 1.6, 7.32}, {0, 270, 0}, "White") - optionPanel[id][2] = spawnOrRemoveHelper(state, "Hand Helper", {-50.85, 1.6, -24.88}, {0, 270, 0}, "Orange") - optionPanel[id][3] = spawnOrRemoveHelper(state, "Hand Helper", {-39.13, 1.6, 22.45}, {0, 000, 0}, "Green") - optionPanel[id][4] = spawnOrRemoveHelper(state, "Hand Helper", {-21.57, 1.6, -22.45}, {0, 180, 0}, "Red") + optionPanel[id][1] = spawnOrRemoveHelper(state, "Hand Helper", {-50.85, 1.6, 7.32}, {0, 270, 0}) + optionPanel[id][2] = spawnOrRemoveHelper(state, "Hand Helper", {-50.85, 1.6, -24.88}, {0, 270, 0}) + optionPanel[id][3] = spawnOrRemoveHelper(state, "Hand Helper", {-39.13, 1.6, 22.45}, {0, 000, 0}) + optionPanel[id][4] = spawnOrRemoveHelper(state, "Hand Helper", {-21.57, 1.6, -22.45}, {0, 180, 0}) -- option: Show search assistant for each player elseif id == "showSearchAssistant" then @@ -899,12 +899,11 @@ end ---@param name String Name of the helper object ---@param position Vector Position of the object (where it will spawn) ---@param rotation Vector Rotation of the object for spawning (default: {0, 270, 0}) ----@param color String This is only needed for correctly setting the color of the "Hand Helper" ---@return. GUID of the spawnedObj (or nil if object was removed) -function spawnOrRemoveHelper(state, name, position, rotation, color) +function spawnOrRemoveHelper(state, name, position, rotation) if state then Player.getPlayers()[1].pingTable(position) - return spawnHelperObject(name, position, rotation, color).getGUID() + return spawnHelperObject(name, position, rotation).getGUID() else return removeHelperObject(name) end @@ -913,7 +912,7 @@ end -- copies the specified tool (by name) from the barrel ---@param name String Name of the object that should be copied ---@param position Table Desired position of the object -function spawnHelperObject(name, position, rotation, color) +function spawnHelperObject(name, position, rotation) local barrel = getObjectFromGUID(BARREL_GUID) -- error handling for missing barrel