Compare commits
2 Commits
9d50705d9a
...
d4bbf62945
Author | SHA1 | Date | |
---|---|---|---|
d4bbf62945 | |||
36204b579f |
12
lb_store.lua
12
lb_store.lua
@ -381,6 +381,18 @@ COM_AddCommand("lb_known_maps", function(player, map)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
COM_AddCommand("lb_download_live_records", function(player, filename)
|
||||||
|
if not filename then
|
||||||
|
CONS_Printf(player, "Usage: lb_download_live_records <filename>")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if filename:sub(#filename-3) != ".txt" then
|
||||||
|
filename = $..".txt"
|
||||||
|
end
|
||||||
|
dumpStoreToFile(filename, LiveStore)
|
||||||
|
end, COM_LOCAL)
|
||||||
|
|
||||||
-- Load the livestore
|
-- Load the livestore
|
||||||
if isserver then
|
if isserver then
|
||||||
LiveStore = loadStoreFile(LEADERBOARD_FILE)
|
LiveStore = loadStoreFile(LEADERBOARD_FILE)
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user