fix(script): Do not process empty script output
This commit is contained in:
parent
8535f5a83d
commit
40524979d0
@ -50,11 +50,14 @@ bool ScriptModule::update()
|
|||||||
log_error(e.what());
|
log_error(e.what());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return !this->output.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ScriptModule::get_output()
|
std::string ScriptModule::get_output()
|
||||||
{
|
{
|
||||||
|
if (this->output.empty())
|
||||||
|
return "";
|
||||||
|
|
||||||
if (!this->click_left.empty())
|
if (!this->click_left.empty())
|
||||||
this->builder->cmd(Cmd::LEFT_CLICK, string::replace_all(this->click_left, "%counter%", std::to_string(this->counter)));
|
this->builder->cmd(Cmd::LEFT_CLICK, string::replace_all(this->click_left, "%counter%", std::to_string(this->counter)));
|
||||||
if (!this->click_middle.empty())
|
if (!this->click_middle.empty())
|
||||||
|
Loading…
Reference in New Issue
Block a user