diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2024-01-29 16:20:10 -0600 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2024-01-29 16:20:10 -0600 |
| commit | c2926c5ec74d7e37da395c8c32a7ff2b4cae7d06 (patch) | |
| tree | ac2bb208dab1274cdc5e9059ffe014ae19181a4c /debug/dispatch.lua.X | |
| download | fools_rush_in-c2926c5ec74d7e37da395c8c32a7ff2b4cae7d06.tar.gz fools_rush_in-c2926c5ec74d7e37da395c8c32a7ff2b4cae7d06.tar.bz2 fools_rush_in-c2926c5ec74d7e37da395c8c32a7ff2b4cae7d06.zip | |
All the files
Diffstat (limited to 'debug/dispatch.lua.X')
| -rw-r--r-- | debug/dispatch.lua.X | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/debug/dispatch.lua.X b/debug/dispatch.lua.X new file mode 100644 index 0000000..b8528ee --- /dev/null +++ b/debug/dispatch.lua.X @@ -0,0 +1,50 @@ +Pos Lua >> Moon +28 1:[ local mod = ... ] >> 3:[ mod = ... ] +38 2:[ local char = require("char") ] >> 4:[ char = require "char" ] +80 4:[ KeyInput = char.KeyInput ] >> 5:[ import KeyInput from char ] +86 5:[ local main = require("main") ] >> 6:[ main = require "main" ] +109 6:[ local set_input ] >> 8:[ set_input = (inputs, key, value) -> ] +109 7:[ set_input = function(inputs, key, value) ] >> 8:[ set_input = (inputs, key, value) -> ] +160 8:[ for _index_0 = 1, #inputs do ] >> 9:[ for input in *inputs ] +160 9:[ local input = inputs[_index_0] ] >> 9:[ for input in *inputs ] +171 10:[ if input.key == key then ] >> 10:[ if input.key == key ] +233 11:[ input.value = value ] >> 12:[ input.value = value ] +256 12:[ return ] >> 13:[ return ] +169 13:[ end ] >> 10:[ if input.key == key ] +109 15:[ end ] >> 8:[ set_input = (inputs, key, value) -> ] +264 16:[ local controls = { ] >> 15:[ controls = { ] +284 17:[ right = "right", ] >> 16:[ right: "right", ] +300 18:[ left = "left", ] >> 17:[ left: "left", ] +313 19:[ up = "up", ] >> 18:[ up: "up" ] +325 20:[ jump = "z", ] >> 19:[ jump: "z", ] +337 21:[ down = "down", ] >> 20:[ down: "down" ] +351 22:[ dash = "c", ] >> 21:[ dash: "c" ] +363 23:[ swing = "x" ] >> 22:[ swing: "x" ] +264 24:[ } ] >> 15:[ controls = { ] +371 25:[ mod.control = function(character) ] >> 25:[ mod.control = (character) -> ] +401 26:[ return character.node:action(coroutine.create(function() ] >> 26:[ character.node\action(coroutine.create(() -> ] +453 27:[ while true do ] >> 27:[ while true ] +472 28:[ for k, v in pairs(controls) do ] >> 28:[ for k,v in pairs controls ] +492 29:[ set_input(character.inputs, k, main.win:key_down(v)) ] >> 29:[ set_input(character.inputs,k,main.win\key_down(v)) ] +462 30:[ end ] >> 28:[ for k,v in pairs controls ] +546 31:[ coroutine.yield() ] >> 30:[ coroutine.yield() ] +448 32:[ end ] >> 27:[ while true ] +401 33:[ end)) ] >> 26:[ character.node\action(coroutine.create(() -> ] +371 34:[ end ] >> 25:[ mod.control = (character) -> ] +569 35:[ mod.slime_ai = function(character) ] >> 33:[ mod.slime_ai = (character) -> ] +600 36:[ return character.node:action(coroutine.create(function() ] >> 34:[ character.node\action(coroutine.create(() -> ] +647 37:[ local time_offset = math.random() ] >> 35:[ time_offset = math.random() ] +677 38:[ local last_action = am.current_time() + time_offset ] >> 36:[ last_action = am.current_time() + time_offset ] +730 39:[ while true do ] >> 37:[ while true ] +739 40:[ local time_diff = am.current_time() - last_action ] >> 38:[ time_diff = am.current_time() - last_action ] +788 41:[ if time_diff > 1.3 then ] >> 39:[ if time_diff > 1.3 ] +809 42:[ last_action = am.current_time() + math.random() ] >> 40:[ last_action = am.current_time() + math.random() ] +866 43:[ elseif time_diff > 1.1 then ] >> 41:[ elseif time_diff > 1.1 ] +887 44:[ set_input(character.inputs, "jump_left", false) ] >> 42:[ set_input(character.inputs,"jump_left",false) ] +942 45:[ elseif time_diff > 1 then ] >> 43:[ elseif time_diff > 1 ] +961 46:[ set_input(character.inputs, "jump_left", true) ] >> 44:[ set_input(character.inputs,"jump_left",true) ] +1010 48:[ coroutine.yield() ] >> 46:[ coroutine.yield() ] +725 49:[ end ] >> 37:[ while true ] +600 50:[ end)) ] >> 34:[ character.node\action(coroutine.create(() -> ] +569 51:[ end ] >> 33:[ mod.slime_ai = (character) -> ] +1033 52:[ return mod ] >> 49:[ mod ] |
