
local hook = hook
local player = player
local pairs = pairs
local Msg = Msg

module("player_manager")


// If a player doesn't have a valid model set they will use this one by default
local DefaultPlayerModel = "models/player/Kleiner.mdl"

// Stores a table of valid player models
local ModelList = {}

/*---------------------------------------------------------
   Utility to add models to the acceptable model list
---------------------------------------------------------*/
local function AddValidModel( name, model )
	ModelList[ name ] = model
end


/*---------------------------------------------------------
   Translate the simple name of a model 
   into the full model name
---------------------------------------------------------*/
function TranslatePlayerModel( name )

	if ( ModelList[ name ] != nil ) then
		return ModelList[ name ]
	end
	
	return DefaultPlayerModel
end


/*---------------------------------------------------------
   Compile a list of valid player models
---------------------------------------------------------*/
AddValidModel( "alyx",		"models/player/alyx.mdl" )
AddValidModel( "barney",	"models/player/barney.mdl" )	
AddValidModel( "breen",		"models/player/breen.mdl" )		
AddValidModel( "combine",	"models/player/combine_soldier.mdl" )				
AddValidModel( "prison",	"models/player/combine_soldier_prisonguard.mdl" )
AddValidModel( "super",		"models/player/combine_super_soldier.mdl" )				
AddValidModel( "eli",		"models/player/eli.mdl" )			
AddValidModel( "gman",		"models/player/gman_high.mdl" )		
AddValidModel( "kleiner",	"models/player/Kleiner.mdl" )
AddValidModel( "scientist",	"models/player/Kleiner.mdl" )
AddValidModel( "monk",		"models/player/monk.mdl" )		
AddValidModel( "mossman",	"models/player/mossman.mdl" )	
AddValidModel( "gina",		"models/player/mossman.mdl" )
AddValidModel( "odessa",	"models/player/odessa.mdl" )		
AddValidModel( "police",	"models/player/police.mdl" )		
AddValidModel( "female1",	"models/player/female_04.mdl" )	
AddValidModel( "female2",	"models/player/female_06.mdl" )		
AddValidModel( "female3",	"models/player/female_07.mdl" )
AddValidModel( "male1",		"models/player/male_02.mdl" )			
AddValidModel( "male2",		"models/player/male_03.mdl" )			
AddValidModel( "male3",		"models/player/male_08.mdl" )	
AddValidModel( "zombie",	"models/player/classic.mdl" )
AddValidModel( "burnt",		"models/player/charple01.mdl" )	
AddValidModel( "corpse",	"models/player/corpse1.mdl" )
AddValidModel( "charple",	"models/player/charple01.mdl" )