Added support for skipping player that takes too long

This commit is contained in:
2022-03-18 18:57:16 -04:00
parent ee5e0a8fb6
commit dc5d233449
4 changed files with 39 additions and 12 deletions

View File

@@ -167,7 +167,7 @@ def repair(): # Repairs all tables or updates them if needed
"space3likes" : [["id", 1], ["account", 0]],
"golfGamePlayers" : [["gameID", 1], ["multiplier", 1], ["user", 0], ["points", 1], ["orderID", 1], ["lastMode", 0], ["upToDate", 6]],
"golfGameCards" : [["gameID", 1], ["user", 0], ["card", 1], ["cardPlacement", 1], ["faceUp", 6]],
"golfGame" : [["ID", 5], ["deck", 4], ["discard", 4], ["cardNumber", 1], ["flipNumber", 1], ["multiplierForFlip", 1], ["pointsToEnd", 1], ["name", 0], ["password", 0], ["players", 1], ["playersToStart", 1], ["currentPlayer", 1], ["turnStartTime", 1], ["locked", 6], ["decks", 1]],
"golfGame" : [["ID", 5], ["deck", 4], ["discard", 4], ["cardNumber", 1], ["flipNumber", 1], ["multiplierForFlip", 1], ["pointsToEnd", 1], ["name", 0], ["password", 0], ["players", 1], ["playersToStart", 1], ["currentPlayer", 1], ["turnStartTime", 1], ["locked", 6], ["decks", 1], ["skipTime", 1]],
"docker" : [["link", 0], ["action", 0], ["image", 0], ["password", 0], ["owner", 0], ["port", 1], ["ID", 0]],
"dockerImages" : [["realName", 0], ["shortName", 0]]
}
@@ -249,9 +249,16 @@ def repair(): # Repairs all tables or updates them if needed
command("UPDATE golfGame SET decks='1'")
version = "v2.1"
updatedVersions.append("v2.1")
if versionNumber == "v2.1": # Adds support for skip time
command("ALTER table golfGame ADD skipTime int")
command("ALTER table golfGame ADD timeLeft int")
command("UPDATE golfGame SET skipTime='0'")
command("UPDATE golfGame SET timeLeft='0'")
version = "v2.2"
updatedVersions.append("v2.2")
# Fixes the version if it is invalid to the latest version
if version != "v2.1":
version = "v2.1"
if version != "v2.2":
version = "v2.2"
except:
1
command("DELETE FROM information WHERE pointer='version'")