Global fixes

This commit is contained in:
dscarpac 2024-04-18 14:28:29 -05:00
parent 8a8ff43302
commit 877ac6ebcd

View File

@ -319,20 +319,17 @@ function drawChaosToken(params)
chaosBag.shuffle()
local indexOfReturnedToken
local takeParameters = {
position,
rotation,
index
}
local takeParameters = {}
-- add the token to the list, compute new position based on list length
if params.returnedToken then
trackChaosToken(params.returnedToken.getName(), matGUID, true)
indexOfReturnedToken = getTokenIndex(params.returnedToken)
takeParameters.position = params.returnedToken.getPosition()
takeParameters.rotation = params.returnedToken.getRotation()
if #chaosTokens > indexOfReturnedToken then
takeParameters.rotation = params.mat.getRotation() + Vector(0, 0, -8)
else
takeParameters.rotation = params.returnedToken.getRotation()
end
returnChaosTokenToBag(params.returnedToken)
else
@ -1214,8 +1211,7 @@ function contentDownloadCallback(request, params)
if pos then
spawnTable.position = pos
else
broadcastToAll(
"Please make space in the area below the tentacle stand in the upper middle of the table and try again.", "Red")
broadcastToAll("Please make space in the area below the tentacle stand in the upper middle of the table and try again.", "Red")
return
end
end
@ -1373,9 +1369,7 @@ function playermatRemovalSelected(player, selectedIndex, id)
if mat then
-- confirmation dialog about deletion
player.pingTable(mat.getPosition())
player.showConfirmDialog(
"Do you really want to remove " .. matColor .. "'s playermat and related objects? This can't be reversed.",
function() removePlayermat(matColor) end)
player.showConfirmDialog("Do you really want to remove " .. matColor .. "'s playermat and related objects? This can't be reversed.", function() removePlayermat(matColor) end)
else
-- info dialog that it is already deleted
player.showInfoDialog(matColor .. "'s playermat has already been removed.")