mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 12:25:02 +01:00
Store worlds in user data dir
This commit is contained in:
parent
d2da1b39ed
commit
d7f57a2176
8 changed files with 98 additions and 30 deletions
|
|
@ -1,3 +1,5 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use derivative::Derivative;
|
||||
use egui_inspect::derive::Inspect;
|
||||
use sfml::{
|
||||
|
|
@ -114,12 +116,12 @@ impl GameState {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn new(world_name: String) -> GameState {
|
||||
pub(crate) fn new(world_name: String, path: PathBuf) -> GameState {
|
||||
let mut spawn_point = WorldPos::SURFACE_CENTER;
|
||||
spawn_point.y -= 1104;
|
||||
Self {
|
||||
camera_offset: spawn_point,
|
||||
world: World::new(spawn_point, &world_name),
|
||||
world: World::new(spawn_point, &world_name, path),
|
||||
gravity: 0.55,
|
||||
tile_to_place: 1,
|
||||
current_biome: Biome::Surface,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue