/
INTERACT.lua
54 lines (40 loc) · 971 Bytes
/
INTERACT.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
-- Default interaction script. You may edit this directly, or
-- create additional files to point to.
--
-- Called every time interactive mode starts again.
-- Keep state with global variables.
--
-- One way of using the 'interact' method is
-- a custom callback that occurs every time Ctrl-C is pressed.
--
--
-- Configuration
--
--long_print_on() -- Print objects over multiple lines in repl_run()
--
-- Event loggers
--
function on_new_network(id)
end
function on_save_network(id)
end
function on_load_network(id)
end
function on_add(id)
end
function on_unfollow(id1, id2)
end
function on_follow(id1, id2)
end
function on_tweet(id1, id2)
end
function on_exit()
end
--
-- Interaction (ie, what happens when ctrl-C is pressed)
--
function on_interact() -- Return true to continue, false to exit
print("Welcome to Simulator Interactive Mode.")
print("Type exit() or quit() to (gracefully) finish the simulation.")
return repl_run()
end