Fixed reactivation problems
This commit is contained in:
@@ -15,6 +15,7 @@ private:
|
||||
VoxelLodTerrain *terrain;
|
||||
Node *current_scene;
|
||||
ConfigFile config;
|
||||
/* Per-building information */
|
||||
struct building {
|
||||
String id;
|
||||
int pattern_id;
|
||||
@@ -29,6 +30,7 @@ private:
|
||||
const String &key);
|
||||
Dictionary to_dict() const;
|
||||
};
|
||||
/* Scene objects data */
|
||||
struct scene_data {
|
||||
Ref<PackedScene> packed_scene;
|
||||
String path;
|
||||
@@ -46,11 +48,20 @@ private:
|
||||
};
|
||||
using tile_map_t = std::unordered_map<const tile_key_t,
|
||||
std::vector<int>, tile_hash>;
|
||||
/* Data for each building type */
|
||||
HashMap<String, String> building_data;
|
||||
/* Data for each building in a world */
|
||||
std::vector<struct building> buildings;
|
||||
Vector3 eye;
|
||||
tile_map_t tiles;
|
||||
tile_map_t loaded_tiles;
|
||||
struct checkpoint_data {
|
||||
HashMap<String, String> building_data;
|
||||
std::vector<struct building> buildings;
|
||||
};
|
||||
std::vector<struct checkpoint_data> undo_log;
|
||||
int undo_log_size;
|
||||
|
||||
int world_extent;
|
||||
int tile_size;
|
||||
int view_distance;
|
||||
@@ -69,6 +80,8 @@ private:
|
||||
void unload_building(int id);
|
||||
void request_item(int type, int item);
|
||||
void update_items();
|
||||
void checkpoint();
|
||||
void undo();
|
||||
|
||||
static void _bind_methods();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user