From dff72fae1be663177ce292b3c63c3d760c11cbf1 Mon Sep 17 00:00:00 2001 From: phoriah <95628489+phoriah@users.noreply.github.com> Date: Tue, 31 Dec 2024 06:54:00 +0200 Subject: [PATCH] Moved FilteredSelection to NotCreatableFixes --- saveinstance.luau | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/saveinstance.luau b/saveinstance.luau index c268cd2..1bb23ec 100644 --- a/saveinstance.luau +++ b/saveinstance.luau @@ -1334,7 +1334,7 @@ local GLOBAL_ENV = getgenv and getgenv() or _G or shared --- @field IsolateLocalPlayerCharacter boolean -- Saves Children of LocalPlayer.Character as separate folder and prevents any instance of ClassName Player with .Name identical to LocalPlayer.Name from saving. ___Default:___ false --- @field RemovePlayerCharacters boolean -- Ignore player characters while saving. (Enables SaveNonCreatable automatically). ___Default:___ true --- @field SaveNonCreatable boolean -- * Includes non-serializable instances as Folder objects (Name is misleading as this is mostly a fix for certain NilInstances and isn't always related to NotCreatable). ___Default:___ false ---- .NotCreatableFixes table -- * {"Player"} is the same as {Player = "Folder"}; Format like {SpawnLocation = "Part"} is only to be used when SpawnLocation inherits from "Part" AND "Part" is Creatable. ___Default:___ { "Player", "PlayerScripts", "PlayerGui" } +--- .NotCreatableFixes table -- * {"Player"} is the same as {Player = "Folder"}; Format like {SpawnLocation = "Part"} is only to be used when SpawnLocation inherits from "Part" AND "Part" is Creatable. ___Default:___ { "", "Player", "PlayerScripts", "PlayerGui", "TouchTransmitter" } --- @field IsolatePlayers boolean -- * This option does save players, it's just they won't show up in Studio and can only be viewed through the place file code (in text editor). More info at https://github.com/luau/UniversalSynSaveInstance/issues/2. ___Default:___ false --- @field AlternativeWritefile boolean -- * Splits file content string into segments and writes them using appendfile. This might help with crashes when it starts writing to file. Though there is a risk of appendfile working incorrectly on some executors. ___Default:___ true --- @field IgnoreDefaultPlayerScripts boolean -- * **RISKY: Ignores Default PlayerScripts like PlayerModule & RbxCharacterSounds. Prevents crashes on certain Executors. ___Default:___ true @@ -1450,7 +1450,13 @@ local function synsaveinstance(CustomOptions, CustomOptions2) RemovePlayerCharacters = true, SaveNonCreatable = false, - NotCreatableFixes = { "Player", "PlayerScripts", "PlayerGui", "TouchTransmitter" }, + NotCreatableFixes = { + "", -- * FilteredSelection + "Player", + "PlayerScripts", + "PlayerGui", + "TouchTransmitter", + }, -- ! Risky @@ -2297,9 +2303,6 @@ local function synsaveinstance(CustomOptions, CustomOptions2) if not InstanceOverride then InstanceOverride = InstancesOverrides[instance] end - if ClassName == "" then -- * FilteredSelection - ClassName = "Folder" - end -- ? The reason we only save .Name (and few other props in save_specific) is because -- ? we can be sure this is a custom container (ex. NilInstancesFixes)