From a68cb03da948d5dcac2670838508b1e85f986882 Mon Sep 17 00:00:00 2001 From: NullBite Date: Thu, 24 Mar 2022 22:03:50 -0400 Subject: [PATCH] Add aquatic armor to PartsManager --- script.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/script.lua b/script.lua index 17c5bb1..fca431f 100644 --- a/script.lua +++ b/script.lua @@ -447,14 +447,12 @@ do -- Always true if vanilla_enabled PM.addPartGroupFunction(VANILLA_GROUPS.ALL, function(last) return last or forceVanilla() end) - --- Armor state - PM.addPartGroupFunction(VANILLA_GROUPS.ARMOR, function(last) return last and local_state.armor_enabled end) --- Custom state - local tail_parts=mergeTable({model.Body.TailBase}, recurseModelGroup(model.Body.MTail1)) + local tail_parts=mergeTable({model.Body.TailBase}, TAIL_BONES) -- Disable model in vanilla partial local vanilla_partial_disabled=mergeTable(MAIN_GROUPS, {model.Body.Body, model.Body.BodyLayer}) - local vanilla_partial_enabled=mergeTable(tail_parts, {model.Head, model.Body_Tail, model.Body}) + local vanilla_partial_enabled={model.Head, model.Body} PM.addPartGroupFunction(vanilla_partial_disabled, function(last) return not vanillaPartial() end) -- Enable certain parts in vanilla partial PM.addPartGroupFunction(vanilla_partial_enabled, function(last) return last or vanillaPartial() end) @@ -468,6 +466,11 @@ do -- aquatic tail in water PM.addPartGroupFunction(tail_parts, function(last) return last and aquaticTailVisible() end) + --- Armor state + local all_armor=reduce(mergeTable, {VANILLA_GROUPS.ARMOR, TAIL_LEGGINGS, TAIL_BOOTS}) + PM.addPartGroupFunction(all_armor, function(last) return last and local_state.armor_enabled end) + + -- Disable when vanilla_enabled PM.addPartGroupFunction(MAIN_GROUPS, function(last) return last and not forceVanilla() end) end