Add final progression to tiny sword, fixes and tweeks required
This commit is contained in:
@@ -5,9 +5,7 @@ var failed: int = 0
|
||||
var _game_root: Node = null
|
||||
|
||||
func _ready():
|
||||
await run()
|
||||
# Let test_runner handle exit
|
||||
pass
|
||||
pass # run() is called by the test runner; avoid double-execution.
|
||||
|
||||
func run():
|
||||
print("\n=== TEST: Prestige Mechanics ===\n")
|
||||
@@ -15,6 +13,13 @@ func run():
|
||||
|
||||
var scene = load("res://docs/gyms/tiny_sword/tiny_sword.tscn")
|
||||
_game_root = scene.instantiate()
|
||||
|
||||
# Use a unique save path to avoid contaminating the real game's save.
|
||||
var save_path: String = "user://test_prestige_%d.json" % randi()
|
||||
DirAccess.remove_absolute(ProjectSettings.globalize_path(save_path))
|
||||
var gs: LevelGameState = _game_root.get_node("LevelGameState")
|
||||
gs.save_file_path = save_path
|
||||
|
||||
add_child(_game_root)
|
||||
|
||||
await _wait()
|
||||
|
||||
Reference in New Issue
Block a user