-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsimulation-control.lua
93 lines (83 loc) · 2.03 KB
/
simulation-control.lua
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
player = game.simulation.create_test_player({ name = "fufucuddlypoops" })
player.teleport({ -7, 2 })
game.simulation.camera_alt_info = true
game.simulation.camera_player = player
game.simulation.camera_player_cursor_position = { -7, 1.5 }
step_0 = function()
start_tick = game.tick
script.on_nth_tick(1, function()
if game.tick - start_tick > 60 then
step_1()
end
end)
end
step_1 = function()
target_cursor_position = { -4.5, -1.5 }
script.on_nth_tick(1, function()
local finished = game.simulation.move_cursor({ position = target_cursor_position })
if finished then
step_2()
end
end)
end
step_2 = function()
start_tick = game.tick
script.on_nth_tick(1, function()
if game.tick - start_tick > 15 then
remote.call("ChangeInserterDropLane_simulation", "change_selected_lane", player)
step_3()
end
end)
end
step_3 = function()
start_tick = game.tick
script.on_nth_tick(1, function()
if game.tick - start_tick > 15 then
step_4()
end
end)
end
step_4 = function()
target_cursor_position = { -1.5, -1.5 }
script.on_nth_tick(1, function()
local finished = game.simulation.move_cursor({ position = target_cursor_position })
if finished then
step_5()
end
end)
end
step_5 = function()
start_tick = game.tick
script.on_nth_tick(1, function()
if game.tick - start_tick > 15 then
remote.call("ChangeInserterDropLane_simulation", "change_selected_lane", player)
step_6()
end
end)
end
step_6 = function()
start_tick = game.tick
script.on_nth_tick(1, function()
if game.tick - start_tick > 15 then
step_7()
end
end)
end
step_7 = function()
target_cursor_position = { -7, 1.5 }
script.on_nth_tick(1, function()
local finished = game.simulation.move_cursor({ position = target_cursor_position })
if finished then
step_8()
end
end)
end
step_8 = function()
start_tick = game.tick
script.on_nth_tick(1, function()
if game.tick - start_tick > 240 then
step_0()
end
end)
end
step_0()