Added mileage, changed all namespaces from reallife_gamemode to ReallifeGamemode

This commit is contained in:
hydrant
2019-03-06 21:12:34 +01:00
parent 13142edbb7
commit bee3497fc3
104 changed files with 1408 additions and 297 deletions

View File

@@ -1,11 +1,11 @@
using GTANetworkAPI;
using reallife_gamemode.Server.Extensions;
using reallife_gamemode.Server.Managers;
using reallife_gamemode.Server.Util;
using ReallifeGamemode.Server.Extensions;
using ReallifeGamemode.Server.Managers;
using ReallifeGamemode.Server.Util;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace reallife_gamemode.Server.Entities
namespace ReallifeGamemode.Server.Entities
{
public abstract class ServerVehicle
{
@@ -24,6 +24,7 @@ namespace reallife_gamemode.Server.Entities
public int SecondaryColor { get; set; }
public bool Locked { get; set; }
public bool Active { get; set; }
public float DistanceDriven { get; set; }
[NotMapped]
public Vector3 Position => new Vector3(PositionX, PositionY, PositionZ);
@@ -42,6 +43,8 @@ namespace reallife_gamemode.Server.Entities
VehicleStreaming.SetLockStatus(veh, this.Locked);
VehicleManager.AddVehicle(this, veh);
veh.SetSharedData("drivenDistance", this.DistanceDriven);
string numberplate = $"{this.Id}";
if(this is FactionVehicle fV)