mirror of
https://github.com/t-affeldt/lighting_monoids.git
synced 2025-04-07 05:20:38 +02:00
14 lines
532 B
Lua
14 lines
532 B
Lua
-- Hook into MTG weather mod for compatibility (requires PR #3020)
|
|
if weather ~= nil and weather.on_update ~= nil then
|
|
weather.on_update = function(player, overrides)
|
|
if overrides == nil then
|
|
return
|
|
end
|
|
if overrides.shadows and overrides.shadows.intensity then
|
|
local intensity = overrides.shadows.intensity
|
|
lighting_monoids.shadows:add_change(player, intensity, "weather:cloud_shadows")
|
|
end
|
|
overrides.lighting = nil
|
|
return overrides
|
|
end
|
|
end |