This repository was archived by the owner on Nov 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoader.js
More file actions
62 lines (55 loc) · 2.24 KB
/
Loader.js
File metadata and controls
62 lines (55 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
This file is part of YouGee.
YouGee is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
YouGee is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with YouGee.
If not, see <https://www.gnu.org/licenses/>.
*/
const URLParams = new URLSearchParams(window.location.search);
var loadedMap;
Global_Name = "YouGee";
$("body").append("<script src=\"Modules/ModuleAdder.js\"></script>");
Module_Add("jquery.overlaps.js", "");
Module_Add("SaveGames.js");
Module_Add("SoundMusic.js");
Module_Add("TextPopups.js");
Module_Add("ElementStuff.js");
if (localStorage.getItem("GameLoop_Bindings") == null) {
localStorage.setItem("GameLoop_Bindings", [37,38,39,40,16,17,32,13]);
}
$(document).ready(function() {
$("body").on("contextmenu", function() {
return false;
});
if (URLParams.has("Secret")) {
Module_Add("Secret.js", "Assets/Remove/");
$.getJSON("Assets/Remove/" + URLParams.get("secret") + ".json", function(JSON) {
Secret_Load(JSON);
});} else if (URLParams.has("BlockBreak")) {
Module_Add("BlockBreak.js");
BlockBreak_Init();
} else if (URLParams.has("Menu")) {
Module_Add("MenuLoader.js");
$.getJSON("Assets/Menus/" + URLParams.get("Menu") + ".json", function(JSON) {
Menu_Load(JSON, false, URLParams.get("Menu"))
});} else if (URLParams.has("StartIntermission")) {
Module_Add("IntermissionPlayer.js");
$.getJSON("Assets/Intermissions/" + URLParams.get("StartIntermission") + ".json", function(JSON) {
Intermission_Play(JSON);
});} else if (URLParams.has("StartMap")) {
Module_Add("MapLoader.js");
Module_Add("GameLoop.js");
$.getJSON("Assets/Maps/" + URLParams.get("startMap") + ".json", function(JSON) {
loadedMap = URLParams.get("startMap");
Map_Load(JSON);
});} else {
Module_Add("IntermissionPlayer.js");
$.getJSON("Assets/Intermissions/Intro.json", function(JSON) {
Intermission_Play(JSON);
});}});