added editorconfig and formatted code

This commit is contained in:
hydrant
2019-07-17 19:52:55 +02:00
parent ada071cc93
commit 123ab7d07b
146 changed files with 10839 additions and 10715 deletions

View File

@@ -5,9 +5,9 @@ using System.Text;
namespace ReallifeGamemode.Server.Managers
{
class WeaponManager
{
private static readonly List<string> _modWeapons = new List<string>()
class WeaponManager
{
private static readonly List<string> _modWeapons = new List<string>()
{
"dagger",
"bat",
@@ -101,19 +101,19 @@ namespace ReallifeGamemode.Server.Managers
"fireextinguisher"
};
public static bool IsValidHash(uint hash)
{
foreach (WeaponHash vh in Enum.GetValues(typeof(WeaponHash)))
{
if ((uint)vh == hash) return true;
}
public static bool IsValidHash(uint hash)
{
foreach (WeaponHash vh in Enum.GetValues(typeof(WeaponHash)))
{
if ((uint)vh == hash) return true;
}
foreach (string mod in _modWeapons)
{
if (NAPI.Util.GetHashKey($"weapon_{mod}") == hash) return true;
}
foreach (string mod in _modWeapons)
{
if (NAPI.Util.GetHashKey($"weapon_{mod}") == hash) return true;
}
return false;
}
return false;
}
}
}