restore full world effects outside portmaster

This commit is contained in:
Alexander Sellite 2026-09-01 19:00:13 -04:00
parent 4fda6e97f6
commit 41b4f86ddf
15 changed files with 398 additions and 122 deletions

View file

@ -9,6 +9,7 @@ const NETFISHING_PROFILE_ENVIRONMENT_VARIABLE := (
"NETFISHING_PERFORMANCE_PROFILE"
)
const NETFISHING_LIGHT_ENVIRONMENT_VARIABLE := "NETFISHING_LOW_END"
const PORTMASTER_BUILD_FEATURE: StringName = &"straywild_portmaster"
const NORMAL_PROFILE: StringName = &"normal"
const LIGHT_PROFILE: StringName = &"light"
const NORMAL_WORLD_RENDER_SCALE: float = 1.0
@ -18,6 +19,16 @@ var _profile_name: StringName = NORMAL_PROFILE
static func from_environment() -> RuntimePerformanceProfile:
return from_environment_for_portmaster_build(
OS.has_feature(PORTMASTER_BUILD_FEATURE)
)
static func from_environment_for_portmaster_build(
is_portmaster_build: bool,
) -> RuntimePerformanceProfile:
if not is_portmaster_build:
return from_name(NORMAL_PROFILE)
var profile_name: String = OS.get_environment(
PROFILE_ENVIRONMENT_VARIABLE
)