updated modifySlot

This commit is contained in:
Zerino 2024-11-13 18:02:04 -03:00
parent a9c31630f0
commit 5dad64ae98

View File

@ -1185,12 +1185,10 @@ function modifySlot(newSlot, cardPosition)
table.insert(slotSnaps, snap)
end
end
cardPosition.x = tonumber(string.format("%.3f", cardPosition.x))
cardPosition.z = tonumber(string.format("%.3f", cardPosition.z))
cardPosition.y = 0
for snapId, snap in ipairs(slotSnaps) do
local snapPosX = tonumber(string.format("%.3f", snap.position.x))
local snapPosZ = tonumber(string.format("%.3f", snap.position.z))
if snapPosX == cardPosition.x and snapPosZ == cardPosition.z then
local snapPosition = Vector(snap.position.x, 0, snap.position.z)
if snapPosition == cardPosition then
slotData[snapId] = newSlot
if Player[playerColor].seated then
printToColor(newSlot .. " slot added to player mat", playerColor, Color.fromString(playerColor))