示例#1
0
 public ForestCreatorAction(IDbManager dbManager, IForestManager forestManager, IScheduler scheduler)
 {
     this.dbManager     = dbManager;
     this.forestManager = forestManager;
     this.scheduler     = scheduler;
     Time = SystemClock.Now;
 }
示例#2
0
        public SystemVariablesUpdater(IWorld world,
                                      ITribeManager tribeManager,
                                      IDbManager dbManager,
                                      IScheduler scheduler,
                                      IStrongholdManager strongholdManager,
                                      IForestManager forestManager,
                                      ISystemVariableManager systemVariableManager,
                                      INetworkServer networkServer,
                                      IChannel channel,
                                      BlockingBufferManager bufferManager,
                                      SocketAwaitablePool socketAwaitablePool)
        {
            this.world                 = world;
            this.tribeManager          = tribeManager;
            this.dbManager             = dbManager;
            this.scheduler             = scheduler;
            this.strongholdManager     = strongholdManager;
            this.forestManager         = forestManager;
            this.systemVariableManager = systemVariableManager;
            this.networkServer         = networkServer;
            this.channel               = channel;
            this.bufferManager         = bufferManager;
            this.socketAwaitablePool   = socketAwaitablePool;

            if (!string.IsNullOrEmpty(Config.api_id))
            {
                graphiteKeyPrefix = string.Format("servers.{0}_tribalhero_com.tribalhero.", Config.api_id);
            }
        }
示例#3
0
        public void AfterDbLoaded(Procedure procedure, IForestManager forestManager)
        {
            Cities.AfterDbLoaded(procedure);

            // Launch forest creator
            forestManager.StartForestCreator();
        }
示例#4
0
 public CityTileNextAvailableLocationStrategy(MapFactory mapFactory,
                                              Formula formula,
                                              IForestManager forestManager,
                                              IGameObjectLocator gameObjectLocator)
 {
     this.mapFactory        = mapFactory;
     this.formula           = formula;
     this.forestManager     = forestManager;
     this.gameObjectLocator = gameObjectLocator;
 }
示例#5
0
 public ForestCampHarvestPassiveAction(uint cityId,
                                       uint forestId,
                                       IScheduler scheduler,
                                       IWorld world,
                                       IForestManager forestManager,
                                       ILocker locker)
     : this(scheduler, world, forestManager, locker)
 {
     this.forestId = forestId;
     this.cityId   = cityId;
 }
示例#6
0
 public ForestCampHarvestPassiveAction(IScheduler scheduler,
                                       IWorld world,
                                       IForestManager forestManager,
                                       ILocker locker)
 {
     IsCancellable      = true;
     this.scheduler     = scheduler;
     this.world         = world;
     this.forestManager = forestManager;
     this.locker        = locker;
 }
示例#7
0
 public ForestDepleteAction(IForest forest,
                            DateTime time,
                            IForestManager forestManager,
                            IRegionManager regionManager,
                            ILocker locker)
 {
     this.forestManager = forestManager;
     this.regionManager = regionManager;
     this.locker        = locker;
     Forest             = forest;
     Time = time;
 }
示例#8
0
 public MapDataExport(IStrongholdManager strongholdManager,
                      ICityManager cityManager,
                      IForestManager forestManager,
                      IBarbarianTribeManager barbarianTribeManager,
                      ITribeManager tribeManager,
                      IWorld world,
                      IScheduler scheduler)
 {
     this.strongholdManager     = strongholdManager;
     this.cityManager           = cityManager;
     this.forestManager         = forestManager;
     this.barbarianTribeManager = barbarianTribeManager;
     this.tribeManager          = tribeManager;
     this.world     = world;
     this.scheduler = scheduler;
 }
示例#9
0
 public ResourcesCommandLineModule(
     IWorld world,
     IForestManager forestManager,
     ICityManager cityManager,
     ILocker locker,
     IObjectTypeFactory objectTypeFactory,
     Formula formula,
     UnitFactory unitFactory)
 {
     this.forestManager     = forestManager;
     this.cityManager       = cityManager;
     this.locker            = locker;
     this.objectTypeFactory = objectTypeFactory;
     this.formula           = formula;
     this.unitFactory       = unitFactory;
     this.world             = world;
 }
示例#10
0
 public CityTileNextToFriendLocationStrategy(int distance,
                                             IPlayer player,
                                             MapFactory mapFactory,
                                             ITileLocator tileLocator,
                                             Random random,
                                             Formula formula,
                                             IForestManager forestManager,
                                             IWorld world)
 {
     this.distance      = distance;
     this.player        = player;
     this.mapFactory    = mapFactory;
     this.tileLocator   = tileLocator;
     this.random        = random;
     this.formula       = formula;
     this.forestManager = forestManager;
     this.world         = world;
 }
示例#11
0
 public StructureCommandsModule(IActionFactory actionFactory,
                                IStructureCsvFactory structureCsvFactory,
                                IObjectTypeFactory objectTypeFactory,
                                PropertyFactory propertyFactory,
                                IForestManager forestManager,
                                IThemeManager themeManager,
                                IWorld world,
                                ILocker locker)
 {
     this.actionFactory       = actionFactory;
     this.structureCsvFactory = structureCsvFactory;
     this.objectTypeFactory   = objectTypeFactory;
     this.propertyFactory     = propertyFactory;
     this.forestManager       = forestManager;
     this.themeManager        = themeManager;
     this.world  = world;
     this.locker = locker;
 }
示例#12
0
 public ForestCampBuildActiveAction(Formula formula,
                                    IWorld world,
                                    IObjectTypeFactory objectTypeFactory,
                                    IStructureCsvFactory structureCsvFactory,
                                    IForestManager forestManager,
                                    ILocker locker,
                                    ITileLocator tileLocator,
                                    CallbackProcedure callbackProcedure)
 {
     this.formula             = formula;
     this.world               = world;
     this.objectTypeFactory   = objectTypeFactory;
     this.structureCsvFactory = structureCsvFactory;
     this.forestManager       = forestManager;
     this.locker              = locker;
     this.tileLocator         = tileLocator;
     this.callbackProcedure   = callbackProcedure;
 }
示例#13
0
 public ForestCampBuildActiveAction(uint cityId,
                                    uint lumbermillId,
                                    uint forestId,
                                    ushort campType,
                                    ushort labors,
                                    Formula formula,
                                    IWorld world,
                                    IObjectTypeFactory objectTypeFactory,
                                    IStructureCsvFactory structureCsvFactory,
                                    IForestManager forestManager,
                                    ILocker locker,
                                    ITileLocator tileLocator,
                                    CallbackProcedure callbackProcedure)
     : this(formula, world, objectTypeFactory, structureCsvFactory, forestManager, locker, tileLocator, callbackProcedure)
 {
     this.cityId       = cityId;
     this.lumbermillId = lumbermillId;
     this.forestId     = forestId;
     this.labors       = labors;
     this.campType     = campType;
 }