removal of unneeded option panel code
This commit is contained in:
parent
8ee07b2582
commit
a1e6560440
@ -856,10 +856,10 @@ function applyOptionPanelChange(id, state)
|
|||||||
|
|
||||||
-- option: Show hand helper for each player
|
-- option: Show hand helper for each player
|
||||||
elseif id == "showHandHelper" then
|
elseif id == "showHandHelper" then
|
||||||
optionPanel[id][1] = spawnOrRemoveHelper(state, "Hand Helper", {-50.85, 1.6, 7.32}, {0, 270, 0}, "White")
|
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}, "Orange")
|
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}, "Green")
|
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}, "Red")
|
optionPanel[id][4] = spawnOrRemoveHelper(state, "Hand Helper", {-21.57, 1.6, -22.45}, {0, 180, 0})
|
||||||
|
|
||||||
-- option: Show search assistant for each player
|
-- option: Show search assistant for each player
|
||||||
elseif id == "showSearchAssistant" then
|
elseif id == "showSearchAssistant" then
|
||||||
@ -899,12 +899,11 @@ end
|
|||||||
---@param name String Name of the helper object
|
---@param name String Name of the helper object
|
||||||
---@param position Vector Position of the object (where it will spawn)
|
---@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 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)
|
---@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
|
if state then
|
||||||
Player.getPlayers()[1].pingTable(position)
|
Player.getPlayers()[1].pingTable(position)
|
||||||
return spawnHelperObject(name, position, rotation, color).getGUID()
|
return spawnHelperObject(name, position, rotation).getGUID()
|
||||||
else
|
else
|
||||||
return removeHelperObject(name)
|
return removeHelperObject(name)
|
||||||
end
|
end
|
||||||
@ -913,7 +912,7 @@ end
|
|||||||
-- copies the specified tool (by name) from the barrel
|
-- copies the specified tool (by name) from the barrel
|
||||||
---@param name String Name of the object that should be copied
|
---@param name String Name of the object that should be copied
|
||||||
---@param position Table Desired position of the object
|
---@param position Table Desired position of the object
|
||||||
function spawnHelperObject(name, position, rotation, color)
|
function spawnHelperObject(name, position, rotation)
|
||||||
local barrel = getObjectFromGUID(BARREL_GUID)
|
local barrel = getObjectFromGUID(BARREL_GUID)
|
||||||
|
|
||||||
-- error handling for missing barrel
|
-- error handling for missing barrel
|
||||||
|
Loading…
Reference in New Issue
Block a user