public EntityFactory(Func <EntityDefault, Entity> factory, IEntityDefaultReader defaultReader, DefaultPropertyModifierReader defaultPropertyModifierReader, RobotTemplateFactory robotTemplateFactory, ModulePropertyModifiersReader modulePropertyModifiersReader) { _factory = factory; _defaultReader = defaultReader; _defaultPropertyModifierReader = defaultPropertyModifierReader; _robotTemplateFactory = robotTemplateFactory; _modulePropertyModifiersReader = modulePropertyModifiersReader; }
private static Dictionary <MaterialType, MaterialInfo> LoadMaterials(IEntityDefaultReader entityDefaultReader) { return(Db.Query().CommandText("select * from minerals").Execute().Select(r => { var mineral = new MaterialInfo { Type = r.GetValue <string>("name").ToMaterialType(), EntityDefault = entityDefaultReader.Get(r.GetValue <int>("definition")), Amount = r.GetValue <int>("amount"), EnablerExtensionRequired = r.GetValue <bool>("enablereffectrequired") }; return mineral; }).ToDictionary(m => m.Type)); }
public LotteryItem(IEntityDefaultReader entityDefaultReader) { _entityDefaultReader = entityDefaultReader; if (_weights == null) { _weights = Db.Query().CommandText("select * from lotteryitemweights") .Execute() .Select(r => { var lotteryDefinition = r.GetValue <int>("lotterydefinition"); var categoryFlags = r.GetValue <CategoryFlags>("categoryflags"); var tierType = (TierType)r.GetValue <int>("tiertype"); var tierLevel = r.GetValue <int>("tierlevel"); var weight = r.GetValue <double>("weight"); var tier = new TierInfo(tierType, tierLevel); return(new WeightInfo(EntityDefault.Get(lotteryDefinition), categoryFlags, tier, weight)); }).ToLookup(i => i.lotteryItem); } }
public FlockConfigurationBuilder(IEntityDefaultReader entityDefaultReader) { _entityDefaultReader = entityDefaultReader; _configuration = new FlockConfiguration(); }
public RobotTemplateRelations(IRobotTemplateReader robotTemplateReader, IEntityDefaultReader entityDefaultReader) { _robotTemplateReader = robotTemplateReader; _entityDefaultReader = entityDefaultReader; }
public static EntityDefault GetByName(this IEntityDefaultReader reader, string name) { return(reader.GetAll().FirstOrDefault(ed => ed.Name == name) ?? EntityDefault.None); }
public ItemDeployerHelper(IEntityDefaultReader entityDefaultReader) { _entityDefaultReader = entityDefaultReader; }
public GetEntityDefaults(IExtensionReader extensionReader, IEntityDefaultReader entityDefaultReader, IRobotTemplateRelations robotTemplateRelations) { var cachedEntityDefaultsInfo = entityDefaultReader.GetAll().ToDictionary("d", ed => InfoBuilder.Build(extensionReader, robotTemplateRelations, ed)); _message = Message.Builder.SetCommand(Commands.GetEntityDefaults).WithData(cachedEntityDefaultsInfo).Build(); }
public ModulePropertyModifiersReader(IEntityDefaultReader entityDefaultReader) { _entityDefaultReader = entityDefaultReader; }
public ZoneDrawBlockingByDefinition(IEntityDefaultReader defaultReader) { _defaultReader = defaultReader; }
public MissionDataCache(IExtensionReader extensionReader, IZoneManager zoneManager, IEntityDefaultReader entityDefaultReader) { _extensionReader = extensionReader; _zoneManager = zoneManager; _entityDefaultReader = entityDefaultReader; }
public CalibrationProgramCapsule(IEntityDefaultReader entityDefaultReader) : base() { _entityDefaultReader = entityDefaultReader; }
public MaterialHelper(IEntityDefaultReader entityDefaultReader) { _materials = LoadMaterials(entityDefaultReader); }
public ZoneNpcFlockSet(IEntityDefaultReader defaultReader, IFlockConfigurationRepository repository, FlockConfigurationBuilder.Factory flockConfigurationBuilderFactory) { _defaultReader = defaultReader; _repository = repository; _flockConfigurationBuilderFactory = flockConfigurationBuilderFactory; }
public MarketRobotPriceWriter(IEntityDefaultReader entityDefaultReader, IRobotTemplateRelations robotTemplateRelations) { _entityDefaultReader = entityDefaultReader; _robotTemplateRelations = robotTemplateRelations; }
public ProductionDataAccess(IEntityDefaultReader entityDefaultReader) { _entityDefaultReader = entityDefaultReader; }