formatted code
This commit is contained in:
@@ -117,7 +117,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
|
||||
public static void AddVehicle(ServerVehicle serverVehicle, Vehicle vehicle)
|
||||
{
|
||||
if(_serverVehicles.ContainsKey(serverVehicle.Id))
|
||||
if (_serverVehicles.ContainsKey(serverVehicle.Id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
|
||||
public static Vehicle GetVehicleFromServerVehicle(ServerVehicle serverVehicle)
|
||||
{
|
||||
if(!_serverVehicles.ContainsKey(serverVehicle.Id))
|
||||
if (!_serverVehicles.ContainsKey(serverVehicle.Id))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -162,7 +162,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
|
||||
public static ServerVehicle GetServerVehicleFromVehicle(Vehicle veh, DatabaseContext dbContext = null)
|
||||
{
|
||||
if(dbContext == null)
|
||||
if (dbContext == null)
|
||||
{
|
||||
using (dbContext = new DatabaseContext())
|
||||
{
|
||||
@@ -191,12 +191,12 @@ namespace ReallifeGamemode.Server.Managers
|
||||
|
||||
public static bool IsValidHash(uint hash)
|
||||
{
|
||||
foreach(VehicleHash vh in Enum.GetValues(typeof(VehicleHash)))
|
||||
foreach (VehicleHash vh in Enum.GetValues(typeof(VehicleHash)))
|
||||
{
|
||||
if ((uint)vh == hash) return true;
|
||||
}
|
||||
|
||||
foreach(string mod in _enabledMods)
|
||||
foreach (string mod in _enabledMods)
|
||||
{
|
||||
if (NAPI.Util.GetHashKey(mod) == hash) return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user