ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.PrintName = "Wheel Of Luck"
ENT.Category = "Mapobjekte"
ENT.Spawnable = true
ENT.AutomaticFrameAdvance = true

function ENT:SetupDataTables()
	self:NetworkVar("Int", 0, "BonusSpins")
	self:NetworkVar("Int", 1, "LastWin")
	self:NetworkVar("Entity", 1, "ReelOne")
	self:NetworkVar("Entity", 2, "ReelTwo")
	self:NetworkVar("Entity", 3, "ReelThree")
	self:NetworkVar("Int", 4, "Jackpot")
end

local IDToString = {}
IDToString[1] = "bonus"
IDToString[2] = "raspberry"
IDToString[3] = "coins"
IDToString[4] = "diamond"
IDToString[5] = "bar2"
IDToString[6] = "bar"
IDToString[7] = "seven"
IDToString[8] = "nothing"

WOL = WOL or {}
WOL.BONUS_ITEMS = {}
WOL.BONUS_ITEMS[1] = {cash = "jackpot"}

local index = 2
function WOL.AddBonusItem(reward)
	WOL.BONUS_ITEMS[index] = {cash = reward}
	index = index + 1
end

function WOL.IDToString(id)
	return IDToString[id]
end

function ENT:PhysgunPickup(ply)
	return !GetConVar("mg_movemode") or GetConVar("mg_movemode"):GetInt() > 1 and ply:IsAdmin() or GetConVar("mg_movemode") and GetConVar("mg_movemode"):GetInt() > 0 and ply:IsSuperAdmin()
end

function ENT:CanTool(ply, trace, mode)
	return !GetConVar("mg_movemode") or GetConVar("mg_movemode"):GetInt() > 1 and ply:IsAdmin() or GetConVar("mg_movemode") and GetConVar("mg_movemode"):GetInt() > 0 and ply:IsSuperAdmin()
end