fishing = fishing or {} 
fishing.LineTension = 0 
  
include("libraries/luadata.lua")

-- net_*.lua were made by Python1320
include("libraries/net_queue.lua")
include("libraries/net_playervars.lua")

include("utilities.lua")
include("stats.lua")
include("inventory.lua")
include("restrictions.lua")
    
include("rod.lua")
   
if CLIENT then 
	--include("client/hud.lua")
	include("client/camera.lua") 
	include("client/rod_screen.lua")
end 

if SERVER then
	include("server/spawning.lua")
	include("server/inventory.lua")
end

include("base_entity.lua") 
include("base_bait.lua")
include("base_fish.lua")

include("seagulls.lua")

function fishing.IncludeAllFiles(dir)
	local files = file.Find("fishing/"..dir.."/*", "LUA")
	for _, file_name in pairs(files) do
		include("fishing/"..dir.."/" .. file_name)
	end
end

fishing.IncludeAllFiles("bait")
fishing.IncludeAllFiles("fish")
 
if SERVER then
	concommand.Add("fishing_test", function(ply)
		if ply ~= player.GetByUniqueID(--[[CapsAdmin]] "1416729906") then return end
		
		ply:Give("weapon_fishing")

		fishing.SetPlayerItemCount(ply, "chinese", math.random(50))
		fishing.SetPlayerItemCount(ply, "melon", math.random(50)) 
		fishing.SetPlayerItemCount(ply, "hula flyer", math.random(50))		
		
		local stats = fishing.GetStats(ply)
		stats.rod_length = 1 + math.random() * 5
		stats.string_max_tension = 20
		stats.string_length = 5000
	end)
end