Lua loaded records #9
@ -1,14 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
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]:
|
||||
print("Usage: coldstore.py <leaderboard.txt> <coldstore.txt> <leaderboard_records.lua>")
|
||||
if len(sys.argv) != 3 or not sys.argv[1] or not sys.argv[2]:
|
||||
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()
|
||||
|
||||
leaderboard_txt = sys.argv[1]
|
||||
coldstore_txt = sys.argv[2]
|
||||
records_lua = sys.argv[3]
|
||||
if not sys.argv[2].endswith(".lua"):
|
||||
print("{} must end with .lua".format(sys.argv[2]))
|
||||
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):
|
||||
# Map Name Skin Color Time Splits Flags Stat
|
||||
|
Loading…
Reference in New Issue
Block a user