Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
ef4c43161d | |||
9b1ef1a655 | |||
f9716f9e9f | |||
051b0adb4e |
@ -1046,7 +1046,7 @@ local function drawScoreboard(v, player)
|
|||||||
|
|
||||||
cachePatches(v)
|
cachePatches(v)
|
||||||
|
|
||||||
local gui = cv_gui.value
|
local gui = cv_gui.value or drawState == DS_BROWSER
|
||||||
|
|
||||||
-- Force enable gui at start and end of the race
|
-- Force enable gui at start and end of the race
|
||||||
if leveltime < START_TIME or player.exiting or player.lives == 0 then
|
if leveltime < START_TIME or player.exiting or player.lives == 0 then
|
||||||
@ -1055,13 +1055,13 @@ local function drawScoreboard(v, player)
|
|||||||
|
|
||||||
if gui then
|
if gui then
|
||||||
stateFunctions[drawState](v, player, ScoreTable, gui)
|
stateFunctions[drawState](v, player, ScoreTable, gui)
|
||||||
end
|
|
||||||
|
|
||||||
local pos = 0
|
local pos = 0
|
||||||
-- Draw current active modes bottom left
|
-- Draw current active modes bottom left
|
||||||
pos = drawMode(v, pos, F_SPBJUS)
|
pos = drawMode(v, pos, F_SPBJUS)
|
||||||
pos = drawMode(v, pos, F_SPBBIG)
|
pos = drawMode(v, pos, F_SPBBIG)
|
||||||
pos = drawMode(v, pos, F_SPBEXP)
|
pos = drawMode(v, pos, F_SPBEXP)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
hud.add(drawScoreboard, "game")
|
hud.add(drawScoreboard, "game")
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import sys
|
import sys
|
||||||
from os import linesep, path
|
from os import path
|
||||||
|
linesep = "\n"
|
||||||
|
|
||||||
if len(sys.argv) != 3 or not sys.argv[1] or not sys.argv[2]:
|
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("Usage: coldstore.py <game_directory> <leaderboard_records.lua>")
|
||||||
@ -47,9 +48,15 @@ def SameScore(a, b):
|
|||||||
|
|
||||||
def LoadRecordsFromFile(path):
|
def LoadRecordsFromFile(path):
|
||||||
records = []
|
records = []
|
||||||
with open(path, "r") as f:
|
try:
|
||||||
for line in f.readlines():
|
with open(path, "r") as f:
|
||||||
records.append(ParseScore(line.strip()))
|
for line in f.readlines():
|
||||||
|
line = line.strip()
|
||||||
|
if line != "":
|
||||||
|
records.append(ParseScore(line))
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
return records
|
return records
|
||||||
|
|
||||||
def AddScore(records, score):
|
def AddScore(records, score):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user