Lua loaded records #9
@ -1,14 +1,21 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import sys
|
import sys
|
||||||
from os import linesep
|
from os import linesep, path
|
||||||
|
|
||||||
if len(sys.argv) != 4 or not sys.argv[1] or not sys.argv[2] or not sys.argv[3]:
|
if len(sys.argv) != 3 or not sys.argv[1] or not sys.argv[2]:
|
||||||
print("Usage: coldstore.py <leaderboard.txt> <coldstore.txt> <leaderboard_records.lua>")
|
print("Usage: coldstore.py <game_directory> <leaderboard_records.lua>")
|
||||||
|
print("\t<game_directory>\t\tthe game directory where wads and luafiles reside. Usually at '$HOME/.srb2kart'.")
|
||||||
|
print("\t<leaderboard_records.lua>\tthe output name for the records packed lua file. It will be saved within <game_directory>.")
|
||||||
quit()
|
quit()
|
||||||
|
|
||||||
leaderboard_txt = sys.argv[1]
|
if not sys.argv[2].endswith(".lua"):
|
||||||
coldstore_txt = sys.argv[2]
|
print("{} must end with .lua".format(sys.argv[2]))
|
||||||
records_lua = sys.argv[3]
|
quit()
|
||||||
|
|
||||||
|
game_dir = sys.argv[1]
|
||||||
|
leaderboard_txt = path.join(game_dir, "luafiles", "leaderboard.txt")
|
||||||
|
coldstore_txt = path.join(game_dir, "luafiles", "leaderboard.coldstore.txt")
|
||||||
|
records_lua = path.join(game_dir, sys.argv[2])
|
||||||
|
|
||||||
def ParseScore(score):
|
def ParseScore(score):
|
||||||
# Map Name Skin Color Time Splits Flags Stat
|
# Map Name Skin Color Time Splits Flags Stat
|
||||||
|
Loading…
Reference in New Issue
Block a user