/**
 *	Mode info library
 */
#Const	Version			"2016-10-28"
#Const	ScriptName	"Libs/Nadeo/ModeInfo.Script.txt"

// ---------------------------------- //
// Libraries
// ---------------------------------- //
#Include "TextLib" as TL

// ---------------------------------- //
// Constants
// ---------------------------------- //
#Const C_Type_FreeForAll	_("Free for all")
#Const C_Type_Teams			_("Team versus Team")
#Const C_Type_Solo				_("Solo")
#Const C_Type_Duel				_("Duel")

// ---------------------------------- //
// Globales
// ---------------------------------- //
declare Text G_Name;
declare Text G_Type;
declare Text G_Rules;

// ---------------------------------- //
// Functions
// ---------------------------------- //
// ---------------------------------- //
// Public
// ---------------------------------- //
// ---------------------------------- //
/**	Return the version number of the script
 *
 *	@return														The version number of the script
 */
Text GetScriptVersion() {
	return Version;
}

// ---------------------------------- //
/**	Return the name of the script
 *
 *	@return														The name of the script
 */
Text GetScriptName() {
	return ScriptName;
}

// ---------------------------------- //
/** Set the name of the mode
 *
 *	@param	_Name											The name of the mode
 */
Void SetName(Text _Name) {
	G_Name = _Name;
}

// ---------------------------------- //
/** Get the name of the mode
 *
 *	@return														The name of the mode
 */
Text GetName() {
	return G_Name;
}

// ---------------------------------- //
/// Get the type constants
Text Type_FreeForAll() { return C_Type_FreeForAll; }
Text Type_Teams() { return C_Type_Teams; }
Text Type_Solo() { return C_Type_Solo; }
Text Type_Duel() { return C_Type_Duel; }

// ---------------------------------- //
/** Set the type of the mode
 *	eg: Free for all, Team, Solo, ...
 *
 *	@param	_Type											The type of mode
 */
Void SetType(Text _Type) {
	G_Type = _Type;
}

// ---------------------------------- //
/** Get the type of the mode
 *	eg: Free for all, Team, Solo, ...
 *
 *	@return														The type of mode
 */
Text GetType() {
	return G_Type;
}

// ---------------------------------- //
/** Set the rules of the mode
 *
 *	@param	_Rules										The rules
 */
Void SetRules(Text _Rules) {
	G_Rules = _Rules;
}

// ---------------------------------- //
/** Get the rules of the mode
 *
 *	@return														The rules
 */
Text GetRules() {
	return G_Rules;
}

// ---------------------------------- //
/** Set the ModeStatusMessage
 *	This message is displayed in the
 *	server connection window
 *
 *	@param	_Message									The mode status message
 */
Void SetStatusMessage(Text _Message) {
	ModeStatusMessage = _Message;
}

// ---------------------------------- //
/**	Use a default message to display
 *	the points limit and the current
 *	best score
 *
 *	@param	_PointsLimit							The points limit
 *	@param	_BestPoints								The points nearest to the limit
 */ 
Text GetPointsLimitStatusMessage(Integer _PointsLimit, Integer _BestPoints) {
	//L16N Inform the players joining a server about the current points limit and the score of the player who is the nearest to this points limit
	return TL::Compose(_("Points limit: %1, Current best score: %2"), TL::ToText(_PointsLimit), TL::ToText(_BestPoints));
}

// ---------------------------------- //
/** Get the ModeStatusMessage
 *	This message is displayed in the
 *	server connection window
 *
 *	@return														The mode status message
 */
Text GetStatusMessage() {
	return ModeStatusMessage;
}

// ---------------------------------- //
/// Unload the library
Void Unload() {
	G_Name = "";
	G_Type = "";
	G_Rules = "";
}

// ---------------------------------- //
/// Load the library
Void Load() {
	Unload();
}