From 06edc4d67e0926d1599dc588a5152ba3b14be99e Mon Sep 17 00:00:00 2001 From: htt-py <95628489+phoriah@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:00:36 +0200 Subject: [PATCH] Removed IsolatePlayerGui; Use IsolateLocalPlayer Instead --- README.md | 2 +- saveinstance.lua | 24 ++++++++++++------------ saveinstance.luau | 24 ++++++++++++------------ 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 0914290..3e71adb 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ https://discord.com/invite/wx4ThpAsmw **/** https://discord.gg/wx4ThpAsmw
* [x] SavePlayers * [x] ShowStatus * [ ] Add Drawing Library support for ShowStatus - * [ ] IsolatePlayerGui + * ~~[-] IsolatePlayerGui~~ Use IsolateLocalPlayer instead * [ ] Callback * [ ] Clipboard * [ ] Binary (rbxl/rbxm) diff --git a/saveinstance.lua b/saveinstance.lua index da67e2b..b54ee9d 100644 --- a/saveinstance.lua +++ b/saveinstance.lua @@ -875,7 +875,6 @@ PropertiesBlacklist = {}, IgnoreNotArchivable = true, IgnorePropertiesOfNotScriptsOnScriptsMode = false, -- Ignores property of every instance that is not a script in "scripts" mode IgnoreSpecialProperties = false, -- true will disable Terrain & Break MeshPart Sizes (very likely) - IsolatePlayerGui = false, IsolateStarterPlayer = false, --If enabled, StarterPlayer will be cleared and the saved starter player will be placed into folders. IsolateLocalPlayer = false, -- Saves Children of LocalPlayer as separate folder and prevents any instance of ClassName Player with .Name identical to LocalPlayer.Name from saving IsolateLocalPlayerCharacter = false, -- Saves Children of LocalPlayer.Character as separate folder and prevents any instance of ClassName Player with .Name identical to LocalPlayer.Name from saving @@ -961,17 +960,18 @@ IgnoreSharedStrings = true, -- ! FIXES CRASHES (TEMPORARY, TESTED ON ROEXEC ONLY if mode == "optimized" then -- ! NOT supported with Model file mode mode = "full" end - if not CustomOptions.IsolateLocalPlayerCharacter then - OPTIONS.IsolateLocalPlayerCharacter = false - end - if not CustomOptions.IsolateStarterPlayer then - OPTIONS.IsolateStarterPlayer = false - end - if not CustomOptions.IsolateLocalPlayer then - OPTIONS.IsolateLocalPlayer = false - end - if not CustomOptions.NilInstances then - OPTIONS.NilInstances = false + + for _, key in next, + { + "IsolateLocalPlayerCharacter", + "IsolateStarterPlayer", + "IsolateLocalPlayer", + "NilInstances", + } + do + if not CustomOptions[key] then + OPTIONS[key] = false +end end placename = (FilePath or "model" .. PlaceId .. "_" .. ToSaveInstance:GetDebugId(0)) .. ".rbxmx" -- * GetDebugId is only unique per instance within same game session, after rejoining it might be different diff --git a/saveinstance.luau b/saveinstance.luau index 1dc140d..91bf116 100644 --- a/saveinstance.luau +++ b/saveinstance.luau @@ -874,7 +874,6 @@ local function synsaveinstance(CustomOptions) IgnoreNotArchivable = true, IgnorePropertiesOfNotScriptsOnScriptsMode = false, -- Ignores property of every instance that is not a script in "scripts" mode IgnoreSpecialProperties = false, -- true will disable Terrain & Break MeshPart Sizes (very likely) - IsolatePlayerGui = false, IsolateStarterPlayer = false, --If enabled, StarterPlayer will be cleared and the saved starter player will be placed into folders. IsolateLocalPlayer = false, -- Saves Children of LocalPlayer as separate folder and prevents any instance of ClassName Player with .Name identical to LocalPlayer.Name from saving IsolateLocalPlayerCharacter = false, -- Saves Children of LocalPlayer.Character as separate folder and prevents any instance of ClassName Player with .Name identical to LocalPlayer.Name from saving @@ -960,17 +959,18 @@ local function synsaveinstance(CustomOptions) if mode == "optimized" then -- ! NOT supported with Model file mode mode = "full" end - if not CustomOptions.IsolateLocalPlayerCharacter then - OPTIONS.IsolateLocalPlayerCharacter = false - end - if not CustomOptions.IsolateStarterPlayer then - OPTIONS.IsolateStarterPlayer = false - end - if not CustomOptions.IsolateLocalPlayer then - OPTIONS.IsolateLocalPlayer = false - end - if not CustomOptions.NilInstances then - OPTIONS.NilInstances = false + + for _, key in + { + "IsolateLocalPlayerCharacter", + "IsolateStarterPlayer", + "IsolateLocalPlayer", + "NilInstances", + } + do + if not CustomOptions[key] then + OPTIONS[key] = false +end end placename = (FilePath or "model" .. PlaceId .. "_" .. ToSaveInstance:GetDebugId(0)) .. ".rbxmx" -- * GetDebugId is only unique per instance within same game session, after rejoining it might be different