Merge branch 'main' into removal-of-fan-placeholders
This commit is contained in:
commit
ca3fa692c5
@ -3,7 +3,6 @@
|
|||||||
"ComponentTags_path": "ComponentTags.json",
|
"ComponentTags_path": "ComponentTags.json",
|
||||||
"CustomUIAssets_path": "CustomUIAssets.json",
|
"CustomUIAssets_path": "CustomUIAssets.json",
|
||||||
"DecalPallet_path": "DecalPallet.json",
|
"DecalPallet_path": "DecalPallet.json",
|
||||||
"Decals": [],
|
|
||||||
"GameComplexity": "",
|
"GameComplexity": "",
|
||||||
"GameMode": "Arkham Horror LCG - Super Complete Edition",
|
"GameMode": "Arkham Horror LCG - Super Complete Edition",
|
||||||
"GameType": "",
|
"GameType": "",
|
||||||
@ -198,6 +197,7 @@
|
|||||||
"TokenArranger.022907",
|
"TokenArranger.022907",
|
||||||
"ChaosBagManager.023240",
|
"ChaosBagManager.023240",
|
||||||
"ArkhamSCE330-1092023-Page1.964222",
|
"ArkhamSCE330-1092023-Page1.964222",
|
||||||
|
"PlaceholderBoxDummy.a93466",
|
||||||
"SoulsofDarkness.a94e6b"
|
"SoulsofDarkness.a94e6b"
|
||||||
],
|
],
|
||||||
"PlayArea": 1,
|
"PlayArea": 1,
|
||||||
|
@ -56,10 +56,6 @@
|
|||||||
"displayed": "chaosBag",
|
"displayed": "chaosBag",
|
||||||
"normalized": "chaosbag"
|
"normalized": "chaosbag"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"displayed": "arkham_setup_memory_object",
|
|
||||||
"normalized": "arkham_setup_memory_object"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"displayed": "ActionToken",
|
"displayed": "ActionToken",
|
||||||
"normalized": "actiontoken"
|
"normalized": "actiontoken"
|
||||||
|
@ -28,9 +28,6 @@
|
|||||||
"Nickname": "Arkham Deck Cutter",
|
"Nickname": "Arkham Deck Cutter",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
"Sticky": true,
|
"Sticky": true,
|
||||||
"Tags": [
|
|
||||||
"arkham_setup_memory_object"
|
|
||||||
],
|
|
||||||
"Tooltip": true,
|
"Tooltip": true,
|
||||||
"Transform": {
|
"Transform": {
|
||||||
"posX": 78,
|
"posX": 78,
|
||||||
|
@ -54,4 +54,4 @@
|
|||||||
},
|
},
|
||||||
"Value": 0,
|
"Value": 0,
|
||||||
"XmlUI": ""
|
"XmlUI": ""
|
||||||
}
|
}
|
||||||
|
@ -54,4 +54,4 @@
|
|||||||
},
|
},
|
||||||
"Value": 0,
|
"Value": 0,
|
||||||
"XmlUI": ""
|
"XmlUI": ""
|
||||||
}
|
}
|
||||||
|
@ -73,4 +73,4 @@
|
|||||||
},
|
},
|
||||||
"Value": 0,
|
"Value": 0,
|
||||||
"XmlUI": ""
|
"XmlUI": ""
|
||||||
}
|
}
|
||||||
|
@ -42,4 +42,4 @@
|
|||||||
},
|
},
|
||||||
"Value": 0,
|
"Value": 0,
|
||||||
"XmlUI": ""
|
"XmlUI": ""
|
||||||
}
|
}
|
||||||
|
@ -14,11 +14,12 @@
|
|||||||
"r": 1
|
"r": 1
|
||||||
},
|
},
|
||||||
"ContainedObjects_order": [
|
"ContainedObjects_order": [
|
||||||
"BadBlood.451eaa",
|
|
||||||
"RedTideRising.5302f2",
|
|
||||||
"AllorNothing.72ab92",
|
"AllorNothing.72ab92",
|
||||||
|
"BadBlood.451eaa",
|
||||||
|
"BytheBook.cc7eb3",
|
||||||
|
"LaidtoRest.e2dd57",
|
||||||
"ReadorDie.9e73fa",
|
"ReadorDie.9e73fa",
|
||||||
"BytheBook.cc7eb3"
|
"RedTideRising.5302f2"
|
||||||
],
|
],
|
||||||
"ContainedObjects_path": "ChallengeScenarios.9f6801",
|
"ContainedObjects_path": "ChallengeScenarios.9f6801",
|
||||||
"CustomMesh": {
|
"CustomMesh": {
|
||||||
@ -64,7 +65,7 @@
|
|||||||
"Tooltip": true,
|
"Tooltip": true,
|
||||||
"Transform": {
|
"Transform": {
|
||||||
"posX": -9,
|
"posX": -9,
|
||||||
"posY": 1.481,
|
"posY": 1.482,
|
||||||
"posZ": -76,
|
"posZ": -76,
|
||||||
"rotX": 0,
|
"rotX": 0,
|
||||||
"rotY": 270,
|
"rotY": 270,
|
||||||
|
@ -1 +1 @@
|
|||||||
{"ml":{"451eaa":{"lock":false,"pos":{"x":12.2499580383301,"y":1.46560525894165,"z":3.98636198043823},"rot":{"x":359.920135498047,"y":269.999908447266,"z":0.016873624175787}},"5302f2":{"lock":false,"pos":{"x":12.2504663467407,"y":1.45853757858276,"z":-20.013650894165},"rot":{"x":359.920135498047,"y":270.00146484375,"z":0.0168716721236706}},"72ab92":{"lock":false,"pos":{"x":12.2520532608032,"y":1.4679582118988,"z":11.9863719940186},"rot":{"x":359.920135498047,"y":270,"z":0.0168737415224314}},"9e73fa":{"lock":false,"pos":{"x":12.2500581741333,"y":1.46089386940002,"z":-12.0136384963989},"rot":{"x":359.920135498047,"y":269.999847412109,"z":0.0168744903057814}},"cc7eb3":{"lock":false,"pos":{"x":12.2495565414429,"y":1.46325027942657,"z":-4.01364088058472},"rot":{"x":359.920135498047,"y":269.999908447266,"z":0.0168744102120399}}}}
|
{"ml":{"451eaa":{"lock":false,"pos":{"x":12.252,"y":1.4815,"z":11.986},"rot":{"x":0,"y":269.9999,"z":0}},"5302f2":{"lock":false,"pos":{"x":12.2505,"y":1.4815,"z":-20.0137},"rot":{"x":0,"y":270.0014,"z":0}},"72ab92":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":19.986},"rot":{"x":0,"y":269.9999,"z":0}},"9e73fa":{"lock":false,"pos":{"x":12.2501,"y":1.4815,"z":-12.0137},"rot":{"x":0,"y":269.9998,"z":0}},"cc7eb3":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":3.986},"rot":{"x":0,"y":269.9999,"z":0}},"e2dd57":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":-4.014},"rot":{"x":0,"y":270,"z":0}}}}
|
||||||
|
@ -71,9 +71,9 @@
|
|||||||
"Sticky": true,
|
"Sticky": true,
|
||||||
"Tooltip": true,
|
"Tooltip": true,
|
||||||
"Transform": {
|
"Transform": {
|
||||||
"posX": 12.252,
|
"posX": 12.25,
|
||||||
"posY": 1.468,
|
"posY": 1.481,
|
||||||
"posZ": 11.986,
|
"posZ": 19.986,
|
||||||
"rotX": 0,
|
"rotX": 0,
|
||||||
"rotY": 270,
|
"rotY": 270,
|
||||||
"rotZ": 0,
|
"rotZ": 0,
|
||||||
|
@ -71,9 +71,9 @@
|
|||||||
"Sticky": true,
|
"Sticky": true,
|
||||||
"Tooltip": true,
|
"Tooltip": true,
|
||||||
"Transform": {
|
"Transform": {
|
||||||
"posX": 12.25,
|
"posX": 12.252,
|
||||||
"posY": 1.466,
|
"posY": 1.481,
|
||||||
"posZ": 3.986,
|
"posZ": 11.986,
|
||||||
"rotX": 0,
|
"rotX": 0,
|
||||||
"rotY": 270,
|
"rotY": 270,
|
||||||
"rotZ": 0,
|
"rotZ": 0,
|
||||||
|
@ -72,8 +72,8 @@
|
|||||||
"Tooltip": true,
|
"Tooltip": true,
|
||||||
"Transform": {
|
"Transform": {
|
||||||
"posX": 12.25,
|
"posX": 12.25,
|
||||||
"posY": 1.463,
|
"posY": 1.481,
|
||||||
"posZ": -4.014,
|
"posZ": 3.986,
|
||||||
"rotX": 0,
|
"rotX": 0,
|
||||||
"rotY": 270,
|
"rotY": 270,
|
||||||
"rotZ": 0,
|
"rotZ": 0,
|
||||||
|
@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"AltLookAngle": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"AttachedDecals": [
|
||||||
|
{
|
||||||
|
"CustomDecal": {
|
||||||
|
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/959719855119695911/931B9829687A20F4DEADB36DA57B7E6D76792231/",
|
||||||
|
"Name": "dunwich_back",
|
||||||
|
"Size": 7.4
|
||||||
|
},
|
||||||
|
"Transform": {
|
||||||
|
"posX": 0,
|
||||||
|
"posY": 0,
|
||||||
|
"posZ": 0,
|
||||||
|
"rotX": 270,
|
||||||
|
"rotY": 0,
|
||||||
|
"rotZ": 0,
|
||||||
|
"scaleX": 2,
|
||||||
|
"scaleY": 2,
|
||||||
|
"scaleZ": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Autoraise": true,
|
||||||
|
"ColorDiffuse": {
|
||||||
|
"a": 0.27451,
|
||||||
|
"b": 1,
|
||||||
|
"g": 1,
|
||||||
|
"r": 1
|
||||||
|
},
|
||||||
|
"CustomMesh": {
|
||||||
|
"CastShadows": true,
|
||||||
|
"ColliderURL": "",
|
||||||
|
"Convex": true,
|
||||||
|
"CustomShader": {
|
||||||
|
"FresnelStrength": 0,
|
||||||
|
"SpecularColor": {
|
||||||
|
"b": 1,
|
||||||
|
"g": 1,
|
||||||
|
"r": 1
|
||||||
|
},
|
||||||
|
"SpecularIntensity": 0,
|
||||||
|
"SpecularSharpness": 2
|
||||||
|
},
|
||||||
|
"DiffuseURL": "http://cloud-3.steamusercontent.com/ugc/2115061845788468343/B7611EC7DCD2008B87D6518EBEFF0AD36EFE5B54/",
|
||||||
|
"MaterialIndex": 3,
|
||||||
|
"MeshURL": "https://raw.githubusercontent.com/RobMayer/TTSLibrary/master/advboxes/tuckbox_h_MSH.obj",
|
||||||
|
"NormalURL": "",
|
||||||
|
"TypeIndex": 0
|
||||||
|
},
|
||||||
|
"Description": "Challenge Scenario",
|
||||||
|
"DragSelectable": true,
|
||||||
|
"GMNotes": "scenarios/challenge_laid_to_rest.json",
|
||||||
|
"GUID": "e2dd57",
|
||||||
|
"Grid": true,
|
||||||
|
"GridProjection": false,
|
||||||
|
"Hands": true,
|
||||||
|
"HideWhenFaceDown": false,
|
||||||
|
"IgnoreFoW": false,
|
||||||
|
"LayoutGroupSortIndex": 0,
|
||||||
|
"Locked": false,
|
||||||
|
"LuaScript": "require(\"core/DownloadBox\")",
|
||||||
|
"LuaScriptState": "",
|
||||||
|
"MeasureMovement": false,
|
||||||
|
"Name": "Custom_Model",
|
||||||
|
"Nickname": "Laid to Rest",
|
||||||
|
"Snap": true,
|
||||||
|
"Sticky": true,
|
||||||
|
"Tooltip": true,
|
||||||
|
"Transform": {
|
||||||
|
"posX": 12.25,
|
||||||
|
"posY": 1.481,
|
||||||
|
"posZ": -4.014,
|
||||||
|
"rotX": 0,
|
||||||
|
"rotY": 270,
|
||||||
|
"rotZ": 0,
|
||||||
|
"scaleX": 2.21,
|
||||||
|
"scaleY": 0.46,
|
||||||
|
"scaleZ": 2.42
|
||||||
|
},
|
||||||
|
"Value": 0,
|
||||||
|
"XmlUI": ""
|
||||||
|
}
|
@ -72,7 +72,7 @@
|
|||||||
"Tooltip": true,
|
"Tooltip": true,
|
||||||
"Transform": {
|
"Transform": {
|
||||||
"posX": 12.25,
|
"posX": 12.25,
|
||||||
"posY": 1.461,
|
"posY": 1.481,
|
||||||
"posZ": -12.014,
|
"posZ": -12.014,
|
||||||
"rotX": 0,
|
"rotX": 0,
|
||||||
"rotY": 270,
|
"rotY": 270,
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
"Tooltip": true,
|
"Tooltip": true,
|
||||||
"Transform": {
|
"Transform": {
|
||||||
"posX": 12.25,
|
"posX": 12.25,
|
||||||
"posY": 1.459,
|
"posY": 1.481,
|
||||||
"posZ": -20.014,
|
"posZ": -20.014,
|
||||||
"rotX": 0,
|
"rotX": 0,
|
||||||
"rotY": 270,
|
"rotY": 270,
|
||||||
|
45
objects/PlaceholderBoxDummy.a93466.json
Normal file
45
objects/PlaceholderBoxDummy.a93466.json
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"AltLookAngle": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"Autoraise": true,
|
||||||
|
"ColorDiffuse": {
|
||||||
|
"b": 0.82353,
|
||||||
|
"g": 0.20157,
|
||||||
|
"r": 0
|
||||||
|
},
|
||||||
|
"Description": "This dummy is there to hold the up-to-date script file for placeholder boxes to be available for placeholder box spawning.",
|
||||||
|
"DragSelectable": true,
|
||||||
|
"GMNotes": "",
|
||||||
|
"GUID": "a93466",
|
||||||
|
"Grid": true,
|
||||||
|
"GridProjection": false,
|
||||||
|
"Hands": false,
|
||||||
|
"HideWhenFaceDown": false,
|
||||||
|
"IgnoreFoW": false,
|
||||||
|
"LayoutGroupSortIndex": 0,
|
||||||
|
"Locked": true,
|
||||||
|
"LuaScript": "require(\"core/DownloadBox\")",
|
||||||
|
"LuaScriptState": "",
|
||||||
|
"MeasureMovement": false,
|
||||||
|
"Name": "BlockRectangle",
|
||||||
|
"Nickname": "Placeholder Box Dummy",
|
||||||
|
"Snap": true,
|
||||||
|
"Sticky": true,
|
||||||
|
"Tooltip": true,
|
||||||
|
"Transform": {
|
||||||
|
"posX": 78,
|
||||||
|
"posY": 1.645,
|
||||||
|
"posZ": -33,
|
||||||
|
"rotX": 0,
|
||||||
|
"rotY": 0,
|
||||||
|
"rotZ": 0,
|
||||||
|
"scaleX": 1,
|
||||||
|
"scaleY": 1,
|
||||||
|
"scaleZ": 1
|
||||||
|
},
|
||||||
|
"Value": 0,
|
||||||
|
"XmlUI": ""
|
||||||
|
}
|
@ -351,10 +351,6 @@
|
|||||||
"Nickname": "Playermat 4: Red",
|
"Nickname": "Playermat 4: Red",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
"Sticky": true,
|
"Sticky": true,
|
||||||
"Tags": [
|
|
||||||
"Red",
|
|
||||||
"Playermat"
|
|
||||||
],
|
|
||||||
"Tooltip": false,
|
"Tooltip": false,
|
||||||
"Transform": {
|
"Transform": {
|
||||||
"posX": -30.35,
|
"posX": -30.35,
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
"PDFPage": 0,
|
"PDFPage": 0,
|
||||||
"PDFPageOffset": 0,
|
"PDFPageOffset": 0,
|
||||||
"PDFPassword": "",
|
"PDFPassword": "",
|
||||||
"PDFUrl": "https://images-cdn.fantasyflightgames.com/filer_public/c4/b0/c4b0d66c-d79e-411b-bdb5-b5d8c457d4bc/ahc01_rules_reference_web.pdf"
|
"PDFUrl": "http://cloud-3.steamusercontent.com/ugc/2115061845793806189/6FC67F9AF9224452E2D8F25E63B88D702B21B0DC/"
|
||||||
},
|
},
|
||||||
"Description": "",
|
"Description": "",
|
||||||
"DragSelectable": true,
|
"DragSelectable": true,
|
||||||
|
@ -312,6 +312,10 @@ function layout(_, _, isRightClick)
|
|||||||
local value = tonumber(objData.Nickname)
|
local value = tonumber(objData.Nickname)
|
||||||
local precedence = tokenPrecedence[objData.Nickname]
|
local precedence = tokenPrecedence[objData.Nickname]
|
||||||
|
|
||||||
|
-- remove GUID to avoid issues for high latency clients
|
||||||
|
objData["GUID"] = nil
|
||||||
|
|
||||||
|
-- store data with value / precendence
|
||||||
data[i] = {
|
data[i] = {
|
||||||
token = objData,
|
token = objData,
|
||||||
value = value or precedence[1]
|
value = value or precedence[1]
|
||||||
|
@ -295,7 +295,12 @@ do
|
|||||||
local card = allCardsBagApi.getCardById(cardId)
|
local card = allCardsBagApi.getCardById(cardId)
|
||||||
if (card ~= nil and card.metadata.bonded ~= nil) then
|
if (card ~= nil and card.metadata.bonded ~= nil) then
|
||||||
for _, bond in ipairs(card.metadata.bonded) do
|
for _, bond in ipairs(card.metadata.bonded) do
|
||||||
bondedCards[bond.id] = bond.count
|
-- add a bonded card for each copy of the parent card (except for Pendant of the Queen)
|
||||||
|
if bond.id == "06022" then
|
||||||
|
bondedCards[bond.id] = bond.count
|
||||||
|
else
|
||||||
|
bondedCards[bond.id] = bond.count * cardCount
|
||||||
|
end
|
||||||
-- We need to know which cards are bonded to determine their position, remember them
|
-- We need to know which cards are bonded to determine their position, remember them
|
||||||
bondedList[bond.id] = true
|
bondedList[bond.id] = true
|
||||||
-- Also adding taboo versions of bonded cards to the list
|
-- Also adding taboo versions of bonded cards to the list
|
||||||
|
@ -56,6 +56,7 @@ local GuidReferences = {
|
|||||||
MythosArea = "9f334f",
|
MythosArea = "9f334f",
|
||||||
NavigationOverlayHandler = "797ede",
|
NavigationOverlayHandler = "797ede",
|
||||||
OptionPanelSource = "830bd0",
|
OptionPanelSource = "830bd0",
|
||||||
|
PlaceholderBoxDummy = "a93466",
|
||||||
PlayArea = "721ba2",
|
PlayArea = "721ba2",
|
||||||
PlayAreaZone = "a2f932",
|
PlayAreaZone = "a2f932",
|
||||||
PlayerCardPanel = "2d30ee",
|
PlayerCardPanel = "2d30ee",
|
||||||
|
@ -717,6 +717,128 @@ function downloadCoroutine()
|
|||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- spawns a bag that contains every object from the library
|
||||||
|
function onClick_downloadAll()
|
||||||
|
broadcastToAll("Download initiated - this will take a few minutes!")
|
||||||
|
|
||||||
|
-- hide download window
|
||||||
|
if xmlVisibility.downloadWindow then
|
||||||
|
xmlVisibility.downloadWindow = false
|
||||||
|
UI.hide('downloadWindow')
|
||||||
|
end
|
||||||
|
|
||||||
|
startLuaCoroutine(Global, "coroutineDownloadAll")
|
||||||
|
end
|
||||||
|
|
||||||
|
function coroutineDownloadAll()
|
||||||
|
local JSON = [[
|
||||||
|
{
|
||||||
|
"Name": "Bag",
|
||||||
|
"Transform": {
|
||||||
|
"posX": -39.5,
|
||||||
|
"posY": 2,
|
||||||
|
"posZ": -87,
|
||||||
|
"rotX": 0,
|
||||||
|
"rotY": 270,
|
||||||
|
"rotZ": 0,
|
||||||
|
"scaleX": 1.0,
|
||||||
|
"scaleY": 1.0,
|
||||||
|
"scaleZ": 1.0
|
||||||
|
},
|
||||||
|
"Nickname": "All Downloadable Content",
|
||||||
|
"Bag": {
|
||||||
|
"Order": 0
|
||||||
|
},
|
||||||
|
"ContainedObjects": [
|
||||||
|
]]
|
||||||
|
|
||||||
|
local contained = ""
|
||||||
|
local downloadedItems = 0
|
||||||
|
local skippedItems = 0
|
||||||
|
|
||||||
|
-- loop through the library to add content
|
||||||
|
for contentType, objectList in pairs(library) do
|
||||||
|
broadcastToAll("Downloading " .. contentType .. "...")
|
||||||
|
for _, params in ipairs(objectList) do
|
||||||
|
local request = WebRequest.get(SOURCE_REPO .. '/' .. params.url)
|
||||||
|
local start = os.time()
|
||||||
|
while true do
|
||||||
|
if request.is_done then
|
||||||
|
contained = contained .. request.text .. ","
|
||||||
|
downloadedItems = downloadedItems + 1
|
||||||
|
break
|
||||||
|
-- time-out if item can't be loaded in 5s
|
||||||
|
elseif request.is_error or (os.time() - start) > 5 then
|
||||||
|
skippedItems = skippedItems + 1
|
||||||
|
break
|
||||||
|
end
|
||||||
|
coroutine.yield(0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
JSON = JSON .. contained .. "]}"
|
||||||
|
spawnObjectJSON({json = JSON})
|
||||||
|
|
||||||
|
broadcastToAll(downloadedItems .. " objects downloaded.", "Green")
|
||||||
|
broadcastToAll(skippedItems .. " objects had a time-out / error.", "Orange")
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
-- spawns a placeholder box for the selected object
|
||||||
|
function onClick_spawnPlaceholder()
|
||||||
|
-- get object references
|
||||||
|
local item = library[contentToShow][currentListItem]
|
||||||
|
local dummy = guidReferenceApi.getObjectByOwnerAndType("Mythos", "PlaceholderBoxDummy")
|
||||||
|
|
||||||
|
-- error handling
|
||||||
|
if not item.boxsize or item.boxsize == "" or not item.boxart or item.boxart == "" then
|
||||||
|
print("Error loading object.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- get data for placeholder
|
||||||
|
local spawnPos = {-39.5, 2, -87}
|
||||||
|
|
||||||
|
local meshTable = {
|
||||||
|
big = "https://raw.githubusercontent.com/RobMayer/TTSLibrary/master/advboxes/core_h_MSH.obj",
|
||||||
|
small = "https://raw.githubusercontent.com/RobMayer/TTSLibrary/master/advboxes/tuckbox_h_MSH.obj",
|
||||||
|
wide = "http://pastebin.com/raw.php?i=uWAmuNZ2"
|
||||||
|
}
|
||||||
|
|
||||||
|
local scaleTable = {
|
||||||
|
big = {1.00, 0.14, 1.00},
|
||||||
|
small = {2.21, 0.46, 2.42},
|
||||||
|
wide = {2.00, 0.11, 1.69}
|
||||||
|
}
|
||||||
|
|
||||||
|
local placeholder = spawnObject({
|
||||||
|
type = "Custom_Model",
|
||||||
|
position = spawnPos,
|
||||||
|
rotation = {0, 270, 0},
|
||||||
|
scale = scaleTable[item.boxsize],
|
||||||
|
})
|
||||||
|
|
||||||
|
placeholder.setCustomObject({
|
||||||
|
mesh = meshTable[item.boxsize],
|
||||||
|
diffuse = item.boxart,
|
||||||
|
material = 3
|
||||||
|
})
|
||||||
|
|
||||||
|
placeholder.setColorTint({1, 1, 1, 71/255})
|
||||||
|
placeholder.setName(item.name)
|
||||||
|
placeholder.setDescription("by " .. (item.author or "Unknown"))
|
||||||
|
placeholder.setGMNotes(item.url)
|
||||||
|
placeholder.setLuaScript(dummy.getLuaScript())
|
||||||
|
Player.getPlayers()[1].pingTable(spawnPos)
|
||||||
|
|
||||||
|
-- hide download window
|
||||||
|
if xmlVisibility.downloadWindow then
|
||||||
|
xmlVisibility.downloadWindow = false
|
||||||
|
UI.hide('downloadWindow')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- toggles the visibility of the respective UI
|
-- toggles the visibility of the respective UI
|
||||||
---@param player LuaPlayer Player that triggered this
|
---@param player LuaPlayer Player that triggered this
|
||||||
---@param title String Name of the UI to toggle
|
---@param title String Name of the UI to toggle
|
||||||
@ -754,25 +876,25 @@ function updatePreviewWindow()
|
|||||||
local maskData = {}
|
local maskData = {}
|
||||||
if item.boxsize == "big" then
|
if item.boxsize == "big" then
|
||||||
maskData = {
|
maskData = {
|
||||||
image = "box-cover-mask-big",
|
image = "box-cover-mask-big",
|
||||||
width = "870",
|
width = "870",
|
||||||
height = "435",
|
height = "435",
|
||||||
offsetXY = "154 60"
|
offsetXY = "154 60"
|
||||||
}
|
}
|
||||||
elseif item.boxsize == "small" then
|
elseif item.boxsize == "small" then
|
||||||
maskData = {
|
maskData = {
|
||||||
image = "box-cover-mask-small",
|
image = "box-cover-mask-small",
|
||||||
width = "792",
|
width = "792",
|
||||||
height = "594",
|
height = "594",
|
||||||
offsetXY = "135 13"
|
offsetXY = "135 13"
|
||||||
}
|
}
|
||||||
elseif item.boxsize == "wide" then
|
elseif item.boxsize == "wide" then
|
||||||
maskData = {
|
maskData = {
|
||||||
image = "box-cover-mask-wide",
|
image = "box-cover-mask-wide",
|
||||||
width = "756",
|
width = "756",
|
||||||
height = "630",
|
height = "630",
|
||||||
offsetXY = "-190 -70"
|
offsetXY = "-190 -70"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
-- loading empty image as placeholder until real image is loaded
|
-- loading empty image as placeholder until real image is loaded
|
||||||
|
@ -221,9 +221,11 @@ do
|
|||||||
-- Copy the offsets to make sure we don't change the static values
|
-- Copy the offsets to make sure we don't change the static values
|
||||||
local baseOffsets = offsets
|
local baseOffsets = offsets
|
||||||
offsets = { }
|
offsets = { }
|
||||||
|
|
||||||
|
-- get a vector for the shifting (downwards local to the card)
|
||||||
|
local shiftDownVector = Vector(0, 0, shiftDown):rotateOver("y", card.getRotation().y)
|
||||||
for i, baseOffset in ipairs(baseOffsets) do
|
for i, baseOffset in ipairs(baseOffsets) do
|
||||||
offsets[i] = baseOffset
|
offsets[i] = baseOffset + shiftDownVector
|
||||||
offsets[i][3] = offsets[i][3] + shiftDown
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -25,16 +25,16 @@ customizations = {
|
|||||||
checkboxes = {
|
checkboxes = {
|
||||||
posZ = -0.44,
|
posZ = -0.44,
|
||||||
count = 2,
|
count = 2,
|
||||||
|
},
|
||||||
|
textField = {
|
||||||
|
position = { 0.6295, 0.25, -0.44 },
|
||||||
|
width = 290
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[4] = {
|
[4] = {
|
||||||
checkboxes = {
|
checkboxes = {
|
||||||
posZ = -0.05,
|
posZ = -0.05,
|
||||||
count = 2,
|
count = 2,
|
||||||
},
|
|
||||||
textField = {
|
|
||||||
position = { 0.6295, 0.25, -0.44 },
|
|
||||||
width = 290
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[5] = {
|
[5] = {
|
||||||
|
@ -12,6 +12,12 @@
|
|||||||
color="white"/>
|
color="white"/>
|
||||||
<Button class="activeTab"
|
<Button class="activeTab"
|
||||||
color="#ffffff"/>
|
color="#ffffff"/>
|
||||||
|
<Button class="windowButton"
|
||||||
|
hoverClass="bGrey"
|
||||||
|
pressClass="bWhite"
|
||||||
|
selectClass="bWhite"
|
||||||
|
color="#888888"
|
||||||
|
font="font_teutonic-arkham"/>
|
||||||
</Defaults>
|
</Defaults>
|
||||||
|
|
||||||
<!-- window to select downloadable content -->
|
<!-- window to select downloadable content -->
|
||||||
@ -27,13 +33,32 @@
|
|||||||
<!-- window header -->
|
<!-- window header -->
|
||||||
<Panel preferredHeight="60"
|
<Panel preferredHeight="60"
|
||||||
padding="10 10 5 5"
|
padding="10 10 5 5"
|
||||||
|
spacing="10"
|
||||||
outlineSize="2 2"
|
outlineSize="2 2"
|
||||||
outline="#303030"
|
outline="#303030"
|
||||||
color="black">
|
color="black">
|
||||||
<Text fontSize="32"
|
<Text fontSize="32"
|
||||||
font="font_teutonic-arkham"
|
font="font_teutonic-arkham"
|
||||||
|
preferredWidth="600"
|
||||||
alignment="MiddleLeft">Downloadable Content</Text>
|
alignment="MiddleLeft">Downloadable Content</Text>
|
||||||
<Panel>
|
<Button id="downloadAll_button"
|
||||||
|
class="windowButton"
|
||||||
|
visibility="Black"
|
||||||
|
onClick="onClick_downloadAll"
|
||||||
|
height="30"
|
||||||
|
preferredWidth="110"
|
||||||
|
fontSize="20"
|
||||||
|
tooltip="Very rough estimate: 400 MB"
|
||||||
|
tooltipPosition="Above"
|
||||||
|
tooltipBackgroundColor="rgba(0,0,0,1)">Download Everything</Button>
|
||||||
|
<Button id="spawnPlaceholder_button"
|
||||||
|
class="windowButton"
|
||||||
|
visibility="Black"
|
||||||
|
onClick="onClick_spawnPlaceholder"
|
||||||
|
height="30"
|
||||||
|
preferredWidth="110"
|
||||||
|
fontSize="20">Spawn Placeholder</Button>
|
||||||
|
<Panel preferredWidth="50">
|
||||||
<Button rectAlignment="MiddleRight"
|
<Button rectAlignment="MiddleRight"
|
||||||
width="50"
|
width="50"
|
||||||
color="clear"
|
color="clear"
|
||||||
@ -116,15 +141,11 @@
|
|||||||
<Panel preferredHeight="60">
|
<Panel preferredHeight="60">
|
||||||
<!-- download button -->
|
<!-- download button -->
|
||||||
<Button id="download_button"
|
<Button id="download_button"
|
||||||
hoverClass="bGrey"
|
class="windowButton"
|
||||||
pressClass="bWhite"
|
|
||||||
selectClass="bWhite"
|
|
||||||
onClick="onClick_download"
|
onClick="onClick_download"
|
||||||
color="#888888"
|
|
||||||
height="50"
|
height="50"
|
||||||
width="270"
|
width="270"
|
||||||
fontSize="28"
|
fontSize="28">Download</Button>
|
||||||
font="font_teutonic-arkham">Download</Button>
|
|
||||||
<!-- download progress bar -->
|
<!-- download progress bar -->
|
||||||
<ProgressBar id="download_progress"
|
<ProgressBar id="download_progress"
|
||||||
active="false"
|
active="false"
|
||||||
|
Loading…
Reference in New Issue
Block a user