From 03ee183cc3a8c85ef2b2c7b706d4da6b229985d1 Mon Sep 17 00:00:00 2001 From: Loren Norman Date: Wed, 30 Jul 2025 15:23:55 -0400 Subject: [PATCH] make weather block behavior toggleable --- app/blocks/power_ups/weather_mixin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/blocks/power_ups/weather_mixin.js b/app/blocks/power_ups/weather_mixin.js index 70eab74..2ff24fb 100644 --- a/app/blocks/power_ups/weather_mixin.js +++ b/app/blocks/power_ups/weather_mixin.js @@ -26,7 +26,12 @@ export default { } }, + autoDisable: true, + setEnabledByLocation: function() { + // bail if this behavior has been disabled + if(!this.autoDisable) { return } + // must have a location and a parent (copacetic with disableOrphans) if(this.getFieldValue("POWER_UP_ID") === "" || !this.getParent()) { this.disabled || this.setEnabled(false)