Skip to content

Commit

Permalink
Allow adding more pump entity classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Doridian committed Mar 6, 2024
1 parent 55f79c0 commit 1c79dd5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/entities/rd_pump/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function ENT:LinkToPump(ply, ent)
return false, "You are not allowed to control this pump!"
end

if ent:GetClass() ~= self:GetClass() then
if not (IsValid(ent) and ent.IsRDPump and ent:IsRDPump()) then
return false, "The other entity is not a pump"
end

Expand Down
6 changes: 5 additions & 1 deletion lua/entities/rd_pump/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ ENT.IsPump = true

list.Set("LSEntOverlayText", "rd_pump", {
HasOOO = true
})
})

function ENT:IsRDPump()
return true
end

0 comments on commit 1c79dd5

Please sign in to comment.