From 312f5e017163b2622b3ea328cd44fc946d0efe8e Mon Sep 17 00:00:00 2001 From: tpart Date: Mon, 19 Aug 2024 22:18:57 +0200 Subject: Completely disable freezer and oven lights when shadows are disabled --- client/map/auto_setup/light_setup.gd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'client/map/auto_setup') diff --git a/client/map/auto_setup/light_setup.gd b/client/map/auto_setup/light_setup.gd index f583b6a5..1e256dae 100644 --- a/client/map/auto_setup/light_setup.gd +++ b/client/map/auto_setup/light_setup.gd @@ -13,14 +13,18 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # -extends DirectionalLight3D +extends Light3D class_name LightSetup +@export var completely_disable_light_if_shadows_disabled := false + func _ready(): apply_settings() Global.settings_changed.connect(apply_settings) func apply_settings(): + if completely_disable_light_if_shadows_disabled: + visible = Global.get_setting("shadows") shadow_enabled = Global.get_setting("shadows") func set_sky(sky_name: String): -- cgit v1.2.3-70-g09d2