updated helper spawning

This commit is contained in:
Chr1Z93 2024-05-13 14:52:44 +02:00
parent 6eaebf3616
commit 788e84f218
2 changed files with 7 additions and 9 deletions

View File

@ -15,7 +15,7 @@
"MergeDistancePixels": 15,
"Stackable": false,
"StandUp": false,
"Thickness": 0.2
"Thickness": 0.1
},
"ImageScalar": 1,
"ImageSecondaryURL": "",

View File

@ -1451,7 +1451,7 @@ function applyOptionPanelChange(id, state)
-- option: Show clean up helper
elseif id == "showCleanUpHelper" then
spawnOrRemoveHelper(state, "Clean Up Helper", { -66, 1.6, 46 })
spawnOrRemoveHelper(state, "Clean Up Helper", { -66, 1.53, 46 })
-- option: Show hand helper for each player
elseif id == "showHandHelper" then
@ -1471,7 +1471,7 @@ function applyOptionPanelChange(id, state)
-- option: Show displacement tool
elseif id == "showDisplacementTool" then
spawnOrRemoveHelper(state, "Displacement Tool", { -57, 1.6, 46 })
spawnOrRemoveHelper(state, "Displacement Tool", { -57, 1.53, 46 })
end
end
@ -1522,12 +1522,10 @@ function spawnHelperObject(name, position, rotation)
spawnTable.rotation = rotation
end
for _, obj in ipairs(sourceBag.getData().ContainedObjects) do
if obj["Nickname"] == name then
spawnTable.data = obj
spawnTable.callback_function = function(spawnedObj)
Wait.time(function() spawnedObj.setLock(true) end, 2)
end
for _, objData in ipairs(sourceBag.getData().ContainedObjects) do
if objData["Nickname"] == name then
objData["Locked"] = true
spawnTable.data = objData
return spawnObjectData(spawnTable)
end
end