Add macro count member

Used to indicate the number of times the actions were executed.
This commit is contained in:
WarmUpTill
2021-05-23 21:13:08 +02:00
committed by WarmUpTill
parent 069b0f89d0
commit 77642c54d8
2 changed files with 9 additions and 1 deletions

View File

@@ -4,6 +4,9 @@
#include "headers/macro-condition-edit.hpp"
#include "headers/macro-action-scene-switch.hpp"
#include <limits>
#undef max
const std::map<LogicType, LogicTypeInfo> MacroCondition::logicTypes = {
{LogicType::NONE, {"AdvSceneSwitcher.logic.none"}},
{LogicType::AND, {"AdvSceneSwitcher.logic.and"}},
@@ -85,7 +88,9 @@ bool Macro::PerformAction()
return false;
}
}
if (ret && _count != std::numeric_limits<int>::max()) {
_count++;
}
return ret;
}