Skip to content

Commit

Permalink
Revert "Add ACF_Weighable for ACF entities that can be user-weighed"
Browse files Browse the repository at this point in the history
This reverts commit 41de938.
  • Loading branch information
marchc1 committed Dec 20, 2024
1 parent 87efcf5 commit cda4b2b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lua/entities/acf_baseplate/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ local Classes = ACF.Classes
local Entities = Classes.Entities

ENT.ACF_Limit = 16
ENT.ACF_Weighable = true

function ENT.ACF_OnVerifyClientData(ClientData)
ClientData.Size = Vector(ClientData.Width, ClientData.Length, ClientData.Thickness)
Expand All @@ -21,7 +20,13 @@ function ENT:ACF_PreSpawn(_, _, _, _)
self:SetMaterial("hunter/myplastic")
end

function ENT:ACF_OnMassChange(_, NewMass)
function ENT:ACF_PostSpawn(_, _, _, ClientData)
local EntMods = ClientData.EntityMods
if EntMods and EntMods.mass then
ACF.Contraption.SetMass(self, self.ACF.Mass or 1)
else
ACF.Contraption.SetMass(self, 1000)
end
end

local Text = "Baseplate Size: %dx%dx%d"
Expand Down

0 comments on commit cda4b2b

Please sign in to comment.