Some corrections to lpxclient code
This commit is contained in:
@@ -165,8 +165,8 @@ void DrivenEngine::set_console_prompt(const eng::string &prompt) {
|
|||||||
console_prompt_ = prompt;
|
console_prompt_ = prompt;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrivenEngine::rescan_lua_source() {
|
void DrivenEngine::rescan_lua_source(bool b) {
|
||||||
rescan_lua_source_ = true;
|
rescan_lua_source_ = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrivenEngine::set_visible_world_and_actor(World *w, int64_t id) {
|
void DrivenEngine::set_visible_world_and_actor(World *w, int64_t id) {
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ public:
|
|||||||
// DRIVER: this merely sets a flag, which the driver will notice later,
|
// DRIVER: this merely sets a flag, which the driver will notice later,
|
||||||
// causing the driver to update the lua source.
|
// causing the driver to update the lua source.
|
||||||
//
|
//
|
||||||
void rescan_lua_source();
|
void rescan_lua_source(bool b);
|
||||||
|
|
||||||
// Set the world pointer and the actor ID.
|
// Set the world pointer and the actor ID.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ public:
|
|||||||
RunUnitTests() {
|
RunUnitTests() {
|
||||||
world_.reset(new World(WORLD_TYPE_MASTER));
|
world_.reset(new World(WORLD_TYPE_MASTER));
|
||||||
stop_driver();
|
stop_driver();
|
||||||
rescan_lua_source();
|
rescan_lua_source(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void event_access(AccessKind kind, int64_t place_id, std::string_view datapk, StreamBuffer *retpk) override {
|
virtual void event_access(AccessKind kind, int64_t place_id, std::string_view datapk, StreamBuffer *retpk) override {
|
||||||
|
|||||||
@@ -50,6 +50,12 @@ public:
|
|||||||
|
|
||||||
// Reset the print channeler
|
// Reset the print channeler
|
||||||
print_channeler_.reset();
|
print_channeler_.reset();
|
||||||
|
|
||||||
|
// Do not trigger lua source loading.
|
||||||
|
rescan_lua_source(false);
|
||||||
|
|
||||||
|
// Clear any saved invocations
|
||||||
|
delayed_invocations_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_initial_state_standalone() {
|
void set_initial_state_standalone() {
|
||||||
@@ -72,7 +78,10 @@ public:
|
|||||||
print_channeler_.reset();
|
print_channeler_.reset();
|
||||||
|
|
||||||
// Trigger lua source loading.
|
// Trigger lua source loading.
|
||||||
rescan_lua_source();
|
rescan_lua_source(true);
|
||||||
|
|
||||||
|
// Clear any saved invocations
|
||||||
|
delayed_invocations_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// When the world is in synchronous mode, there's no
|
// When the world is in synchronous mode, there's no
|
||||||
@@ -140,7 +149,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void do_cpl_command() override {
|
virtual void do_cpl_command() override {
|
||||||
rescan_lua_source();
|
rescan_lua_source(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void do_work_command() override {
|
virtual void do_work_command() override {
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public:
|
|||||||
set_visible_world_and_actor(master_.get(), admin_id_);
|
set_visible_world_and_actor(master_.get(), admin_id_);
|
||||||
|
|
||||||
// Trigger the loading of the lua source.
|
// Trigger the loading of the lua source.
|
||||||
rescan_lua_source();
|
rescan_lua_source(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void do_syntax_error(std::string_view error) override {
|
virtual void do_syntax_error(std::string_view error) override {
|
||||||
@@ -82,7 +82,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void do_cpl_command() override {
|
virtual void do_cpl_command() override {
|
||||||
rescan_lua_source();
|
rescan_lua_source(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void do_work_command() override {
|
virtual void do_work_command() override {
|
||||||
|
|||||||
Reference in New Issue
Block a user