[GSC]: Remove reduntant color code (#830)
This commit is contained in:
parent
e0f7d42022
commit
09ff8b4fb6
@ -213,7 +213,7 @@ namespace Components
|
||||
|
||||
if (Game::SV_IsTestClient(ent->s.number) == 0)
|
||||
{
|
||||
Game::Scr_Error("^1BotStop: Can only call on a bot!");
|
||||
Game::Scr_Error("BotStop: Can only call on a bot!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -228,7 +228,7 @@ namespace Components
|
||||
|
||||
if (Game::SV_IsTestClient(ent->s.number) == 0)
|
||||
{
|
||||
Game::Scr_Error("^1BotWeapon: Can only call on a bot!");
|
||||
Game::Scr_Error("BotWeapon: Can only call on a bot!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -251,7 +251,7 @@ namespace Components
|
||||
|
||||
if (Game::SV_IsTestClient(ent->s.number) == 0)
|
||||
{
|
||||
Game::Scr_Error("^1BotAction: Can only call on a bot!");
|
||||
Game::Scr_Error("BotAction: Can only call on a bot!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -259,13 +259,13 @@ namespace Components
|
||||
|
||||
if (!action)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1BotAction: Illegal parameter!");
|
||||
Game::Scr_ParamError(0, "BotAction: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (action[0] != '+' && action[0] != '-')
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1BotAction: Sign for action must be '+' or '-'");
|
||||
Game::Scr_ParamError(0, "BotAction: Sign for action must be '+' or '-'");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -283,7 +283,7 @@ namespace Components
|
||||
return;
|
||||
}
|
||||
|
||||
Game::Scr_ParamError(0, "^1BotAction: Unknown action");
|
||||
Game::Scr_ParamError(0, "BotAction: Unknown action");
|
||||
});
|
||||
|
||||
GSC::Script::AddMethod("BotMovement", [](Game::scr_entref_t entref) // Usage: <bot> BotMovement(<int>, <int>);
|
||||
@ -292,7 +292,7 @@ namespace Components
|
||||
|
||||
if (Game::SV_IsTestClient(ent->s.number) == 0)
|
||||
{
|
||||
Game::Scr_Error("^1BotMovement: Can only call on a bot!");
|
||||
Game::Scr_Error("BotMovement: Can only call on a bot!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -590,13 +590,13 @@ namespace Components
|
||||
{
|
||||
if (Game::Scr_GetNumParam() != 1)
|
||||
{
|
||||
Game::Scr_Error("^1OnPlayerSay: Needs one function pointer!");
|
||||
Game::Scr_Error("OnPlayerSay: Needs one function pointer!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CanAddCallback)
|
||||
{
|
||||
Game::Scr_Error("^1OnPlayerSay: Cannot add a callback in this context");
|
||||
Game::Scr_Error("OnPlayerSay: Cannot add a callback in this context");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -16,13 +16,13 @@ namespace Components::GSC
|
||||
|
||||
if (!path)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1FileWrite: filepath is not defined!");
|
||||
Game::Scr_ParamError(0, "FileWrite: filepath is not defined!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!text || !mode)
|
||||
{
|
||||
Game::Scr_Error("^1FileWrite: Illegal parameters!");
|
||||
Game::Scr_Error("FileWrite: Illegal parameters!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ namespace Components::GSC
|
||||
|
||||
if (!path)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1FileRead: filepath is not defined!");
|
||||
Game::Scr_ParamError(0, "FileRead: filepath is not defined!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ namespace Components::GSC
|
||||
|
||||
if (!path)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1FileExists: filepath is not defined!");
|
||||
Game::Scr_ParamError(0, "FileExists: filepath is not defined!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ namespace Components::GSC
|
||||
|
||||
if (!path)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1FileRemove: filepath is not defined!");
|
||||
Game::Scr_ParamError(0, "FileRemove: filepath is not defined!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ namespace Components::GSC
|
||||
{
|
||||
if (std::strstr(path, QueryStrings[i]) != nullptr)
|
||||
{
|
||||
Logger::Print("^1FileRemove: directory traversal is not allowed!\n");
|
||||
Logger::Print("FileRemove: directory traversal is not allowed!\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ namespace Components::GSC
|
||||
{
|
||||
if (static_cast<unsigned int>(index) >= Game::scrVmPub->outparamcount)
|
||||
{
|
||||
Game::Scr_ParamError(static_cast<unsigned int>(index), "^1GetCodePosForParam: Index is out of range!");
|
||||
Game::Scr_ParamError(static_cast<unsigned int>(index), "GetCodePosForParam: Index is out of range!");
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ namespace Components::GSC
|
||||
|
||||
if (value->type != Game::VAR_FUNCTION)
|
||||
{
|
||||
Game::Scr_ParamError(static_cast<unsigned int>(index), "^1GetCodePosForParam: Expects a function as parameter!");
|
||||
Game::Scr_ParamError(static_cast<unsigned int>(index), "GetCodePosForParam: Expects a function as parameter!");
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ namespace Components::GSC
|
||||
{
|
||||
if (Game::Scr_GetNumParam() != 2)
|
||||
{
|
||||
Game::Scr_Error("^1ReplaceFunc: Needs two parameters!");
|
||||
Game::Scr_Error("ReplaceFunc: Needs two parameters!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -247,7 +247,7 @@ namespace Components::GSC
|
||||
const auto* str = Game::Scr_GetString(0);
|
||||
if (!str)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1Exec: Illegal parameter!");
|
||||
Game::Scr_ParamError(0, "Exec: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -262,7 +262,7 @@ namespace Components::GSC
|
||||
const auto* str = Game::Scr_GetString(i);
|
||||
if (!str)
|
||||
{
|
||||
Game::Scr_ParamError(i, "^1PrintConsole: Illegal parameter!");
|
||||
Game::Scr_ParamError(i, "PrintConsole: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace Components::GSC
|
||||
|
||||
if (!key || !value)
|
||||
{
|
||||
Game::Scr_Error("^1StorageSet: Illegal parameters!");
|
||||
Game::Scr_Error("StorageSet: Illegal parameters!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -29,13 +29,13 @@ namespace Components::GSC
|
||||
|
||||
if (!key)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1StorageRemove: Illegal parameter!");
|
||||
Game::Scr_ParamError(0, "StorageRemove: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Data.contains(key))
|
||||
{
|
||||
Game::Scr_Error(Utils::String::VA("^1StorageRemove: Store does not have key '%s'!", key));
|
||||
Game::Scr_Error(Utils::String::VA("StorageRemove: Store does not have key '%s'!", key));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -48,13 +48,13 @@ namespace Components::GSC
|
||||
|
||||
if (!key)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1StorageGet: Illegal parameter!");
|
||||
Game::Scr_ParamError(0, "StorageGet: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Data.contains(key))
|
||||
{
|
||||
Game::Scr_Error(Utils::String::VA("^1StorageGet: Store does not have key '%s'!", key));
|
||||
Game::Scr_Error(Utils::String::VA("StorageGet: Store does not have key '%s'!", key));
|
||||
}
|
||||
|
||||
const auto& data = Data.at(key);
|
||||
@ -67,7 +67,7 @@ namespace Components::GSC
|
||||
|
||||
if (!key)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1StorageHas: Illegal parameter!");
|
||||
Game::Scr_ParamError(0, "StorageHas: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ namespace Components::GSC
|
||||
{
|
||||
if (Data.empty())
|
||||
{
|
||||
Game::Scr_Error("^1StorageDump: ScriptStorage is empty!");
|
||||
Game::Scr_Error("StorageDump: ScriptStorage is empty!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ namespace Components::GSC
|
||||
|
||||
if (!str)
|
||||
{
|
||||
Game::Scr_Error("^1GetChar: Illegal parameter!");
|
||||
Game::Scr_Error("GetChar: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ namespace Components::GSC
|
||||
|
||||
if (!str || !suffix)
|
||||
{
|
||||
Game::Scr_Error("^1IsEndStr: Illegal parameters!");
|
||||
Game::Scr_Error("IsEndStr: Illegal parameters!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace Components::GSC
|
||||
|
||||
if (!name)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1SetName: Illegal parameter!");
|
||||
Game::Scr_ParamError(0, "SetName: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ namespace Components::GSC
|
||||
|
||||
if (!clanName)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1SetClanTag: Illegal parameter!");
|
||||
Game::Scr_ParamError(0, "SetClanTag: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user