Cancel warnings when the condition no longer exists
This commit is contained in:
parent
3ff14f1c94
commit
77120dcf04
1 changed files with 3 additions and 0 deletions
|
@ -52,6 +52,7 @@ var warning = {
|
|||
},
|
||||
write: func() {
|
||||
if (me.active == 0) { return; }
|
||||
me.wasActive = 1;
|
||||
lineIndex = 0;
|
||||
while (lineIndex < 7 and lines[lineIndex].getValue() != "") {
|
||||
lineIndex = lineIndex + 1; # go to next line until empty line
|
||||
|
@ -74,6 +75,7 @@ var warning = {
|
|||
lights[me.light].setBoolValue(1);
|
||||
me.noRepeat = 1;
|
||||
} elsif (me.wasActive) {
|
||||
print("Yesssssss");
|
||||
lights[me.light].setBoolValue(0);
|
||||
me.wasActive = 0;
|
||||
}
|
||||
|
@ -89,6 +91,7 @@ var warning = {
|
|||
aural[me.aural].setBoolValue(1);
|
||||
}, 0.15);
|
||||
} elsif (me.wasActive) {
|
||||
print("Noooooooo");
|
||||
aural[me.aural].setBoolValue(0);
|
||||
me.wasActive = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue