Modified SS script state, added transparent indicator buttons, and cleaned up requested code logic
This commit is contained in:
parent
982621fdd5
commit
da2dd66966
@ -34,7 +34,7 @@
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": false,
|
||||
"LuaScript": "require(\"playercards/customizable/SummonedServitorUpgradeSheet\")",
|
||||
"LuaScriptState": "[[0,0,0,0,0,0,0,0,0,0],[\"\",\"\",\"\",\"\",\"\"]]",
|
||||
"LuaScriptState": "[[0,0,0,0,0,0,0,0,0,0],[\"\",\"\",\"\",\"\",\"\"],\"\"]",
|
||||
"MeasureMovement": false,
|
||||
"Name": "CardCustom",
|
||||
"Nickname": "Summoned Servitor Upgrade Sheet",
|
||||
|
@ -237,35 +237,42 @@ end
|
||||
-- Refresh the vector circles indicating a slot is selected.
|
||||
function updateSlotDisplay()
|
||||
local box = {}
|
||||
if selectedSlot ~= "" then
|
||||
box = getBoxVector(SLOT_ICON_POSITIONS[selectedSlot], selectedSlot)
|
||||
end
|
||||
self.setVectorLines({box})
|
||||
end
|
||||
|
||||
function getBoxVector(center, slot)
|
||||
local vecList = {}
|
||||
if slot == "arcane" then
|
||||
vecList = {
|
||||
Vector(center.x + 0.12, 0.3, center.z + 0.05),
|
||||
Vector(center.x - 0.12, 0.3, center.z + 0.05),
|
||||
Vector(center.x - 0.12, 0.3, center.z - 0.05),
|
||||
Vector(center.x + 0.12, 0.3, center.z - 0.05),
|
||||
Vector(center.x + 0.12, 0.3, center.z + 0.05),
|
||||
}
|
||||
elseif slot == "ally" then
|
||||
vecList = {
|
||||
Vector(center.x + 0.07, 0.3, center.z + 0.05),
|
||||
Vector(center.x - 0.07, 0.3, center.z + 0.05),
|
||||
Vector(center.x - 0.07, 0.3, center.z - 0.05),
|
||||
Vector(center.x + 0.07, 0.3, center.z - 0.05),
|
||||
Vector(center.x + 0.07, 0.3, center.z + 0.05),
|
||||
}
|
||||
local center = {}
|
||||
center = SLOT_ICON_POSITIONS["arcane"]
|
||||
local arcaneVecList = {
|
||||
Vector(center.x + 0.12, 0.3, center.z + 0.05),
|
||||
Vector(center.x - 0.12, 0.3, center.z + 0.05),
|
||||
Vector(center.x - 0.12, 0.3, center.z - 0.05),
|
||||
Vector(center.x + 0.12, 0.3, center.z - 0.05),
|
||||
Vector(center.x + 0.12, 0.3, center.z + 0.05),
|
||||
}
|
||||
center = SLOT_ICON_POSITIONS["ally"]
|
||||
local allyVecList = {
|
||||
Vector(center.x + 0.07, 0.3, center.z + 0.05),
|
||||
Vector(center.x - 0.07, 0.3, center.z + 0.05),
|
||||
Vector(center.x - 0.07, 0.3, center.z - 0.05),
|
||||
Vector(center.x + 0.07, 0.3, center.z - 0.05),
|
||||
Vector(center.x + 0.07, 0.3, center.z + 0.05),
|
||||
}
|
||||
local arcaneVecColor = {0.5, 0.5, 0.5, 0.75}
|
||||
local allyVecColor = {0.5, 0.5, 0.5, 0.75}
|
||||
if selectedSlot == "arcane" then
|
||||
arcaneVecColor = {0.597, 0.195, 0.796}
|
||||
elseif selectedSlot == "ally" then
|
||||
allyVecColor = {0.597, 0.195, 0.796}
|
||||
end
|
||||
|
||||
return {
|
||||
points = vecList,
|
||||
color = {0.597, 0.195, 0.796},
|
||||
thickness = 0.02,
|
||||
}
|
||||
end
|
||||
self.setVectorLines({
|
||||
{
|
||||
points = arcaneVecList,
|
||||
color = arcaneVecColor,
|
||||
thickness = 0.02,
|
||||
},
|
||||
{
|
||||
points = allyVecList,
|
||||
color = allyVecColor,
|
||||
thickness = 0.02,
|
||||
},
|
||||
|
||||
})
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user