Esempio n. 1
0
        public void register_markerzones()
        {
            //Create locker.
            Locker.Create();

            if (Locker != MarkerZone.None)
            {
                Locker.ColZone.OnEntityEnterColShape += (shape, entity) =>
                {
                    if (API.Shared.GetEntityType(entity) != EntityType.Player)
                    {
                        return;
                    }
                    foreach (var c in PlayerManager.Players)
                    {
                        if (c.Client != entity)
                        {
                            continue;
                        }
                        c.LockerZoneGroup = this;
                    }
                };
                Locker.ColZone.OnEntityEnterColShape += (shape, entity) =>
                {
                    if (API.Shared.GetEntityType(entity) != EntityType.Player)
                    {
                        return;
                    }
                    foreach (var c in PlayerManager.Players)
                    {
                        if (c.Client != entity)
                        {
                            continue;
                        }
                        c.LockerZoneGroup = Group.None;
                    }
                };
            }

            FrontDesk.Create();

            if (FrontDesk != MarkerZone.None)
            {
                FrontDesk.ColZone.OnEntityEnterColShape += (shape, entity) =>
                {
                    if (API.Shared.GetEntityType(entity) != EntityType.Player)
                    {
                        return;
                    }
                    foreach (var c in PlayerManager.Players)
                    {
                        if (c.Client != entity)
                        {
                            continue;
                        }
                    }
                };
                FrontDesk.ColZone.OnEntityEnterColShape += (shape, entity) =>
                {
                    if (API.Shared.GetEntityType(entity) != EntityType.Player)
                    {
                        return;
                    }
                    foreach (var c in PlayerManager.Players)
                    {
                        if (c.Client != entity)
                        {
                            continue;
                        }
                    }
                };
            }

            ArrestLocation.Create();

            if (ArrestLocation != MarkerZone.None)
            {
                ArrestLocation.ColZone.OnEntityEnterColShape += (shape, entity) =>
                {
                    if (API.Shared.GetEntityType(entity) != EntityType.Player)
                    {
                        return;
                    }
                    foreach (var c in PlayerManager.Players)
                    {
                        if (c.Client != entity)
                        {
                            continue;
                        }
                    }
                };
                ArrestLocation.ColZone.OnEntityEnterColShape += (shape, entity) =>
                {
                    if (API.Shared.GetEntityType(entity) != EntityType.Player)
                    {
                        return;
                    }
                    foreach (var c in PlayerManager.Players)
                    {
                        if (c.Client != entity)
                        {
                            continue;
                        }
                    }
                };
            }
        }
 public async Task <ActionResult <long> > AddInmate(string name, decimal size, ArrestLocation arrestLocation, HungerLevel hungerLevel, HappinessLevel happinessLevel)
 {
     _logger.LogInformation("I just got an AddInmate request");
     return(await _inmateCrudService.AddInmateAndReturnId(name, size, arrestLocation, hungerLevel, happinessLevel));
 }