예제 #1
0
        public MineClaim Add(MineClaim mineClaim)
        {
            for (var i = 1; true; i++)
            {
                if (mineClaims.All(x => x.Id != i))
                {
                    mineClaim.SetId(i);
                    break;
                }
            }

            mineClaims.Add(mineClaim);
            return(mineClaim);
        }
예제 #2
0
 public static ChipDigger StandardDigger(MineClaim mineClaim)
 {
     return(new ChipDigger(
                new ChipDiggerState
     {
         FirstEquipped = DateTime.Now,
         MineClaim = new MineClaimState
         {
             Id = mineClaim.Id,
             Hardness = mineClaim.Hardness,
             ChipDensity = mineClaim.ChipDensity
         },
         Hopper = new ChipsHopperState
         {
             Max = 30,
             Name = "Standard"
         },
         DiggerBit = new ChipDiggerBitState
         {
             Name = "Basic",
             Min = 8,
             Max = 25
         },
         Durability = new DiggerDurabilityState
         {
             Current = 25,
             Max = 25,
             Modifier = .2f
         },
         Upgrades = new List <DiggerUpgrade>
         {
             new DiggerUpgrade()
             {
                 Name = "Hopper +2",
                 Description = "The hopper can be upgraded to level 2 (210 chips)",
                 MaxLevel = 2,
                 Slot = DiggerUpgradeSlot.Hopper
             },
             new DiggerUpgrade()
             {
                 Name = "Bit upgrade",
                 Description = "The bit can be upgraded to level 2",
                 MaxLevel = 2,
                 Slot = DiggerUpgradeSlot.Bit
             }
         }
     }));
 }
예제 #3
0
 private ChipDigger(ChipDiggerState state)
 {
     Name          = state.Name;
     lastDig       = state.LastDig;
     FirstEquipped = state.FirstEquipped;
     DiggerBit     = ChipDiggerBit.From(state.DiggerBit);
     Durability    = DiggerDurability.From(state.Durability);
     MineClaim     = new MineClaim(
         state.MineClaim.Id,
         state.MineClaim.ChipDensity,
         state.MineClaim.Hardness
         );
     AvailableUpgrades = state.Upgrades;
     LifetimeStats     = state.LifeTimeStats ?? new List <Stat>();
     Hopper            = ChipsHopper.FromState(state.Hopper);
 }