Clean up/fix stuff broken in 3.1.0 update
Build and Release / Build and Release (push) Successful in 1m12s Details

- Delete some unused snap points
- Fix position of action marker tiles
- Re-apply patch to hide clickable clue counters
- Re-apply encounter drawing patch
- Re-add `arkhamdb_reinit` function to deck importer
- Fix encounter discard positions for white board
- Fix encounter card draw for white playermat
This commit is contained in:
Adam Goldsmith 2023-07-08 12:18:22 -04:00
parent b5d513e4d0
commit 7a9afb4d80
20 changed files with 75 additions and 130 deletions

View File

@ -350,6 +350,8 @@ function onLoad(savedData)
optionPanel = loadedData.optionPanel
acknowledgedUpgradeVersions = loadedData.acknowledgedUpgradeVersions
updateOptionPanelState()
-- hack to disable on load
playmatApi.clickableClues(false, "All")
else
print("Saved state could not be found!")
end
@ -399,25 +401,20 @@ function tryObjectEnterContainer(container, object)
return true
end
function drawEncountercard(params)
local position = params[1]
local rotation = params[2]
local alwaysFaceUp = params[3]
local card
function drawEncountercard(color) --[[ Parameter Player color ]]
local items = findInRadiusBy(ENCOUNTER_DECK_POS, 4, isCardOrDeck)
if #items > 0 then
for _, v in ipairs(items) do
if v.tag == 'Deck' then
card = v.takeObject({index = 0})
break
v.deal(1, color)
return
end
end
-- we didn't find the deck so just pull the first thing we did find
if card == nil then card = items[1] end
actualEncounterCardDraw(card, params)
items[1].deal(1, color)
else
-- nothing here, time to reshuffle
reshuffleEncounterDeck(params)
reshuffleEncounterDeck(color)
end
end
@ -436,11 +433,11 @@ function actualEncounterCardDraw(card, params)
card.setRotationSmooth({0, rotation.y, faceUpRotation}, false, false)
end
function reshuffleEncounterDeck(params)
function reshuffleEncounterDeck(color)
-- finishes moving the deck back and draws a card
local function move(deck)
deck.setPositionSmooth({ENCOUNTER_DECK_POS[1], ENCOUNTER_DECK_POS[2] + 2, ENCOUNTER_DECK_POS[3]}, false, true)
actualEncounterCardDraw(deck.takeObject({index=0}), params)
deck.deal(1, color)
Wait.time(function() IS_RESHUFFLING = false end, 1)
end
-- bail out if we're mid reshuffle

View File

@ -569,62 +569,6 @@ SnapPoints:
x: -3.85
y: 1.58
z: -10.39
- Position:
x: -45.3
y: 1.48
z: 31.67
- Position:
x: -45.3
y: 1.48
z: 29.73
- Position:
x: -45.3
y: 1.48
z: 27.8
- Position:
x: -45.3
y: 1.48
z: 25.86
- Position:
x: -45.3
y: 1.48
z: 23.93
- Position:
x: -45.3
y: 1.48
z: 21.99
- Position:
x: -45.3
y: 1.48
z: 20.06
- Position:
x: -45.3
y: 1.48
z: -20.62
- Position:
x: -45.3
y: 1.48
z: -22.55
- Position:
x: -45.3
y: 1.48
z: -24.49
- Position:
x: -45.3
y: 1.48
z: -26.43
- Position:
x: -45.3
y: 1.48
z: -28.36
- Position:
x: -45.3
y: 1.48
z: -30.3
- Position:
x: -45.3
y: 1.48
z: -32.23
- Position:
x: 65.0
y: 1.48

View File

@ -970,6 +970,10 @@ function onLoad(script_state)
arkhamDb.initialize()
end
function arkhamdb_reinit()
arkhamDb.initialize()
end
function onSave() return JSON.encode(getUiState()) end
-- Returns the zone name where the specified card should be placed, based on its metadata.

View File

@ -2019,12 +2019,12 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -53.2
posY: 1.57
posZ: 10.54
posX: -47.7
posY: 1.48
posZ: 9.82
rotX: 0.0
rotY: 270.01
rotZ: 356.65
rotZ: 0.0
scaleX: 0.35
scaleY: 1.0
scaleZ: 0.35

View File

@ -2019,11 +2019,11 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -23.92
posY: 1.55
posZ: -24.8
posX: -19.03
posY: 1.48
posZ: -39.97
rotX: 0.0
rotY: 180.0
rotY: 270.0
rotZ: 0.0
scaleX: 0.45
scaleY: 1.0

View File

@ -2019,9 +2019,9 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -53.2
posY: 1.58
posZ: 9.67
posX: -47.7
posY: 1.48
posZ: 8.63
rotX: 0.0
rotY: 270.0
rotZ: 0.0

View File

@ -2019,11 +2019,11 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -37.94
posX: -19.33
posY: 1.48
posZ: 24.8
posZ: 23.75
rotX: 0.0
rotY: 0.0
rotY: 270.0
rotZ: 0.0
scaleX: 0.45
scaleY: 1.0

View File

@ -2019,11 +2019,11 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -56.49
posY: 1.55
posZ: 9.25
posX: -47.7
posY: 1.48
posZ: 6.15
rotX: 0.0
rotY: 286.58
rotY: 270.0
rotZ: 0.0
scaleX: 0.45
scaleY: 1.0

View File

@ -2019,12 +2019,12 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -53.14
posY: 1.55
posZ: -24.88
rotX: 359.27
rotY: 273.73
rotZ: 0.05
posX: -47.7
posY: 1.48
posZ: -26.05
rotX: 0.0
rotY: 270.0
rotZ: 0.0
scaleX: 0.45
scaleY: 1.0
scaleZ: 0.45

View File

@ -2019,9 +2019,9 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -53.2
posY: 1.58
posZ: -22.53
posX: -47.7
posY: 1.48
posZ: -23.57
rotX: 0.0
rotY: 270.0
rotZ: 0.0

View File

@ -2019,11 +2019,11 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -36.78
posX: -19.33
posY: 1.48
posZ: 24.8
posZ: 25.03
rotX: 0.0
rotY: 0.0
rotY: 270.0
rotZ: 0.0
scaleX: 0.45
scaleY: 1.0

View File

@ -2019,11 +2019,11 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -21.61
posY: 1.55
posZ: -24.8
posX: -19.03
posY: 1.48
posZ: -42.45
rotX: 0.0
rotY: 180.0
rotY: 270.0
rotZ: 0.0
scaleX: 0.45
scaleY: 1.0

View File

@ -2019,12 +2019,12 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -53.2
posY: 1.57
posZ: -21.64
rotX: 358.56
rotY: 270.06
rotZ: 356.72
posX: -47.7
posY: 1.48
posZ: -22.38
rotX: 0.0
rotY: 270.01
rotZ: 0.0
scaleX: 0.35
scaleY: 1.0
scaleZ: 0.35

View File

@ -2019,11 +2019,11 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -22.76
posY: 1.55
posZ: -24.8
posX: -19.03
posY: 1.48
posZ: -41.25
rotX: 0.0
rotY: 180.0
rotY: 270.0
rotZ: 0.0
scaleX: 0.45
scaleY: 1.0

View File

@ -2019,9 +2019,9 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -53.2
posY: 1.58
posZ: -23.69
posX: -47.7
posY: 1.48
posZ: -24.85
rotX: 0.0
rotY: 270.0
rotZ: 0.0

View File

@ -2019,11 +2019,11 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -24.79
posY: 1.55
posZ: -24.8
posX: -19.03
posY: 1.48
posZ: -38.78
rotX: 0.0
rotY: 180.0
rotY: 270.01
rotZ: 0.0
scaleX: 0.35
scaleY: 1.0

View File

@ -2019,9 +2019,9 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -53.2
posY: 1.58
posZ: 8.51
posX: -47.7
posY: 1.48
posZ: 7.35
rotX: 0.0
rotY: 270.0
rotZ: 0.0

View File

@ -2019,11 +2019,11 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -39.09
posX: -19.33
posY: 1.48
posZ: 24.8
posZ: 22.55
rotX: 0.0
rotY: 0.0
rotY: 270.0
rotZ: 0.0
scaleX: 0.45
scaleY: 1.0

View File

@ -2019,11 +2019,11 @@ Tags:
- ActionToken
Tooltip: true
Transform:
posX: -35.91
posX: -19.33
posY: 1.48
posZ: 24.8
posZ: 26.22
rotX: 0.0
rotY: 0.0
rotY: 270.01
rotZ: 0.0
scaleX: 0.35
scaleY: 1.0

View File

@ -881,7 +881,7 @@ function makeDiscardButton(xValue, discardPosition, number)
label = "Discard",
click_function = handlerName,
function_owner = self,
position = position,
position = {position[1], position[2], position[3] + 0.6},
scale = {0.12, 0.12, 0.12},
width = 900,
height = 350,
@ -1462,7 +1462,7 @@ function drawChaosTokenButton(_, _, isRightClick)
end
function drawEncountercard(_, _, isRightClick)
Global.call("drawEncountercard", {self.positionToWorld(DRAWN_ENCOUNTER_CARD_OFFSET), self.getRotation(), isRightClick})
Global.call("drawEncountercard", PLAYER_COLOR)
end
function returnGlobalDiscardPosition()