aboutsummaryrefslogtreecommitdiff
path: root/debug/dispatch.lua.X
blob: b8528eec5ea6a83a0de8cdd12c4f3e225e035ee3 (plain)
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
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 ]