mirror of
https://github.com/t-affeldt/lighting_monoids.git
synced 2025-07-08 03:20:23 +02:00
Change API to use lighting table instead
This commit is contained in:
@ -38,7 +38,8 @@ minetest.override_chatcommand("shadow_intensity", {
|
||||
|
||||
intensity = new_intensity
|
||||
for _,player in pairs(minetest.get_connected_players()) do
|
||||
lighting_monoids.shadows:add_change(player, new_intensity, "enable_shadows:base_value")
|
||||
local lighting = { shadows = { intensity = new_intensity } }
|
||||
lighting_monoid:add_change(player, lighting, "enable_shadows:base_value")
|
||||
end
|
||||
end
|
||||
})
|
@ -4,9 +4,8 @@ if weather ~= nil and weather.on_update ~= nil then
|
||||
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")
|
||||
if overrides.shadows then
|
||||
lighting_monoid:add_change(player, { shadows = overrides.shadows }, "weather:cloud_shadows")
|
||||
end
|
||||
overrides.lighting = nil
|
||||
return overrides
|
||||
|
Reference in New Issue
Block a user