Closed icewolfz closed 2 years ago
Multistate-triggers branch is the work on multi state triggers
Due to the complexity of trigger alarms they will not support multi state triggering and will not be allowed as a sub type
Temp multistate triggers will not be removed until all states have been successfully triggerd, sub states can not be temp
Profile manger editing, do it like how context menus work and have the sub states as child nodes off main trigger and hide alarm type for sub triggers and show sub type only types when supported
Alarms now support sub states, by caching any trigger that as a sub state that is an alarm
went with a drop down navigation and buttons in profile manger editor as easier then trying to use tree view due to trigger vs tigger sub states being same type
Merged with, officially supported, will add remaining missing features as time allows
Expression system needs profile variables or converting the variable[name] to use function wrappers like profile variable to properly trigger when something changes, even so still not 100% reliable due to expressions could change a variable multiple times before completed but can only trigger after expression is over when the scope is set, while not perfect only way to do expression triggers, will wait until i merge profile variables to add expression type
Expression triggers should only fire if a variable in the expression changes, meaning have to parse valid possible varibales in expression and test against those if changed
//get all ids not in quotes, cache to improve performancelater on
//it first removes all quoted strings to ensure not false matches, then it looks for any valid matching words
_cachedIds = [...(EXPRESISONSTRING.replace(/"(.*)"/, "").matchAll(/\b([a-zA-Z_$][a-zA-Z_$0-9]*)\b/gm))].map(v => v[0]);
//to test if var is in exprssion or not
_cacheIds.indexOf('VAR') !== -1
//multiids
['var1', 'var2'].every(i => _cacheIds.indexOf(i) !== -1)
The parse variable branch has fully working expression types, once merged all trigger types will be supported
Add a multi system like mudlet offers to match multiple lines some how
https://wiki.mudlet.org/w/Manual:Trigger_Engine#.22multiline_.2F_AND.22_and_.22OR.22_Condition_Triggers