M1b: survival stats, day/night, fire fuel, cooking, foraging, torches, death + grave
- Health, stamina, hunger, warmth and wet with HUD bars, status tags and clock - 20-minute day/night cycle with moon, stars and lit clouds - Campfire fuel (2 min start, 15 min max), heat radius, cooking needs a lit fire - Berry bushes (regrow 10 min), mushrooms, roasted mushroom, torch - Stamina costs for sprint, jump and harvest hits - Death respawns at island start and leaves a grave bag - Saves include stats, time of day, fire fuel, regrowth timers and graves - New test_survival_stats suite; tests fail if a script error aborts them
This commit is contained in:
@@ -8,6 +8,7 @@ extends SceneTree
|
||||
## Run: godot --headless --path . --script res://tests/test_save_load.gd
|
||||
|
||||
var _fails := 0
|
||||
var _finished := false
|
||||
var A: Node # Actions
|
||||
var S: Node # Saves
|
||||
var DB: Node # ItemDB
|
||||
@@ -114,9 +115,11 @@ func _run() -> void:
|
||||
check(chest2 != null and chest2.inventory.count("flint") == 7 and chest2.inventory.count("wood") == 12, "chest rebuilt with its contents")
|
||||
check(S.read_meta(id).play_time >= 0.0, "meta updated")
|
||||
|
||||
_finished = true
|
||||
world.queue_free()
|
||||
S.delete_world(id)
|
||||
DirAccess.remove_absolute(S.root_dir)
|
||||
check(_finished, "test ran to the end (no script errors)")
|
||||
print("RESULT: %s (%d failures)" % ["PASS" if _fails == 0 else "FAIL", _fails])
|
||||
quit(1 if _fails > 0 else 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user