Merge pull request #272 from argonui/phase-tracker
updated Phase Tracker
This commit is contained in:
commit
0c984576e8
@ -169,6 +169,10 @@
|
||||
"TheScarletKeys.300fcc",
|
||||
"Search-A-Card.24051a",
|
||||
"PhaseTracker.d0c8fa",
|
||||
"PhaseTrackerCache.557104",
|
||||
"PhaseTrackerCache.49922d",
|
||||
"PhaseTrackerCache.16832f",
|
||||
"PhaseTrackerCache.645841",
|
||||
"TokenSpawnTracker.e3ffc9",
|
||||
"TokenSource.124381",
|
||||
"GameData.3dbe47",
|
||||
|
@ -20,7 +20,7 @@
|
||||
"HideWhenFaceDown": false,
|
||||
"IgnoreFoW": false,
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": false,
|
||||
"Locked": true,
|
||||
"LuaScript": "require(\"core/GameKeyHandler\")",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
|
@ -18,11 +18,11 @@
|
||||
"Type": 2
|
||||
},
|
||||
"ImageScalar": 1,
|
||||
"ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/933819604050849524/797528309EFBAC7485283048AAB9DA68B8A31891/",
|
||||
"ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/933819604050849085/9E22AFD7B0157140FC177DBCCBCB1D61D6A0329F/",
|
||||
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/933819604050849085/9E22AFD7B0157140FC177DBCCBCB1D61D6A0329F/",
|
||||
"WidthScale": 0
|
||||
},
|
||||
"Description": "",
|
||||
"Description": "Use contextmenu option to enable broadcasting phase changes.\nLeft-click: Next phase\nRight-click: Previous phase",
|
||||
"DragSelectable": true,
|
||||
"GMNotes": "",
|
||||
"GUID": "d0c8fa",
|
||||
@ -33,197 +33,17 @@
|
||||
"IgnoreFoW": false,
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": true,
|
||||
"LuaScriptState": "",
|
||||
"LuaScript_path": "PhaseTracker.d0c8fa.ttslua",
|
||||
"LuaScript": "require(\"accessories/PhaseTracker\")",
|
||||
"LuaScriptState": "{\"broadcastChange\":false,\"phaseId\":1}",
|
||||
"MeasureMovement": false,
|
||||
"Name": "Custom_Tile",
|
||||
"Nickname": "Phase Tracker",
|
||||
"Snap": true,
|
||||
"States": {
|
||||
"2": {
|
||||
"AltLookAngle": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"Autoraise": true,
|
||||
"ColorDiffuse": {
|
||||
"b": 0.0009864086,
|
||||
"g": 0.1132373,
|
||||
"r": 0.0414623022
|
||||
},
|
||||
"CustomImage": {
|
||||
"CustomTile": {
|
||||
"Stackable": false,
|
||||
"Stretch": true,
|
||||
"Thickness": 0.2,
|
||||
"Type": 2
|
||||
},
|
||||
"ImageScalar": 1,
|
||||
"ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/933819604050886219/5987AB68E0D2609CC3831F1311E9070D7189FBA8/",
|
||||
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/933819604050885611/845B5AA915F30492B5F34864698B9C3627FA5763/",
|
||||
"WidthScale": 0
|
||||
},
|
||||
"Description": "",
|
||||
"DragSelectable": true,
|
||||
"GMNotes": "",
|
||||
"GUID": "807ed5",
|
||||
"Grid": true,
|
||||
"GridProjection": false,
|
||||
"Hands": false,
|
||||
"HideWhenFaceDown": false,
|
||||
"IgnoreFoW": false,
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": true,
|
||||
"LuaScript": "function onLoad()\n -- Add a button to the object\n local params = {}\n params.click_function = 'toPhaseThree'\n params.function_owner = self\n params.tooltip = ''\n params.width = 600\n params.height = 600\n self.createButton(params)\nend\n\nfunction toPhaseThree()\n for _, tracker in ipairs(getObjectsWithTag(\"LinkedPhaseTracker\")) do\n tracker.setState(3)\n end\nend",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Name": "Custom_Tile",
|
||||
"Nickname": "Phase Tracker",
|
||||
"Snap": true,
|
||||
"Sticky": true,
|
||||
"Tags": [
|
||||
"LinkedPhaseTracker"
|
||||
],
|
||||
"Tooltip": true,
|
||||
"Transform": {
|
||||
"posX": -11.3,
|
||||
"posY": 1.52,
|
||||
"posZ": -16,
|
||||
"rotX": 0,
|
||||
"rotY": 270,
|
||||
"rotZ": 0,
|
||||
"scaleX": 1.5,
|
||||
"scaleY": 1,
|
||||
"scaleZ": 1.5
|
||||
},
|
||||
"Value": 0,
|
||||
"XmlUI": ""
|
||||
},
|
||||
"3": {
|
||||
"AltLookAngle": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"Autoraise": true,
|
||||
"ColorDiffuse": {
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"r": 0.235188574
|
||||
},
|
||||
"CustomImage": {
|
||||
"CustomTile": {
|
||||
"Stackable": false,
|
||||
"Stretch": true,
|
||||
"Thickness": 0.2,
|
||||
"Type": 2
|
||||
},
|
||||
"ImageScalar": 1,
|
||||
"ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/982233321870235526/32D11CE67CBFB6E1197E540F9CA08F871A500C85/",
|
||||
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/982233321870235122/492996D07ABF6DDA4B605A3013C4892839DCF1F3/",
|
||||
"WidthScale": 0
|
||||
},
|
||||
"Description": "",
|
||||
"DragSelectable": true,
|
||||
"GMNotes": "",
|
||||
"GUID": "b4983b",
|
||||
"Grid": true,
|
||||
"GridProjection": false,
|
||||
"Hands": false,
|
||||
"HideWhenFaceDown": false,
|
||||
"IgnoreFoW": false,
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": true,
|
||||
"LuaScript": "function onLoad()\n -- Add a button to the object\n local params = {}\n params.click_function = 'toPhaseFour'\n params.function_owner = self\n params.tooltip = ''\n params.width = 600\n params.height = 600\n self.createButton(params)\nend\n\nfunction toPhaseFour()\n for _, tracker in ipairs(getObjectsWithTag(\"LinkedPhaseTracker\")) do\n tracker.setState(4)\n end\nend",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Name": "Custom_Tile",
|
||||
"Nickname": "Phase Tracker",
|
||||
"Snap": true,
|
||||
"Sticky": true,
|
||||
"Tags": [
|
||||
"LinkedPhaseTracker"
|
||||
],
|
||||
"Tooltip": true,
|
||||
"Transform": {
|
||||
"posX": -11.3,
|
||||
"posY": 1.52,
|
||||
"posZ": -16,
|
||||
"rotX": 0,
|
||||
"rotY": 270,
|
||||
"rotZ": 0,
|
||||
"scaleX": 1.5,
|
||||
"scaleY": 1,
|
||||
"scaleZ": 1.5
|
||||
},
|
||||
"Value": 0,
|
||||
"XmlUI": ""
|
||||
},
|
||||
"4": {
|
||||
"AltLookAngle": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"Autoraise": true,
|
||||
"ColorDiffuse": {
|
||||
"b": 0,
|
||||
"g": 0.3496273,
|
||||
"r": 0.5313587
|
||||
},
|
||||
"CustomImage": {
|
||||
"CustomTile": {
|
||||
"Stackable": false,
|
||||
"Stretch": true,
|
||||
"Thickness": 0.2,
|
||||
"Type": 2
|
||||
},
|
||||
"ImageScalar": 1,
|
||||
"ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/982233321870237827/81374325F650673C37C89E4E2A1DC25F1C97FED8/",
|
||||
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/982233321870237261/C287CAED2423970F33E72D6C7415CBEC6794C533/",
|
||||
"WidthScale": 0
|
||||
},
|
||||
"Description": "",
|
||||
"DragSelectable": true,
|
||||
"GMNotes": "",
|
||||
"GUID": "d8a337",
|
||||
"Grid": true,
|
||||
"GridProjection": false,
|
||||
"Hands": false,
|
||||
"HideWhenFaceDown": false,
|
||||
"IgnoreFoW": false,
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": true,
|
||||
"LuaScript": "function onLoad()\n -- Add a button to the object\n local params = {}\n params.click_function = 'toPhaseOne'\n params.function_owner = self\n params.tooltip = ''\n params.width = 600\n params.height = 600\n self.createButton(params)\nend\n\nfunction toPhaseOne()\n for _, tracker in ipairs(getObjectsWithTag(\"LinkedPhaseTracker\")) do\n tracker.setState(1)\n end\nend",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Name": "Custom_Tile",
|
||||
"Nickname": "Phase Tracker",
|
||||
"Snap": true,
|
||||
"Sticky": true,
|
||||
"Tags": [
|
||||
"LinkedPhaseTracker"
|
||||
],
|
||||
"Tooltip": true,
|
||||
"Transform": {
|
||||
"posX": -11.3,
|
||||
"posY": 1.52,
|
||||
"posZ": -16,
|
||||
"rotX": 0,
|
||||
"rotY": 270,
|
||||
"rotZ": 0,
|
||||
"scaleX": 1.5,
|
||||
"scaleY": 1,
|
||||
"scaleZ": 1.5
|
||||
},
|
||||
"Value": 0,
|
||||
"XmlUI": ""
|
||||
}
|
||||
},
|
||||
"Sticky": true,
|
||||
"Tags": [
|
||||
"LinkedPhaseTracker"
|
||||
"LinkedPhaseTracker",
|
||||
"CleanUpHelper_ignore",
|
||||
"displacement_excluded"
|
||||
],
|
||||
"Tooltip": true,
|
||||
"Transform": {
|
||||
|
@ -1,16 +0,0 @@
|
||||
function onLoad()
|
||||
-- Add a button to the object
|
||||
local params = {}
|
||||
params.click_function = 'toPhaseTwo'
|
||||
params.function_owner = self
|
||||
params.tooltip = ''
|
||||
params.width = 600
|
||||
params.height = 600
|
||||
self.createButton(params)
|
||||
end
|
||||
|
||||
function toPhaseTwo()
|
||||
for _, tracker in ipairs(getObjectsWithTag("LinkedPhaseTracker")) do
|
||||
tracker.setState(2)
|
||||
end
|
||||
end
|
57
objects/PhaseTrackerCache.16832f.json
Normal file
57
objects/PhaseTrackerCache.16832f.json
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
"AltLookAngle": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"Autoraise": true,
|
||||
"ColorDiffuse": {
|
||||
"b": 0,
|
||||
"g": 0.0083,
|
||||
"r": 0.10623
|
||||
},
|
||||
"CustomImage": {
|
||||
"CustomTile": {
|
||||
"Stackable": false,
|
||||
"Stretch": true,
|
||||
"Thickness": 0.2,
|
||||
"Type": 2
|
||||
},
|
||||
"ImageScalar": 1,
|
||||
"ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/982233321870235122/492996D07ABF6DDA4B605A3013C4892839DCF1F3/",
|
||||
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/982233321870235122/492996D07ABF6DDA4B605A3013C4892839DCF1F3/",
|
||||
"WidthScale": 0
|
||||
},
|
||||
"Description": "",
|
||||
"DragSelectable": true,
|
||||
"GMNotes": "",
|
||||
"GUID": "16832f",
|
||||
"Grid": true,
|
||||
"GridProjection": false,
|
||||
"Hands": false,
|
||||
"HideWhenFaceDown": false,
|
||||
"IgnoreFoW": false,
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": true,
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Name": "Custom_Tile",
|
||||
"Nickname": "Phase Tracker Cache",
|
||||
"Snap": true,
|
||||
"Sticky": true,
|
||||
"Tooltip": true,
|
||||
"Transform": {
|
||||
"posX": 78,
|
||||
"posY": 1.145,
|
||||
"posZ": -38.904,
|
||||
"rotX": 0,
|
||||
"rotY": 90,
|
||||
"rotZ": 0,
|
||||
"scaleX": 0.5,
|
||||
"scaleY": 1,
|
||||
"scaleZ": 0.5
|
||||
},
|
||||
"Value": 0,
|
||||
"XmlUI": ""
|
||||
}
|
57
objects/PhaseTrackerCache.49922d.json
Normal file
57
objects/PhaseTrackerCache.49922d.json
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
"AltLookAngle": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"Autoraise": true,
|
||||
"ColorDiffuse": {
|
||||
"b": 0,
|
||||
"g": 0.0083,
|
||||
"r": 0.10623
|
||||
},
|
||||
"CustomImage": {
|
||||
"CustomTile": {
|
||||
"Stackable": false,
|
||||
"Stretch": true,
|
||||
"Thickness": 0.2,
|
||||
"Type": 2
|
||||
},
|
||||
"ImageScalar": 1,
|
||||
"ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/933819604050885611/845B5AA915F30492B5F34864698B9C3627FA5763/",
|
||||
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/933819604050885611/845B5AA915F30492B5F34864698B9C3627FA5763/",
|
||||
"WidthScale": 0
|
||||
},
|
||||
"Description": "",
|
||||
"DragSelectable": true,
|
||||
"GMNotes": "",
|
||||
"GUID": "49922d",
|
||||
"Grid": true,
|
||||
"GridProjection": false,
|
||||
"Hands": false,
|
||||
"HideWhenFaceDown": false,
|
||||
"IgnoreFoW": false,
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": true,
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Name": "Custom_Tile",
|
||||
"Nickname": "Phase Tracker Cache",
|
||||
"Snap": true,
|
||||
"Sticky": true,
|
||||
"Tooltip": true,
|
||||
"Transform": {
|
||||
"posX": 78,
|
||||
"posY": 1.145,
|
||||
"posZ": -39.995,
|
||||
"rotX": 0,
|
||||
"rotY": 90,
|
||||
"rotZ": 0,
|
||||
"scaleX": 0.5,
|
||||
"scaleY": 1,
|
||||
"scaleZ": 0.5
|
||||
},
|
||||
"Value": 0,
|
||||
"XmlUI": ""
|
||||
}
|
57
objects/PhaseTrackerCache.557104.json
Normal file
57
objects/PhaseTrackerCache.557104.json
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
"AltLookAngle": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"Autoraise": true,
|
||||
"ColorDiffuse": {
|
||||
"b": 0,
|
||||
"g": 0.0083,
|
||||
"r": 0.10623
|
||||
},
|
||||
"CustomImage": {
|
||||
"CustomTile": {
|
||||
"Stackable": false,
|
||||
"Stretch": true,
|
||||
"Thickness": 0.2,
|
||||
"Type": 2
|
||||
},
|
||||
"ImageScalar": 1,
|
||||
"ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/933819604050849085/9E22AFD7B0157140FC177DBCCBCB1D61D6A0329F/",
|
||||
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/933819604050849085/9E22AFD7B0157140FC177DBCCBCB1D61D6A0329F/",
|
||||
"WidthScale": 0
|
||||
},
|
||||
"Description": "",
|
||||
"DragSelectable": true,
|
||||
"GMNotes": "",
|
||||
"GUID": "557104",
|
||||
"Grid": true,
|
||||
"GridProjection": false,
|
||||
"Hands": false,
|
||||
"HideWhenFaceDown": false,
|
||||
"IgnoreFoW": false,
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": true,
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Name": "Custom_Tile",
|
||||
"Nickname": "Phase Tracker Cache",
|
||||
"Snap": true,
|
||||
"Sticky": true,
|
||||
"Tooltip": true,
|
||||
"Transform": {
|
||||
"posX": 78,
|
||||
"posY": 1.145,
|
||||
"posZ": -41.086,
|
||||
"rotX": 0,
|
||||
"rotY": 90,
|
||||
"rotZ": 0,
|
||||
"scaleX": 0.5,
|
||||
"scaleY": 1,
|
||||
"scaleZ": 0.5
|
||||
},
|
||||
"Value": 0,
|
||||
"XmlUI": ""
|
||||
}
|
57
objects/PhaseTrackerCache.645841.json
Normal file
57
objects/PhaseTrackerCache.645841.json
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
"AltLookAngle": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"Autoraise": true,
|
||||
"ColorDiffuse": {
|
||||
"b": 0,
|
||||
"g": 0.0083,
|
||||
"r": 0.10623
|
||||
},
|
||||
"CustomImage": {
|
||||
"CustomTile": {
|
||||
"Stackable": false,
|
||||
"Stretch": true,
|
||||
"Thickness": 0.2,
|
||||
"Type": 2
|
||||
},
|
||||
"ImageScalar": 1,
|
||||
"ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/982233321870237261/C287CAED2423970F33E72D6C7415CBEC6794C533/",
|
||||
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/982233321870237261/C287CAED2423970F33E72D6C7415CBEC6794C533/",
|
||||
"WidthScale": 0
|
||||
},
|
||||
"Description": "",
|
||||
"DragSelectable": true,
|
||||
"GMNotes": "",
|
||||
"GUID": "645841",
|
||||
"Grid": true,
|
||||
"GridProjection": false,
|
||||
"Hands": false,
|
||||
"HideWhenFaceDown": false,
|
||||
"IgnoreFoW": false,
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": true,
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Name": "Custom_Tile",
|
||||
"Nickname": "Phase Tracker Cache",
|
||||
"Snap": true,
|
||||
"Sticky": true,
|
||||
"Tooltip": true,
|
||||
"Transform": {
|
||||
"posX": 78,
|
||||
"posY": 1.145,
|
||||
"posZ": -37.813,
|
||||
"rotX": 0,
|
||||
"rotY": 90,
|
||||
"rotZ": 0,
|
||||
"scaleX": 0.5,
|
||||
"scaleY": 1,
|
||||
"scaleZ": 0.5
|
||||
},
|
||||
"Value": 0,
|
||||
"XmlUI": ""
|
||||
}
|
@ -27,7 +27,7 @@
|
||||
"HideWhenFaceDown": false,
|
||||
"IgnoreFoW": false,
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": false,
|
||||
"Locked": true,
|
||||
"LuaScript": "",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
|
85
src/accessories/PhaseTracker.ttslua
Normal file
85
src/accessories/PhaseTracker.ttslua
Normal file
@ -0,0 +1,85 @@
|
||||
local phaseNames = {
|
||||
"I. Mythos Phase",
|
||||
"II. Investigation Phase",
|
||||
"III. Enemy Phase",
|
||||
"IV. Upkeep Phase"
|
||||
}
|
||||
local phaseImages = {
|
||||
"http://cloud-3.steamusercontent.com/ugc/933819604050849085/9E22AFD7B0157140FC177DBCCBCB1D61D6A0329F/",
|
||||
"http://cloud-3.steamusercontent.com/ugc/933819604050885611/845B5AA915F30492B5F34864698B9C3627FA5763/",
|
||||
"http://cloud-3.steamusercontent.com/ugc/982233321870235122/492996D07ABF6DDA4B605A3013C4892839DCF1F3/",
|
||||
"http://cloud-3.steamusercontent.com/ugc/982233321870237261/C287CAED2423970F33E72D6C7415CBEC6794C533/"
|
||||
}
|
||||
|
||||
function onSave()
|
||||
return JSON.encode({
|
||||
phaseId = phaseId,
|
||||
broadcastChange = broadcastChange
|
||||
})
|
||||
end
|
||||
|
||||
function onLoad(savedData)
|
||||
if savedData and savedData ~= "" then
|
||||
local loadedData = JSON.decode(savedData)
|
||||
phaseId = loadedData.phaseId
|
||||
broadcastChange = loadedData.broadcastChange
|
||||
else
|
||||
phaseId = 1
|
||||
broadcastChange = false
|
||||
end
|
||||
|
||||
self.createButton(
|
||||
{
|
||||
tooltip = "change phase",
|
||||
click_function = 'changeState',
|
||||
function_owner = self,
|
||||
width = 600,
|
||||
height = 600
|
||||
})
|
||||
|
||||
self.addContextMenuItem("toggle broadcasting", updateBroadcast)
|
||||
end
|
||||
|
||||
function updateBroadcast()
|
||||
for _, tracker in ipairs(getObjectsWithTag("LinkedPhaseTracker")) do
|
||||
tracker.setVar("broadcastChange", not broadcastChange)
|
||||
end
|
||||
broadcastToAll("Broadcasting phase changes has been " .. (broadcastChange and "enabled." or "disabled."))
|
||||
end
|
||||
|
||||
function changeState(_, _, isRightClick)
|
||||
-- get newId for all trackers
|
||||
local newId = phaseId + (isRightClick and -1 or 1)
|
||||
if newId == 0 then
|
||||
newId = 4
|
||||
elseif newId == 5 then
|
||||
newId = 1
|
||||
end
|
||||
|
||||
-- broadcast if option is enabled
|
||||
if broadcastChange then
|
||||
broadcastToAll(phaseNames[newId])
|
||||
end
|
||||
|
||||
-- manipulate data and then respawn
|
||||
local data = self.getData()
|
||||
data["CustomImage"]["ImageURL"] = phaseImages[newId]
|
||||
data["CustomImage"]["ImageSecondaryURL"] = phaseImages[newId]
|
||||
data["LuaScriptState"] = "{\"broadcastChange\":" .. tostring(broadcastChange) .. ",\"phaseId\":" .. newId .. "}"
|
||||
|
||||
-- update all trackers with tag
|
||||
for _, tracker in ipairs(getObjectsWithTag("LinkedPhaseTracker")) do
|
||||
local pos = tracker.getPosition()
|
||||
local rot = tracker.getRotation()
|
||||
local scale = tracker.getScale()
|
||||
tracker.destruct()
|
||||
spawnObjectData(
|
||||
{
|
||||
data = data,
|
||||
position = pos,
|
||||
rotation = rot,
|
||||
scale = scale
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user