Tag removal and new serverside structure

This commit is contained in:
2024-03-03 02:34:59 -05:00
parent a3a8720c91
commit 1af1c6919e
15 changed files with 72 additions and 88 deletions

View File

@@ -0,0 +1,49 @@
--!optimize 2
--!native
--!strict
local Lighting = game:GetService("Lighting")
type LightingProps = { [string]: Color3 | number | boolean | string }
local Lighting_PropsTree: LightingProps = {
["Ambient"] = Color3.fromRGB(40,40,40),
["Brightness"] = 1,
["ColorShift_Bottom"] = Color3.new(0,0,0),
["ColorShift_Top"] = Color3.new(0,0,0),
["EnvironmentDiffuseScale"] = 1,
["EnvironmentSpecularScale"] = .7,
["GlobalShadows"] = true,
["OutdoorAmbient"] = Color3.fromRGB(50,50,50),
["ShadowSoftness"] = 1,
["ClockTime"] = 0,
["GeographicLatitude"] = 0,
["Name"] = "Lighting",
["ExposureCompensation"] = 0,
["FogColor"] = Color3.new(0,0,0),
["FogEnd"] = 100000,
["FogStart"] = 100000,
}
export type Effects = {
ColorCorrection: ColorCorrectionEffect
}
return function(): Effects
--VFX Effects for later
local ColorCorrection = Instance.new("ColorCorrectionEffect")
ColorCorrection.Parent = Lighting
for Light_Prop, Light_Value in Lighting_PropsTree do
local changed, err = pcall(function()
Lighting[Light_Prop] = Light_Value
end)
if not changed then
warn("Server Lighting:", err, debug.traceback())
end
end
return {
ColorCorrection = ColorCorrection
}
end