formatting

This commit is contained in:
Chr1Z93 2024-08-15 13:13:51 +02:00
parent 30d83a23bb
commit 77fd5bb4d6
2 changed files with 5 additions and 9 deletions

View File

@ -21,8 +21,7 @@ local CONNECTION_LINE_Y = 1.529
-- used for recreating the link to a custom data helper after image change
customDataHelper = nil
local DEFAULT_URL =
"https://steamusercontent-a.akamaihd.net/ugc/998015670465071049/FFAE162920D67CF38045EFBD3B85AD0F916147B2/"
local DEFAULT_URL = "https://steamusercontent-a.akamaihd.net/ugc/998015670465071049/FFAE162920D67CF38045EFBD3B85AD0F916147B2/"
local SHIFT_OFFSETS = {
left = { x = 0.00, y = 0, z = 7.67 },
@ -427,8 +426,7 @@ function addOneWayVector(origin, target, vectorOwner, lines)
-- Calculate distance to be closer for horizontal positions than vertical, since cards are taller than wide
local heading = Vector(originPos):sub(targetPos):heading("y")
local distanceFromCard = DIRECTIONAL_ARROW_DISTANCE * 0.7 +
DIRECTIONAL_ARROW_DISTANCE * 0.3 * math.abs(math.sin(math.rad(heading)))
local distanceFromCard = DIRECTIONAL_ARROW_DISTANCE * 0.7 + DIRECTIONAL_ARROW_DISTANCE * 0.3 * math.abs(math.sin(math.rad(heading)))
-- Calculate the three possible arrow positions. These are offset by half the arrow length to
-- make them visually balanced by keeping the arrows centered, not tracking the point
@ -451,10 +449,8 @@ end
--- positioning and scaling, as well as highlighting connections during a drag operation
---@param lines table List of vector line elements. Mutable, will be updated to add this arrow
function addArrowLines(arrowheadPos, originPos, vectorOwner, lines)
local arrowArm1 = Vector(arrowheadPos):moveTowards(originPos, ARROW_ARM_LENGTH):sub(arrowheadPos):rotateOver("y",
-1 * ARROW_ANGLE):add(arrowheadPos)
local arrowArm2 = Vector(arrowheadPos):moveTowards(originPos, ARROW_ARM_LENGTH):sub(arrowheadPos):rotateOver("y",
ARROW_ANGLE):add(arrowheadPos)
local arrowArm1 = Vector(arrowheadPos):moveTowards(originPos, ARROW_ARM_LENGTH):sub(arrowheadPos):rotateOver("y", -1 * ARROW_ANGLE):add(arrowheadPos)
local arrowArm2 = Vector(arrowheadPos):moveTowards(originPos, ARROW_ARM_LENGTH):sub(arrowheadPos):rotateOver("y", ARROW_ANGLE):add(arrowheadPos)
local head = vectorOwner.positionToLocal(arrowheadPos)
local arm1 = vectorOwner.positionToLocal(arrowArm1)

View File

@ -22,4 +22,4 @@
fontSize="125"
textAlignment="MiddleCenter"
onClick="readyCards">Ready Cards in Play Area ↺</Button>
</Panel>
</Panel>