public void Execute(ISystemContainer systemContainer, Map map, MapGenCommand command, Vector offset) { var itemLevel = string.IsNullOrEmpty(command.Parameters) ? 0 : int.Parse(command.Parameters); var coordinate = new MapCoordinate(map.MapKey, offset + command.Vector); var itemList = systemContainer.ItemSystem.GetSpawnableItems(); itemList = itemList.Where(i => !i.Has <Wealth>()).ToList(); var shop = new EnchantedItemShopGenerator().GenerateShop(systemContainer, systemContainer.Random.Between(4, 10), itemLevel, itemList, systemContainer.Random); systemContainer.PositionSystem.SetPosition(shop, coordinate); }
public override void Generate(ISystemContainer systemContainer, GeneratedBranch generatedBranch, IEntity branch, IRandom random, IProgress <string> progress) { progress.Report("Placing shops"); var itemLevel = BasePower; var itemList = systemContainer.ItemSystem.GetSpawnableItems(); itemList = itemList.Where(i => !i.Has <Wealth>()).ToList(); var shopGenerator = new EnchantedItemShopGenerator(); foreach (var map in generatedBranch.Maps) { FillMap(map, systemContainer, itemLevel, itemList, random, shopGenerator); itemLevel += PowerIncrement; } }