From 10f91c8f3654f843e839d9a33f7f56b3f13a2026 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 3 Dec 2022 04:10:11 -0600 Subject: [PATCH 1/9] Update init.lua --- sm64/Util/init.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sm64/Util/init.lua b/sm64/Util/init.lua index 0d6f6d9..88dfcc1 100644 --- a/sm64/Util/init.lua +++ b/sm64/Util/init.lua @@ -57,10 +57,11 @@ end function Util.ToRotation(v: Vector3int16): CFrame local angle = Util.ToEulerAngles(v) - - local matrix = CFrame.fromAxisAngle(Vector3.yAxis, angle.Y) - * CFrame.fromAxisAngle(Vector3.xAxis, -angle.X) - * CFrame.fromAxisAngle(Vector3.zAxis, -angle.Z) + + -- stylua: ignore + local matrix = CFrame.fromAxisAngle(Vector3.yAxis, angle.Y) + * CFrame.fromAxisAngle(Vector3.xAxis, -angle.X) + * CFrame.fromAxisAngle(Vector3.zAxis, -angle.Z) return matrix end From b6a19b47a67046b2ff86081498fa1dcf1c371f65 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 3 Dec 2022 04:15:52 -0600 Subject: [PATCH 2/9] Update init.client.lua --- sm64/init.client.lua | 70 +++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 20 deletions(-) diff --git a/sm64/init.client.lua b/sm64/init.client.lua index 3622436..8265e81 100644 --- a/sm64/init.client.lua +++ b/sm64/init.client.lua @@ -53,8 +53,11 @@ local function processAction(id: string, state: Enum.UserInputState) if state == Enum.UserInputState.Begin then local isDebug = not script.Util:GetAttribute("Debug") local character = player.Character - - local rootPart = if character then character.PrimaryPart else nil + + -- stylua: ignore + local rootPart = if character + then character.PrimaryPart + else nil if rootPart then local action = rootPart:FindFirstChild("Action") @@ -84,8 +87,11 @@ end local function updateCollisions() for i, player in Players:GetPlayers() do assert(player:IsA("Player")) - - local rootPart = if player.Character then player.Character.PrimaryPart else nil + + -- stylua: ignore + local rootPart = if player.Character + then player.Character.PrimaryPart + else nil if rootPart then local parts = rootPart:GetConnectedParts(true) @@ -146,8 +152,11 @@ assert(lazyNetwork:IsA("RemoteEvent"), "bad lazyNetwork!") function Commands.PlaySound(player: Player, name: string) local sound: Sound? = Sounds[name] local character = player.Character - - local rootPart = if character then character.PrimaryPart else nil + + -- stylua: ignore + local rootPart = if character + then character.PrimaryPart + else nil if rootPart and sound then local oldSound: Instance? = rootPart:FindFirstChild(name) @@ -168,13 +177,19 @@ end function Commands.SetParticle(player: Player, name: string, set: boolean) local character = player.Character - - local rootPart = if character then character.PrimaryPart else nil + + -- stylua: ignore + local rootPart = if character + then character.PrimaryPart + else nil if rootPart then local particles = rootPart:FindFirstChild("Particles") - - local inst = if particles then particles:FindFirstChild(name) else nil + + -- stylua: ignore + local inst = if particles + then particles:FindFirstChild(name) + else nil if inst and PARTICLE_CLASSES[inst.ClassName] then local particle = inst :: ParticleEmitter @@ -191,8 +206,11 @@ end function Commands.SetAngle(player: Player, angle: Vector3int16) local character = player.Character - - local waist = if character then character:FindFirstChild("Waist", true) else nil + + -- stylua: ignore + local waist = if character + then character:FindFirstChild("Waist", true) + else nil if waist and waist:IsA("Motor6D") then local props = { C1 = Util.ToRotation(-angle) + waist.C1.Position } @@ -296,8 +314,11 @@ local function update() local now = os.clock() local gfxRot = CFrame.identity - - local humanoid = if character then character:FindFirstChildOfClass("Humanoid") else nil + + -- stylua: ignore + local humanoid = if character + then character:FindFirstChildOfClass("Humanoid") + else nil local simSpeed = tonumber(script:GetAttribute("TimeScale") or nil) or 1 local frames = math.floor((now - lastUpdate) * (STEP_RATE * simSpeed)) @@ -383,15 +404,24 @@ local function update() cf = cf:Lerp(goalCF, interp) alignCF.CFrame = cf.Rotation end - - local debugLabel = if action then action:FindFirstChildOfClass("TextLabel") else nil + + -- stylua: ignore + local debugLabel = if action + then action:FindFirstChildOfClass("TextLabel") + else nil if debugLabel then local actionId = mario.Action() - - local anim = if activeTrack then activeTrack.Animation else nil - - local animName = if anim then anim.Name else nil + + -- stylua: ignore + local anim = if activeTrack + then activeTrack.Animation + else nil + + -- stylua: ignore + local animName = if anim + then anim.Name + else nil local debugText = "Action: " .. Enums.GetName(Action, actionId) From 5ca00511121d78ba0c7e18148050ff09f640924a Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 3 Dec 2022 04:19:41 -0600 Subject: [PATCH 3/9] Update init.lua --- sm64/Mario/init.lua | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/sm64/Mario/init.lua b/sm64/Mario/init.lua index ec55a90..a5b3960 100644 --- a/sm64/Mario/init.lua +++ b/sm64/Mario/init.lua @@ -237,25 +237,37 @@ end function Mario.PlayLandingSound(m: Mario, sound: Instance?) local sound = sound or Sounds.ACTION_TERRAIN_LANDING - local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) then Sounds.ACTION_METAL_LANDING else sound + -- stylua: ignore + local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) + then Sounds.ACTION_METAL_LANDING + else sound m:PlaySoundAndSpawnParticles(landSound, 1) end function Mario.PlayLandingSoundOnce(m: Mario, sound: Instance?) - local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) then Sounds.ACTION_METAL_LANDING else sound + -- stylua: ignore + local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) + then Sounds.ACTION_METAL_LANDING + else sound m:PlayActionSound(landSound, 1) end function Mario.PlayHeavyLandingSound(m: Mario, sound: Instance?) - local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) then Sounds.ACTION_METAL_HEAVY_LANDING else sound + -- stylua: ignore + local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) + then Sounds.ACTION_METAL_HEAVY_LANDING + else sound m:PlaySoundAndSpawnParticles(landSound, 1) end function Mario.PlayHeavyLandingSoundOnce(m: Mario, sound: Instance?) - local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) then Sounds.ACTION_METAL_HEAVY_LANDING else sound + -- stylua: ignore + local landSound = if m.Flags:Has(MarioFlags.METAL_CAP) + then Sounds.ACTION_METAL_HEAVY_LANDING + else sound m:PlayActionSound(landSound, 1) end @@ -266,7 +278,10 @@ function Mario.PlayMarioSound(m: Mario, actionSound: Instance, marioSound: Insta end if actionSound == Sounds.ACTION_TERRAIN_JUMP then - local sound = if m.Flags:Has(MarioFlags.METAL_CAP) then Sounds.ACTION_METAL_JUMP else actionSound + -- stylua: ignore + local sound = if m.Flags:Has(MarioFlags.METAL_CAP) + then Sounds.ACTION_METAL_JUMP + else actionSound m:PlayActionSound(sound) else From ff8e9c0a8ebd42198c0c4f2f8abcdbfdcb22fefd Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 3 Dec 2022 04:26:26 -0600 Subject: [PATCH 4/9] Update Moving.client.lua --- sm64/Mario/Moving.client.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sm64/Mario/Moving.client.lua b/sm64/Mario/Moving.client.lua index de1ed76..7f575f8 100644 --- a/sm64/Mario/Moving.client.lua +++ b/sm64/Mario/Moving.client.lua @@ -1414,11 +1414,11 @@ DEF_ACTION(Action.LONG_JUMP_LAND, function(m: Mario) if not m.Input:Has(InputFlags.NONZERO_ANALOG) then m:PlaySoundIfNoFlag(Sounds.MARIO_UH, MarioFlags.MARIO_SOUND_PLAYED) end - - commonLandingAction( - m, - if m.LongJumpIsSlow then Animations.CROUCH_FROM_FAST_LONGJUMP else Animations.CROUCH_FROM_SLOW_LONGJUMP - ) + + -- stylua: ignore + commonLandingAction(m, if m.LongJumpIsSlow + then Animations.CROUCH_FROM_FAST_LONGJUMP + else Animations.CROUCH_FROM_SLOW_LONGJUMP) return false end) From 41b0f8f4322d64a50035c91d98eb9df0d6510ba6 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 3 Dec 2022 04:29:04 -0600 Subject: [PATCH 5/9] Update Stationary.client.lua --- sm64/Mario/Stationary.client.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sm64/Mario/Stationary.client.lua b/sm64/Mario/Stationary.client.lua index bbb342e..9ed4856 100644 --- a/sm64/Mario/Stationary.client.lua +++ b/sm64/Mario/Stationary.client.lua @@ -596,10 +596,13 @@ DEF_ACTION(Action.LONG_JUMP_LAND_STOP, function(m: Mario) if checkCommonLandingCancels(m, Action.JUMP) then return true end - - landingStep( - m, - if m.LongJumpIsSlow then Animations.CROUCH_FROM_FAST_LONGJUMP else Animations.CROUCH_FROM_SLOW_LONGJUMP, + + -- stylua: ignore + landingStep(m, + if m.LongJumpIsSlow + then Animations.CROUCH_FROM_FAST_LONGJUMP + else Animations.CROUCH_FROM_SLOW_LONGJUMP, + Action.CROUCHING ) From 726970a411ab2d6648ed2de678c7de2b6746a9b4 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 3 Dec 2022 04:30:23 -0600 Subject: [PATCH 6/9] Update LazyNetworking.server.lua --- rbx/LazyNetworking.server.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/rbx/LazyNetworking.server.lua b/rbx/LazyNetworking.server.lua index d6279bd..e1f94d1 100644 --- a/rbx/LazyNetworking.server.lua +++ b/rbx/LazyNetworking.server.lua @@ -27,13 +27,19 @@ function Validators.SetParticle(player: Player, name: string, set: boolean?) end local character = player.Character - - local rootPart = if character then character.PrimaryPart else nil + + -- stylua: ignore + local rootPart = if character + then character.PrimaryPart + else nil if rootPart then local particles = rootPart:FindFirstChild("Particles") - - local particle = if particles then particles:FindFirstChild(name) else nil + + -- stylua: ignore + local particle = if particles + then particles:FindFirstChild(name) + else nil if particle then return true From 0a9f47d84ac48ba7b4bb27ad9d0bde0a76dd714d Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 3 Dec 2022 04:32:25 -0600 Subject: [PATCH 7/9] Update Moving.client.lua --- sm64/Mario/Moving.client.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sm64/Mario/Moving.client.lua b/sm64/Mario/Moving.client.lua index 7f575f8..edd5ee3 100644 --- a/sm64/Mario/Moving.client.lua +++ b/sm64/Mario/Moving.client.lua @@ -883,8 +883,9 @@ DEF_ACTION(Action.WALKING, function(m: Mario) return m:SetAction(Action.CROUCH_SLIDE) end - local step - do + + -- stylua: ignore + local step do m.ActionState = 0 startPos = m.Position @@ -1414,7 +1415,7 @@ DEF_ACTION(Action.LONG_JUMP_LAND, function(m: Mario) if not m.Input:Has(InputFlags.NONZERO_ANALOG) then m:PlaySoundIfNoFlag(Sounds.MARIO_UH, MarioFlags.MARIO_SOUND_PLAYED) end - + -- stylua: ignore commonLandingAction(m, if m.LongJumpIsSlow then Animations.CROUCH_FROM_FAST_LONGJUMP From 0ee4ad340b3bb41bec1ab9b1623bb60779220bc0 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 3 Dec 2022 04:34:14 -0600 Subject: [PATCH 8/9] Update Airborne.client.lua --- sm64/Mario/Airborne.client.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sm64/Mario/Airborne.client.lua b/sm64/Mario/Airborne.client.lua index 968afcb..8c3378e 100644 --- a/sm64/Mario/Airborne.client.lua +++ b/sm64/Mario/Airborne.client.lua @@ -305,8 +305,8 @@ local function updateFlying(m: Mario) end local function commonAirActionStep(m: Mario, landAction: number, anim: Animation, stepArg: number): number - local stepResult - do + -- stylua: ignore + local stepResult do updateAirWithoutTurn(m) stepResult = m:PerformAirStep(stepArg) end @@ -397,8 +397,8 @@ local function commonAirKnockbackStep( anim: Animation, speed: number ) - local stepResult - do + -- stylua: ignore + local stepResult do m:SetForwardVel(speed) stepResult = m:PerformAirStep() end From 0e4c8b39d6015b7e984c62bbd9d37795fad932dc Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 4 Dec 2022 08:06:09 -0600 Subject: [PATCH 9/9] Update UploadAnimations.lua --- tools/UploadAnimations.lua | 81 ++++++++------------------------------ 1 file changed, 17 insertions(+), 64 deletions(-) diff --git a/tools/UploadAnimations.lua b/tools/UploadAnimations.lua index cbe53f9..93657d0 100644 --- a/tools/UploadAnimations.lua +++ b/tools/UploadAnimations.lua @@ -11,71 +11,24 @@ local bxor = bit32.bxor local rrotate = bit32.rrotate local rshift = bit32.rshift +-- stylua: ignore local primes = { - 0x428a2f98, - 0x71374491, - 0xb5c0fbcf, - 0xe9b5dba5, - 0x3956c25b, - 0x59f111f1, - 0x923f82a4, - 0xab1c5ed5, - 0xd807aa98, - 0x12835b01, - 0x243185be, - 0x550c7dc3, - 0x72be5d74, - 0x80deb1fe, - 0x9bdc06a7, - 0xc19bf174, - 0xe49b69c1, - 0xefbe4786, - 0x0fc19dc6, - 0x240ca1cc, - 0x2de92c6f, - 0x4a7484aa, - 0x5cb0a9dc, - 0x76f988da, - 0x983e5152, - 0xa831c66d, - 0xb00327c8, - 0xbf597fc7, - 0xc6e00bf3, - 0xd5a79147, - 0x06ca6351, - 0x14292967, - 0x27b70a85, - 0x2e1b2138, - 0x4d2c6dfc, - 0x53380d13, - 0x650a7354, - 0x766a0abb, - 0x81c2c92e, - 0x92722c85, - 0xa2bfe8a1, - 0xa81a664b, - 0xc24b8b70, - 0xc76c51a3, - 0xd192e819, - 0xd6990624, - 0xf40e3585, - 0x106aa070, - 0x19a4c116, - 0x1e376c08, - 0x2748774c, - 0x34b0bcb5, - 0x391c0cb3, - 0x4ed8aa4a, - 0x5b9cca4f, - 0x682e6ff3, - 0x748f82ee, - 0x78a5636f, - 0x84c87814, - 0x8cc70208, - 0x90befffa, - 0xa4506ceb, - 0xbef9a3f7, - 0xc67178f2, + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2, } local function toHex(str: string): string