Rework PerformActions() to enable choosing which action type to run

This commit is contained in:
WarmUpTill
2023-09-13 10:40:16 +02:00
committed by WarmUpTill
parent 24f4b864c4
commit 0c8135078d
6 changed files with 45 additions and 27 deletions

View File

@@ -54,12 +54,12 @@ bool MacroActionRandom::PerformAction()
}
if (macros.size() == 1) {
lastRandomMacro = macros[0];
return macros[0]->PerformActions();
return macros[0]->PerformActions(true);
}
srand((unsigned int)time(0));
size_t idx = std::rand() % (macros.size());
lastRandomMacro = macros[idx];
return macros[idx]->PerformActions();
return macros[idx]->PerformActions(true);
}
void MacroActionRandom::LogAction() const