Add fire mode
[kaka/cakelight.git] / src / kaka / cakelight / Commands.java
index e665cf1..8f61713 100644 (file)
@@ -168,6 +168,19 @@ class Commands {
        });
     }
 
+    static Console.Command fireMode() {
+        return modeCommand(new String[] {"f", "fire"}, (console, args) -> {
+           if (args.length > 1) {
+               console.out("setting multi-color fire mode");
+               return new FireMode(Stream.of(args)
+                       .map(console::parseColor)
+                       .toArray(Color[]::new)
+               );
+           }
+           return null;
+       });
+    }
+
     static Console.Command sunriseMode() {
         return modeCommand(new String[] {"sunrise"}, (console, args) -> {
            if (args.length == 1) {