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

View File

@ -569,62 +569,6 @@ SnapPoints:
x: -3.85 x: -3.85
y: 1.58 y: 1.58
z: -10.39 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: - Position:
x: 65.0 x: 65.0
y: 1.48 y: 1.48

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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