--[[
	MOD/lua/bin/lua/client/libs/init.lua
	Joseph | STEAM_0:0:69348930 <2.26.87.183:27005> | [19-10-13 05:31:36PM]
	===BadFile===
]]

/* * * * * * * * * * * * * * * * 
 * 	 ______     __  __     ______     __  __     ______     ______     __  __    
 *	/\  __ \   /\ \/\ \   /\  == \   /\ \_\ \   /\  __ \   /\  ___\   /\ \/ /    
 *	\ \ \/\ \  \ \ \_\ \  \ \  __<   \ \  __ \  \ \  __ \  \ \ \____  \ \  _"-.  
 *	 \ \_____\  \ \_____\  \ \_____\  \ \_\ \_\  \ \_\ \_\  \ \_____\  \ \_\ \_\ 
 *	  \/_____/   \/_____/   \/_____/   \/_/\/_/   \/_/\/_/   \/_____/   \/_/\/_/ 
 *
 *  - Version : 3L
 *  - By Oubliette
 * * * * * * * * * * * * * * * */

--
local arg = { ... };
local IOubHack = arg[ 1 ]
--

local function copy( tab, nTab, f )

	local _copy = {};

	setmetatable( _copy, getmetatable( tab ) );

	for k, v in pairs( tab ) do 

		if ( !istable( v ) ) then 

			_copy[ k ] = v;

		else 

			nTab = nTab or {};
			nTab[ tab ] = _copy;

			if ( nTab[ v ] ) then 

				_copy[ k ] = nTab[ v ];

			else 

				_copy[ k ] = f( v, nTab, f );

			end

		end

	end

	return _copy;

end

local g = copy( _G, {}, copy );
local r = copy( debug.getregistry(), {}, copy );

g.table = 			IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/glib/table.lua" )( g, copy( table or {}, {}, copy ) ); // Everything else has access to copy besides this file -- done

IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/glib/util.lua" )( g ); -- done

r.Angle =	 	IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/rlib/angle.lua" )( g, r );
r.Vector = 		IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/rlib/vector.lua" )( g, r );
r.Entity = 		IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/rlib/entity.lua" )( g, r );
r.Player = 		IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/rlib/player.lua" )( g, r );

g.string = 			IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/glib/string.lua" )( g, r ); -- done
g.http = 			IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/glib/http.lua" )( g, r ); -- done
g.timer = 			IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/glib/timer.lua" )( g, r ); -- done
g.net = 			IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/glib/net.lua" )( g, r ); -- done
g.draw = 			IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/glib/draw.lua" )( g, r ); -- done
g.math = 			IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/glib/math.lua" )( g, r ); -- done
g.render, g.cam = 	IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/glib/render.lua" )( g, r ); -- done

r.Panel = 			IOubHack.RunFromCacheDynamic( "bin/lua/client/libs/rlib/panel.lua" )( g, r ); -- done

// Check for errors

// Panel : 
--include ( "extensions/client/panel.lua" )

return g, r;
