Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 22 KiB |
BIN
img/headers/compass.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 19 KiB |
BIN
img/headers/header_template.pdn
Normal file
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 24 KiB |
@ -87,22 +87,22 @@
|
||||
{
|
||||
"Name": "header_cover",
|
||||
"Type": 0,
|
||||
"URL": "http://cloud-3.steamusercontent.com/ugc/5118935530977312342/0D22712378B1F9A5A1FC7DA40C355943C878DDC0/"
|
||||
"URL": "http://cloud-3.steamusercontent.com/ugc/2280574378889753624/53E7443E2A9957BC5CA4D73B67D5C1C30971C9F9/"
|
||||
},
|
||||
{
|
||||
"Name": "header_acolyte",
|
||||
"Type": 0,
|
||||
"URL": "http://cloud-3.steamusercontent.com/ugc/5118935530977311773/B8B2021D42CFB084AFDCCA42EE6B9A57F3E30AC6/"
|
||||
"URL": "http://cloud-3.steamusercontent.com/ugc/2280574378889753484/961371448C1CB9F93D574E0F78CF51A88D0D34F6/"
|
||||
},
|
||||
{
|
||||
"Name": "header_ruins",
|
||||
"Name": "header_compass",
|
||||
"Type": 0,
|
||||
"URL": "http://cloud-3.steamusercontent.com/ugc/5118935530977312917/E24A34736C912186C7AC58270E3819B6A44B3EE8/"
|
||||
"URL": "http://cloud-3.steamusercontent.com/ugc/2280574378889786684/52E2A801060A523AF5DD956C72A41889B5A1D2C9/"
|
||||
},
|
||||
{
|
||||
"Name": "header_olive",
|
||||
"Type": 0,
|
||||
"URL": "http://cloud-3.steamusercontent.com/ugc/5118935530977377198/4E88B41107A29D027D86E6B80D47B03617335990/"
|
||||
"URL": "http://cloud-3.steamusercontent.com/ugc/2280574378889753733/F67B7B37FF7AA253B6D697E577DF54A3E76030C2/"
|
||||
},
|
||||
{
|
||||
"Name": "option_on",
|
||||
|
@ -23,7 +23,6 @@
|
||||
"CustomDataHelper.2547b3",
|
||||
"UnderworldMarketHelper.3650ea",
|
||||
"Subject5U-21Helper.1335e8",
|
||||
"PlayermatHider.a758b2",
|
||||
"Auto-failCounter.a9a321",
|
||||
"ElderSignCounter.e62cb5"
|
||||
],
|
||||
|
@ -1 +1 @@
|
||||
{"acknowledgedUpgradeVersions":[],"optionPanel":{"cardLanguage":"en","playAreaSnapTags":true,"showAttachmentHelper":false,"showCleanUpHelper":false,"showCYOA":false,"showDisplacementTool":false,"showDrawButton":false,"showHandHelper":[],"showSearchAssistant":[],"showTitleSplash":true,"useClueClickers":false,"useResourceCounters":"disabled","useSnapTags":true}}
|
||||
{"acknowledgedUpgradeVersions":[],"optionPanel":{"cardLanguage":"en","changePlayAreaImage":false,"playAreaConnectionColor":{"a":1,"b":0.4,"g":0.4,"r":0.4},"playAreaConnections":true,"playAreaSnapTags":true,"showAttachmentHelper":false,"showCleanUpHelper":false,"showCYOA":false,"showDisplacementTool":false,"showDrawButton":false,"showHandHelper":[],"showPlayermatHider":false,"showSearchAssistant":[],"showTitleSplash":true,"useClueClickers":false,"useResourceCounters":"disabled","useSnapTags":true}}
|
||||
|
@ -17,6 +17,7 @@
|
||||
"CYOACampaignGuides.e87ea2",
|
||||
"AttachmentHelper.7f4976",
|
||||
"SearchAssistant.17aed0",
|
||||
"PlayermatHider.a758b2",
|
||||
"HandHelper.450688",
|
||||
"DisplacementTool.0f1374",
|
||||
"CleanUpHelper.26cf4b"
|
||||
|
60
objects/OptionPanelSource.830bd0/PlayermatHider.a758b2.json
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
"AltLookAngle": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"Autoraise": true,
|
||||
"ColorDiffuse": {
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1
|
||||
},
|
||||
"CustomImage": {
|
||||
"CustomTile": {
|
||||
"Stackable": false,
|
||||
"Stretch": true,
|
||||
"Thickness": 0.1,
|
||||
"Type": 3
|
||||
},
|
||||
"ImageScalar": 1,
|
||||
"ImageSecondaryURL": "",
|
||||
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/2115061845796985108/F0ADB7094641DA966FFA3AF0CC6987D33D2D9591/",
|
||||
"WidthScale": 0
|
||||
},
|
||||
"Description": "Use the buttons to show / hide a playermat.",
|
||||
"DragSelectable": true,
|
||||
"GMNotes": "",
|
||||
"GUID": "a758b2",
|
||||
"Grid": true,
|
||||
"GridProjection": false,
|
||||
"Hands": false,
|
||||
"HideWhenFaceDown": false,
|
||||
"IgnoreFoW": false,
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": false,
|
||||
"LuaScript": "require(\"accessories/PlayermatHider\")",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Name": "Custom_Tile",
|
||||
"Nickname": "Playermat Hider",
|
||||
"Snap": true,
|
||||
"Sticky": true,
|
||||
"Tags": [
|
||||
"CleanUpHelper_ignore"
|
||||
],
|
||||
"Tooltip": true,
|
||||
"Transform": {
|
||||
"posX": 0,
|
||||
"posY": 2,
|
||||
"posZ": 0,
|
||||
"rotX": 0,
|
||||
"rotY": 270,
|
||||
"rotZ": 0,
|
||||
"scaleX": 3,
|
||||
"scaleY": 1,
|
||||
"scaleZ": 3
|
||||
},
|
||||
"Value": 0,
|
||||
"XmlUI": "\u003cInclude src=\"accessories/PlayermatHider.xml\"/\u003e"
|
||||
}
|
@ -971,7 +971,7 @@
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": true,
|
||||
"LuaScript": "require(\"core/PlayArea\")",
|
||||
"LuaScriptState": "{\"trackedLocations\":[]}",
|
||||
"LuaScriptState_path": "PlayArea.721ba2.luascriptstate",
|
||||
"MeasureMovement": false,
|
||||
"Name": "Custom_Token",
|
||||
"Nickname": "Play Area",
|
1
objects/PlayArea.721ba2.luascriptstate
Normal file
@ -0,0 +1 @@
|
||||
{"connectionColor":{"a":1,"b":0.4,"g":0.4,"r":0.4},"connectionsEnabled":true,"trackedLocations":[]}
|
@ -74,6 +74,7 @@ local GuidReferences = {
|
||||
OptionPanelSource = "830bd0",
|
||||
PlaceholderBoxDummy = "a93466",
|
||||
PlayArea = "721ba2",
|
||||
PlayAreaImageSelector = "b7b45b",
|
||||
PlayAreaZone = "a2f932",
|
||||
PlayerCardPanel = "2d30ee",
|
||||
ResourceTokenBag = "9fadf9",
|
||||
|
@ -49,7 +49,7 @@ local currentListItem = 1
|
||||
local xmlVisibility = {
|
||||
downloadWindow = false,
|
||||
optionPanel = false,
|
||||
playareaGallery = false,
|
||||
playAreaGallery = false,
|
||||
updateNotification = false
|
||||
}
|
||||
local tabIdTable = {
|
||||
@ -878,10 +878,10 @@ function onClick_toggleUi(player, title)
|
||||
navigationOverlayApi.cycleVisibility(player.color)
|
||||
return
|
||||
-- hide the playareaGallery if visible
|
||||
elseif title == "downloadWindow" and xmlVisibility.playareaGallery then
|
||||
onClick_toggleUi(_, "playareaGallery")
|
||||
elseif title == "downloadWindow" and xmlVisibility.playAreaGallery then
|
||||
onClick_toggleUi(_, "playAreaGallery")
|
||||
-- hide the downloadWindow if visible
|
||||
elseif title == "playareaGallery" and xmlVisibility.downloadWindow then
|
||||
elseif title == "playAreaGallery" and xmlVisibility.downloadWindow then
|
||||
onClick_toggleUi(_, "downloadWindow")
|
||||
end
|
||||
|
||||
@ -895,8 +895,8 @@ function onClick_toggleUi(player, title)
|
||||
end
|
||||
|
||||
-- forwards the call to the onClick function
|
||||
function togglePlayareaGallery()
|
||||
onClick_toggleUi(_, "playareaGallery")
|
||||
function togglePlayAreaGallery()
|
||||
onClick_toggleUi(_, "playAreaGallery")
|
||||
end
|
||||
|
||||
-- updates the preview window
|
||||
@ -1157,6 +1157,13 @@ function onClick_toggleOption(_, id)
|
||||
applyOptionPanelChange(id, state)
|
||||
end
|
||||
|
||||
-- color selection for playArea
|
||||
function onClick_playAreaConnectionColor(player, _, id)
|
||||
player.showColorDialog(optionPanel[id], function(color)
|
||||
applyOptionPanelChange(id, color)
|
||||
end)
|
||||
end
|
||||
|
||||
-- called by the language selection dropdown
|
||||
function languageSelected(_, selectedIndex, id)
|
||||
optionPanel[id] = LANGUAGES[tonumber(selectedIndex) + 1].code
|
||||
@ -1194,6 +1201,8 @@ function updateOptionPanelState()
|
||||
elseif id == "useResourceCounters" and type(optionValue) == "string" then
|
||||
local dropdownId = returnResourceCounterId(optionValue) - 1
|
||||
UI.setAttribute(id, "value", dropdownId)
|
||||
elseif id == "playAreaConnectionColor" then
|
||||
UI.setAttribute(id, "color", "#" .. Color.new(optionValue):toHex())
|
||||
elseif (type(optionValue) == "boolean" and optionValue)
|
||||
or (type(optionValue) == "string" and optionValue)
|
||||
or (type(optionValue) == "table" and #optionValue ~= 0) then
|
||||
@ -1227,6 +1236,17 @@ function applyOptionPanelChange(id, state)
|
||||
local counter = guidReferenceApi.getObjectByOwnerAndType("Mythos", "MasterClueCounter")
|
||||
counter.setVar("useClickableCounters", state)
|
||||
|
||||
-- option: Play area snap tags
|
||||
elseif id == "playAreaConnections" then
|
||||
playAreaApi.setConnectionDrawState(state)
|
||||
optionPanel[id] = state
|
||||
|
||||
-- option: Play area connection color
|
||||
elseif id == "playAreaConnectionColor" then
|
||||
playAreaApi.setConnectionColor(state)
|
||||
UI.setAttribute(id, "color", "#" .. Color.new(state):toHex())
|
||||
optionPanel[id] = state
|
||||
|
||||
-- option: Play area snap tags
|
||||
elseif id == "playAreaSnapTags" then
|
||||
playAreaApi.setLimitSnapsByType(state)
|
||||
@ -1236,6 +1256,10 @@ function applyOptionPanelChange(id, state)
|
||||
elseif id == "showTitleSplash" then
|
||||
optionPanel[id] = state
|
||||
|
||||
-- option: Change custom playarea image on setup
|
||||
elseif id == "changePlayAreaImage" then
|
||||
optionPanel[id] = state
|
||||
|
||||
-- option: Show clean up helper
|
||||
elseif id == "showCleanUpHelper" then
|
||||
optionPanel[id] = spawnOrRemoveHelper(state, "Clean Up Helper", {-66, 1.6, 46})
|
||||
@ -1248,6 +1272,10 @@ function applyOptionPanelChange(id, state)
|
||||
optionPanel[id][i] = spawnOrRemoveHelper(state, "Hand Helper", pos, rot)
|
||||
end
|
||||
|
||||
-- option: Show playermat hider
|
||||
elseif id == "showPlayermatHider" then
|
||||
optionPanel[id] = spawnOrRemoveHelper(state, "Playermat Hider", {-48, 1.6, 46})
|
||||
|
||||
-- option: Show search assistant for each player
|
||||
elseif id == "showSearchAssistant" then
|
||||
for i, color in ipairs(MAT_COLORS) do
|
||||
@ -1325,6 +1353,7 @@ function removeHelperObject(name)
|
||||
local referenceTable = {
|
||||
["Clean Up Helper"] = "showCleanUpHelper",
|
||||
["Hand Helper"] = "showHandHelper",
|
||||
["Playermat Hider"] = "showPlayermatHider",
|
||||
["Search Assistant"] = "showSearchAssistant",
|
||||
["Displacement Tool"] = "showDisplacementTool",
|
||||
["Attachment Helper"] = "showAttachmentHelper",
|
||||
@ -1370,6 +1399,8 @@ function onClick_defaultSettings()
|
||||
-- clean reset of variables
|
||||
optionPanel = {
|
||||
cardLanguage = "en",
|
||||
playAreaConnectionColor = { 0.4, 0.4, 0.4, 1 },
|
||||
playAreaConnections = true,
|
||||
playAreaSnapTags = true,
|
||||
showAttachmentHelper = false,
|
||||
showCleanUpHelper = false,
|
||||
@ -1377,6 +1408,7 @@ function onClick_defaultSettings()
|
||||
showDisplacementTool = false,
|
||||
showDrawButton = false,
|
||||
showHandHelper = {},
|
||||
showPlayermatHider = false,
|
||||
showSearchAssistant = {},
|
||||
showTitleSplash = true,
|
||||
useClueClickers = false,
|
||||
|
@ -105,8 +105,15 @@ end
|
||||
|
||||
-- fires if the scenario title changes
|
||||
function fireScenarioChangedEvent()
|
||||
-- maybe show the title splash screen
|
||||
Wait.frames(function() Global.call('titleSplash', currentScenario) end, 20)
|
||||
|
||||
-- set the scenario for the playarea (connections might be disabled)
|
||||
playAreaApi.onScenarioChanged(currentScenario)
|
||||
|
||||
-- maybe update the playarea image
|
||||
local playAreaImageSelector = guidReferenceApi.getObjectByOwnerAndType("Mythos", "PlayAreaImageSelector")
|
||||
playAreaImageSelector.call("maybeUpdatePlayAreaImage", currentScenario)
|
||||
end
|
||||
|
||||
-- fires if the scenario title or the difficulty changes
|
||||
|
@ -11,7 +11,6 @@ local INCOMING_ONE_WAY = 2
|
||||
local CONNECTION_THICKNESS = 0.015
|
||||
local DRAGGING_CONNECTION_THICKNESS = 0.15
|
||||
local DRAGGING_CONNECTION_COLOR = { 0.8, 0.8, 0.8, 1 }
|
||||
local CONNECTION_COLOR = { 0.4, 0.4, 0.4, 1 }
|
||||
local DIRECTIONAL_ARROW_DISTANCE = 3.5
|
||||
local ARROW_ARM_LENGTH = 0.9
|
||||
local ARROW_ANGLE = 25
|
||||
@ -19,9 +18,6 @@ local ARROW_ANGLE = 25
|
||||
-- Height to draw the connector lines, places them just above the table and always below cards
|
||||
local CONNECTION_LINE_Y = 1.529
|
||||
|
||||
-- we use this to turn off collision handling until onLoad() is complete
|
||||
local collisionEnabled = false
|
||||
|
||||
-- used for recreating the link to a custom data helper after image change
|
||||
customDataHelper = nil
|
||||
|
||||
@ -49,7 +45,7 @@ local locations = {}
|
||||
local locationConnections = {}
|
||||
local draggingGuids = {}
|
||||
local missingData = {}
|
||||
local locationData, currentScenario
|
||||
local locationData, currentScenario, connectionsEnabled
|
||||
|
||||
---------------------------------------------------------
|
||||
-- general code
|
||||
@ -57,19 +53,19 @@ local locationData, currentScenario
|
||||
|
||||
function onSave()
|
||||
return JSON.encode({
|
||||
trackedLocations = locations,
|
||||
currentScenario = currentScenario,
|
||||
trackedLocations = locations,
|
||||
currentScenario = currentScenario,
|
||||
connectionColor = connectionColor,
|
||||
connectionsEnabled = connectionsEnabled
|
||||
})
|
||||
end
|
||||
|
||||
function onLoad(saveState)
|
||||
-- records locations we have spawned clues for
|
||||
local save = JSON.decode(saveState) or {}
|
||||
locations = save.trackedLocations or {}
|
||||
currentScenario = save.currentScenario
|
||||
|
||||
self.interactable = false
|
||||
Wait.time(function() collisionEnabled = true end, 1)
|
||||
function onLoad(savedData)
|
||||
local loadedData = JSON.decode(savedData) or {}
|
||||
locations = loadedData.trackedLocations or {}
|
||||
currentScenario = loadedData.currentScenario
|
||||
connectionColor = loadedData.connectionColor or { 0.4, 0.4, 0.4, 1 }
|
||||
connectionsEnabled = loadedData.connectionsEnabled or true
|
||||
end
|
||||
|
||||
-- Called by Custom Data Helpers to push their location data into the Data Helper. This adds the
|
||||
@ -82,6 +78,7 @@ function updateLocations(args)
|
||||
end
|
||||
end
|
||||
|
||||
-- sets the image of the playarea
|
||||
function updateSurface(newURL)
|
||||
local customInfo = self.getCustomObject()
|
||||
|
||||
@ -105,12 +102,13 @@ function updateSurface(newURL)
|
||||
end
|
||||
end
|
||||
|
||||
-- TTS event, called for each object that is placed on the playarea
|
||||
function onCollisionEnter(collisionInfo)
|
||||
local obj = collisionInfo.collision_object
|
||||
local objType = obj.name
|
||||
|
||||
-- only continue for cards
|
||||
if not collisionEnabled or (objType ~= "Card" and objType ~= "CardCustom") then
|
||||
if objType ~= "Card" and objType ~= "CardCustom" then
|
||||
if objType == "Deck" then
|
||||
table.insert(missingData, obj)
|
||||
end
|
||||
@ -204,7 +202,7 @@ function onUpdate()
|
||||
-- Even if the last location left the play area, need one last draw to clear the lines
|
||||
needsConnectionDraw = true
|
||||
end
|
||||
if (needsConnectionRebuild) then
|
||||
if needsConnectionRebuild then
|
||||
rebuildConnectionList()
|
||||
end
|
||||
if needsConnectionDraw then
|
||||
@ -349,6 +347,7 @@ end
|
||||
function drawBaseConnections()
|
||||
if not showLocationLinks() then
|
||||
locationConnections = {}
|
||||
self.setVectorLines({})
|
||||
return
|
||||
end
|
||||
local cardConnectionLines = {}
|
||||
@ -428,7 +427,7 @@ function addBidirectionalVector(card1, card2, vectorOwner, lines)
|
||||
|
||||
table.insert(lines, {
|
||||
points = { pos1, pos2 },
|
||||
color = vectorOwner == self and CONNECTION_COLOR or DRAGGING_CONNECTION_COLOR,
|
||||
color = vectorOwner == self and connectionColor or DRAGGING_CONNECTION_COLOR,
|
||||
thickness = vectorOwner == self and CONNECTION_THICKNESS or DRAGGING_CONNECTION_THICKNESS,
|
||||
})
|
||||
end
|
||||
@ -486,7 +485,7 @@ function addArrowLines(arrowheadPos, originPos, vectorOwner, lines)
|
||||
local arm2 = vectorOwner.positionToLocal(arrowArm2)
|
||||
table.insert(lines, {
|
||||
points = { arm1, head, arm2 },
|
||||
color = vectorOwner == self and CONNECTION_COLOR or DRAGGING_CONNECTION_COLOR,
|
||||
color = vectorOwner == self and connectionColor or DRAGGING_CONNECTION_COLOR,
|
||||
thickness = vectorOwner == self and CONNECTION_THICKNESS or DRAGGING_CONNECTION_THICKNESS,
|
||||
})
|
||||
end
|
||||
@ -553,7 +552,7 @@ function onScenarioChanged(scenarioName)
|
||||
end
|
||||
|
||||
function showLocationLinks()
|
||||
return not LOC_LINK_EXCLUDE_SCENARIOS[currentScenario]
|
||||
return not LOC_LINK_EXCLUDE_SCENARIOS[currentScenario] and connectionsEnabled
|
||||
end
|
||||
|
||||
-- Sets this playmat's snap points to limit snapping to locations or not.
|
||||
@ -576,6 +575,20 @@ function setLimitSnapsByType(matchTypes)
|
||||
self.setSnapPoints(snaps)
|
||||
end
|
||||
|
||||
-- called by the option panel to enabled / disable location connections
|
||||
function setConnectionDrawState(state)
|
||||
connectionsEnabled = state
|
||||
rebuildConnectionList()
|
||||
drawBaseConnections()
|
||||
end
|
||||
|
||||
-- called by the option panel to edit the location connection color
|
||||
function setConnectionColor(color)
|
||||
connectionColor = color
|
||||
rebuildConnectionList()
|
||||
drawBaseConnections()
|
||||
end
|
||||
|
||||
-- count victory points on locations in play area
|
||||
---@param highlightOff Boolean True if highlighting should be enabled
|
||||
---@return. Returns the total amount of VP found in the play area
|
||||
|
@ -46,6 +46,16 @@ do
|
||||
return getPlayArea().call("resetSpawnedCards")
|
||||
end
|
||||
|
||||
-- Sets whether location connections should be drawn
|
||||
PlayAreaApi.setConnectionDrawState = function(state)
|
||||
getPlayArea().call("setConnectionDrawState", state)
|
||||
end
|
||||
|
||||
-- Sets the connection color
|
||||
PlayAreaApi.setConnectionColor = function(color)
|
||||
getPlayArea().call("setConnectionColor", color)
|
||||
end
|
||||
|
||||
-- Event to be called when the current scenario has changed.
|
||||
---@param scenarioName Name of the new scenario
|
||||
PlayAreaApi.onScenarioChanged = function(scenarioName)
|
||||
|
@ -6,11 +6,11 @@ PLAYAREA_IMAGE_DATA = {
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725443007/D34B55D2637EF1DF22839D12F9CF74F92F8EB486/"
|
||||
},
|
||||
{
|
||||
Name = "III - Devourer Below 1",
|
||||
Name = "III - The Devourer Below 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725443203/FBE04C8B89F79D18C6D29C28DC3B292A5A3A3DEB/"
|
||||
},
|
||||
{
|
||||
Name = "III - Devourer Below 2",
|
||||
Name = "III - The Devourer Below 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725443345/FD10BC04B3F3AFD710C3C12EE14F85F9AFB265E6/"
|
||||
}
|
||||
},
|
||||
@ -28,31 +28,31 @@ PLAYAREA_IMAGE_DATA = {
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725401870/FE29404D9D93BE2735D41C115DDD9708A0931F3E/"
|
||||
},
|
||||
{
|
||||
Name = "I-B - House Always Wins 1",
|
||||
Name = "I-B - The House Always Wins 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725402059/4C4A50D259ECFD4DFB94FABB9FA2AD3AABDCA0CA/"
|
||||
},
|
||||
{
|
||||
Name = "I-B - House Always Wins 2",
|
||||
Name = "I-B - The House Always Wins 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725402263/8B0C981B78E803B3BFD64AC874F315B6810E579B/"
|
||||
},
|
||||
{
|
||||
Name = "I-B - House Always Wins 3",
|
||||
Name = "I-B - The House Always Wins 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725402460/8599D17306C644D75D189591BC6D57C2F27F9E35/"
|
||||
},
|
||||
{
|
||||
Name = "I-B - House Always Wins 4",
|
||||
Name = "I-B - The House Always Wins 4",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725402641/777865B25BCF86C2EFEAE232AFBC31561D12AE0F/"
|
||||
},
|
||||
{
|
||||
Name = "II - Miskatonic Museum 1",
|
||||
Name = "II - The Miskatonic Museum 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725402804/A44E68AC08E6568A757429B29E71C703B76FA159/"
|
||||
},
|
||||
{
|
||||
Name = "II - Miskatonic Museum 2",
|
||||
Name = "II - The Miskatonic Museum 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725403000/B28D46D5B7BCE9EA9BF27D3A0A932393D8258A76/"
|
||||
},
|
||||
{
|
||||
Name = "III - Essex County Express",
|
||||
Name = "III - The Essex County Express",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725403150/956BE4B5C25805E57C8FC5CF28A94BD7EF07CA54/"
|
||||
},
|
||||
{
|
||||
@ -126,15 +126,15 @@ PLAYAREA_IMAGE_DATA = {
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725426327/41F6192EDCFFD6AAE2EE44C2BB5708B19D7464A9/"
|
||||
},
|
||||
{
|
||||
Name = "II - Last King 1",
|
||||
Name = "II - The Last King 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725426499/114EAEA245AC51CA219364AF26341E7F7E649A7D/"
|
||||
},
|
||||
{
|
||||
Name = "II - Last King 2",
|
||||
Name = "II - The Last King 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725426683/A2762E95DD79D7A7BC749925166BBFC18B62EF3B/"
|
||||
},
|
||||
{
|
||||
Name = "II - Last King 3",
|
||||
Name = "II - The Last King 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725426818/A6A20773EA95CE3D9896B22E317A0E1ACCA911F0/"
|
||||
},
|
||||
{
|
||||
@ -142,39 +142,39 @@ PLAYAREA_IMAGE_DATA = {
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725427005/25F51DE4B1F33C16A0E68C929E5002F0C4520A37/"
|
||||
},
|
||||
{
|
||||
Name = "IV - Unspeakable Oath 1",
|
||||
Name = "IV - The Unspeakable Oath 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725427178/9575E4F6E53DDAD2D3E61684AB9757B04E1EF787/"
|
||||
},
|
||||
{
|
||||
Name = "IV - Unspeakable Oath 2",
|
||||
Name = "IV - The Unspeakable Oath 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725427342/199A6C6411992ACFB8A417E86207FE6CE956EB97/"
|
||||
},
|
||||
{
|
||||
Name = "IV - Unspeakable Oath 3",
|
||||
Name = "IV - The Unspeakable Oath 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725427501/48525BCDFA281947FA9ED26507BC1F81C07056E8/"
|
||||
},
|
||||
{
|
||||
Name = "V - Phantom of Truth 1",
|
||||
Name = "V - A Phantom of Truth 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725427681/F72B02FF1A5E58CBCB0E53C8455310AF37064477/"
|
||||
},
|
||||
{
|
||||
Name = "V - Phantom of Truth 2",
|
||||
Name = "V - A Phantom of Truth 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725427848/215A757FF28317EB3EF7CF1F9CAE6F1CFF735091/"
|
||||
},
|
||||
{
|
||||
Name = "VI - Pallid Mask 1",
|
||||
Name = "VI - The Pallid Mask 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725428067/D46BAD80B112156A2D3DEFF247A74C74F27DDA12/"
|
||||
},
|
||||
{
|
||||
Name = "VI - Pallid Mask 2",
|
||||
Name = "VI - The Pallid Mask 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725428250/464681CF59770BFD493A0D672C7CB70BA8CD3499/"
|
||||
},
|
||||
{
|
||||
Name = "VII - Black Star Rises 1",
|
||||
Name = "VII - Black Stars Rise 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725428431/4766E1A4893E0EF16B576749B73CE449F10DA20C/"
|
||||
},
|
||||
{
|
||||
Name = "VII - Black Star Rises 2",
|
||||
Name = "VII - Black Stars Rise 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725428896/05ED3D08F29C8E6EC080F0615DE130F2A687A9AC/"
|
||||
},
|
||||
{
|
||||
@ -188,35 +188,35 @@ PLAYAREA_IMAGE_DATA = {
|
||||
},
|
||||
["The Forgotten Age"] = {
|
||||
{
|
||||
Name = "I - Untamed Wilds 1",
|
||||
Name = "I - The Untamed Wilds 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725446729/7F5E48BC9A028AE5117231364F2D5B433A62239A/"
|
||||
},
|
||||
{
|
||||
Name = "I - Untamed Wilds 2",
|
||||
Name = "I - The Untamed Wilds 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725446946/55C374DC5BE3620CB0D5BCA379EA55CF471D09B3/"
|
||||
},
|
||||
{
|
||||
Name = "I - Untamed Wilds 3",
|
||||
Name = "I - The Untamed Wilds 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725447172/6EAE2CFD3AC552CFB744C75E4E26A79264DE17D3/"
|
||||
},
|
||||
{
|
||||
Name = "I - Untamed Wilds 4",
|
||||
Name = "I - The Untamed Wilds 4",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725447409/FCF48C94D90F94FBFFD674B0650E288E7312C441/"
|
||||
},
|
||||
{
|
||||
Name = "I - Untamed Wilds 5",
|
||||
Name = "I - The Untamed Wilds 5",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725447579/F7C3FB9E31147430C1384684887FC66E616D0302/"
|
||||
},
|
||||
{
|
||||
Name = "II - Doom of Etzli 1",
|
||||
Name = "II - The Doom of Eztli 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725447752/44EF68E1BF3C2D9DCD5306DD90B4CCCFBE03891C/"
|
||||
},
|
||||
{
|
||||
Name = "II - Doom of Etzli 2",
|
||||
Name = "II - The Doom of Eztli 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725448027/F5F14EC590C33BC87D8F0CFF43D7E4DF80D61133/"
|
||||
},
|
||||
{
|
||||
Name = "II - Doom of Etzli 3",
|
||||
Name = "II - The Doom of Eztli 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725448215/BFD9D940DB8EC9AC8D818C48BBAE3338A8E48A3B/"
|
||||
},
|
||||
{
|
||||
@ -224,51 +224,51 @@ PLAYAREA_IMAGE_DATA = {
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725448393/67F3BE7DC1BEC807A17D3F8914328D408856E019/"
|
||||
},
|
||||
{
|
||||
Name = "IV - Boundary Beyond 1",
|
||||
Name = "IV - The Boundary Beyond 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725448568/3C268415A47430CEEC3F9BFB216EF57E3DBF820A/"
|
||||
},
|
||||
{
|
||||
Name = "IV - Boundary Beyond 2",
|
||||
Name = "IV - The Boundary Beyond 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725448701/3FA23DCA30505AD4C27D8914740AD3138C01122C/"
|
||||
},
|
||||
{
|
||||
Name = "IV - Boundary Beyond 3",
|
||||
Name = "IV - The Boundary Beyond 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725448863/266C3320AC326C30F08FBC11A95567E1249E7FB7/"
|
||||
},
|
||||
{
|
||||
Name = "V - Heart of the Elders I-1",
|
||||
Name = "V - Heart of the Elders 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725449019/A6CC459ACA004C33DD9605BE8382437F6BBE24F7/"
|
||||
},
|
||||
{
|
||||
Name = "V - Heart of the Elders I-2",
|
||||
Name = "V - Heart of the Elders 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725449150/241FA88572B6B4F652D7FC6D1EDB23DF94E3199C/"
|
||||
},
|
||||
{
|
||||
Name = "V - Heart of the Elders II",
|
||||
Name = "V - Heart of the Elders 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725449310/DBD731498FAB399A4155F7B64F8710BF5FBB5C1F/"
|
||||
},
|
||||
{
|
||||
Name = "VI - City of Archives 1",
|
||||
Name = "VI - The City of Archives 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725449473/527CB6470F508D4E1F1E4AFC8A0D3AB0A65E046E/"
|
||||
},
|
||||
{
|
||||
Name = "VI - City of Archives 2",
|
||||
Name = "VI - The City of Archives 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725449630/A8E933F79A646990155CC18A2143B3BC16222750/"
|
||||
},
|
||||
{
|
||||
Name = "VI - City of Archives 3",
|
||||
Name = "VI - The City of Archives 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725449814/30BB7E4F8D9F1571A420372E78ACAF2D7792811F/"
|
||||
},
|
||||
{
|
||||
Name = "VII - Depths of Yoth 1",
|
||||
Name = "VII - The Depths of Yoth 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725449962/D69532827DFF2D654F8A606B7917D593F52D7624/"
|
||||
},
|
||||
{
|
||||
Name = "VII - Depths of Yoth 2",
|
||||
Name = "VII - The Depths of Yoth 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725450085/479A8A1BDD7BE80B43AE4F2C14DFA811D7B28482/"
|
||||
},
|
||||
{
|
||||
Name = "VII - Depths of Yoth 3",
|
||||
Name = "VII - The Depths of Yoth 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725450258/E617F5A78DFBE913652E20BF97D38B91087FACAE/"
|
||||
},
|
||||
{
|
||||
@ -282,11 +282,11 @@ PLAYAREA_IMAGE_DATA = {
|
||||
},
|
||||
["The Circle Undone"] = {
|
||||
{
|
||||
Name = "0 - Prologue",
|
||||
Name = "0 - Disappearance at the Twilight Estate",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725457506/6E228F87CEDCD3A0CFA28B680C266B4C68C7682B/"
|
||||
},
|
||||
{
|
||||
Name = "I - Witching Hour",
|
||||
Name = "I - The Witching Hour",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725457706/D0FDC0E9287C343745AE6135352194D654D98B64/"
|
||||
},
|
||||
{
|
||||
@ -318,19 +318,19 @@ PLAYAREA_IMAGE_DATA = {
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725459026/A1A5B18ECB38985A35781CBDFF53935541720AF4/"
|
||||
},
|
||||
{
|
||||
Name = "IV - Wages of Sin 1",
|
||||
Name = "IV - The Wages of Sin 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725459182/46870E1DBE623E93E675CB2D3C1E959B40CDCC83/"
|
||||
},
|
||||
{
|
||||
Name = "IV - Wages of Sin 2",
|
||||
Name = "IV - The Wages of Sin 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725459344/9552699A8CEC5E7BF22843990394BB977539CBE0/"
|
||||
},
|
||||
{
|
||||
Name = "IV - Wages of Sin 3",
|
||||
Name = "IV - The Wages of Sin 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725459466/9B6B55A6F76668929B6D6B1DD5FDAE7CEE427A1C/"
|
||||
},
|
||||
{
|
||||
Name = "IV - Wages of Sin 4",
|
||||
Name = "IV - The Wages of Sin 4",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725459609/054A60BDCD266C1A53F29067CFC83D0561666FE4/"
|
||||
},
|
||||
{
|
||||
@ -396,35 +396,35 @@ PLAYAREA_IMAGE_DATA = {
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725466267/16FAE20612ED0A6A65836DD1B014AC5A801A172F/"
|
||||
},
|
||||
{
|
||||
Name = "II-A - Search for Kadath 1",
|
||||
Name = "II-A - The Search for Kadath 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725466425/03CCD5F24999CC6CC905CB2FD021DB67D7769163/"
|
||||
},
|
||||
{
|
||||
Name = "II-A - Search for Kadath 2",
|
||||
Name = "II-A - The Search for Kadath 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725466615/085ACE95FEF03D2BE91BAD5E1864E1D0263DCCC0/"
|
||||
},
|
||||
{
|
||||
Name = "II-A - Search for Kadath 3",
|
||||
Name = "II-A - The Search for Kadath 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725466802/83861733568FCA9673B6F5EFE0C9D3337E3DFD27/"
|
||||
},
|
||||
{
|
||||
Name = "II-A - Search for Kadath 4",
|
||||
Name = "II-A - The Search for Kadath 4",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725466941/D4FDE1FE722DC6B03AD38D797F2E00531908583D/"
|
||||
},
|
||||
{
|
||||
Name = "II-A - Search for Kadath 5",
|
||||
Name = "II-A - The Search for Kadath 5",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725467396/C9A476395B9326142BBDBD06D22A14C83EAD2161/"
|
||||
},
|
||||
{
|
||||
Name = "II-B - Thousand Shapes of Horror 1",
|
||||
Name = "II-B - A Thousand Shapes of Horror 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725467582/5EB69F3A3F20B312FE3FE3C64FEA96200EE51563/"
|
||||
},
|
||||
{
|
||||
Name = "II-B - Thousand Shapes of Horror 2",
|
||||
Name = "II-B - A Thousand Shapes of Horror 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725467791/5FE437C821641EDD703D336205A37F8F0CACFD38/"
|
||||
},
|
||||
{
|
||||
Name = "II-B - Thousand Shapes of Horror 3",
|
||||
Name = "II-B - A Thousand Shapes of Horror 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725467946/841CEC1D8B56C1CA52B5558E8E49CE04D95D2F4A/"
|
||||
},
|
||||
{
|
||||
@ -462,27 +462,27 @@ PLAYAREA_IMAGE_DATA = {
|
||||
},
|
||||
["The Innsmouth Conspiracy"] = {
|
||||
{
|
||||
Name = "I - Pit of Despair 1",
|
||||
Name = "I - The Pit of Despair 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725473070/57FEAA8135F62DBAD52E2AAB562EF45EB9A0194A/"
|
||||
},
|
||||
{
|
||||
Name = "I - Pit of Despair 2",
|
||||
Name = "I - The Pit of Despair 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725473257/FEC6F9FAA1CC656BFD5861F58E4751BC94AB0424/"
|
||||
},
|
||||
{
|
||||
Name = "II - Vanishing of Elina Harper 1",
|
||||
Name = "II - The Vanishing of Elina Harper 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725473424/B0E2BFA9C7F61A5B7A72CD11AD1AFF4A070AFFA1/"
|
||||
},
|
||||
{
|
||||
Name = "II - Vanishing of Elina Harper 2",
|
||||
Name = "II - The Vanishing of Elina Harper 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725473570/D28C2DA099D656116A0D7BAA8B874E4ED6B6B50E/"
|
||||
},
|
||||
{
|
||||
Name = "II - Vanishing of Elina Harper 3",
|
||||
Name = "II - The Vanishing of Elina Harper 3",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725473731/EE9BED3522A1B7CD5E394A67AD7F692DB709A9B5/"
|
||||
},
|
||||
{
|
||||
Name = "II - Vanishing of Elina Harper 4",
|
||||
Name = "II - The Vanishing of Elina Harper 4",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725473874/0A85B2CE9A3FFB048C932E1B014B2986D5D42A1B/"
|
||||
},
|
||||
{
|
||||
@ -526,19 +526,19 @@ PLAYAREA_IMAGE_DATA = {
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725475402/C41EB1D2F8549669DD4323A339F5EC594996816C/"
|
||||
},
|
||||
{
|
||||
Name = "VI - Light in the Fog 1",
|
||||
Name = "VI - A Light in the Fog 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725475509/C526C9A3AC34195ACF6161D4821D1424A8A288B4/"
|
||||
},
|
||||
{
|
||||
Name = "VI - Light in the Fog 2",
|
||||
Name = "VI - A Light in the Fog 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725475660/2C67D57967F300BD1FE1AFC08C49EBCF4A88D11C/"
|
||||
},
|
||||
{
|
||||
Name = "VII - Lair of Dagon 1",
|
||||
Name = "VII - The Lair of Dagon 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725476055/4BC221648012F7A7A37B2F65929705E973FF9CE3/"
|
||||
},
|
||||
{
|
||||
Name = "VII - Lair of Dagon 2",
|
||||
Name = "VII - The Lair of Dagon 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725476271/3F9CF0FE8ACCE12E26ACA5D5777177A10B49D6DA/"
|
||||
},
|
||||
{
|
||||
@ -584,11 +584,11 @@ PLAYAREA_IMAGE_DATA = {
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725483208/CDFF7A2D404485DE2B4C4ED54B34E197515F0094/"
|
||||
},
|
||||
{
|
||||
Name = "IV - Heart of Madness 1",
|
||||
Name = "IV - The Heart of Madness 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725483349/A96BC4AA73C71FE86EF38110236BAEF710C00EE2/"
|
||||
},
|
||||
{
|
||||
Name = "IV - Heart of Madness 2",
|
||||
Name = "IV - The Heart of Madness 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2279446315725483528/5BF0DD740C5D43EFBFEF0436EB35FF9DA748FA5E/"
|
||||
}
|
||||
},
|
||||
@ -626,15 +626,15 @@ PLAYAREA_IMAGE_DATA = {
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2038485431566444330/3ED2CCE95DE933546E1B5CBBF445D773E6D65465/"
|
||||
},
|
||||
{
|
||||
Name = "56-Y ???",
|
||||
Name = "56-Y Without a Trace",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2038485431566444450/FE4C335B0F72E83900A4EED0FD1A1D304D70D6B7/"
|
||||
},
|
||||
{
|
||||
Name = "59-Z Congress of Keys I",
|
||||
Name = "59-Z Congress of Keys 1",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2038485431566444576/5BB32469ED412D59BB0A46E57D226500B1D0568B/"
|
||||
},
|
||||
{
|
||||
Name = "59-Z Congress of Keys II",
|
||||
Name = "59-Z Congress of Keys 2",
|
||||
URL = "http://cloud-3.steamusercontent.com/ugc/2038485431566444690/B01A1FEAB57473D9B6DF11B92D62C214AA1C2C02/"
|
||||
}
|
||||
}
|
||||
@ -858,7 +858,7 @@ PLAYAREA_IMAGE_DATA = {
|
||||
URL = "https://github.com/ArkhamDotCards/theghostsofonigawa/blob/main/product/onigawa-playmat-01.png?raw=true"
|
||||
},
|
||||
{
|
||||
Name = "II - In The Shadow Of Mount Kokoro",
|
||||
Name = "II - In The Shadow Of Mount Kokoro",
|
||||
URL = "https://github.com/ArkhamDotCards/theghostsofonigawa/blob/main/product/onigawa-playmat-02.png?raw=true"
|
||||
},
|
||||
{
|
||||
|
@ -1,14 +1,16 @@
|
||||
require("core/PlayAreaImageData") -- this fills the variable "PLAYAREA_IMAGE_DATA"
|
||||
local optionPanelApi = require("core/OptionPanelApi")
|
||||
local playAreaApi = require("core/PlayAreaApi")
|
||||
local typeIndex, selectionIndex
|
||||
local typeIndex, selectionIndex, plainNameCache
|
||||
|
||||
function onSave() return JSON.encode({typeIndex = typeIndex, selectionIndex = selectionIndex}) end
|
||||
function onSave() return JSON.encode({ typeIndex = typeIndex, selectionIndex = selectionIndex }) end
|
||||
|
||||
function onLoad(savedData)
|
||||
self.createButton({
|
||||
function_owner = self,
|
||||
click_function = "onClick_toggleGallery",
|
||||
tooltip = "Show Image Gallery",
|
||||
position = {0, 0.06, 0},
|
||||
height = 1500,
|
||||
width = 1500,
|
||||
color = { 1, 1, 1, 0 }
|
||||
@ -17,17 +19,18 @@ function onLoad(savedData)
|
||||
local loadedData = JSON.decode(savedData) or {}
|
||||
typeIndex = loadedData.typeIndex or 1
|
||||
selectionIndex = loadedData.selectionIndex or 1
|
||||
Wait.time(updatePlayareaGallery, 0.5)
|
||||
Wait.time(updatePlayAreaGallery, 0.5)
|
||||
math.randomseed(os.time())
|
||||
end
|
||||
|
||||
-- click function for main button
|
||||
function onClick_toggleGallery()
|
||||
Global.call("togglePlayareaGallery")
|
||||
Global.call("togglePlayAreaGallery")
|
||||
end
|
||||
|
||||
function onClick_defaultImage()
|
||||
playAreaApi.updateSurface()
|
||||
Global.call("togglePlayareaGallery")
|
||||
Global.call("togglePlayAreaGallery")
|
||||
end
|
||||
|
||||
function getDataSubTableByIndex(dataTable, index)
|
||||
@ -39,7 +42,7 @@ function getDataSubTableByIndex(dataTable, index)
|
||||
return {}
|
||||
end
|
||||
|
||||
function updatePlayareaGallery()
|
||||
function updatePlayAreaGallery()
|
||||
-- get subtables
|
||||
local dataForType = getDataSubTableByIndex(PLAYAREA_IMAGE_DATA, typeIndex)
|
||||
local dataForSelection = getDataSubTableByIndex(dataForType, selectionIndex)
|
||||
@ -97,12 +100,12 @@ end
|
||||
function onClick_imageTab(_, _, tabId)
|
||||
typeIndex = tonumber(tabId:sub(9))
|
||||
selectionIndex = 1
|
||||
updatePlayareaGallery()
|
||||
updatePlayAreaGallery()
|
||||
end
|
||||
|
||||
function onClick_listItem(_, _, listId)
|
||||
selectionIndex = tonumber(listId:sub(10))
|
||||
updatePlayareaGallery()
|
||||
updatePlayAreaGallery()
|
||||
end
|
||||
|
||||
function onClick_image(_, _, id)
|
||||
@ -111,7 +114,7 @@ function onClick_image(_, _, id)
|
||||
local dataForSelection = getDataSubTableByIndex(dataForType, selectionIndex)
|
||||
local newURL = dataForSelection[imageIndex].URL
|
||||
playAreaApi.updateSurface(newURL)
|
||||
Global.call("togglePlayareaGallery")
|
||||
Global.call("togglePlayAreaGallery")
|
||||
end
|
||||
|
||||
function highlightTabAndItem()
|
||||
@ -146,3 +149,63 @@ function round(num, numDecimalPlaces)
|
||||
local mult = 10 ^ (numDecimalPlaces or 0)
|
||||
return math.floor(num * mult + 0.5) / mult
|
||||
end
|
||||
|
||||
function maybeUpdatePlayAreaImage(scenarioName)
|
||||
-- check if option is enabled
|
||||
local optionPanelState = optionPanelApi.getOptions()
|
||||
if not optionPanelState["changePlayAreaImage"] then return end
|
||||
|
||||
-- initialize cache if nil
|
||||
if not plainNameCache then
|
||||
plainNameCache = {}
|
||||
for i, dataForType in pairs(PLAYAREA_IMAGE_DATA) do
|
||||
for j, dataForCycle in pairs(dataForType) do
|
||||
for k, data in ipairs(dataForCycle) do
|
||||
local plainName = getPlainName(data.Name)
|
||||
|
||||
-- override plainName for all images in the "Other Images" category (except the default image)
|
||||
if i == "Other Images" and data.Name ~= "Default Image" then
|
||||
plainName = "Generic"
|
||||
end
|
||||
|
||||
if not plainNameCache[plainName] then
|
||||
plainNameCache[plainName] = {}
|
||||
end
|
||||
table.insert(plainNameCache[plainName], data.URL)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- look for matching playarea image or use generic ones instead
|
||||
local listOfEligibleImages = {}
|
||||
if plainNameCache[scenarioName] then
|
||||
listOfEligibleImages = plainNameCache[scenarioName]
|
||||
else
|
||||
listOfEligibleImages = plainNameCache["Generic"]
|
||||
end
|
||||
|
||||
-- get a random entry from the eligible list
|
||||
local newImageIndex = math.random(#listOfEligibleImages)
|
||||
playAreaApi.updateSurface(listOfEligibleImages[newImageIndex])
|
||||
end
|
||||
|
||||
-- attempts to extract the plain scenario name from the playarea image name
|
||||
function getPlainName(str)
|
||||
-- remove prefix type 1
|
||||
str = str:gsub("%w+%-%w%s%-%s", "") -- matches "II-B - Thousand Shapes of Horror 1"
|
||||
|
||||
-- remove prefix type 2
|
||||
str = str:gsub("%w+%-%w%s", "") -- matches "59-Z Congress of Keys 1"
|
||||
|
||||
-- remove prefix type 3
|
||||
str = str:gsub("%w+%s%-%s", "") -- matches "III - The Secret Name 4"
|
||||
|
||||
-- remove prefix type 4
|
||||
str = str:gsub("%?+%s%-%s", "") -- matches "??? - Fatal Mirage"
|
||||
|
||||
-- remove suffix (numbering)
|
||||
str = str:gsub("%s%d+", "")
|
||||
|
||||
return str
|
||||
end
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
<Include src="Global/BottomBar.xml"/>
|
||||
<Include src="Global/DownloadWindow.xml"/>
|
||||
<Include src="Global/PlayareaGallery.xml"/>
|
||||
<Include src="Global/PlayAreaGallery.xml"/>
|
||||
<Include src="Global/TitleSplash.xml"/>
|
||||
<Include src="Global/NavigationOverlay.xml"/>
|
||||
<Include src="Global/OptionPanel.xml"/>
|
||||
|
@ -26,8 +26,9 @@
|
||||
|
||||
<!-- group headers -->
|
||||
<Row class="group-header"
|
||||
preferredHeight="54" />
|
||||
preferredHeight="44" />
|
||||
<Cell class="group-header"
|
||||
padding="10 10 0 0"
|
||||
columnSpan="3"
|
||||
color="#222222" />
|
||||
<Panel class="group-header"
|
||||
@ -42,22 +43,26 @@
|
||||
tooltipPosition="Left"
|
||||
tooltipBackgroundColor="rgba(0,0,0,1)"/>
|
||||
<Cell class="option-text"
|
||||
padding="10 10 5 5"
|
||||
color="#333333"
|
||||
columnSpan="2"/>
|
||||
<Cell class="option-button"
|
||||
padding="10 10 5 5"
|
||||
color="#333333"/>
|
||||
<Cell class="option-dropdowntext"
|
||||
<Cell class="option-singleColumn"
|
||||
padding="10 10 5 5"
|
||||
color="#333333"
|
||||
columnSpan="1"/>
|
||||
<Cell class="option-dropdown"
|
||||
<Cell class="option-doubleColumn"
|
||||
padding="10 10 5 5"
|
||||
color="#333333"
|
||||
columnSpan="2"/>
|
||||
<Panel class="option-wrapper"
|
||||
<Panel class="singleColumn-wrapper"
|
||||
padding="10 0 0 0"/>
|
||||
<Text class="option-header"
|
||||
fontSize="22"
|
||||
font="font_teutonic-arkham"/>
|
||||
<Panel class="dropdown-wrapper"
|
||||
<Panel class="doubleColumn-wrapper"
|
||||
padding="0 17 3 3"/>
|
||||
|
||||
<!-- buttons at the bottom -->
|
||||
@ -102,7 +107,7 @@
|
||||
raycastTarget="true">
|
||||
<TableLayout columnWidths="0 100 75"
|
||||
autoCalculateHeight="1"
|
||||
cellPadding="10 10 5 5">
|
||||
useGlobalCellPadding="false">
|
||||
|
||||
<!-- Group: general settings -->
|
||||
<Row class="group-header">
|
||||
@ -117,13 +122,13 @@
|
||||
<!-- Option: card language -->
|
||||
<!-- disabled until we have the backend in place
|
||||
<Row class="option-text" tooltip="Downloading a campaign or importing a deck will use
this language for cards (NOT FUNCTIONAL YET!).">
|
||||
<Cell class="option-dropdowntext">
|
||||
<Panel class="option-wrapper">
|
||||
<Cell class="option-singleColumn">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Card language</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
<Cell class="option-dropdown">
|
||||
<Panel class="dropdown-wrapper">
|
||||
<Cell class="option-doubleColumn">
|
||||
<Panel class="doubleColumn-wrapper">
|
||||
<Dropdown id="cardLanguage" onValueChanged="languageSelected(selectedIndex)">
|
||||
<Option>简体中文</Option>
|
||||
<Option>繁體中文</Option>
|
||||
@ -137,12 +142,36 @@
|
||||
</Cell>
|
||||
</Row> -->
|
||||
|
||||
<!-- Option: splash scenario name on setup -->
|
||||
<Row class="option-text"
|
||||
tooltip="Fade in the name of the scenario for 2 seconds
when placing down a scenario.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Show scenario title on setup</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
<Cell class="option-button">
|
||||
<Toggle id="showTitleSplash"
|
||||
onValueChanged="onClick_toggleOption(showTitleSplash)"/>
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<!-- Group: play area settings -->
|
||||
<Row class="group-header">
|
||||
<Cell class="group-header">
|
||||
<Panel class="group-header"
|
||||
image="header_compass">
|
||||
<Text class="group-header">PLAY AREA SETTINGS</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<!-- Option: play area snap tags -->
|
||||
<Row class="option-text"
|
||||
tooltip="Only cards with the tag 'Location' will snap (official cards are supported by default).
Disable this if you are having issues with custom content.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="option-wrapper">
|
||||
<Text class="option-header">Enable snap tags for play area</Text>
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Enable snap tags</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
<Cell class="option-button">
|
||||
@ -151,17 +180,48 @@
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<!-- Option: splash scenario name on setup -->
|
||||
<!-- Option: location connections -->
|
||||
<Row class="option-text"
|
||||
tooltip="Fade in the name of the scenario for 2 seconds
when placing down a scenario.">
|
||||
tooltip="Automatically draw location connections based on card metadata.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="option-wrapper">
|
||||
<Text class="option-header">Show scenario title on setup</Text>
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Draw location connections</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
<Cell class="option-button">
|
||||
<Toggle id="showTitleSplash"
|
||||
onValueChanged="onClick_toggleOption(showTitleSplash)"/>
|
||||
<Toggle id="playAreaConnections"
|
||||
onValueChanged="onClick_toggleOption(playAreaConnections)"/>
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<!-- Option: play area connection color -->
|
||||
<Row class="option-text"
|
||||
tooltip="This color will be used to draw lines
for location connections.">
|
||||
<Cell class="option-singleColumn">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Choose color for location connections</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
<Cell class="option-doubleColumn">
|
||||
<Panel class="doubleColumn-wrapper">
|
||||
<Button id="playAreaConnectionColor"
|
||||
onClick="onClick_playAreaConnectionColor">
|
||||
</Button>
|
||||
</Panel>
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<!-- Option: change custom playarea image on setup -->
|
||||
<Row class="option-text"
|
||||
tooltip="Attempts to set the play area to a fitting image
from the play area image gallery.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Change background on setup</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
<Cell class="option-button">
|
||||
<Toggle id="changePlayAreaImage"
|
||||
onValueChanged="onClick_toggleOption(changePlayAreaImage)"/>
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
@ -179,7 +239,7 @@
|
||||
<Row class="option-text"
|
||||
tooltip="Only cards with the tag 'Asset' will snap (official cards are supported by default).
Disable this if you are having issues with custom content.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="option-wrapper">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Enable snap tags</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
@ -193,7 +253,7 @@
|
||||
<Row class="option-text"
|
||||
tooltip="Displays a button below the 'Upkeep' button that draws a card from your deck.
Useful for multi-handed solo play.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="option-wrapper">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Show "Draw 1" button</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
@ -207,7 +267,7 @@
|
||||
<Row class="option-text"
|
||||
tooltip="Instead of automatically counting clues in the respective area on your playermat,
this displays a clickable counter for clues.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="option-wrapper">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Use clickable clue counters</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
@ -220,13 +280,13 @@
|
||||
<!-- Option: use clickable resource counters -->
|
||||
<Row class="option-text"
|
||||
tooltip="This enables spawning of clickable resource tokens for player cards.
(Chef's Selection = assets with 0 uses)">
|
||||
<Cell class="option-dropdowntext">
|
||||
<Panel class="option-wrapper">
|
||||
<Cell class="option-singleColumn">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Use clickable resource tokens</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
<Cell class="option-dropdown">
|
||||
<Panel class="dropdown-wrapper">
|
||||
<Cell class="option-doubleColumn">
|
||||
<Panel class="doubleColumn-wrapper">
|
||||
<Dropdown id="useResourceCounters"
|
||||
onValueChanged="resourceCounterSelected(selectedIndex)">
|
||||
<Option>Enabled</Option>
|
||||
@ -251,7 +311,7 @@
|
||||
<Row class="option-text"
|
||||
tooltip="Provides a card-sized bag for cards that are attached to other cards
(e.g. Backpack).">
|
||||
<Cell class="option-text">
|
||||
<Panel class="option-wrapper">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Attachment Helper</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
@ -265,7 +325,7 @@
|
||||
<Row class="option-text"
|
||||
tooltip="Useful for campaign-play:
It resets play areas to allow continuous gameplay in the same savegame.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="option-wrapper">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Clean Up Helper</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
@ -279,7 +339,7 @@
|
||||
<Row class="option-text"
|
||||
tooltip="Displays in a 'Choose Your Own Adventure'
style redesigned campaign guides.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="option-wrapper">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">CYOA Campaign Guides</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
@ -293,7 +353,7 @@
|
||||
<Row class="option-text"
|
||||
tooltip="This allows moving all objects on the main playmat
in a chosen direction.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="option-wrapper">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Displacement Tool</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
@ -307,7 +367,7 @@
|
||||
<Row class="option-text"
|
||||
tooltip="Never count your hand cards again! This tool does that for you
and additionally enables easy discarding of random cards.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="option-wrapper">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Hand Helper</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
@ -317,11 +377,25 @@
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<!-- Option: show playermat hider -->
|
||||
<Row class="option-text"
|
||||
tooltip="Use this tool to hide unused playermats
for more table space.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Playmat Hider</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
<Cell class="option-button">
|
||||
<Toggle id="showPlayermatHider"
|
||||
onValueChanged="onClick_toggleOption(showPlayermatHider)"/>
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<!-- Option: show search assistant -->
|
||||
<Row class="option-text"
|
||||
tooltip="Quickly search 3, 6, 9 or the top X
cards of your deck!">
|
||||
<Cell class="option-text">
|
||||
<Panel class="option-wrapper">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Search Assistant</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
|
@ -46,7 +46,7 @@
|
||||
<VerticalLayout childForceExpandHeight="false"/>
|
||||
</Defaults>
|
||||
|
||||
<VerticalLayout id="playareaGallery"
|
||||
<VerticalLayout id="playAreaGallery"
|
||||
active="false"
|
||||
color="black"
|
||||
height="880"
|
||||
@ -79,7 +79,7 @@
|
||||
tooltip="Close"
|
||||
tooltipPosition="Right"
|
||||
tooltipBackgroundColor="rgba(0,0,0,1)"
|
||||
onClick="onClick_toggleUi(playareaGallery)"/>
|
||||
onClick="onClick_toggleUi(playAreaGallery)"/>
|
||||
</Panel>
|
||||
</Panel>
|
||||
|