Skip to content

Commit

Permalink
Fix: sleeping at the inn then returning to town undoes sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
nightblade9 committed Dec 19, 2024
1 parent 0c3f849 commit 167233f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions source/TextBlade.ConsoleRunner/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public void SetLocation(Location location)
// Only the freshest data here: rehydrate your current location state.
// This is for when you leave dungeon, go to town, then back to the dungeon.
// Fixes a bug where: clear a dungeon floor, go to town, go back to the dungeon real quick.
// You saved, yes, but t_saveData is stale.
if (SaveGameManager.HasSave("default"))
{
_saveData = SaveGameManager.LoadGame("default");
}
// // You saved, yes, but _saveData is stale.
// if (SaveGameManager.HasSave("default"))
// {
// _saveData = SaveGameManager.LoadGame("default");
// }

Location.CurrentSaveData = _saveData;

Expand Down
2 changes: 1 addition & 1 deletion source/TextBlade.Core/IO/SaveData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public class SaveData
// Who owns the location specific data? e.g. the dungeon, but you're in town right now
public string LocationSpecificDataLocationId { get; set; }

// For user code, i.e. ggame-specific things
// For user code, i.e. game-specific things
public Dictionary<string, object>? GameSpecificData { get; set; }
}

0 comments on commit 167233f

Please sign in to comment.