« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/flash/FlashSide.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things/flash/FlashSide.js')
-rw-r--r--src/data/things/flash/FlashSide.js80
1 files changed, 0 insertions, 80 deletions
diff --git a/src/data/things/flash/FlashSide.js b/src/data/things/flash/FlashSide.js
index 72782bdd..5e2ea3de 100644
--- a/src/data/things/flash/FlashSide.js
+++ b/src/data/things/flash/FlashSide.js
@@ -1,7 +1,4 @@
-const FLASH_DATA_FILE = 'flashes.yaml';
-
 import {V} from '#composite';
-import {sortFlashesChronologically} from '#sort';
 import Thing from '#thing';
 
 import {exposeConstant} from '#composite/control-flow';
@@ -56,81 +53,4 @@ export class FlashSide extends Thing {
       referenced: flashSide => flashSide.acts,
     },
   };
-
-  static [Thing.getYamlLoadingSpec] = ({
-    documentModes: {allInOne},
-    thingConstructors: {Flash, FlashAct},
-  }) => ({
-    title: `Process flashes file`,
-    file: FLASH_DATA_FILE,
-
-    documentMode: allInOne,
-    documentThing: document =>
-      ('Side' in document
-        ? FlashSide
-     : 'Act' in document
-        ? FlashAct
-        : Flash),
-
-    connect(results) {
-      let thing, i;
-
-      for (i = 0; thing = results[i]; i++) {
-        if (thing.isFlashSide) {
-          const side = thing;
-          const acts = [];
-
-          for (i++; thing = results[i]; i++) {
-            if (thing.isFlashAct) {
-              const act = thing;
-              const flashes = [];
-
-              for (i++; thing = results[i]; i++) {
-                if (thing.isFlash) {
-                  const flash = thing;
-
-                  flash.act = act;
-                  flashes.push(flash);
-
-                  continue;
-                }
-
-                i--;
-                break;
-              }
-
-              act.side = side;
-              act.flashes = flashes;
-              acts.push(act);
-
-              continue;
-            }
-
-            if (thing.isFlash) {
-              throw new Error(`Flashes must be under an act`);
-            }
-
-            i--;
-            break;
-          }
-
-          side.acts = acts;
-
-          continue;
-        }
-
-        if (thing.isFlashAct) {
-          throw new Error(`Acts must be under a side`);
-        }
-
-        if (thing.isFlash) {
-          throw new Error(`Flashes must be under a side and act`);
-        }
-      }
-    },
-
-    sort({flashData}) {
-      sortFlashesChronologically(flashData);
-    },
-  });
 }