« get me outta code hell

Flash jumpColor inherits from color - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-11-27 00:43:15 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-11-27 00:43:15 -0400
commitdd8943ea8cfb086f4b6a5e1057998faacc564bf6 (patch)
tree6a9888748d6211d99ce8d41dfbc6353c9d5b8bff
parentfa51edfa0d66e5d85a71ba92b0b926f039407d30 (diff)
Flash jumpColor inherits from color
-rw-r--r--src/data/things.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/data/things.js b/src/data/things.js
index 33880460..ee458006 100644
--- a/src/data/things.js
+++ b/src/data/things.js
@@ -1461,7 +1461,16 @@ FlashAct.propertyDescriptors = {
   color: Thing.common.color(),
   anchor: Thing.common.simpleString(),
   jump: Thing.common.simpleString(),
-  jumpColor: Thing.common.color(),
+
+  jumpColor: {
+    flags: {update: true, expose: true},
+    update: {validate: isColor},
+    expose: {
+      dependencies: ['color'],
+      transform: (jumpColor, {color}) =>
+        jumpColor ?? color,
+    }
+  },
 
   flashesByRef: Thing.common.referenceList(Flash),