Skip to content

Commit

Permalink
Allow ammo/fuel resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
thecraftianman committed Sep 7, 2024
1 parent 78f5da1 commit 10bad48
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
11 changes: 0 additions & 11 deletions lua/entities/acf_ammo/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,6 @@ do -- Spawning and Updating --------------------
end
end)

-- Called when checking if an entity can be spawned.
hook.Add("ACF_CanUpdateEntity", "ACF Crate Size Update", function(Entity, Data)
if not Entity.IsACFAmmoCrate then return end
if Data.Size then return end -- The menu won't send it like this

Data.Size = Entity:GetSize()
Data.CrateSizeX = nil
Data.CrateSizeY = nil
Data.CrateSizeZ = nil
end)

-------------------------------------------------------------------------------

function MakeACF_Ammo(Player, Pos, Ang, Data)
Expand Down
10 changes: 0 additions & 10 deletions lua/entities/acf_fueltank/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,6 @@ do -- Spawn and Update functions
WireLib.TriggerOutput(Entity, "Capacity", Entity.Capacity)
end

hook.Add("ACF_CanUpdateEntity", "ACF Fuel Tank Size Update", function(Entity, Data)
if not Entity.IsACFFuelTank then return end
if Data.Size then return end -- The menu won't send it like this

Data.Size = Entity:GetSize()
Data.TankSizeX = nil
Data.TankSizeY = nil
Data.TankSizeZ = nil
end)

function MakeACF_FuelTank(Player, Pos, Angle, Data)
VerifyData(Data)

Expand Down

0 comments on commit 10bad48

Please sign in to comment.