Reformat and clean up reactor and base scripts

This commit is contained in:
P0nk
2021-09-09 23:38:09 +02:00
parent 3f43fe82d0
commit d9590078f5
231 changed files with 1192 additions and 1075 deletions

View File

@@ -23,36 +23,37 @@
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendOk("Sample text.");
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendOk("Sample text.");
cm.dispose();
}
}
}
function generateSelectionMenu(array) { // nice tool for generating a string for the sendSimple functionality
var menu = "";
for (var i = 0; i < array.length; i++) {
menu += "#L" + i + "#" + array[i] + "#l\r\n";
}
return menu;
var menu = "";
for (var i = 0; i < array.length; i++) {
menu += "#L" + i + "#" + array[i] + "#l\r\n";
}
return menu;
}