Reorganized cvars.inc, organized all cvars into module groups (to be updated later), removed unused cvars, made classes and weapons core modules (event forwarding priority), updated spawn protect cvars, added cvars to disable weapons, restrict, and hitgroups

This commit is contained in:
Greyscale
2009-04-20 02:56:26 +02:00
parent 8ac1361a70
commit 41153af5f4
30 changed files with 533 additions and 297 deletions

View File

@ -1,9 +1,12 @@
/**
* ====================
/*
* ============================================================================
*
* Zombie:Reloaded
* File: weapons.inc
* Author: Greyscale
* ====================
*
* File: weapons.inc
* Description: API for all weapon-related functions.
*
* ============================================================================
*/
/**
@ -55,8 +58,12 @@ WeaponsLoad()
// Clear weapon data.
WeaponsClearData();
// Clear weapon restrict data.
RestrictClearData();
// If module is disabled, then stop.
new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]);
if (!weapons)
{
return;
}
decl String:path[PLATFORM_MAX_PATH];
BuildPath(Path_SM, path, sizeof(path), "configs/zr/weapons/weapons.txt");
@ -66,7 +73,7 @@ WeaponsLoad()
{
if (LogFlagCheck(LOG_CORE_EVENTS, LOG_MODULE_WEAPONS))
{
ZR_LogMessageFormatted(-1, "Weapons", "Config Validation", "Missing file weapons.txt, disabling weapons-based modules.", LOG_FORMAT_TYPE_FULL);
ZR_LogMessageFormatted(-1, "Weapons", "Config Validation", "Missing file weapons.txt, disabling weapons-based modules.", LOG_FORMAT_TYPE_ERROR);
}
return;
@ -93,7 +100,7 @@ WeaponsValidateConfig()
KvRewind(kvWeapons);
if (!KvGotoFirstSubKey(kvWeapons))
{
ZR_LogMessageFormatted(-1, "Weapons", "Config Validation", "No weapons listed in weapons.txt, disabling weapons-based modules.", LOG_FORMAT_TYPE_FULL);
ZR_LogMessageFormatted(-1, "Weapons", "Config Validation", "No weapons listed in weapons.txt, disabling weapons-based modules.", LOG_FORMAT_TYPE_ERROR);
}
}