public Sector(ISectorMap map, IActorManager actorManager, IStaticObjectManager staticObjectManager, IDropResolver dropResolver, ISchemeService schemeService, IEquipmentDurableService equipmentDurableService) { ActorManager = actorManager ?? throw new ArgumentNullException(nameof(actorManager)); StaticObjectManager = staticObjectManager ?? throw new ArgumentNullException(nameof(staticObjectManager)); _dropResolver = dropResolver ?? throw new ArgumentNullException(nameof(dropResolver)); _schemeService = schemeService ?? throw new ArgumentNullException(nameof(schemeService)); _equipmentDurableService = equipmentDurableService ?? throw new ArgumentNullException(nameof(equipmentDurableService)); _diseases = new List <IDisease>(); ActorManager.Added += ActorManager_Added; ActorManager.Removed += ActorManager_Remove; StaticObjectManager.Added += StaticObjectManager_Added; StaticObjectManager.Removed += StaticObjectManager_Remove; Map = map ?? throw new ArgumentException("Не передана карта сектора.", nameof(map)); PatrolRoutes = new Dictionary <IActor, IPatrolRoute>(); }
public SectorFactory(IDropResolver dropResolver, ISchemeService schemeService, IEquipmentDurableService equipmentDurableService) { _dropResolver = dropResolver ?? throw new ArgumentNullException(nameof(dropResolver)); _schemeService = schemeService ?? throw new ArgumentNullException(nameof(schemeService)); _equipmentDurableService = equipmentDurableService; }
public ChestGenerator(ISchemeService schemeService, IDropResolver dropResolver, IChestGeneratorRandomSource chestGeneratorRandomSource) { _schemeService = schemeService ?? throw new ArgumentNullException(nameof(schemeService)); _dropResolver = dropResolver ?? throw new ArgumentNullException(nameof(dropResolver)); _chestGeneratorRandomSource = chestGeneratorRandomSource ?? throw new ArgumentNullException(nameof(chestGeneratorRandomSource)); }
public TemplateBasedPersonFactory( ISchemeService schemeService, ISurvivalRandomSource survivalRandomSource, IPropFactory propFactory, IDropResolver dropResolver, IPersonPerkInitializator personPerkInitializator, IDice dice) : base(schemeService, survivalRandomSource, propFactory, dropResolver, personPerkInitializator, dice) { }
/// <summary> /// Конструктор генератора жителей. /// </summary> /// <param name="schemeService"> Сервис схем. </param> /// <param name="dropResolver"> Служба работы с таблицами дропа. Нужна для создания торговцев. </param> /// <param name="actorManager"> Менеджер актёров. </param> public CitizenGenerator(ISchemeService schemeService, IDropResolver dropResolver, IActorManager actorManager, ICitizenGeneratorRandomSource citizenGeneratorRandomSource) { _schemeService = schemeService ?? throw new System.ArgumentNullException(nameof(schemeService)); _dropResolver = dropResolver ?? throw new System.ArgumentNullException(nameof(dropResolver)); _actorManager = actorManager ?? throw new System.ArgumentNullException(nameof(actorManager)); _citizenGeneratorRandomSource = citizenGeneratorRandomSource ?? throw new System.ArgumentNullException(nameof(citizenGeneratorRandomSource)); }
public ChestGenerator(ISchemeService schemeService, IDropResolver dropResolver, IPropContainerManager propContainerManager, IChestGeneratorRandomSource chestGeneratorRandomSource) { _schemeService = schemeService; _dropResolver = dropResolver; _propContainerManager = propContainerManager; _chestGeneratorRandomSource = chestGeneratorRandomSource; }
public TestEmptySectorGenerator( IDropResolver dropResolver, ISchemeService schemeService, IMapFactory mapFactory, IEquipmentDurableService equipmentDurableService) { _dropResolver = dropResolver ?? throw new System.ArgumentNullException(nameof(dropResolver)); _schemeService = schemeService ?? throw new System.ArgumentNullException(nameof(schemeService)); _mapFactory = mapFactory ?? throw new System.ArgumentNullException(nameof(mapFactory)); _equipmentDurableService = equipmentDurableService ?? throw new System.ArgumentNullException(nameof(equipmentDurableService)); }
public RandomHumanPersonFactory( ISchemeService schemeService, ISurvivalRandomSource survivalRandomSource, IPropFactory propFactory, IDropResolver dropResolver) { _schemeService = schemeService ?? throw new System.ArgumentNullException(nameof(schemeService)); _survivalRandomSource = survivalRandomSource ?? throw new System.ArgumentNullException(nameof(survivalRandomSource)); _propFactory = propFactory ?? throw new System.ArgumentNullException(nameof(propFactory)); _dropResolver = dropResolver ?? throw new System.ArgumentNullException(nameof(dropResolver)); }
public SectorFactory(IActorManager actorManager, IPropContainerManager propContainerManager, IDropResolver dropResolver, ISchemeService schemeService, IEquipmentDurableService equipmentDurableService) { _actorManager = actorManager ?? throw new ArgumentNullException(nameof(actorManager)); _propContainerManager = propContainerManager ?? throw new ArgumentNullException(nameof(propContainerManager)); _dropResolver = dropResolver ?? throw new ArgumentNullException(nameof(dropResolver)); _schemeService = schemeService ?? throw new ArgumentNullException(nameof(schemeService)); _equipmentDurableService = equipmentDurableService; }
protected PropDepositFactoryBase( string[] toolTags, string dropTableSchemeSid, PropContainerPurpose propContainerPurpose, ISchemeService schemeService, IDropResolver dropResolver) { _toolTags = toolTags ?? throw new ArgumentNullException(nameof(toolTags)); _dropTableSchemeSid = dropTableSchemeSid ?? throw new ArgumentNullException(nameof(dropTableSchemeSid)); _schemeService = schemeService ?? throw new ArgumentNullException(nameof(schemeService)); _dropResolver = dropResolver ?? throw new ArgumentNullException(nameof(dropResolver)); Purpose = propContainerPurpose; }
public TestEmptySectorGenerator(IActorManager actorManager, IPropContainerManager propContainerManager, IDropResolver dropResolver, ISchemeService schemeService, IMapFactory mapFactory, IEquipmentDurableService equipmentDurableService) { _actorManager = actorManager; _propContainerManager = propContainerManager; _dropResolver = dropResolver; _schemeService = schemeService; _mapFactory = mapFactory; _equipmentDurableService = equipmentDurableService; }
public RandomHumanPersonFactory( ISchemeService schemeService, ISurvivalRandomSource survivalRandomSource, IPropFactory propFactory, IDropResolver dropResolver, IPersonPerkInitializator personPerkInitializator, IDice dice) { _schemeService = schemeService ?? throw new ArgumentNullException(nameof(schemeService)); _survivalRandomSource = survivalRandomSource ?? throw new ArgumentNullException(nameof(survivalRandomSource)); _propFactory = propFactory ?? throw new ArgumentNullException(nameof(propFactory)); _dropResolver = dropResolver ?? throw new ArgumentNullException(nameof(dropResolver)); _personPerkInitializator = personPerkInitializator ?? throw new ArgumentNullException(nameof(personPerkInitializator)); _dice = dice ?? throw new ArgumentNullException(nameof(dice)); }
public PropDepositModule(IPropContainer propContainer, IDropTableScheme dropTableScheme, IDropResolver dropResolver, string[] toolTags, int exhaustingValue, DepositMiningDifficulty depositMiningDifficulty) { _propContainer = propContainer ?? throw new ArgumentNullException(nameof(propContainer)); _dropTableScheme = dropTableScheme ?? throw new ArgumentNullException(nameof(dropTableScheme)); _dropResolver = dropResolver ?? throw new ArgumentNullException(nameof(dropResolver)); _toolTags = toolTags ?? throw new ArgumentNullException(nameof(toolTags)); _exhaustingValue = exhaustingValue; _exhaustingCounter = exhaustingValue; Difficulty = depositMiningDifficulty; }
public SectorProceduralGenerator(IActorManager actorManager, IPropContainerManager propContainerManager, ISectorGeneratorRandomSource randomSource, IBotPlayer botPlayer, ISchemeService schemeService, IDropResolver dropResolver) { _actorManager = actorManager; _propContainerManager = propContainerManager; _randomSource = randomSource; _botPlayer = botPlayer; _schemeService = schemeService; _dropResolver = dropResolver; Log = new StringBuilder(); }
public Sector(IMap map, IActorManager actorManager, IPropContainerManager propContainerManager, IDropResolver dropResolver, ISchemeService schemeService) { _actorManager = actorManager; _propContainerManager = propContainerManager; _dropResolver = dropResolver; _schemeService = schemeService; _actorManager.Added += ActorManager_Added; _propContainerManager.Added += PropContainerManager_Added; _propContainerManager.Removed += PropContainerManager_Remove; Map = map ?? throw new ArgumentException("Не передана карта сектора.", nameof(map)); PatrolRoutes = new Dictionary <IActor, IPatrolRoute>(); }
/// <summary> /// Создаёт экземпляр <see cref="SectorGenerator"/>. /// </summary> /// <param name="mapFactory"> Фабрика карты. Сейчас используется <see cref="RoomStyle.RoomMapFactory"/>. </param> /// <param name="sectorFactory"> Фабрика сектора. </param> /// <param name="monsterGenerator"> Генератор монстров для подземелий. </param> /// <param name="chestGenerator"> Генератор сундуков для подземеоий </param> /// <param name="monsterPlayer"> Игрок, управляющий монстрами. </param> /// <param name="schemeService"> Сервис схем. </param> /// <param name="traderManager"> Менеджер торговцев. Нужен для сектора. </param> /// <param name="dropResolver"> Служба работы с таблицами дропа. Нужна для создания торговцев. </param> public SectorGenerator( IMapFactory mapFactory, ISectorFactory sectorFactory, IMonsterGenerator monsterGenerator, IChestGenerator chestGenerator, IBotPlayer monsterPlayer, ISchemeService schemeService, ITraderManager traderManager,//TODO Вынести в отдельный генератор IDropResolver dropResolver ) { _mapFactory = mapFactory; _sectorFactory = sectorFactory; _monsterGenerator = monsterGenerator; _chestGenerator = chestGenerator; _monsterPlayer = monsterPlayer; _schemeService = schemeService; _traderManager = traderManager; _dropResolver = dropResolver; }
public StoneDepositFactory( ISchemeService schemeService, IDropResolver dropResolver) : base(toolTags: new[] { "pick-axe" }, dropTableSchemeSid: "stone-deposit", PropContainerPurpose.StoneDeposits, schemeService, dropResolver) { }
public DropTableChestStore(IEnumerable <IDropTableScheme> dropTables, IDropResolver dropResolver) { _dropTables = dropTables; _dropResolver = dropResolver; }
public DropTableLoot(IDropTableScheme[] dropTables, IDropResolver dropResolver) : base(new DropTableChestStore(dropTables, dropResolver)) { Purpose = PropContainerPurpose.Loot; }
public DropTablePropChest(IDropTableScheme[] dropTables, IDropResolver dropResolver) : base(new DropTableChestStore(dropTables, dropResolver)) { }
public DropTableLoot(IMapNode node, DropTableScheme[] dropTables, IDropResolver dropResolver) : base(node, new DropTableChestStore(dropTables, dropResolver)) { }
public PuddleFactory( ISchemeService schemeService, IDropResolver dropResolver) : base(Array.Empty <string>(), "water-puddle", PropContainerPurpose.Puddle, schemeService, dropResolver) { }
public CitizenPerson(IDropTableScheme goodsDropTable, IDropResolver dropResolver) { CitizenType = CitizenType.Trader; _goodsDropTable = goodsDropTable; _dropResolver = dropResolver; }
public TrashHeapFactory( ISchemeService schemeService, IDropResolver dropResolver) : base(toolTags: new[] { "shovel" }, dropTableSchemeSid: "trash-heap", PropContainerPurpose.TrashHeap, schemeService, dropResolver, false) { }
public DropTablePropChest(IMapNode node, IDropTableScheme[] dropTables, IDropResolver dropResolver, int id) : base(node, new DropTableChestStore(dropTables, dropResolver), id) { }
public CherryBrushFactory( ISchemeService schemeService, IDropResolver dropResolver) : base(Array.Empty <string>(), "cherry-brush", PropContainerPurpose.CherryBrush, schemeService, dropResolver) { }
/// <summary> /// Создаёт экземпляр торговца <see cref="Trader"/>. /// </summary> /// <param name="goodsDropTable"> Таблица дропа, на основе которой будут выдаваться товары.</param> /// <param name="node"> Узел карты, в котором стоит торговец. </param> /// <param name="dropResolver"> Сервис для работы с таблицами дропа. </param> /// <exception cref="ArgumentNullException"> /// goodsDropTable /// or /// node /// or /// dropResolver /// </exception> public Trader(IDropTableScheme goodsDropTable, IMapNode node, IDropResolver dropResolver) { _goodsDropTable = goodsDropTable ?? throw new ArgumentNullException(nameof(goodsDropTable)); Node = node ?? throw new ArgumentNullException(nameof(node)); _dropResolver = dropResolver ?? throw new ArgumentNullException(nameof(dropResolver)); }