saveload system

localstorage isn't supported by wasm, so playing online will probably just not have save games for a while
This commit is contained in:
Llywelwyn 2023-07-09 12:09:30 +01:00
parent dd91a8cca7
commit 51060f1a85
11 changed files with 290 additions and 63 deletions

View file

@ -98,7 +98,7 @@ pub fn player_input(gs: &mut State, ctx: &mut Rltk) -> RunState {
VirtualKeyCode::G => get_item(&mut gs.ecs),
VirtualKeyCode::I => return RunState::ShowInventory,
VirtualKeyCode::D => return RunState::ShowDropItem,
VirtualKeyCode::Escape => return RunState::MainMenu { menu_selection: gui::MainMenuSelection::NewGame },
VirtualKeyCode::Escape => return RunState::SaveGame,
_ => {
return RunState::AwaitingInput;
}