aboutsummaryrefslogtreecommitdiff
path: root/client/map/auto_setup
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-08-19 22:18:57 +0200
committertpart <tpart120@proton.me>2024-08-19 22:18:57 +0200
commit312f5e017163b2622b3ea328cd44fc946d0efe8e (patch)
tree77431d983b4ee90f5160b77a099c5328e91d4cac /client/map/auto_setup
parent6e6c02c03a4c3a3cbc26e7c98436fd38c5a3931b (diff)
downloadhurrycurry-312f5e017163b2622b3ea328cd44fc946d0efe8e.tar
hurrycurry-312f5e017163b2622b3ea328cd44fc946d0efe8e.tar.bz2
hurrycurry-312f5e017163b2622b3ea328cd44fc946d0efe8e.tar.zst
Completely disable freezer and oven lights when shadows are disabled
Diffstat (limited to 'client/map/auto_setup')
-rw-r--r--client/map/auto_setup/light_setup.gd6
1 files changed, 5 insertions, 1 deletions
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 <https://www.gnu.org/licenses/>.
#
-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):