From e35dfd5c4872951f2b13c11349a4993fa001d286 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Wed, 16 Nov 2022 00:23:27 +0100 Subject: [PATCH] using require for the official standalones --- .../AllorNothing.72ab92.json | 2 +- .../AllorNothing.72ab92.ttslua | 22 ----------------- .../BadBlood.451eaa.json | 2 +- .../BadBlood.451eaa.ttslua | 22 ----------------- .../BytheBook.cc7eb3.json | 2 +- .../BytheBook.cc7eb3.ttslua | 22 ----------------- .../ReadorDie.9e73fa.json | 2 +- .../ReadorDie.9e73fa.ttslua | 22 ----------------- .../RedTideRising.5302f2.json | 2 +- .../RedTideRising.5302f2.ttslua | 22 ----------------- .../CarnevaleofHorrors.23dd51.json | 2 +- .../CarnevaleofHorrors.23dd51.ttslua | 24 ------------------- .../CurseoftheRougarou.db7039.json | 2 +- .../CurseoftheRougarou.db7039.ttslua | 24 ------------------- .../FortuneandFolly.0dce91.json | 2 +- .../FortuneandFolly.0dce91.ttslua | 24 ------------------- .../GuardiansoftheAbyss.ee987d.json | 2 +- .../GuardiansoftheAbyss.ee987d.ttslua | 24 ------------------- .../MachinationsThroughTime.3c4f3c.json | 2 +- .../MachinationsThroughTime.3c4f3c.ttslua | 24 ------------------- .../MurderattheExcelsiorHotel.01d780.json | 2 +- .../MurderattheExcelsiorHotel.01d780.ttslua | 24 ------------------- .../TheBlobthatAteEverything.4dee5a.json | 2 +- .../TheBlobthatAteEverything.4dee5a.ttslua | 24 ------------------- .../TheLabyrinthsofLunacy.4c173f.json | 2 +- .../TheLabyrinthsofLunacy.4c173f.ttslua | 24 ------------------- .../WaroftheOuterGods.fc7674.json | 2 +- .../WaroftheOuterGods.fc7674.ttslua | 24 ------------------- src/core/DownloadBox.ttslua | 17 +++++++++++++ 29 files changed, 31 insertions(+), 340 deletions(-) delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/AllorNothing.72ab92.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BadBlood.451eaa.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BytheBook.cc7eb3.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/ReadorDie.9e73fa.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RedTideRising.5302f2.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CarnevaleofHorrors.23dd51.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CurseoftheRougarou.db7039.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/FortuneandFolly.0dce91.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/GuardiansoftheAbyss.ee987d.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MachinationsThroughTime.3c4f3c.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MurderattheExcelsiorHotel.01d780.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheBlobthatAteEverything.4dee5a.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheLabyrinthsofLunacy.4c173f.ttslua delete mode 100644 objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/WaroftheOuterGods.fc7674.ttslua create mode 100644 src/core/DownloadBox.ttslua diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/AllorNothing.72ab92.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/AllorNothing.72ab92.json index b5683fea..f0de2057 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/AllorNothing.72ab92.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/AllorNothing.72ab92.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/AllorNothing.72ab92.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/AllorNothing.72ab92.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "All or Nothing", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/AllorNothing.72ab92.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/AllorNothing.72ab92.ttslua deleted file mode 100644 index fc615914..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/AllorNothing.72ab92.ttslua +++ /dev/null @@ -1,22 +0,0 @@ -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BadBlood.451eaa.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BadBlood.451eaa.json index 376ba584..6b3ed01f 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BadBlood.451eaa.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BadBlood.451eaa.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BadBlood.451eaa.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BadBlood.451eaa.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "Bad Blood", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BadBlood.451eaa.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BadBlood.451eaa.ttslua deleted file mode 100644 index fc615914..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BadBlood.451eaa.ttslua +++ /dev/null @@ -1,22 +0,0 @@ -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BytheBook.cc7eb3.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BytheBook.cc7eb3.json index e5ee2b88..3564d2e6 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BytheBook.cc7eb3.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BytheBook.cc7eb3.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BytheBook.cc7eb3.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BytheBook.cc7eb3.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "By the Book", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BytheBook.cc7eb3.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BytheBook.cc7eb3.ttslua deleted file mode 100644 index fc615914..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/BytheBook.cc7eb3.ttslua +++ /dev/null @@ -1,22 +0,0 @@ -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/ReadorDie.9e73fa.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/ReadorDie.9e73fa.json index 25baca55..14ac97e7 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/ReadorDie.9e73fa.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/ReadorDie.9e73fa.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/ReadorDie.9e73fa.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/ReadorDie.9e73fa.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "Read or Die", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/ReadorDie.9e73fa.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/ReadorDie.9e73fa.ttslua deleted file mode 100644 index fc615914..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/ReadorDie.9e73fa.ttslua +++ /dev/null @@ -1,22 +0,0 @@ -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RedTideRising.5302f2.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RedTideRising.5302f2.json index b524af89..6f0df65e 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RedTideRising.5302f2.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RedTideRising.5302f2.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RedTideRising.5302f2.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RedTideRising.5302f2.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "Red Tide Rising", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RedTideRising.5302f2.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RedTideRising.5302f2.ttslua deleted file mode 100644 index fc615914..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/ChallengeScenarios.9f6801/RedTideRising.5302f2.ttslua +++ /dev/null @@ -1,22 +0,0 @@ -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CarnevaleofHorrors.23dd51.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CarnevaleofHorrors.23dd51.json index 991b7dca..69694ba2 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CarnevaleofHorrors.23dd51.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CarnevaleofHorrors.23dd51.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CarnevaleofHorrors.23dd51.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CarnevaleofHorrors.23dd51.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "Carnevale of Horrors", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CarnevaleofHorrors.23dd51.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CarnevaleofHorrors.23dd51.ttslua deleted file mode 100644 index 64998970..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CarnevaleofHorrors.23dd51.ttslua +++ /dev/null @@ -1,24 +0,0 @@ - -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end - diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CurseoftheRougarou.db7039.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CurseoftheRougarou.db7039.json index efc9bea9..bc9f72bb 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CurseoftheRougarou.db7039.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CurseoftheRougarou.db7039.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CurseoftheRougarou.db7039.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CurseoftheRougarou.db7039.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "Curse of the Rougarou", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CurseoftheRougarou.db7039.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CurseoftheRougarou.db7039.ttslua deleted file mode 100644 index 64998970..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/CurseoftheRougarou.db7039.ttslua +++ /dev/null @@ -1,24 +0,0 @@ - -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end - diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/FortuneandFolly.0dce91.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/FortuneandFolly.0dce91.json index 58713d3b..b2aa78d3 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/FortuneandFolly.0dce91.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/FortuneandFolly.0dce91.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/FortuneandFolly.0dce91.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/FortuneandFolly.0dce91.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "Fortune and Folly", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/FortuneandFolly.0dce91.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/FortuneandFolly.0dce91.ttslua deleted file mode 100644 index 64998970..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/FortuneandFolly.0dce91.ttslua +++ /dev/null @@ -1,24 +0,0 @@ - -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end - diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/GuardiansoftheAbyss.ee987d.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/GuardiansoftheAbyss.ee987d.json index a648480e..f82ac8c7 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/GuardiansoftheAbyss.ee987d.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/GuardiansoftheAbyss.ee987d.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/GuardiansoftheAbyss.ee987d.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/GuardiansoftheAbyss.ee987d.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "Guardians of the Abyss", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/GuardiansoftheAbyss.ee987d.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/GuardiansoftheAbyss.ee987d.ttslua deleted file mode 100644 index 64998970..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/GuardiansoftheAbyss.ee987d.ttslua +++ /dev/null @@ -1,24 +0,0 @@ - -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end - diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MachinationsThroughTime.3c4f3c.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MachinationsThroughTime.3c4f3c.json index b256c8ba..de04b076 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MachinationsThroughTime.3c4f3c.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MachinationsThroughTime.3c4f3c.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MachinationsThroughTime.3c4f3c.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MachinationsThroughTime.3c4f3c.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "Machinations Through Time", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MachinationsThroughTime.3c4f3c.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MachinationsThroughTime.3c4f3c.ttslua deleted file mode 100644 index 64998970..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MachinationsThroughTime.3c4f3c.ttslua +++ /dev/null @@ -1,24 +0,0 @@ - -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end - diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MurderattheExcelsiorHotel.01d780.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MurderattheExcelsiorHotel.01d780.json index f87bbdaa..a8e62339 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MurderattheExcelsiorHotel.01d780.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MurderattheExcelsiorHotel.01d780.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MurderattheExcelsiorHotel.01d780.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MurderattheExcelsiorHotel.01d780.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "Murder at the Excelsior Hotel", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MurderattheExcelsiorHotel.01d780.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MurderattheExcelsiorHotel.01d780.ttslua deleted file mode 100644 index 64998970..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/MurderattheExcelsiorHotel.01d780.ttslua +++ /dev/null @@ -1,24 +0,0 @@ - -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end - diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheBlobthatAteEverything.4dee5a.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheBlobthatAteEverything.4dee5a.json index ddeadf95..dccdd792 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheBlobthatAteEverything.4dee5a.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheBlobthatAteEverything.4dee5a.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheBlobthatAteEverything.4dee5a.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheBlobthatAteEverything.4dee5a.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "The Blob that Ate Everything", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheBlobthatAteEverything.4dee5a.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheBlobthatAteEverything.4dee5a.ttslua deleted file mode 100644 index 64998970..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheBlobthatAteEverything.4dee5a.ttslua +++ /dev/null @@ -1,24 +0,0 @@ - -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end - diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheLabyrinthsofLunacy.4c173f.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheLabyrinthsofLunacy.4c173f.json index a32ed88a..96f95ca4 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheLabyrinthsofLunacy.4c173f.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheLabyrinthsofLunacy.4c173f.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheLabyrinthsofLunacy.4c173f.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheLabyrinthsofLunacy.4c173f.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "The Labyrinths of Lunacy", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheLabyrinthsofLunacy.4c173f.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheLabyrinthsofLunacy.4c173f.ttslua deleted file mode 100644 index 64998970..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/TheLabyrinthsofLunacy.4c173f.ttslua +++ /dev/null @@ -1,24 +0,0 @@ - -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end - diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/WaroftheOuterGods.fc7674.json b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/WaroftheOuterGods.fc7674.json index 6a0103be..ac70caa5 100644 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/WaroftheOuterGods.fc7674.json +++ b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/WaroftheOuterGods.fc7674.json @@ -63,7 +63,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/WaroftheOuterGods.fc7674.luascriptstate", - "LuaScript_path": "OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/WaroftheOuterGods.fc7674.ttslua", + "LuaScript": "require(\"core/DownloadBox\")", "MeasureMovement": false, "Name": "Custom_Model", "Nickname": "War of the Outer Gods", diff --git a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/WaroftheOuterGods.fc7674.ttslua b/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/WaroftheOuterGods.fc7674.ttslua deleted file mode 100644 index 64998970..00000000 --- a/objects/OfficialStandaloneChallengeScenarios.0ef5c8/StandaloneScenarios.77a5f9/WaroftheOuterGods.fc7674.ttslua +++ /dev/null @@ -1,24 +0,0 @@ - -function onload(saved_data) - createDownloadButton() -end - - ---Beginning Setup - - ---Make Download button -function createDownloadButton() - self.createButton({ - label="Download", click_function="buttonClick_download", function_owner=self, - position={0,0.1,2.2}, rotation={0,0,0}, height=240, width=800, - font_size=150, color={0,0,0}, font_color={1,1,1} - }) -end - ---Triggered by download button, -function buttonClick_download() - local params = { url = self.getGMNotes(), replace = self.guid } - Global.call('placeholder_download', params) -end - diff --git a/src/core/DownloadBox.ttslua b/src/core/DownloadBox.ttslua new file mode 100644 index 00000000..eceabbbb --- /dev/null +++ b/src/core/DownloadBox.ttslua @@ -0,0 +1,17 @@ +function onLoad() + self.createButton({ + label = "Download", + click_function = "buttonClick_download", + function_owner = self, + position = { 0, 0.1, 2.2 }, + height = 240, + width = 800, + font_size = 150, + color = { 0, 0, 0 }, + font_color = { 1, 1, 1 } + }) +end + +function buttonClick_download() + Global.call('placeholder_download', { url = self.getGMNotes(), replace = self.guid }) +end