From 6b64bc0a13b9f152ddc31a3b31a9c0948328f2ed Mon Sep 17 00:00:00 2001 From: NullBite Date: Wed, 23 Mar 2022 14:33:51 -0400 Subject: [PATCH] Add setting for tail enabled, PM manage cape Move cape to PartsManager so it can be disabled when tail is enabled --- script.lua | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/script.lua b/script.lua index f6f0325..fdb759e 100644 --- a/script.lua +++ b/script.lua @@ -209,6 +209,7 @@ do ["snore_enabled"]=true, ["print_settings"]=false, ["vanilla_partial"]=false, + ["tail_enabled"]=true, ["aquatic_enabled"]=false } @@ -377,34 +378,37 @@ do --- Vanilla state -- Show all in vanilla partial - PM.addPartGroupFunction(VANILLA_GROUPS.ALL, function() return - vanillaPartial() end) - -- no legs in water if tail enabled + PM.addPartGroupFunction(VANILLA_GROUPS.ALL, function() return vanillaPartial() end) + -- no cape if tail enabled (it clips) + PM.addPartFunction(vanilla_model.CAPE, function(last) return last and not local_state.tail_enabled end) + -- no legs in water if mtail enabled PM.addPartGroupFunction(VANILLA_GROUPS.LEFT_LEG, function(last) return last and not aquaticTailVisible() end) PM.addPartGroupFunction(VANILLA_GROUPS.RIGHT_LEG, function(last) return last and not aquaticTailVisible() end) -- no vanilla head in partial vanilla PM.addPartGroupFunction(VANILLA_GROUPS.HEAD, function(last) return last and not vanillaPartial() end) -- Always true if vanilla_enabled - PM.addPartGroupFunction(VANILLA_GROUPS.ALL, - function(last) return last or local_state.vanilla_enabled end) + PM.addPartGroupFunction(VANILLA_GROUPS.ALL, function(last) return last or local_state.vanilla_enabled end) --- Armor state - PM.addPartGroupFunction(VANILLA_GROUPS.ARMOR, - function(last) return local_state.armor_enabled end) + PM.addPartGroupFunction(VANILLA_GROUPS.ARMOR, function(last) return local_state.armor_enabled end) --- Custom state -- Disable model in vanilla partial PM.addPartGroupFunction(CUSTOM_GROUPS, function(last) return not vanillaPartial() end) + -- Enable certain parts in vanilla partial + local vanilla_partial_enabled={model.Head, model.Body_Tail} + PM.addPartGroupFunction(vanilla_partial_enabled, function(last) return last or vanillaPartial() end) + -- Enable tail setting + PM.addPartFunction(model.Body_Tail, function(last) return last and local_state.tail_enabled end) -- no legs, regular tail in water if tail enabled local mtail_mutually_exclusive={model.LeftLeg, model.RightLeg, model.Body_Tail} PM.addPartGroupFunction(mtail_mutually_exclusive, function(last) return last and not aquaticTailVisible() end) - -- Enable certain parts in vanilla partial - local vanilla_partial_enabled={model.Head, model.Body_Tail} - PM.addPartGroupFunction(vanilla_partial_enabled, function(last) return last or vanillaPartial() end) -- Disable when vanilla_enabled PM.addPartGroupFunction(CUSTOM_GROUPS, function(last) return last and not local_state.vanilla_enabled end) + + end SNORES={"snore-1", "snore-2", "snore-3"} @@ -593,7 +597,6 @@ else v.setEnabled(false) end end -vanilla_model.CAPE.setEnabled(true) -- }}}