]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - invoke/minetest/tasks.py
Critical command fix
[dotfiles.git] / invoke / minetest / tasks.py
index c652f1daa335691f1e7d5c8bb01f397f0808b2d0..47bcdb8f5669275b58e5e3057a0f58c2447c4cd2 100644 (file)
@@ -4,6 +4,7 @@ import os
 home = os.path.expanduser('~')
 flat_pak_root = f"{home}/.var/app/net.minetest.Minetest"
 easy_dir = f"{home}/minetest/"
+run_mt = f"flatpak run net.minetest.Minetest"
 
 # flatpak
 link_to = f"{home}/.var/app/net.minetest.Minetest/.minetest"  
@@ -63,3 +64,30 @@ def status(c):
     print(f"+ ls ---")
     c.run(f"ls -ald {link_to} | grep minetest")
 
+
+@task
+def games(c):
+    print(f"+ List Games ---")
+    cmd = f"{run_mt} --gameid list"
+    c.run(cmd)
+
+@task
+def play(c):
+    c.run(f"{run_mt}")
+
+@task
+def worlds(c):
+    print(f"+ List Worlds ---")
+    cmd = f"{run_mt} --gameid minetest --worldlist path"
+    c.run(cmd)
+
+
+@task
+def version(c):
+    cmd = f"{run_mt} --version"
+    c.run(cmd)
+
+@task
+def serve(c, world="SurfaceWorld"):
+    cmd = f"{run_mt} --gameid minetest --server --worldname {world}"
+    c.run(cmd)