The town should work now
This commit is contained in:
@@ -275,6 +275,10 @@ void StreamWorld::update_items()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StreamWorld::run_command(const String &command, const Array &args)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void StreamWorld::_notification(int which)
|
void StreamWorld::_notification(int which)
|
||||||
{
|
{
|
||||||
switch (which) {
|
switch (which) {
|
||||||
@@ -285,10 +289,12 @@ void StreamWorld::_notification(int which)
|
|||||||
case NOTIFICATION_ENTER_TREE:
|
case NOTIFICATION_ENTER_TREE:
|
||||||
if (initialized) {
|
if (initialized) {
|
||||||
if (Engine::get_singleton()->is_editor_hint())
|
if (Engine::get_singleton()->is_editor_hint())
|
||||||
current_scene = Object::cast_to<Node>(
|
current_scene = Object::cast_to<Node>(this);
|
||||||
get_tree()->get_root());
|
else {
|
||||||
else
|
|
||||||
current_scene = get_tree()->get_current_scene();
|
current_scene = get_tree()->get_current_scene();
|
||||||
|
if (current_scene)
|
||||||
|
current_scene = get_tree()->get_root();
|
||||||
|
}
|
||||||
ERR_FAIL_COND_MSG(!current_scene, "No current scene");
|
ERR_FAIL_COND_MSG(!current_scene, "No current scene");
|
||||||
RoadProcessing::road_setup(this);
|
RoadProcessing::road_setup(this);
|
||||||
set_process(true);
|
set_process(true);
|
||||||
@@ -329,6 +335,8 @@ void StreamWorld::_bind_methods()
|
|||||||
&StreamWorld::terrain_dead);
|
&StreamWorld::terrain_dead);
|
||||||
ClassDB::bind_method(D_METHOD("viewer_dead"),
|
ClassDB::bind_method(D_METHOD("viewer_dead"),
|
||||||
&StreamWorld::viewer_dead);
|
&StreamWorld::viewer_dead);
|
||||||
|
ClassDB::bind_method(D_METHOD("run_command", "command", "args"),
|
||||||
|
&StreamWorld::run_command);
|
||||||
}
|
}
|
||||||
|
|
||||||
StreamWorld::StreamWorld()
|
StreamWorld::StreamWorld()
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ private:
|
|||||||
void unload_building(int id);
|
void unload_building(int id);
|
||||||
void request_item(int type, int item);
|
void request_item(int type, int item);
|
||||||
void update_items();
|
void update_items();
|
||||||
|
void run_command(const String &command, const Array &args);
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user