1 # internal functions used by Elidragon v2 scripts
4 echo "/tmp/ElidragonV2_$1_lock"
7 function world_screenname {
8 echo "Elidragon v2 - $1"
12 kill `cat \`world_lock $1\``
16 return $(test -f `world_lock $1`)
19 function loop_worlds {
21 for WORLD in $WORLDS; do
26 function assert_running {
27 if ! is_running $1; then
28 echo "Error: World $1 is not running"
33 function assert_not_running {
34 if is_running $1; then
35 echo "Error: World $1 is already running"
40 function start_world {
46 screen -dmS `world_screenname $1` bash -c "
47 while is_running $1; do
50 exec minetest --server --terminal --world worlds/$1 --config worlds/$1/minetest.conf --logfile worlds/$1/debug.txt
65 function restart_world {
66 echo "Restarting $1..."
72 function run_one_or_all {