aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--featureClass/class.js9
-rw-r--r--featureClass/featureManager.js10
-rw-r--r--features/settings/settingThings/settingBase.js4
3 files changed, 19 insertions, 4 deletions
diff --git a/featureClass/class.js b/featureClass/class.js
index b8a17d9..3471652 100644
--- a/featureClass/class.js
+++ b/featureClass/class.js
@@ -106,6 +106,13 @@ class Feature {
return new CustomEvent(theEvent, theEvent.trigger, [criteria, func], this)
}
+ registerSoundPlay(criteria, func) {
+ let theEvent = this.FeatureManager.registerSoundPlay(criteria, func, this)
+
+ this.customEvents[theEvent.id] = theEvent
+
+ return new CustomEvent(theEvent, theEvent.trigger, [criteria, func], this)
+ }
registerActionBar(criteria, func) {
let theEvent = this.FeatureManager.registerActionBar(criteria, func, this)
@@ -274,4 +281,4 @@ class CustomEvent extends Event {
actuallyUnregister() {
this.trigger.unregister()
}
-} \ No newline at end of file
+}
diff --git a/featureClass/featureManager.js b/featureClass/featureManager.js
index 991f549..41ba671 100644
--- a/featureClass/featureManager.js
+++ b/featureClass/featureManager.js
@@ -382,6 +382,14 @@ class FeatureManager {
return event
}
+ registerSoundPlay(criteria, func, context) {
+ let event = this.registerCustom("soundPlay", func, context)
+
+ event.trigger.setCriteria(criteria)
+
+ return event
+ }
+
registerActionBar(criteria, func, context) {
let event = this.registerCustom("actionBar", func, context)
@@ -624,4 +632,4 @@ if (!global.soopyv2featuremanagerthing) {
global.soopyv2featuremanagerthing = undefined
})
}
-export default global.soopyv2featuremanagerthing \ No newline at end of file
+export default global.soopyv2featuremanagerthing
diff --git a/features/settings/settingThings/settingBase.js b/features/settings/settingThings/settingBase.js
index 9e3abb1..95f902e 100644
--- a/features/settings/settingThings/settingBase.js
+++ b/features/settings/settingThings/settingBase.js
@@ -143,8 +143,8 @@ class SettingBase {
return this
}
- contributor(name) {
- this.contributorVal = name
+ contributor(name, things = []) {
+ this.contributorVal = { name, things }
//TODO: this entire function
return this
}