3 Commits

Author SHA1 Message Date
caeff69f27 Change map_range behavior 2023-12-20 23:31:34 +01:00
6c150faaaf Decrease strength of lighting effects 2023-04-02 10:58:41 +02:00
1a20676883 Remove unused translation 2023-04-02 10:58:22 +02:00
3 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,9 @@ end
-- maps range of 0 to 1 to any other range
local function map_range(val, low, high)
return (val + low) * (high - low)
local cal_val = math.min(math.max(val, 0), 1)
local range = high - low
return low + (cal_val * range)
end
local function generate_effects(params)
@ -36,8 +38,8 @@ local function generate_effects(params)
-- zero at dawn / dusk and one at midday
local daytime_shadows = 1 - (math.abs(0.5 - daytime) * 2 / daylight_duration)
local shadow_intensity = map_range(cloud_shadows + daytime_shadows, 0.15, 0.5)
local light_saturation = map_range(cloud_shadows + daytime_shadows, 0.8, 1.2)
local shadow_intensity = map_range(cloud_shadows + daytime_shadows, 0.15, 0.4)
local light_saturation = map_range(cloud_shadows + daytime_shadows, 0.9, 1.1)
local skybox = {priority = 10}
skybox.cloud_data = {
@ -88,7 +90,7 @@ local function generate_effects(params)
local movement_penalty = climate_api.utility.sigmoid(vector_product, 1.5, 0.15, 0.9) + 0.2
override["regional_weather:speed_buff"] = movement_penalty
end
return override
end

View File

@ -1,5 +1,4 @@
# textdomain:regional_weather
Disable MTG weather for the best experience. Check the forum for more information.=Deaktiviere MTG weather für die beste Spielerfahrung. Mehr Informationen im Forum.
Thin Ice=Dünnes Eis
Puddle=Pfütze
Snow Cover=Schnee

View File

@ -1,5 +1,4 @@
# textdomain:regional_weather
Disable MTG weather for the best experience=
Thin Ice=
Puddle=
Snow Cover=