Open Benjamin-Dobell opened 4 years ago
Describe the bug
When spawning a custom CardCustom using spawnObjectJSON, loading_custom remains as true indefinitely i.e. after the card texture has visibly loaded.
CardCustom
spawnObjectJSON
loading_custom
true
To Reproduce
Expected behavior
Should see in Game chat tab:
Loading complete for Card Loading complete for CardCustom
Actual behavior
Instead seeing:
Loading complete for Card Loading failed to complete for CardCustom. spawning = false, loading_custom = true
Lua Scripts:
Global:
local function waitUntilLoadedCallback(object) Wait.condition(function() local name = JSON.decode(object.getJSON()).Name print('Loading complete for ' .. name) end, function() return not object.spawning and not object.loading_custom end, 10, function() local name = JSON.decode(object.getJSON()).Name print('Loading failed to complete for ' .. name .. '. spawning = ' .. tostring(object.spawning) .. ' loading_custom = ' .. tostring(object.loading_custom)) end) end function onLoad() local jsonRepresentation = { Name = "Card", Transform = { posX = 0, posY = 3, posZ = 0, rotX = 0, rotY = 180, rotZ = 0, scaleX = 1, scaleY = 1.2, scaleZ = 1.4 }, Nickname = "Test Card", Hands = true, CardID = 2111, CustomDeck = { ["21"] = { FaceURL = "https://kb.tabletopsimulator.com/img/custom-deck/template-sheet.png", BackURL = "https://kb.tabletopsimulator.com/img/custom-deck/template-sheet.png", NumWidth = 10, NumHeight = 7, BackIsHidden = true, UniqueBack = true } } } spawnObjectJSON({ json = JSON.encode(jsonRepresentation), callback_function = waitUntilLoadedCallback }) jsonRepresentation.Name = "CardCustom" jsonRepresentation.Transform.posX = 2 spawnObjectJSON({ json = JSON.encode(jsonRepresentation), callback_function = waitUntilLoadedCallback }) end
Tabletop Simulator Info (please complete the following information):
Known workarounds
None.
Additional context
Likely arose in 12.2.2 as changes were made in this area to attempt to address https://github.com/tts-community/tts-community-bug-tracker/issues/12.
Just noting that this still happens on 12.4.3 - in Linux :(
Describe the bug
When spawning a custom
CardCustom
usingspawnObjectJSON
,loading_custom
remains astrue
indefinitely i.e. after the card texture has visibly loaded.To Reproduce
Expected behavior
Should see in Game chat tab:
Actual behavior
Instead seeing:
Lua Scripts:
Global:
Tabletop Simulator Info (please complete the following information):
Known workarounds
None.
Additional context
Likely arose in 12.2.2 as changes were made in this area to attempt to address https://github.com/tts-community/tts-community-bug-tracker/issues/12.