public void Check() { var x = _plantInfos.Any(pi => pi.Check()); if (x) { Logger.Error("empty naturecube " + _zone.Id + " " + _area + " " + SystemTools.GetCallStack()); } var checkSpawnAmount = _plantInfos.Count(plantInfo => plantInfo.spawn > 0) >= 10; if (!checkSpawnAmount) { Logger.Error("no spawn was found. " + _zone.Id + " " + _area); } }
public override void AddItem(Item item, long issuerEid, bool doStack) { //no infinite capacity containers if (item.IsCategory(CategoryFlags.cf_infinite_capacity_containers)) { item.ThrowIfNotType <VolumeWrapperContainer>(ErrorCodes.InfiniteCapacityContainerNotSupported); } if (!IsEnoughCapacity(item)) { var load = Load; Logger.Info("item is not fitting in container. eid:" + Eid + " load:" + load + " item volume:" + item.Volume + " maxCapacity:" + Capacity + " volumeEmpty:" + (Capacity - load) + " item definition:" + item.Definition + " " + item.ED.Name + " repackaged:" + item.IsRepackaged + " quantity:" + item.Quantity + " \n" + SystemTools.GetCallStack()); throw new PerpetuumException(ErrorCodes.ContainerIsFull); } base.AddItem(item, issuerEid, doStack); }