mirror of
https://github.com/tilgep/stripper.git
synced 2025-12-06 18:08:24 +00:00
Add stripper_file_lowercase cvar
This commit is contained in:
parent
325b3a512c
commit
caa771077e
11
stripper.sp
11
stripper.sp
@ -71,6 +71,7 @@ enum struct Block
|
|||||||
}
|
}
|
||||||
|
|
||||||
char file[PLATFORM_MAX_PATH];
|
char file[PLATFORM_MAX_PATH];
|
||||||
|
ConVar fileLowercase;
|
||||||
Block prop; // Global current stripper block
|
Block prop; // Global current stripper block
|
||||||
int section;
|
int section;
|
||||||
|
|
||||||
@ -79,6 +80,9 @@ public void OnPluginStart()
|
|||||||
prop.Init();
|
prop.Init();
|
||||||
|
|
||||||
RegAdminCmd("stripper_dump", Command_Dump, ADMFLAG_ROOT, "Writes all of the map entity properties to a file in configs/stripper/dumps/");
|
RegAdminCmd("stripper_dump", Command_Dump, ADMFLAG_ROOT, "Writes all of the map entity properties to a file in configs/stripper/dumps/");
|
||||||
|
|
||||||
|
fileLowercase = CreateConVar("stripper_file_lowercase", "0", "Whether to load map config filenames as lower case", _, true, 0.0, true, 1.0);
|
||||||
|
AutoExecConfig(true, "stripper");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Action Command_Dump(int client, int args)
|
public Action Command_Dump(int client, int args)
|
||||||
@ -141,6 +145,13 @@ public void OnMapInit(const char[] mapName)
|
|||||||
|
|
||||||
// Now parse map config
|
// Now parse map config
|
||||||
strcopy(file, sizeof(file), mapName);
|
strcopy(file, sizeof(file), mapName);
|
||||||
|
|
||||||
|
if(fileLowercase.BoolValue)
|
||||||
|
{
|
||||||
|
for(int i = 0; file[i]; i++)
|
||||||
|
file[i] = CharToLower(file[i]);
|
||||||
|
}
|
||||||
|
|
||||||
BuildPath(Path_SM, file, sizeof(file), "configs/stripper/maps/%s.cfg", file);
|
BuildPath(Path_SM, file, sizeof(file), "configs/stripper/maps/%s.cfg", file);
|
||||||
|
|
||||||
ParseFile();
|
ParseFile();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user