From f75c14f2d4abb5b75278e9df2cc6aa0a70522ceb Mon Sep 17 00:00:00 2001 From: LordMidas <55047920+LordMidas@users.noreply.github.com> Date: Thu, 7 Dec 2023 06:16:59 -0500 Subject: [PATCH] refactor: use @() when not calling __original --- msu/hooks/entity/world/party.nut | 2 +- msu/hooks/items/item.nut | 2 +- msu/hooks/skills/perks/perk_quick_hands.nut | 6 +++--- msu/hooks/states/world_state.nut | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/msu/hooks/entity/world/party.nut b/msu/hooks/entity/world/party.nut index 9a43637a2..f3fddea29 100644 --- a/msu/hooks/entity/world/party.nut +++ b/msu/hooks/entity/world/party.nut @@ -16,7 +16,7 @@ } // Used in vanilla to fetch BaseMovementSpeed in the ai_flee function ; we now return the new computed value - q.getBaseMovementSpeed = @(__original) function() + q.getBaseMovementSpeed = @() function() { return this.getMovementSpeed(); } diff --git a/msu/hooks/items/item.nut b/msu/hooks/items/item.nut index dfbb09703..caa57770a 100644 --- a/msu/hooks/items/item.nut +++ b/msu/hooks/items/item.nut @@ -1,5 +1,5 @@ ::MSU.HooksMod.hook("scripts/items/item", function(q) { - q.isItemType = @(__original) function( _t, _any = true, _only = false ) + q.isItemType = @() function( _t, _any = true, _only = false ) { if (_any) { diff --git a/msu/hooks/skills/perks/perk_quick_hands.nut b/msu/hooks/skills/perks/perk_quick_hands.nut index 742ec92dc..a42b72796 100644 --- a/msu/hooks/skills/perks/perk_quick_hands.nut +++ b/msu/hooks/skills/perks/perk_quick_hands.nut @@ -7,15 +7,15 @@ this.m.ItemActionOrder = ::Const.ItemActionOrder.Any; } - q.onUpdate = @(__original) function( _properties ) + q.onUpdate = @() function( _properties ) { } - q.onCombatStarted = @(__original) function() + q.onCombatStarted = @() function() { } - q.onCombatFinished = @(__original) function() + q.onCombatFinished = @() function() { this.skill.onCombatFinished(); } diff --git a/msu/hooks/states/world_state.nut b/msu/hooks/states/world_state.nut index 21eb3d51e..b63f53db7 100644 --- a/msu/hooks/states/world_state.nut +++ b/msu/hooks/states/world_state.nut @@ -37,7 +37,7 @@ this.m.MenuStack.pop(); } - q.getLocalCombatProperties = @(__original) function( _pos, _ignoreNoEnemies = false ) + q.getLocalCombatProperties = @() function( _pos, _ignoreNoEnemies = false ) { local raw_parties = ::World.getAllEntitiesAtPos(_pos, ::Const.World.CombatSettings.CombatPlayerDistance); local parties = [];