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,
|
"LayoutGroupSortIndex": 0,
|
||||||
"Locked": false,
|
"Locked": false,
|
||||||
"LuaScript": "require(\"playercards/customizable/SummonedServitorUpgradeSheet\")",
|
"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,
|
"MeasureMovement": false,
|
||||||
"Name": "CardCustom",
|
"Name": "CardCustom",
|
||||||
"Nickname": "Summoned Servitor Upgrade Sheet",
|
"Nickname": "Summoned Servitor Upgrade Sheet",
|
||||||
|
@ -237,35 +237,42 @@ end
|
|||||||
-- Refresh the vector circles indicating a slot is selected.
|
-- Refresh the vector circles indicating a slot is selected.
|
||||||
function updateSlotDisplay()
|
function updateSlotDisplay()
|
||||||
local box = {}
|
local box = {}
|
||||||
if selectedSlot ~= "" then
|
local center = {}
|
||||||
box = getBoxVector(SLOT_ICON_POSITIONS[selectedSlot], selectedSlot)
|
center = SLOT_ICON_POSITIONS["arcane"]
|
||||||
end
|
local arcaneVecList = {
|
||||||
self.setVectorLines({box})
|
Vector(center.x + 0.12, 0.3, center.z + 0.05),
|
||||||
end
|
Vector(center.x - 0.12, 0.3, center.z + 0.05),
|
||||||
|
Vector(center.x - 0.12, 0.3, center.z - 0.05),
|
||||||
function getBoxVector(center, slot)
|
Vector(center.x + 0.12, 0.3, center.z - 0.05),
|
||||||
local vecList = {}
|
Vector(center.x + 0.12, 0.3, center.z + 0.05),
|
||||||
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),
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
points = vecList,
|
|
||||||
color = {0.597, 0.195, 0.796},
|
|
||||||
thickness = 0.02,
|
|
||||||
}
|
}
|
||||||
end
|
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
|
||||||
|
|
||||||
|
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