Pos Lua >> Moon 1 1:[ local main = require("main") ] >> 1:[ main = require "main" ] 23 2:[ local world = require("world") ] >> 2:[ world = require "world" ] 47 3:[ local color = require("color") ] >> 3:[ color = require "color" ] 71 4:[ local ui = require("ui") ] >> 4:[ ui = require "ui" ] 89 5:[ local bp = require("broadphase") ] >> 5:[ bp = require "broadphase" ] 115 6:[ local action = require("action") ] >> 6:[ action = require "action" ] 141 7:[ local char = require("char") ] >> 7:[ char = require "char" ] 163 8:[ local player = require("player") ] >> 8:[ player = require "player" ] 189 9:[ local room = require("room") ] >> 9:[ room = require "room" ] 228 11:[ World = world.World ] >> 10:[ import World from world ] 253 13:[ Server = world.Server ] >> 11:[ import Server from world ] 283 15:[ LocalPlayer = player.LocalPlayer ] >> 12:[ import LocalPlayer from player ] 313 17:[ LobbyRoom = room.LobbyRoom ] >> 13:[ import LobbyRoom from room ] 320 18:[ local mod = ... ] >> 15:[ mod = ... ] 331 19:[ mod.node = am.group() ] >> 17:[ mod.node = am.group! ] 352 20:[ mod.node:append(am.translate(0, main.height / 2) ^ am.text("Creating lobby...", color.fg, "center", "top"):tag("join_id")) ] >> 18:[ mod.node\append(am.translate(0,main.height/2)^ am.text("Creating lobby...", color.fg, "center","top")\tag("join_id")) ] 470 21:[ mod.loaded = false ] >> 19:[ mod.loaded = false ] 489 22:[ mod.load = function() ] >> 20:[ mod.load = () -> ] 507 23:[ mod.loaded = true ] >> 21:[ mod.loaded = true ] 526 24:[ print("Loading create party") ] >> 22:[ print("Loading create party") ] 557 25:[ main.root("screen"):append(mod.node) ] >> 23:[ main.root("screen")\append(mod.node) ] 595 26:[ print("About to create server") ] >> 24:[ print("About to create server") ] 628 27:[ main["server"] = Server() ] >> 25:[ main["server"] = Server! ] 654 28:[ print("Created server") ] >> 26:[ print("Created server") ] 679 29:[ mod.node("join_id").text = "Lobby id:" .. main.server.lobby_id ] >> 27:[ mod.node("join_id").text = "Lobby id:" .. main.server.lobby_id ] 743 30:[ print("Set join id text") ] >> 28:[ print("Set join id text") ] 770 31:[ main["world"] = World() ] >> 29:[ main["world"] = World! ] 794 32:[ main.world:set_room(LobbyRoom()) ] >> 30:[ main.world\set_room(LobbyRoom!) ] 827 33:[ print("Created world") ] >> 31:[ print("Created world") ] 851 34:[ main.world:join(main.server.lobby_id) ] >> 32:[ main.world\join(main.server.lobby_id) ] 890 35:[ print("Joined my own lobby") ] >> 33:[ print("Joined my own lobby") ] 920 36:[ local start_button = ui.create_any_button(mod.node, 5, 2, (-32 * 5) / 2, 0) ] >> 34:[ start_button = ui.create_any_button(mod.node,5,2,(-32*5)/2,0) ] 983 37:[ start_button.node("loc"):append(am.scale(1.5) ^ am.translate(12, -10) ^ am.text("GET SILLY", color.fg, "left", "top")) ] >> 35:[ start_button.node("loc")\append(am.scale(1.5)^ am.translate(12,-10)^ am.text("GET SILLY", color.fg, "left", "top")) ] 1100 38:[ local char_selector = ui.create_char_selector2(mod.node) ] >> 36:[ char_selector = ui.create_char_selector2(mod.node) ] 1152 39:[ local char_right, char_left, char_text = char_selector[1], char_selector[2], char_selector[3] ] >> 37:[ char_right, char_left, char_text = char_selector[1], char_selector[2], char_selector[3] ] 1241 40:[ mod.buttons = { ] >> 38:[ mod.buttons = {char_left, char_right, start_button} --save to remove from the physworld later ] 1256 41:[ char_left, ] >> 38:[ mod.buttons = {char_left, char_right, start_button} --save to remove from the physworld later ] 1266 42:[ char_right, ] >> 38:[ mod.buttons = {char_left, char_right, start_button} --save to remove from the physworld later ] 1278 43:[ start_button ] >> 38:[ mod.buttons = {char_left, char_right, start_button} --save to remove from the physworld later ] 1241 44:[ } ] >> 38:[ mod.buttons = {char_left, char_right, start_button} --save to remove from the physworld later ] 1336 45:[ local classes = char.class_order ] >> 39:[ classes = char.class_order ] 1364 46:[ local class_s = 1 ] >> 40:[ class_s = 1 ] 1377 47:[ print("got char selector:", char_selector) ] >> 41:[ print("got char selector:",char_selector) ] 1420 48:[ local touch_indicator = am.group() ] >> 42:[ touch_indicator = am.group! ] 1449 49:[ local touch_cursor = am.sprite("data/cursor.png", vec4(1, 1, 1, 1), "left", "top") ] >> 43:[ touch_cursor = am.sprite("data/cursor.png",vec4(1,1,1,1),"left","top") ] 1521 50:[ local touch_loc = am.translate(0, 0) ^ touch_cursor ] >> 44:[ touch_loc = am.translate(0,0)^ touch_cursor ] 1566 51:[ touch_indicator:append(touch_loc) ] >> 45:[ touch_indicator\append(touch_loc) ] 1667 52:[ start_button.color = color.transparent ] >> 47:[ start_button.color = color.transparent ] 1707 53:[ char_right.color = color.transparent ] >> 48:[ char_right.color = color.transparent ] 1745 54:[ char_left.color = color.transparent ] >> 49:[ char_left.color = color.transparent ] 1782 55:[ mod.node:action("click_interpreter", coroutine.create(function() ] >> 50:[ mod.node\action("click_interpreter",coroutine.create(()-> ] 1847 56:[ while not main.world.client_open() do ] >> 51:[ while not main.world.client_open! ] 1879 57:[ coroutine.yield() ] >> 52:[ coroutine.yield! ] 1842 58:[ end ] >> 51:[ while not main.world.client_open! ] 1898 59:[ char_left.color = color.white ] >> 53:[ char_left.color = color.white ] 1930 60:[ char_right.color = color.white ] >> 54:[ char_right.color = color.white ] 1963 61:[ char_text.text = "Tumbler" ] >> 55:[ char_text.text = "Tumbler" ] 1992 62:[ main.world:set_local(LocalPlayer(am.eval_js("CLIENT.peer._id"), { }, char.classes.Tumbler)) ] >> 56:[ main.world\set_local(LocalPlayer(am.eval_js("CLIENT.peer._id"),{},char.classes.Tumbler)) ] 2083 63:[ main.world:load() ] >> 57:[ main.world\load! ] 2107 64:[ while true do ] >> 58:[ while true ] 2118 65:[ if #main.win:active_touches() > 0 then ] >> 59:[ if #main.win\active_touches! > 0 ] 2154 66:[ local touch = main.win:touch_position(1) ] >> 60:[ touch = main.win\touch_position(1) ] 2193 67:[ touch_cursor.color = vec4(1, 1, 1, 1) ] >> 61:[ touch_cursor.color = vec4(1,1,1,1) ] 2232 68:[ touch_loc.x = touch.x ] >> 62:[ touch_loc.x = touch.x ] 2258 69:[ touch_loc.y = touch.y ] >> 63:[ touch_loc.y = touch.y ] 2284 70:[ local col_but = bp.check(touch.x, touch.y + 64) ] >> 64:[ col_but = bp.check(touch.x, touch.y + 64) ] 2332 71:[ if #col_but > 0 then ] >> 65:[ if #col_but > 0 ] 2351 72:[ touch_cursor.color = vec4(0.5, 0.5, 0.5, 0.5) ] >> 66:[ touch_cursor.color = vec4(0.5,0.5,0.5,0.5) ] 2330 73:[ end ] >> 65:[ if #col_but > 0 ] 2400 74:[ if #col_but > 0 and main.win:touch_began(1) then ] >> 67:[ if #col_but > 0 and main.win\touch_began(1) ] 2449 75:[ if col_but[1] == start_button then ] >> 68:[ if col_but[1] == start_button ] 2483 76:[ print("Starting!") ] >> 69:[ print("Starting!") ] 2508 77:[ action.start_game() ] >> 70:[ action.start_game! ] 2533 78:[ coroutine.yield() ] >> 71:[ coroutine.yield! ] 2447 79:[ end ] >> 68:[ if col_but[1] == start_button ] 2557 80:[ if col_but[1] == char_left then ] >> 72:[ if col_but[1] == char_left ] 2588 81:[ print("char left") ] >> 73:[ print("char left") ] 2613 82:[ class_s = class_s - 1 ] >> 74:[ class_s = class_s - 1 ] 2641 83:[ start_button.color = color.white ] >> 75:[ start_button.color = color.white ] 2682 84:[ if class_s == 0 then ] >> 76:[ if class_s == 0 ] 2703 85:[ class_s = #classes ] >> 77:[ class_s = #classes ] 2680 86:[ end ] >> 76:[ if class_s == 0 ] 2555 87:[ end ] >> 72:[ if col_but[1] == char_left ] 2729 88:[ if col_but[1] == char_right then ] >> 78:[ if col_but[1] == char_right ] 2761 89:[ print("char right") ] >> 79:[ print("char right") ] 2787 90:[ class_s = class_s + 1 ] >> 80:[ class_s = class_s + 1 ] 2815 91:[ start_button.color = color.white ] >> 81:[ start_button.color = color.white ] 2856 92:[ if class_s > #classes then ] >> 82:[ if class_s > #classes ] 2883 93:[ class_s = 1 ] >> 83:[ class_s = 1 ] 2854 94:[ end ] >> 82:[ if class_s > #classes ] 2727 95:[ end ] >> 78:[ if col_but[1] == char_right ] 2902 96:[ if col_but[1] == char_left or col_but[1] == char_right then ] >> 84:[ if col_but[1] == char_left or col_but[1] == char_right ] 2961 97:[ print("class_s", class_s) ] >> 85:[ print("class_s",class_s) ] 2992 98:[ print("classes:", classes) ] >> 86:[ print("classes:", classes) ] 3025 99:[ char_text.text = classes[class_s] ] >> 87:[ char_text.text = classes[class_s] ] 3065 100:[ action.request_class_change(classes[class_s]) ] >> 88:[ action.request_class_change(classes[class_s]) ] 2900 101:[ end ] >> 84:[ if col_but[1] == char_left or col_but[1] == char_right ] 2398 102:[ end ] >> 67:[ if #col_but > 0 and main.win\touch_began(1) ] 3124 104:[ touch_cursor.color = vec4(0, 0, 0, 0) ] >> 91:[ touch_cursor.color = vec4(0,0,0,0) ] 3162 106:[ coroutine.yield() ] >> 92:[ coroutine.yield! ] 2102 107:[ end ] >> 58:[ while true ] 1782 108:[ end)) ] >> 50:[ mod.node\action("click_interpreter",coroutine.create(()-> ] 3184 109:[ return mod.node:append(touch_indicator) ] >> 94:[ mod.node\append(touch_indicator) ] 489 110:[ end ] >> 20:[ mod.load = () -> ] 3218 111:[ mod.unload = function() ] >> 96:[ mod.unload = () -> ] 3238 112:[ print("Unloading create party") ] >> 97:[ print("Unloading create party") ] 3271 113:[ main.root("screen"):remove(mod.node) ] >> 98:[ main.root("screen")\remove(mod.node) ] 3325 114:[ for _, button in pairs(mod.buttons) do ] >> 99:[ for _, button in pairs(mod.buttons) ] 3347 115:[ bp.remove(button) ] >> 100:[ bp.remove(button) ] 3309 116:[ end ] >> 99:[ for _, button in pairs(mod.buttons) ] 3366 117:[ mod.loaded = false ] >> 101:[ mod.loaded = false ] 3218 118:[ end ] >> 96:[ mod.unload = () -> ] 3386 119:[ return mod ] >> 103:[ mod ]