
/*---------------------------------------------------------
    Non-Module includes
---------------------------------------------------------*/

include ( "util.lua" )			// Misc Utilities	


/*---------------------------------------------------------
    Shared Modules
---------------------------------------------------------*/

require ( "stringx" )			// Extended String 
require ( "tablex" )			// Extended Table 
require ( "mathx" )				// Extended Math
require ( "utilx" )				// Extended Util
require ( "concommand" )		// Console Commands
require ( "saverestore" )		// Save/Restore
require ( "gamemode" )			// Gamemode manager
require ( "weapons" )			// SWEP manager
require ( "hook" )				// Gamemode hooks
require ( "timer" )				// Timer manager
require ( "schedule" )			// Schedule manager
require ( "scripted_ents" )		// Scripted Entities
require ( "player_manager" )	// Player models manager
require ( "numpad" )
require ( "shared" )	
require ( "team" )
require ( "undo" )
require ( "cleanup" )
require ( "duplicator" )
require ( "constraint" )
require ( "construct" )	
require ( "filex" )
require ( "vehicles" )

/*---------------------------------------------------------
    Serverside only modules
---------------------------------------------------------*/

if ( SERVER ) then

	require ( "server_settings" )

end


/*---------------------------------------------------------
    Clientside only modules
---------------------------------------------------------*/

if ( CLIENT ) then

	require ( "draw" )			// 2D Draw library
	require ( "markup" )		// Text markup library
	require ( "effects" )
	require ( "killicon" )

end


/*---------------------------------------------------------
    Print version information to the console
---------------------------------------------------------*/

Msg( "Lua initialized (" .. _VERSION .. ")\n" )


/*---------------------------------------------------------
    Module hooks - these are always running.
---------------------------------------------------------*/

hook.Add( "Think", "CheckTimers", timer.Check )
hook.Add( "Think", "CheckSchedules", schedule.Check )

if ( SERVER ) then

	hook.Add( "PlayerInitialSpawn", "sharedSendVarsToClient", shared.SendVarsToClient)
	concommand.Add( "+numpad", CC_NumpadOn )
	concommand.Add( "-numpad", CC_NumpadOff )
	
end

