This commit is contained in:
Karl 2025-07-16 15:57:25 +02:00 committed by GitHub
commit f03926424a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 59 additions and 49 deletions

View file

@ -1,11 +1,11 @@
define([
"Game/" + GLOBALS.context + "/Physics/Engine",
"Game/" + GLOBALS.context + "/Loader/TiledLevel",
"Game/" + GLOBALS.context + "/Player",
"Game/" + App.context + "/Physics/Engine",
"Game/" + App.context + "/Loader/TiledLevel",
"Game/" + App.context + "/Player",
"Lib/Utilities/NotificationCenter",
"Game/" + GLOBALS.context + "/GameObjects/Doll",
"Game/" + GLOBALS.context + "/GameObjects/GameObject",
"Game/" + GLOBALS.context + "/GameObjects/Item",
"Game/" + App.context + "/GameObjects/Doll",
"Game/" + App.context + "/GameObjects/GameObject",
"Game/" + App.context + "/GameObjects/Item",
"Lib/Utilities/Assert",
],

View file

@ -1,10 +1,10 @@
define([
"Game/" + GLOBALS.context + "/GameObjects/GameObject",
"Game/" + App.context + "/GameObjects/GameObject",
"Lib/Utilities/Exception",
"Lib/Vendor/Box2D",
"Game/Config/Settings",
"Game/" + GLOBALS.context + "/Collision/Detector",
"Game/" + GLOBALS.context + "/GameObjects/Item",
"Game/" + App.context + "/Collision/Detector",
"Game/" + App.context + "/GameObjects/Item",
"Lib/Utilities/NotificationCenter",
"Lib/Utilities/Assert"
],

View file

@ -1,5 +1,5 @@
define([
"Game/" + GLOBALS.context + "/GameObjects/GameObject",
"Game/" + App.context + "/GameObjects/GameObject",
"Lib/Vendor/Box2D",
"Lib/Utilities/OptionsHelper",
"Game/Config/Settings",

View file

@ -1,5 +1,5 @@
define([
"Game/" + GLOBALS.context + "/GameObjects/Item",
"Game/" + App.context + "/GameObjects/Item",
"Lib/Vendor/Box2D",
"Game/Config/Settings",
"Lib/Utilities/NotificationCenter",

View file

@ -1,5 +1,5 @@
define([
"Game/" + GLOBALS.context + "/GameObjects/Item",
"Game/" + App.context + "/GameObjects/Item",
"Lib/Vendor/Box2D",
"Game/Config/Settings"
],

View file

@ -1,5 +1,5 @@
define([
"Game/" + GLOBALS.context + "/GameObjects/Item",
"Game/" + App.context + "/GameObjects/Item",
"Lib/Vendor/RubeLoader",
"Lib/Vendor/Box2D",
"Game/Config/Settings",

View file

@ -1,5 +1,5 @@
define([
"Game/" + GLOBALS.context + "/GameObjects/Item",
"Game/" + App.context + "/GameObjects/Item",
"Lib/Vendor/Box2D",
"Game/Config/Settings",
"Lib/Utilities/Assert"
@ -89,7 +89,7 @@ function (Parent, Box2D, Settings, Assert) {
/*
define([
"Game/" + GLOBALS.context + "/GameObjects/Item",
"Game/" + App.context + "/GameObjects/Item",
"Lib/Vendor/Box2D",
"Game/Config/Settings",
"Lib/Utilities/Assert"

View file

@ -1,5 +1,5 @@
define([
"Game/" + GLOBALS.context + "/GameObjects/GameObject",
"Game/" + App.context + "/GameObjects/GameObject",
"Lib/Vendor/Box2D"
],

View file

@ -1,5 +1,5 @@
define([
"Game/" + GLOBALS.context + "/GameObjects/GameObject",
"Game/" + App.context + "/GameObjects/GameObject",
"Lib/Vendor/Box2D",
"Game/Config/Settings",
"Lib/Utilities/Exception",

View file

@ -3,12 +3,12 @@ define([
"Lib/Vendor/Box2D",
"Lib/Utilities/NotificationCenter",
"Lib/Utilities/Abstract",
"Game/" + GLOBALS.context + "/Collision/Detector",
"Game/" + GLOBALS.context + "/GameObjects/Tile",
"Game/" + GLOBALS.context + "/GameObjects/Item",
"Game/" + GLOBALS.context + "/GameObjects/Items/Skateboard",
"Game/" + GLOBALS.context + "/GameObjects/Items/RagDoll",
"Game/" + GLOBALS.context + "/GameObjects/Items/RubeDoll"
"Game/" + App.context + "/Collision/Detector",
"Game/" + App.context + "/GameObjects/Tile",
"Game/" + App.context + "/GameObjects/Item",
"Game/" + App.context + "/GameObjects/Items/Skateboard",
"Game/" + App.context + "/GameObjects/Items/RagDoll",
"Game/" + App.context + "/GameObjects/Items/RubeDoll"
], function (Settings, Box2D, nc, Abstract, CollisionDetector, Tile, Item, Skateboard, RagDoll, RubeDoll) {

View file

@ -1,5 +1,5 @@
define([
"Game/" + GLOBALS.context + "/Loader/Level",
"Game/" + App.context + "/Loader/Level",
"Game/Config/Settings",
"Game/Config/ItemSettings",
"Lib/Vendor/Box2D",
@ -8,10 +8,10 @@ define([
"Lib/Utilities/NotificationCenter",
"Lib/Utilities/Assert",
"Game/Client/View/Abstract/Layer",
"Game/" + GLOBALS.context + "/Collision/Detector",
"Game/" + GLOBALS.context + "/GameObjects/Tile",
"Game/" + GLOBALS.context + "/GameObjects/Item",
"Game/" + GLOBALS.context + "/GameObjects/Items/Skateboard",
"Game/" + App.context + "/Collision/Detector",
"Game/" + App.context + "/GameObjects/Tile",
"Game/" + App.context + "/GameObjects/Item",
"Game/" + App.context + "/GameObjects/Items/Skateboard",
], function (Parent, Settings, ItemSettings, Box2D, optionsHelper, Exception, nc, Assert, AbstractLayer, CollisionDetector, Tile, Item, Skateboard) {

View file

@ -1,7 +1,7 @@
define([
"Game/Config/Settings",
"Lib/Vendor/Box2D",
"Game/" + GLOBALS.context + "/Collision/Detector",
"Game/" + App.context + "/Collision/Detector",
"Lib/Utilities/NotificationCenter"
],

View file

@ -1,12 +1,12 @@
define([
"Game/" + GLOBALS.context + "/GameObjects/Doll",
"Game/" + GLOBALS.context + "/Control/PlayerController",
"Game/" + App.context + "/GameObjects/Doll",
"Game/" + App.context + "/Control/PlayerController",
"Game/Config/Settings",
"Lib/Utilities/NotificationCenter",
"Lib/Utilities/Exception",
"Lib/Utilities/ColorConverter",
"Game/" + GLOBALS.context + "/GameObjects/SpectatorDoll",
"Game/" + GLOBALS.context + "/GameObjects/Items/RubeDoll"
"Game/" + App.context + "/GameObjects/SpectatorDoll",
"Game/" + App.context + "/GameObjects/Items/RubeDoll"
],
function (Doll, PlayerController, Settings, nc, Exception, ColorConverter, SpectatorDoll, RubeDoll) {

View file

@ -1,4 +1,7 @@
GLOBALS = { context: "Channel" };
// "use strict"; intentionally omitted as App scope workaround
Error.stackTraceLimit = Infinity;
var requirejs = require('requirejs');
requirejs.config({
@ -11,14 +14,17 @@ requirejs.config({
},
});
var inspector = {};
App = {};
App.inspector = {};
App.context = "Channel";
requirejs([
"Game/Channel/PipeToServer"
],
],
function (PipeToServer) {
var PipeToServer = new PipeToServer(process);
inspector.PipeToServer = PipeToServer;
App.inspector.PipeToServer = PipeToServer;
});

View file

@ -1,6 +1,6 @@
"use strict";
var GLOBALS = { context: "Client" };
Error.stackTraceLimit = Infinity;
requirejs.config({
baseUrl: 'app',
@ -15,8 +15,9 @@ requirejs.config({
},
});
if(!Chuck) var Chuck = {};
Chuck.inspector = {};
var App = App || {};
App.inspector = {};
App.context = "Client";
requirejs([
"Game/Client/Networker",
@ -36,10 +37,10 @@ function (Networker, io, Settings, Exception, nc, Menu) {
};
var socket = io("/", options);
var networker = new Networker(socket, channelName, nickname);
Chuck.inspector.networker = networker;
Chuck.inspector.settings = Settings;
Chuck.inspector.nc = nc;
Chuck.inspector.resetLevel = function() { networker.sendGameCommand("resetLevel"); }
App.inspector.networker = networker;
App.inspector.settings = Settings;
App.inspector.nc = nc;
App.inspector.resetLevel = function() { networker.sendGameCommand("resetLevel"); }
}
menu.init();
});

View file

@ -10,7 +10,7 @@
name: "../client",
out: "../build/client.min.js",
onBuildRead: function (moduleName, path, contents) {
var contents = contents.replace(/\" \+ GLOBALS.context \+ \"/g, "Client");
var contents = contents.replace(/\" \+ App.context \+ \"/g, "Client");
return contents;
}
})

View file

@ -1,10 +1,13 @@
"use strict"
var GLOBALS = { context: "Channel" };
Error.stackTraceLimit = Infinity;
var requirejs = require('requirejs');
var fs = require('fs');
var inspector;
var App = App || {};
App.inspector = {};
App.context = "Channel";
requirejs.config({
nodeRequire: require,
@ -41,11 +44,11 @@ function (HttpServer, Socket, Coordinator, Settings) {
var httpServer = new HttpServer(options, coordinator);
var socket = new Socket(httpServer.getServer(), options, coordinator);
inspector = {
App.inspector = {
coordinator: coordinator,
httpServer: httpServer,
socket: socket
}
});
exports = module.exports = inspector;
exports = module.exports = App;