mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
Tag removal and new serverside structure
This commit is contained in:
@@ -6,7 +6,10 @@
|
|||||||
"$path": "src/shared"
|
"$path": "src/shared"
|
||||||
},
|
},
|
||||||
"ServerScriptService": {
|
"ServerScriptService": {
|
||||||
"$path": "src/server"
|
"rapid-Server": {
|
||||||
|
"$className": "Actor",
|
||||||
|
"$path": "src/server"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"ReplicatedFirst": {
|
"ReplicatedFirst": {
|
||||||
"$path": "src/load"
|
"$path": "src/load"
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ local HealthSettings = require(UI:WaitForChild("Health"))
|
|||||||
local CoreGuis = require(script:WaitForChild("CoreGuis"))
|
local CoreGuis = require(script:WaitForChild("CoreGuis"))
|
||||||
local Mouse = require(script:WaitForChild("Mouse"))
|
local Mouse = require(script:WaitForChild("Mouse"))
|
||||||
|
|
||||||
local Players: Players = game:GetService("Players")
|
local Players: Players = game:GetService("Players")
|
||||||
local Storage: ReplicatedStorage = game:GetService("ReplicatedStorage")
|
local Storage: ReplicatedStorage = game:GetService("ReplicatedStorage")
|
||||||
local RS: RunService = game:GetService("RunService")
|
local RS: RunService = game:GetService("RunService")
|
||||||
|
|
||||||
local ClientStorage = Storage:WaitForChild("Client")
|
local ClientStorage = Storage:WaitForChild("Client")
|
||||||
local LoadCompleted = ClientStorage:WaitForChild("LoadingComplete")
|
local LoadCompleted = ClientStorage:WaitForChild("LoadingComplete")
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
--!optimize 2
|
|
||||||
--!native
|
|
||||||
--!strict
|
|
||||||
|
|
||||||
local function Sky(): Sky
|
|
||||||
local SkyBox = Instance.new("Sky")
|
|
||||||
SkyBox.MoonAngularSize = 8
|
|
||||||
SkyBox.MoonTextureId = "rbxassetid://62326944"
|
|
||||||
SkyBox.SkyboxBk = "rbxassetid://9544505500"
|
|
||||||
SkyBox.SkyboxDn = "rbxassetid://9544547905"
|
|
||||||
SkyBox.SkyboxFt = "rbxassetid://9544504852"
|
|
||||||
SkyBox.SkyboxLf = "rbxassetid://9544547694"
|
|
||||||
SkyBox.SkyboxRt = "rbxassetid://9544547542"
|
|
||||||
SkyBox.SkyboxUp = "rbxassetid://9544547398"
|
|
||||||
SkyBox.SunTextureId = "rbxassetid://5392574622"
|
|
||||||
SkyBox.StarCount = 200
|
|
||||||
SkyBox.SunAngularSize = 9
|
|
||||||
|
|
||||||
return SkyBox
|
|
||||||
end
|
|
||||||
|
|
||||||
local function Atmosphere(): Atmosphere
|
|
||||||
local Atmosp = Instance.new("Atmosphere")
|
|
||||||
Atmosp.Density = .25
|
|
||||||
Atmosp.Offset = 0
|
|
||||||
Atmosp.Color = Color3.fromRGB(199, 199, 199)
|
|
||||||
Atmosp.Decay = Color3.fromRGB(106, 112, 125)
|
|
||||||
|
|
||||||
return Atmosp
|
|
||||||
end
|
|
||||||
|
|
||||||
local function Clouds(): Clouds
|
|
||||||
local _Clouds = Instance.new("Clouds")
|
|
||||||
_Clouds.Cover = .7
|
|
||||||
_Clouds.Density = .15
|
|
||||||
_Clouds.Color = Color3.fromRGB(180,180,180)
|
|
||||||
|
|
||||||
return _Clouds
|
|
||||||
end
|
|
||||||
|
|
||||||
export type exports = {
|
|
||||||
Sky: () -> Sky,
|
|
||||||
Atmosphere: () -> Atmosphere,
|
|
||||||
Clouds: () -> Clouds,
|
|
||||||
}
|
|
||||||
|
|
||||||
local export: exports = {
|
|
||||||
Sky = Sky,
|
|
||||||
Atmosphere = Atmosphere,
|
|
||||||
Clouds = Clouds
|
|
||||||
}
|
|
||||||
|
|
||||||
return export
|
|
||||||
@@ -2,20 +2,25 @@
|
|||||||
--!native
|
--!native
|
||||||
--!strict
|
--!strict
|
||||||
|
|
||||||
|
local Otis1960_main = {}
|
||||||
|
Otis1960_main.__index = Otis1960_main
|
||||||
|
|
||||||
local Elevator = script.Parent
|
local Elevator = script.Parent
|
||||||
local Elevators = (Elevator :: Instance).Parent
|
local Elevators = Elevator.Parent
|
||||||
|
|
||||||
local RS = game:GetService("ReplicatedStorage")
|
local RS = game:GetService("ReplicatedStorage")
|
||||||
|
|
||||||
local Tags = require(RS:WaitForChild("Tags"))
|
local TagsModule = require(RS:WaitForChild("Tags"))
|
||||||
local Leveling = require(Elevators:WaitForChild("Leveling"))
|
local Leveling = require(Elevators:WaitForChild("Leveling"))
|
||||||
local Doors = require(Elevator:WaitForChild("Doors"))
|
local Doors = require(Elevator:WaitForChild("Doors"))
|
||||||
local ElevatorMover = require(Elevators:WaitForChild("Mover"))
|
local ElevatorMover = require(Elevators:WaitForChild("Mover"))
|
||||||
|
|
||||||
local ElevatorBox_1960 = Tags.ElevatorMover_1960
|
local Tags = TagsModule.constructor().Exports
|
||||||
local ElevatorBox = Tags.ElevatorMover_1960 :: BasePart
|
|
||||||
local ElevatorDoor1 = Tags.ElevatorDoor_1960_1 :: BasePart
|
local ElevatorBox_1960 = Tags.ElevatorMover_1960
|
||||||
local ElevatorDoor2 = Tags.ElevatorDoor_1960_2 :: BasePart
|
local ElevatorBox = Tags.ElevatorMover_1960 :: BasePart
|
||||||
|
local ElevatorDoor1 = Tags.ElevatorDoor_1960_1 :: BasePart
|
||||||
|
local ElevatorDoor2 = Tags.ElevatorDoor_1960_2 :: BasePart
|
||||||
local ElevatorDoorSensor = Tags.ElevatorDoor_Sensor_1960 :: Folder
|
local ElevatorDoorSensor = Tags.ElevatorDoor_Sensor_1960 :: Folder
|
||||||
|
|
||||||
local ElevatorBoxStartPos = ElevatorBox_1960.Position
|
local ElevatorBoxStartPos = ElevatorBox_1960.Position
|
||||||
@@ -45,3 +50,5 @@ print("[DEBUG]: Tags:",Tags)
|
|||||||
-- task.wait(2)
|
-- task.wait(2)
|
||||||
-- ElevatorDoors:Opening(false)
|
-- ElevatorDoors:Opening(false)
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
|
return Otis1960_main
|
||||||
@@ -3,9 +3,6 @@
|
|||||||
--!strict
|
--!strict
|
||||||
|
|
||||||
local Lighting = game:GetService("Lighting")
|
local Lighting = game:GetService("Lighting")
|
||||||
local Terrain = workspace:WaitForChild("Terrain")
|
|
||||||
|
|
||||||
local Sky = require(script:WaitForChild("Sky"))
|
|
||||||
|
|
||||||
type LightingProps = { [string]: Color3 | number | boolean | string }
|
type LightingProps = { [string]: Color3 | number | boolean | string }
|
||||||
|
|
||||||
@@ -33,9 +30,6 @@ export type Effects = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return function(): Effects
|
return function(): Effects
|
||||||
Lighting:ClearAllChildren()
|
|
||||||
Terrain:ClearAllChildren()
|
|
||||||
|
|
||||||
--VFX Effects for later
|
--VFX Effects for later
|
||||||
local ColorCorrection = Instance.new("ColorCorrectionEffect")
|
local ColorCorrection = Instance.new("ColorCorrectionEffect")
|
||||||
ColorCorrection.Parent = Lighting
|
ColorCorrection.Parent = Lighting
|
||||||
@@ -49,10 +43,6 @@ return function(): Effects
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Sky.Sky().Parent = Lighting
|
|
||||||
Sky.Atmosphere().Parent = Lighting
|
|
||||||
Sky.Clouds().Parent = Terrain
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
ColorCorrection = ColorCorrection
|
ColorCorrection = ColorCorrection
|
||||||
}
|
}
|
||||||
@@ -7,9 +7,16 @@ local Lighting_Stuff = require(script:WaitForChild("Lighting"))
|
|||||||
local Workspace_Stuff = require(script:WaitForChild("Workspace"))
|
local Workspace_Stuff = require(script:WaitForChild("Workspace"))
|
||||||
local StarterPlayer_Stuff = require(script:WaitForChild("StarterPlayer"))
|
local StarterPlayer_Stuff = require(script:WaitForChild("StarterPlayer"))
|
||||||
|
|
||||||
local RS = game:GetService("RunService")
|
local RS = game:GetService("RunService")
|
||||||
local Storage = game:GetService("ReplicatedStorage")
|
local Storage = game:GetService("ReplicatedStorage")
|
||||||
|
|
||||||
|
local TagsModule = require(Storage:WaitForChild("Tags"))
|
||||||
|
|
||||||
|
local TagsConstructor = TagsModule.constructor()
|
||||||
|
local Tags = TagsConstructor.Exports
|
||||||
|
print("[DEBUG] Tags=", Tags)
|
||||||
|
|
||||||
|
local Elevators = script:WaitForChild("Elevators")
|
||||||
local ServerStorage = Storage:WaitForChild("Server")
|
local ServerStorage = Storage:WaitForChild("Server")
|
||||||
|
|
||||||
local EditorEntities = Instance.new("BindableFunction")
|
local EditorEntities = Instance.new("BindableFunction")
|
||||||
@@ -25,3 +32,5 @@ Workspace_Stuff()
|
|||||||
EditorEntities.OnInvoke = function(): HideEditorEntities.Entities
|
EditorEntities.OnInvoke = function(): HideEditorEntities.Entities
|
||||||
return StudioEntities.IndexedEntities
|
return StudioEntities.IndexedEntities
|
||||||
end
|
end
|
||||||
|
|
||||||
|
TagsConstructor:Nuke()
|
||||||
@@ -12,15 +12,16 @@ export type KeyBindMap = {
|
|||||||
[Enum.KeyCode]: (KeyPressed: Enum.KeyCode) -> ()
|
[Enum.KeyCode]: (KeyPressed: Enum.KeyCode) -> ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export type InputBegan = RBXScriptConnection
|
|
||||||
export type InputEnded = RBXScriptConnection
|
|
||||||
type CallbackFunction = () -> ()
|
|
||||||
type BindConstructor = {
|
type BindConstructor = {
|
||||||
BindMap: KeyBindMap,
|
BindMap: KeyBindMap,
|
||||||
InputBegan: InputBegan,
|
InputBegan: InputBegan,
|
||||||
InputEnded: InputEnded
|
InputEnded: InputEnded
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type InputBegan = RBXScriptConnection
|
||||||
|
export type InputEnded = RBXScriptConnection
|
||||||
|
type CallbackFunction = (KeyPressed: Enum.KeyCode) -> ()
|
||||||
|
|
||||||
local UIS = game:GetService("UserInputService")
|
local UIS = game:GetService("UserInputService")
|
||||||
|
|
||||||
function BindLink.constructor(gameProcessing: boolean) --Allow multiple bindings of the same keys, no overwrites
|
function BindLink.constructor(gameProcessing: boolean) --Allow multiple bindings of the same keys, no overwrites
|
||||||
|
|||||||
@@ -2,17 +2,44 @@
|
|||||||
--!native
|
--!native
|
||||||
--!strict
|
--!strict
|
||||||
|
|
||||||
|
local Tags = {}
|
||||||
|
Tags.__index = Tags
|
||||||
|
|
||||||
local CS = game:GetService("CollectionService")
|
local CS = game:GetService("CollectionService")
|
||||||
|
|
||||||
local exports: {[string]: Instance} = {}
|
type ExportedTags = {
|
||||||
|
[string]: Instance | {Instance}
|
||||||
|
}
|
||||||
|
|
||||||
local AllTags = CS:GetAllTags()
|
function Tags.constructor()
|
||||||
for i = 1, #AllTags do
|
local Exports: ExportedTags = {}
|
||||||
local TagName = AllTags[i]
|
local AllTags = CS:GetAllTags()
|
||||||
if TagName ~= "RopeMasterObject" and TagName ~= "ServerGuard_Physics" then
|
|
||||||
local Tagged = CS:GetTagged(TagName)
|
for n: number = 1, #AllTags do
|
||||||
exports[TagName] = #Tagged>1 and Tagged or Tagged[1]
|
local TagName = AllTags[n]
|
||||||
|
if TagName ~= "RopeMasterObject" and TagName ~= "ServerGuard_Physics" then
|
||||||
|
local Tagged = CS:GetTagged(TagName)
|
||||||
|
Exports[TagName] = #Tagged>1 and Tagged or Tagged[1]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
return setmetatable({
|
||||||
|
Exports = Exports
|
||||||
|
}, Tags)
|
||||||
end
|
end
|
||||||
|
|
||||||
return exports
|
function Tags:Nuke()
|
||||||
|
local Exports = self.Exports
|
||||||
|
|
||||||
|
for i,v in Exports do
|
||||||
|
if type(v) == "table" then
|
||||||
|
for n: number = 1, #v do
|
||||||
|
CS:RemoveTag(v[n], i)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
CS:RemoveTag(v, i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
warn("☢️ nuked all in-game tags. Left-over tags="..table.concat(CS:GetAllTags(), ", "))
|
||||||
|
end
|
||||||
|
|
||||||
|
return Tags
|
||||||
Reference in New Issue
Block a user