mirror of
https://git.kittycat.homes/zoe/codename-routes.git
synced 2024-08-15 03:18:26 +00:00
clean up codebase
This commit is contained in:
parent
cf27ccca4b
commit
13ae90769b
4 changed files with 19 additions and 20 deletions
Binary file not shown.
|
@ -2,7 +2,6 @@ use gdnative::prelude::*;
|
|||
|
||||
use self::gen::GameRng;
|
||||
|
||||
mod saves;
|
||||
mod world;
|
||||
mod gen;
|
||||
|
||||
|
@ -23,16 +22,6 @@ impl StateServer {
|
|||
}
|
||||
}
|
||||
|
||||
#[export]
|
||||
fn load_from_file(&self, _owner: &Node, file: GodotString) {
|
||||
saves::load(&file.to_string());
|
||||
}
|
||||
|
||||
#[export]
|
||||
fn save_from_file(&self, _owner: &Node, file: GodotString) {
|
||||
saves::save(&file.to_string());
|
||||
}
|
||||
|
||||
#[export]
|
||||
fn _ready(&self, _owner: &Node) {}
|
||||
|
||||
|
@ -63,6 +52,16 @@ impl StateServer {
|
|||
fn is_tile_hidden(&self, _owner: &Node, x: usize, y: usize, z: usize) -> bool {
|
||||
self.world.is_tile_hidden(x, y, z)
|
||||
}
|
||||
|
||||
#[export]
|
||||
fn can_put_tile_at(&self, _owner: &Node, x: usize, y: usize, z: usize, id: usize) -> bool{
|
||||
self.world.can_put_tile_at(x, y, z, id)
|
||||
}
|
||||
|
||||
#[export]
|
||||
fn put_tile_at(&mut self, _owner: &Node, x: usize, y: usize, z: usize, id: usize){
|
||||
self.world.put_tile_at(x, y, z, id);
|
||||
}
|
||||
}
|
||||
|
||||
// signals
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
use toml;
|
||||
|
||||
pub fn load (file: &str){
|
||||
|
||||
}
|
||||
|
||||
pub fn save (file: &str){
|
||||
|
||||
}
|
|
@ -90,6 +90,15 @@ impl World {
|
|||
positions
|
||||
}
|
||||
|
||||
pub fn put_tile_at(&mut self, x: usize, y: usize, z: usize, id: usize){
|
||||
|
||||
}
|
||||
|
||||
pub fn can_put_tile_at(&self, x: usize, y: usize, z: usize, id: usize) -> bool{
|
||||
false
|
||||
}
|
||||
|
||||
|
||||
pub fn new(xsize: usize, ysize: usize, zsize: usize) -> World {
|
||||
World {
|
||||
xsize,
|
||||
|
|
Loading…
Reference in a new issue