mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
Studio launch properties
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
--All debugging objects such as light source indicating objects will be turned invisible
|
--All debugging objects such as light source indicating objects will be turned invisible
|
||||||
|
|
||||||
local StudioEntities = {
|
export type Entities = {
|
||||||
|
IndexedEntities: {Instance}
|
||||||
|
}
|
||||||
|
local StudioEntities: Entities = {
|
||||||
IndexedEntities = {}
|
IndexedEntities = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,9 +25,7 @@ local EditorEntities = {
|
|||||||
["BarrierCollision"] = HideBarrierCollision
|
["BarrierCollision"] = HideBarrierCollision
|
||||||
}
|
}
|
||||||
|
|
||||||
type IndexedEntities = {Instance}
|
function StudioEntities.indexAll(enabled: boolean): Entities
|
||||||
|
|
||||||
function StudioEntities.indexAll(enabled: boolean): IndexedEntities
|
|
||||||
if #StudioEntities.IndexedEntities == 0 then
|
if #StudioEntities.IndexedEntities == 0 then
|
||||||
--Run when the server starts
|
--Run when the server starts
|
||||||
local WorkspaceEnt = workspace:GetDescendants()
|
local WorkspaceEnt = workspace:GetDescendants()
|
||||||
|
|||||||
@@ -1,11 +1,36 @@
|
|||||||
local Lighting = game:GetService("Lighting")
|
local Lighting = game:GetService("Lighting")
|
||||||
|
|
||||||
local PropsTree = {
|
type LightingProps = { [string]: Color3 | number | boolean | string }
|
||||||
|
|
||||||
|
local Lighting_PropsTree: LightingProps = {
|
||||||
|
["Ambient"] = Color3.fromRGB(70, 70, 70),
|
||||||
|
["Brightness"] = 0,
|
||||||
|
["ColorShift_Bottom"] = Color3.new(0,0,0),
|
||||||
|
["ColorShift_Top"] = Color3.new(0,0,0),
|
||||||
|
["EnvironmentDiffuseScale"] = 1,
|
||||||
|
["EnvironmentSpecularScale"] = .7,
|
||||||
|
["GlobalShadows"] = true,
|
||||||
|
["OutdoorAmbient"] = Color3.fromRGB(70,70,70),
|
||||||
|
["ShadowSoftness"] = 1,
|
||||||
|
["ClockTime"] = 0,
|
||||||
|
["GeographicLatitude"] = 0,
|
||||||
|
["Name"] = "Lighting",
|
||||||
|
["ExposureCompensation"] = 0,
|
||||||
|
["FogColor"] = Color3.new(0,0,0),
|
||||||
|
["FogEnd"] = 100000,
|
||||||
|
["FogStart"] = 100000,
|
||||||
}
|
}
|
||||||
|
|
||||||
return function()
|
export type Effects = {
|
||||||
for Light_Prop, Light_Value in PropsTree do
|
ColorCorrection: ColorCorrectionEffect
|
||||||
|
}
|
||||||
|
|
||||||
|
return function(): Effects
|
||||||
|
--Effects
|
||||||
|
local ColorCorrection = Instance.new("ColorCorrectionEffect")
|
||||||
|
ColorCorrection.Parent = Lighting
|
||||||
|
|
||||||
|
for Light_Prop, Light_Value in Lighting_PropsTree do
|
||||||
local changed, err = pcall(function()
|
local changed, err = pcall(function()
|
||||||
Lighting[Light_Prop] = Light_Value
|
Lighting[Light_Prop] = Light_Value
|
||||||
end)
|
end)
|
||||||
@@ -13,4 +38,8 @@ return function()
|
|||||||
warn("Server Lighting:", err, debug.traceback())
|
warn("Server Lighting:", err, debug.traceback())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
ColorCorrection = ColorCorrection
|
||||||
|
}
|
||||||
end
|
end
|
||||||
@@ -6,12 +6,13 @@ local Storage = game:GetService("ReplicatedStorage")
|
|||||||
|
|
||||||
local ServerStorage = Storage:WaitForChild("Server")
|
local ServerStorage = Storage:WaitForChild("Server")
|
||||||
|
|
||||||
local Bind = Instance.new("BindableFunction")
|
local EditorEntities = Instance.new("BindableFunction")
|
||||||
Bind.Name = "StudioIndexedEntities"
|
EditorEntities.Name = "StudioIndexedEntities"
|
||||||
Bind.Parent = ServerStorage
|
EditorEntities.Parent = ServerStorage
|
||||||
|
|
||||||
HideEditorEntities.indexAll(not RS:IsStudio())
|
local StudioEntities = HideEditorEntities.indexAll(not RS:IsStudio())
|
||||||
|
Lighting()
|
||||||
|
|
||||||
Bind.OnInvoke = function()
|
EditorEntities.OnInvoke = function(): HideEditorEntities.Entities
|
||||||
return HideEditorEntities.IndexedEntities
|
return StudioEntities.IndexedEntities
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user