gdjs.FunctionsCode = {}; gdjs.FunctionsCode.localVariables = []; gdjs.FunctionsCode.idToCallbackMap = new Map(); gdjs.FunctionsCode.forEachIndex2 = 0; gdjs.FunctionsCode.forEachObjects2 = []; gdjs.FunctionsCode.forEachTemporary2 = null; gdjs.FunctionsCode.forEachTotalCount2 = 0; gdjs.FunctionsCode.GDtxt_9595debugObjects1= []; gdjs.FunctionsCode.GDtxt_9595debugObjects2= []; gdjs.FunctionsCode.GDtxt_9595debugObjects3= []; gdjs.FunctionsCode.GDtxt_9595debugObjects4= []; gdjs.FunctionsCode.GDtxt_9595debugObjects5= []; gdjs.FunctionsCode.GDspr_9595playerObjects1= []; gdjs.FunctionsCode.GDspr_9595playerObjects2= []; gdjs.FunctionsCode.GDspr_9595playerObjects3= []; gdjs.FunctionsCode.GDspr_9595playerObjects4= []; gdjs.FunctionsCode.GDspr_9595playerObjects5= []; gdjs.FunctionsCode.GDspr_9595otherPlayersObjects1= []; gdjs.FunctionsCode.GDspr_9595otherPlayersObjects2= []; gdjs.FunctionsCode.GDspr_9595otherPlayersObjects3= []; gdjs.FunctionsCode.GDspr_9595otherPlayersObjects4= []; gdjs.FunctionsCode.GDspr_9595otherPlayersObjects5= []; gdjs.FunctionsCode.GDspr_9595doorObjects1= []; gdjs.FunctionsCode.GDspr_9595doorObjects2= []; gdjs.FunctionsCode.GDspr_9595doorObjects3= []; gdjs.FunctionsCode.GDspr_9595doorObjects4= []; gdjs.FunctionsCode.GDspr_9595doorObjects5= []; gdjs.FunctionsCode.GDbtn_9595LogoutObjects1= []; gdjs.FunctionsCode.GDbtn_9595LogoutObjects2= []; gdjs.FunctionsCode.GDbtn_9595LogoutObjects3= []; gdjs.FunctionsCode.GDbtn_9595LogoutObjects4= []; gdjs.FunctionsCode.GDbtn_9595LogoutObjects5= []; gdjs.FunctionsCode.GDbtn_9595FullscreenObjects1= []; gdjs.FunctionsCode.GDbtn_9595FullscreenObjects2= []; gdjs.FunctionsCode.GDbtn_9595FullscreenObjects3= []; gdjs.FunctionsCode.GDbtn_9595FullscreenObjects4= []; gdjs.FunctionsCode.GDbtn_9595FullscreenObjects5= []; gdjs.FunctionsCode.mapOfGDgdjs_9546FunctionsCode_9546GDspr_95959595otherPlayersObjects4Objects = Hashtable.newFrom({"spr_otherPlayers": gdjs.FunctionsCode.GDspr_9595otherPlayersObjects4}); gdjs.FunctionsCode.eventsList0 = function(runtimeScene, asyncObjectsList) { { let isConditionTrue_0 = false; isConditionTrue_0 = false; {isConditionTrue_0 = (runtimeScene.getScene().getVariables().getFromIndex(3).getChild("id").getAsString() != runtimeScene.getGame().getVariables().getFromIndex(0).getChild(0).getChild("id").getAsString()); } if (isConditionTrue_0) { gdjs.FunctionsCode.GDspr_9595otherPlayersObjects4.length = 0; {gdjs.evtTools.object.createObjectOnScene(runtimeScene, gdjs.FunctionsCode.mapOfGDgdjs_9546FunctionsCode_9546GDspr_95959595otherPlayersObjects4Objects, runtimeScene.getScene().getVariables().getFromIndex(3).getChild("x").getAsNumber(), runtimeScene.getScene().getVariables().getFromIndex(3).getChild("y").getAsNumber(), ""); } {for(var i = 0, len = gdjs.FunctionsCode.GDspr_9595otherPlayersObjects4.length ;i < len;++i) { gdjs.FunctionsCode.GDspr_9595otherPlayersObjects4[i].setColor(runtimeScene.getScene().getVariables().getFromIndex(3).getChild("color").getAsString()); } } {for(var i = 0, len = gdjs.FunctionsCode.GDspr_9595otherPlayersObjects4.length ;i < len;++i) { gdjs.FunctionsCode.GDspr_9595otherPlayersObjects4[i].returnVariable(gdjs.FunctionsCode.GDspr_9595otherPlayersObjects4[i].getVariables().getFromIndex(0)).setNumber(runtimeScene.getScene().getVariables().getFromIndex(3).getChild("id").getAsNumber()); } } } } };gdjs.FunctionsCode.eventsList1 = function(runtimeScene, asyncObjectsList) { { const keyIteratorReference3 = runtimeScene.getScene().getVariables().getFromIndex(4); const valueIteratorReference3 = runtimeScene.getScene().getVariables().getFromIndex(3); const iterableReference3 = runtimeScene.getScene().getVariables().getFromIndex(1); if(!iterableReference3.isPrimitive()) { for( const iteratorKey3 in iterableReference3.getType() === "structure" ? iterableReference3.getAllChildren() : iterableReference3.getType() === "array" ? iterableReference3.getAllChildrenArray() : [] ) { if(iterableReference3.getType() === "structure") keyIteratorReference3.setString(iteratorKey3); else if(iterableReference3.getType() === "array") keyIteratorReference3.setNumber(iteratorKey3); const structureChildVariable3 = iterableReference3.getChild(iteratorKey3) valueIteratorReference3.castTo(structureChildVariable3.getType()) if(structureChildVariable3.isPrimitive()) { valueIteratorReference3.setValue(structureChildVariable3.getValue()); } else if (structureChildVariable3.getType() === "structure") { // Structures are passed by reference like JS objects valueIteratorReference3.replaceChildren(structureChildVariable3.getAllChildren()); } else if (structureChildVariable3.getType() === "array") { // Arrays are passed by reference like JS objects valueIteratorReference3.replaceChildrenArray(structureChildVariable3.getAllChildrenArray()); } else console.warn("Cannot identify type: ", type); let isConditionTrue_0 = false; if (true) { { //Subevents: gdjs.FunctionsCode.eventsList0(runtimeScene, asyncObjectsList);} //Subevents end. } } } } };gdjs.FunctionsCode.asyncCallback13872876 = function (runtimeScene, asyncObjectsList) { asyncObjectsList.restoreLocalVariablesContainers(gdjs.FunctionsCode.localVariables); {gdjs.evtTools.network.jsonToVariableStructure(runtimeScene.getScene().getVariables().getFromIndex(0).getAsString(), runtimeScene.getScene().getVariables().getFromIndex(1)); } {gdjs.evtsExt__MQTT__connect.func(runtimeScene, runtimeScene.getGame().getVariables().getFromIndex(2).getAsString(), "", false, null); } { //Subevents gdjs.FunctionsCode.eventsList1(runtimeScene, asyncObjectsList);} //End of subevents gdjs.FunctionsCode.localVariables.length = 0; } gdjs.FunctionsCode.idToCallbackMap.set(13872876, gdjs.FunctionsCode.asyncCallback13872876); gdjs.FunctionsCode.eventsList2 = function(runtimeScene) { { { { const asyncObjectsList = new gdjs.LongLivedObjectsList(); asyncObjectsList.backupLocalVariablesContainers(gdjs.FunctionsCode.localVariables); runtimeScene.getAsyncTasksManager().addTask(gdjs.evtTools.runtimeScene.wait(0.1), (runtimeScene) => (gdjs.FunctionsCode.asyncCallback13872876(runtimeScene, asyncObjectsList)), 13872876, asyncObjectsList); } } } };gdjs.FunctionsCode.eventsList3 = function(runtimeScene) { { let isConditionTrue_0 = false; isConditionTrue_0 = false; isConditionTrue_0 = gdjs.evtTools.runtimeScene.sceneJustBegins(runtimeScene); if (isConditionTrue_0) { gdjs.copyArray(runtimeScene.getObjects("spr_player"), gdjs.FunctionsCode.GDspr_9595playerObjects1); {for(var i = 0, len = gdjs.FunctionsCode.GDspr_9595playerObjects1.length ;i < len;++i) { gdjs.FunctionsCode.GDspr_9595playerObjects1[i].setColor(runtimeScene.getGame().getVariables().getFromIndex(0).getChild(0).getChild("color").getAsString()); } } {gdjs.evtTools.network.sendAsyncRequest(runtimeScene.getGame().getVariables().getFromIndex(1).getAsString() + "/users/" + runtimeScene.getGame().getVariables().getFromIndex(0).getChild(0).getChild("id").getAsString(), "{\"x\":\"" + gdjs.evtTools.common.toString(Math.round((( gdjs.FunctionsCode.GDspr_9595playerObjects1.length === 0 ) ? 0 :gdjs.FunctionsCode.GDspr_9595playerObjects1[0].getPointX("")))) + "\",\"y\":\"" + gdjs.evtTools.common.toString(Math.round((( gdjs.FunctionsCode.GDspr_9595playerObjects1.length === 0 ) ? 0 :gdjs.FunctionsCode.GDspr_9595playerObjects1[0].getPointY("")))) + "\"}", "PATCH", "application/json", gdjs.VariablesContainer.badVariable, gdjs.VariablesContainer.badVariable); } {gdjs.evtTools.network.sendAsyncRequest(runtimeScene.getGame().getVariables().getFromIndex(1).getAsString() + "/users?online=true&room=" + gdjs.evtTools.runtimeScene.getSceneName(runtimeScene), "", "GET", "", runtimeScene.getScene().getVariables().getFromIndex(0), gdjs.VariablesContainer.badVariable); } { //Subevents gdjs.FunctionsCode.eventsList2(runtimeScene);} //End of subevents } } };gdjs.FunctionsCode.mapOfGDgdjs_9546FunctionsCode_9546GDspr_95959595otherPlayersObjects2Objects = Hashtable.newFrom({"spr_otherPlayers": gdjs.FunctionsCode.GDspr_9595otherPlayersObjects2}); gdjs.FunctionsCode.eventsList4 = function(runtimeScene) { };gdjs.FunctionsCode.eventsList5 = function(runtimeScene) { { gdjs.copyArray(runtimeScene.getObjects("spr_otherPlayers"), gdjs.FunctionsCode.GDspr_9595otherPlayersObjects1); for (gdjs.FunctionsCode.forEachIndex2 = 0;gdjs.FunctionsCode.forEachIndex2 < gdjs.FunctionsCode.GDspr_9595otherPlayersObjects1.length;++gdjs.FunctionsCode.forEachIndex2) { gdjs.FunctionsCode.GDspr_9595otherPlayersObjects2.length = 0; gdjs.FunctionsCode.forEachTemporary2 = gdjs.FunctionsCode.GDspr_9595otherPlayersObjects1[gdjs.FunctionsCode.forEachIndex2]; gdjs.FunctionsCode.GDspr_9595otherPlayersObjects2.push(gdjs.FunctionsCode.forEachTemporary2); let isConditionTrue_0 = false; isConditionTrue_0 = false; for (var i = 0, k = 0, l = gdjs.FunctionsCode.GDspr_9595otherPlayersObjects2.length;i