mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-27 06:07:56 +03:00
Added ability to disable console groups from the scripts
This commit is contained in:
parent
ee8bee588a
commit
e5ffd26fda
@ -95,8 +95,13 @@ void LoadConsoleGroupsFromFile( IBaseFileSystem *filesystem, const char *pszFile
|
|||||||
int index = FindConGroup( pGroup->GetName() );
|
int index = FindConGroup( pGroup->GetName() );
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
g_ConGroups[index]._clr = pGroup->GetColor( "MessageColor" );
|
Color msgClr = pGroup->GetColor( "MessageColor" );
|
||||||
//g_ConGroups[index].bDisabled = pGroup->GetBool( "Disabled", false );
|
|
||||||
|
// Make sure the color isn't 0,0,0,0 before assigning
|
||||||
|
if (msgClr.GetRawColor() != 0)
|
||||||
|
g_ConGroups[index]._clr = msgClr;
|
||||||
|
|
||||||
|
g_ConGroups[index].bDisabled = pGroup->GetBool( "Disabled", false );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -118,12 +123,12 @@ void PrintAllConsoleGroups()
|
|||||||
Msg( "============================================================\n" );
|
Msg( "============================================================\n" );
|
||||||
for (int i = 0; i < CON_GROUP_MAX; i++)
|
for (int i = 0; i < CON_GROUP_MAX; i++)
|
||||||
{
|
{
|
||||||
Msg( " # " );
|
ConColorMsg( g_ConGroups[i].GetColor(), " # %s", g_ConGroups[i].pszName );
|
||||||
ConColorMsg( g_ConGroups[i].GetColor(), "%s", g_ConGroups[i].pszName );
|
|
||||||
Msg( " - %s ", g_ConGroups[i].pszDescription );
|
|
||||||
|
|
||||||
//if (g_ConGroups[i].bDisabled)
|
if (g_ConGroups[i].bDisabled)
|
||||||
// Msg("(DISABLED)");
|
Msg(" [DISABLED]");
|
||||||
|
|
||||||
|
Msg( " - %s ", g_ConGroups[i].pszDescription );
|
||||||
|
|
||||||
Msg("\n");
|
Msg("\n");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user