Add default light profile for PortMaster

This commit is contained in:
Alexander Sellite 2026-08-14 22:12:02 -04:00
parent a62cce6404
commit a3e0830bd1
16 changed files with 454 additions and 42 deletions

View file

@ -5,6 +5,7 @@ extends CanvasLayer
var _pixel_size: int = PlayerSettings.DEFAULT_WORLD_PIXEL_SIZE
var _gameplay_active: bool = false
var _light_performance_profile: bool = false
func _ready() -> void:
@ -26,6 +27,15 @@ func set_gameplay_active(active: bool) -> void:
_refresh_grid()
func set_light_performance_profile(enabled: bool) -> void:
_light_performance_profile = enabled
_refresh_grid()
func is_light_performance_profile() -> bool:
return _light_performance_profile
func get_grid_size() -> Vector2i:
return PlayerSettings.get_world_grid_size(
_pixel_size,
@ -38,6 +48,7 @@ func _refresh_grid() -> void:
return
var effect_enabled: bool = (
_gameplay_active
and not _light_performance_profile
and _pixel_size != PlayerSettings.MIN_WORLD_PIXEL_SIZE
)
_screen_grid.visible = effect_enabled