Skip to content

Commit

Permalink
Update multiple serverside hook names
Browse files Browse the repository at this point in the history
  • Loading branch information
thecraftianman committed Dec 20, 2024
1 parent 3a92e1e commit 08b62e0
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lua/acf/hooks/hooks_missiles_sv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Hooks.Add("ACF_Missiles_Server", function(Gamemode)
--- @param Entity entity The affected missile.
--- @param Data table The bullet data of the affected missile.
--- @return boolean # True if the missile can explode, false otherwise.
function Gamemode:ACF_MissileCanExplode()
function Gamemode:ACF_PreExplodeMissile()
return true
end

Expand Down
2 changes: 1 addition & 1 deletion lua/acf/missiles/acfm_roundinject.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ else
return Result
end

hook.Add("ACF_VerifyData", "ACF Missile Ammo", function(EntClass, Data, ...)
hook.Add("ACF_OnVerifyData", "ACF Missile Ammo", function(EntClass, Data, ...)
if not AllowedClass[EntClass] then return end
if Data.Destiny ~= "Missiles" then return end

Expand Down
2 changes: 1 addition & 1 deletion lua/entities/acf_computer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ do -- Spawn and update function
Class.VerifyData(Data, Class)
end

hook.Run("ACF_VerifyData", "acf_computer", Data, Class)
hook.Run("ACF_OnVerifyData", "acf_computer", Data, Class)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lua/entities/acf_glatgm/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ local function ClampAngle(Object, Limit)
end

local function DetonateMissile(Missile, Inflictor)
local CanExplode = hook.Run("ACF_MissileCanExplode", Missile, Missile.BulletData)
local CanExplode = hook.Run("ACF_PreExplodeMissile", Missile, Missile.BulletData)

if not CanExplode then return end

Expand Down
2 changes: 1 addition & 1 deletion lua/entities/acf_missile/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ local function CalcFlight(Missile)
end

local function DetonateMissile(Missile, Inflictor)
local CanExplode = hook.Run("ACF_MissileCanExplode", Missile, Missile.BulletData)
local CanExplode = hook.Run("ACF_PreExplodeMissile", Missile, Missile.BulletData)

if not CanExplode then return end

Expand Down
3 changes: 1 addition & 2 deletions lua/entities/acf_rack/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ include("shared.lua")
-- Local Vars -----------------------------------

local EMPTY = { Type = "Empty", PropMass = 0, ProjMass = 0, Tracer = 0 }
local HookRun = hook.Run
local ACF = ACF
local Contraption = ACF.Contraption
local Classes = ACF.Classes
Expand Down Expand Up @@ -89,7 +88,7 @@ do -- Spawning and Updating --------------------
Rack.VerifyData(Data, Rack)
end

hook.Run("ACF_VerifyData", "acf_rack", Data, Rack)
hook.Run("ACF_OnVerifyData", "acf_rack", Data, Rack)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lua/entities/acf_radar/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ do -- Spawn and Update functions
Class.VerifyData(Data, Class)
end

hook.Run("ACF_VerifyData", "acf_radar", Data, Class)
hook.Run("ACF_OnVerifyData", "acf_radar", Data, Class)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lua/entities/acf_receiver/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ do -- Spawn and Update functions
Class.VerifyData(Data, Class)
end

hook.Run("ACF_VerifyData", "acf_receiver", Data, Class)
hook.Run("ACF_OnVerifyData", "acf_receiver", Data, Class)
end
end

Expand Down

0 comments on commit 08b62e0

Please sign in to comment.