aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/entity_ext.lua
blob: c0e1b34a46314eb25a181e02bcb6438ac6748dbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local meta = FindMetaTable("Entity")

function meta:IsTree()
	local model = self:GetModel()
	local class = self:GetClass()
	return ((model:find("tree") or model:find("pine")) and !class:find("ws_"))
end

function meta:IsRock()
	local model = self:GetModel()
	local class = self:GetClass()
	return (model:find("rock") and !class:find("ws_"))
end

function meta:IsPlant()
	local model = self:GetModel()
	local class = self:GetClass()
	return (model:find("antlionhill") and !class:find("ws_"))
end