Disable saving for web version
This commit is contained in:
13
game.py
13
game.py
@@ -59,9 +59,10 @@ class Game:
|
||||
|
||||
def new_game(self):
|
||||
self.cat = shelter()
|
||||
print("Saving...")
|
||||
data.save.save(self.cat)
|
||||
print("Save complete.")
|
||||
if not os.path.exists("WEB_VERSION"):
|
||||
print("Saving...")
|
||||
data.save.save(self.cat)
|
||||
print("Save complete.")
|
||||
self.game_loop()
|
||||
|
||||
# TODO: Add shop, make food buyable and add money system
|
||||
@@ -81,6 +82,10 @@ class Game:
|
||||
return
|
||||
|
||||
def run(self):
|
||||
if os.path.exists("WEB_VERSION"):
|
||||
print(
|
||||
"This is a web version of Whiskerbound, saving/loading is disabled. As soon as you quit this page, your savefile is gone."
|
||||
)
|
||||
title()
|
||||
if os.path.exists("debug.json"):
|
||||
bypass_tamper_check = False
|
||||
@@ -113,7 +118,7 @@ class Game:
|
||||
return
|
||||
|
||||
options = ["New Game", "Quit"]
|
||||
if os.path.exists("saves"):
|
||||
if os.path.exists("saves") and not os.path.exists("WEB_VERSION"):
|
||||
options.insert(0, "Load Game")
|
||||
print("Welcome to Whiskerbound!")
|
||||
choice = ui.select("Please choose an option", choices=options)
|
||||
|
||||
Reference in New Issue
Block a user