mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 06:41: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
|
||||
|
||||
local StudioEntities = {
|
||||
export type Entities = {
|
||||
IndexedEntities: {Instance}
|
||||
}
|
||||
local StudioEntities: Entities = {
|
||||
IndexedEntities = {}
|
||||
}
|
||||
|
||||
@@ -22,9 +25,7 @@ local EditorEntities = {
|
||||
["BarrierCollision"] = HideBarrierCollision
|
||||
}
|
||||
|
||||
type IndexedEntities = {Instance}
|
||||
|
||||
function StudioEntities.indexAll(enabled: boolean): IndexedEntities
|
||||
function StudioEntities.indexAll(enabled: boolean): Entities
|
||||
if #StudioEntities.IndexedEntities == 0 then
|
||||
--Run when the server starts
|
||||
local WorkspaceEnt = workspace:GetDescendants()
|
||||
|
||||
@@ -1,11 +1,36 @@
|
||||
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()
|
||||
for Light_Prop, Light_Value in PropsTree do
|
||||
export type Effects = {
|
||||
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()
|
||||
Lighting[Light_Prop] = Light_Value
|
||||
end)
|
||||
@@ -13,4 +38,8 @@ return function()
|
||||
warn("Server Lighting:", err, debug.traceback())
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
ColorCorrection = ColorCorrection
|
||||
}
|
||||
end
|
||||
@@ -6,12 +6,13 @@ local Storage = game:GetService("ReplicatedStorage")
|
||||
|
||||
local ServerStorage = Storage:WaitForChild("Server")
|
||||
|
||||
local Bind = Instance.new("BindableFunction")
|
||||
Bind.Name = "StudioIndexedEntities"
|
||||
Bind.Parent = ServerStorage
|
||||
local EditorEntities = Instance.new("BindableFunction")
|
||||
EditorEntities.Name = "StudioIndexedEntities"
|
||||
EditorEntities.Parent = ServerStorage
|
||||
|
||||
HideEditorEntities.indexAll(not RS:IsStudio())
|
||||
local StudioEntities = HideEditorEntities.indexAll(not RS:IsStudio())
|
||||
Lighting()
|
||||
|
||||
Bind.OnInvoke = function()
|
||||
return HideEditorEntities.IndexedEntities
|
||||
EditorEntities.OnInvoke = function(): HideEditorEntities.Entities
|
||||
return StudioEntities.IndexedEntities
|
||||
end
|
||||
Reference in New Issue
Block a user