zrush = zrush or {}
zrush.f = zrush.f or {}

if SERVER then
	AddCSLuaFile("zrush_config_fuel.lua")
	AddCSLuaFile("zrush/sh/zrush_materials.lua")
end
include("zrush_config_fuel.lua")
include("zrush/sh/zrush_materials.lua")

if SERVER then
	AddCSLuaFile("zrush/cl/zrush_fonts.lua")
	AddCSLuaFile("zrush/cl/zrush_player_cl.lua")
else
	include("zrush/cl/zrush_fonts.lua")
	include("zrush/cl/zrush_player_cl.lua")
end

timer.Simple(0, function()
	if SERVER then
		AddCSLuaFile("zrush_config_fuel.lua")
		AddCSLuaFile("zrush_config_machines.lua")
		AddCSLuaFile("zrush_config_main.lua")
		AddCSLuaFile("zrush_config_modules.lua")
		AddCSLuaFile("zrush_config_oilspot.lua")
		AddCSLuaFile("zrush/sh/zrush_animation.lua")
		AddCSLuaFile("zrush/sh/zrush_crate_builder_sh.lua")
		AddCSLuaFile("zrush/sh/zrush_enttable.lua")
		AddCSLuaFile("zrush/sh/zrush_precache.lua")
		AddCSLuaFile("zrush/sh/zrush_soundlibary.lua")
		AddCSLuaFile("zrush/sh/zrush_utility.lua")
		AddCSLuaFile("zrush/sh/zrush_vfx.lua")
		AddCSLuaFile("zrush/cl/zrush_barrel_vgui.lua")
		AddCSLuaFile("zrush/cl/zrush_crate_builder_cl.lua")
		AddCSLuaFile("zrush/cl/zrush_crate_vgui.lua")
		AddCSLuaFile("zrush/cl/zrush_fuelbuyer_vgui.lua")
		AddCSLuaFile("zrush/cl/zrush_machine_vgui.lua")
	end

	include("zrush_config_machines.lua")
	include("zrush_config_main.lua")
	include("zrush_config_modules.lua")
	include("zrush_config_oilspot.lua")
	include("zrush/sh/zrush_animation.lua")
	include("zrush/sh/zrush_crate_builder_sh.lua")
	include("zrush/sh/zrush_enttable.lua")
	include("zrush/sh/zrush_precache.lua")
	include("zrush/sh/zrush_soundlibary.lua")
	include("zrush/sh/zrush_utility.lua")
	include("zrush/sh/zrush_vfx.lua")

	if SERVER then
		include("zrush/sv/zrush_crate_builder_sv.lua")
		include("zrush/sv/zrush_drillhole_remover.lua")
		include("zrush/sv/zrush_ent_barrel.lua")
		include("zrush/sv/zrush_ent_burner.lua")
		include("zrush/sv/zrush_ent_drillhole.lua")
		include("zrush/sv/zrush_ent_drilltower.lua")
		include("zrush/sv/zrush_ent_fuelbuyer.lua")
		include("zrush/sv/zrush_ent_machinecrate.lua")
		include("zrush/sv/zrush_ent_oil.lua")
		include("zrush/sv/zrush_ent_oilgenerator.lua")
		include("zrush/sv/zrush_ent_pump.lua")
		include("zrush/sv/zrush_ent_refinery.lua")
		include("zrush/sv/zrush_eventmanager.lua")
		include("zrush/sv/zrush_gas_damage.lua")
		include("zrush/sv/zrush_machinepanel.lua")
		include("zrush/sv/zrush_machineshop.lua")
		include("zrush/sv/zrush_money.lua")
		include("zrush/sv/zrush_oilspot_generator.lua")
		include("zrush/sv/zrush_oilspot_refresher.lua")
		include("zrush/sv/zrush_player.lua")
		include("zrush/sv/zrush_save.lua")
	else
		include("zrush/cl/zrush_barrel_vgui.lua")
		include("zrush/cl/zrush_crate_builder_cl.lua")
		include("zrush/cl/zrush_crate_vgui.lua")
		include("zrush/cl/zrush_fuelbuyer_vgui.lua")
		include("zrush/cl/zrush_machine_vgui.lua")
	end

	local files = file.Find("zrush_languages/*.lua", "LUA")
	for _, v in ipairs(files) do
		if SERVER then
			AddCSLuaFile("zrush_languages/"..v)
		end
		include("zrush_languages/"..v)
	end
end)