From 77fd5bb4d6911d18b0e92169c666bb1c58fff7dd Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 15 Aug 2024 13:13:51 +0200 Subject: [PATCH] formatting --- src/core/PlayArea.ttslua | 12 ++++-------- xml/PlayArea.xml | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/core/PlayArea.ttslua b/src/core/PlayArea.ttslua index d6551ff7..b2589d5d 100644 --- a/src/core/PlayArea.ttslua +++ b/src/core/PlayArea.ttslua @@ -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) diff --git a/xml/PlayArea.xml b/xml/PlayArea.xml index 6fd686f0..674886d2 100644 --- a/xml/PlayArea.xml +++ b/xml/PlayArea.xml @@ -22,4 +22,4 @@ fontSize="125" textAlignment="MiddleCenter" onClick="readyCards">Ready Cards in Play Area ↺ - \ No newline at end of file +