mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 06:41:55 +00:00
Tag removal and new serverside structure
This commit is contained in:
@@ -6,7 +6,10 @@
|
||||
"$path": "src/shared"
|
||||
},
|
||||
"ServerScriptService": {
|
||||
"$path": "src/server"
|
||||
"rapid-Server": {
|
||||
"$className": "Actor",
|
||||
"$path": "src/server"
|
||||
}
|
||||
},
|
||||
"ReplicatedFirst": {
|
||||
"$path": "src/load"
|
||||
|
||||
@@ -9,9 +9,9 @@ local HealthSettings = require(UI:WaitForChild("Health"))
|
||||
local CoreGuis = require(script:WaitForChild("CoreGuis"))
|
||||
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 RS: RunService = game:GetService("RunService")
|
||||
local RS: RunService = game:GetService("RunService")
|
||||
|
||||
local ClientStorage = Storage:WaitForChild("Client")
|
||||
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
|
||||
--!strict
|
||||
|
||||
local Otis1960_main = {}
|
||||
Otis1960_main.__index = Otis1960_main
|
||||
|
||||
local Elevator = script.Parent
|
||||
local Elevators = (Elevator :: Instance).Parent
|
||||
local Elevators = Elevator.Parent
|
||||
|
||||
local RS = game:GetService("ReplicatedStorage")
|
||||
|
||||
local Tags = require(RS:WaitForChild("Tags"))
|
||||
local Leveling = require(Elevators:WaitForChild("Leveling"))
|
||||
local Doors = require(Elevator:WaitForChild("Doors"))
|
||||
local TagsModule = require(RS:WaitForChild("Tags"))
|
||||
local Leveling = require(Elevators:WaitForChild("Leveling"))
|
||||
local Doors = require(Elevator:WaitForChild("Doors"))
|
||||
local ElevatorMover = require(Elevators:WaitForChild("Mover"))
|
||||
|
||||
local ElevatorBox_1960 = Tags.ElevatorMover_1960
|
||||
local ElevatorBox = Tags.ElevatorMover_1960 :: BasePart
|
||||
local ElevatorDoor1 = Tags.ElevatorDoor_1960_1 :: BasePart
|
||||
local ElevatorDoor2 = Tags.ElevatorDoor_1960_2 :: BasePart
|
||||
local Tags = TagsModule.constructor().Exports
|
||||
|
||||
local ElevatorBox_1960 = Tags.ElevatorMover_1960
|
||||
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 ElevatorBoxStartPos = ElevatorBox_1960.Position
|
||||
@@ -45,3 +50,5 @@ print("[DEBUG]: Tags:",Tags)
|
||||
-- task.wait(2)
|
||||
-- ElevatorDoors:Opening(false)
|
||||
-- end
|
||||
|
||||
return Otis1960_main
|
||||
@@ -3,9 +3,6 @@
|
||||
--!strict
|
||||
|
||||
local Lighting = game:GetService("Lighting")
|
||||
local Terrain = workspace:WaitForChild("Terrain")
|
||||
|
||||
local Sky = require(script:WaitForChild("Sky"))
|
||||
|
||||
type LightingProps = { [string]: Color3 | number | boolean | string }
|
||||
|
||||
@@ -33,9 +30,6 @@ export type Effects = {
|
||||
}
|
||||
|
||||
return function(): Effects
|
||||
Lighting:ClearAllChildren()
|
||||
Terrain:ClearAllChildren()
|
||||
|
||||
--VFX Effects for later
|
||||
local ColorCorrection = Instance.new("ColorCorrectionEffect")
|
||||
ColorCorrection.Parent = Lighting
|
||||
@@ -49,10 +43,6 @@ return function(): Effects
|
||||
end
|
||||
end
|
||||
|
||||
Sky.Sky().Parent = Lighting
|
||||
Sky.Atmosphere().Parent = Lighting
|
||||
Sky.Clouds().Parent = Terrain
|
||||
|
||||
return {
|
||||
ColorCorrection = ColorCorrection
|
||||
}
|
||||
@@ -7,9 +7,16 @@ local Lighting_Stuff = require(script:WaitForChild("Lighting"))
|
||||
local Workspace_Stuff = require(script:WaitForChild("Workspace"))
|
||||
local StarterPlayer_Stuff = require(script:WaitForChild("StarterPlayer"))
|
||||
|
||||
local RS = game:GetService("RunService")
|
||||
local RS = game:GetService("RunService")
|
||||
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 EditorEntities = Instance.new("BindableFunction")
|
||||
@@ -25,3 +32,5 @@ Workspace_Stuff()
|
||||
EditorEntities.OnInvoke = function(): HideEditorEntities.Entities
|
||||
return StudioEntities.IndexedEntities
|
||||
end
|
||||
|
||||
TagsConstructor:Nuke()
|
||||
@@ -12,15 +12,16 @@ export type KeyBindMap = {
|
||||
[Enum.KeyCode]: (KeyPressed: Enum.KeyCode) -> ()
|
||||
}
|
||||
}
|
||||
export type InputBegan = RBXScriptConnection
|
||||
export type InputEnded = RBXScriptConnection
|
||||
type CallbackFunction = () -> ()
|
||||
type BindConstructor = {
|
||||
BindMap: KeyBindMap,
|
||||
InputBegan: InputBegan,
|
||||
InputEnded: InputEnded
|
||||
}
|
||||
|
||||
export type InputBegan = RBXScriptConnection
|
||||
export type InputEnded = RBXScriptConnection
|
||||
type CallbackFunction = (KeyPressed: Enum.KeyCode) -> ()
|
||||
|
||||
local UIS = game:GetService("UserInputService")
|
||||
|
||||
function BindLink.constructor(gameProcessing: boolean) --Allow multiple bindings of the same keys, no overwrites
|
||||
|
||||
@@ -2,17 +2,44 @@
|
||||
--!native
|
||||
--!strict
|
||||
|
||||
local Tags = {}
|
||||
Tags.__index = Tags
|
||||
|
||||
local CS = game:GetService("CollectionService")
|
||||
|
||||
local exports: {[string]: Instance} = {}
|
||||
type ExportedTags = {
|
||||
[string]: Instance | {Instance}
|
||||
}
|
||||
|
||||
local AllTags = CS:GetAllTags()
|
||||
for i = 1, #AllTags do
|
||||
local TagName = AllTags[i]
|
||||
if TagName ~= "RopeMasterObject" and TagName ~= "ServerGuard_Physics" then
|
||||
local Tagged = CS:GetTagged(TagName)
|
||||
exports[TagName] = #Tagged>1 and Tagged or Tagged[1]
|
||||
function Tags.constructor()
|
||||
local Exports: ExportedTags = {}
|
||||
local AllTags = CS:GetAllTags()
|
||||
|
||||
for n: number = 1, #AllTags do
|
||||
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
|
||||
return setmetatable({
|
||||
Exports = Exports
|
||||
}, Tags)
|
||||
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