Saegusa лет назад: 9
Родитель
Сommit
b7668980ae
2 измененных файлов с 13 добавлено и 3 удалено
  1. 1 1
      config.json
  2. 12 2
      index.js

+ 1 - 1
config.json

@@ -1,6 +1,6 @@
 {
 {
     "prefix" : "!",
     "prefix" : "!",
     "savedOptions" : {
     "savedOptions" : {
-        
+        "state" : 0
     }
     }
 }
 }

+ 12 - 2
index.js

@@ -54,11 +54,12 @@ module.exports = function FpsUtils(dispatch) {
     function handleCommands(event) {
     function handleCommands(event) {
 
 
         let command = format.stripTags(event.message).split(' ');
         let command = format.stripTags(event.message).split(' ');
-        lastState = state;
 
 
         if(command[0] !== '!fps')
         if(command[0] !== '!fps')
             return;
             return;
 
 
+        lastState = state;
+
         if(command.length > 1) {
         if(command.length > 1) {
             let arg = command[1];
             let arg = command[1];
 
 
@@ -259,6 +260,14 @@ module.exports = function FpsUtils(dispatch) {
                         }
                         }
                     }
                     }
                     break;
                     break;
+                // List the players in individuals list.
+                case "list":
+                    let hiddenArray = [];
+                    for(let pl in hiddenIndividual) {
+                        hiddenArray.push(hiddenIndividual[pl].name);
+                    }
+                    systemMsg(`Manually hidden players: ${hiddenArray}`);
+                    break;
                 // Command not recognized
                 // Command not recognized
                 default:
                 default:
                     systemMsg('Command not recognized. use [!fps help] for a list of available commands');
                     systemMsg('Command not recognized. use [!fps help] for a list of available commands');
@@ -293,6 +302,7 @@ module.exports = function FpsUtils(dispatch) {
         ({cid, model} = event);
         ({cid, model} = event);
         player = event.name;
         player = event.name;
         clss = getClass(event.model);
         clss = getClass(event.model);
+        state = config.savedOptions.state || 0;
     });
     });
 
 
     dispatch.hook('S_LOAD_TOPO', 1, (event) => {
     dispatch.hook('S_LOAD_TOPO', 1, (event) => {
@@ -327,7 +337,7 @@ module.exports = function FpsUtils(dispatch) {
 
 
         // If me-mode is enabled spawn everyone as yourself.
         // If me-mode is enabled spawn everyone as yourself.
         if(flags.me && appearence) {
         if(flags.me && appearence) {
-            event.model = model;
+            //event.model = model;
             return true;
             return true;
         }
         }