Exemple #1
0
        /// <summary>
        /// Registers this research with the server.
        /// </summary>
        public void Register()
        {
            if (enabled)
            {
                // Convert shell items to real items.
                foreach (ItemShell I in IterationRequirements)
                {
                    if (Variables.itemsMaster == null)
                    {
                        Pipliz.Log.WriteError("{0} CRITICAL ERROR: SimpleResearchable {1} cannot register properly because 'Variables.itemsMaster' is still null.", NAMESPACE == null ? "" : NAMESPACE, this.Name);
                    }
                    else
                    {
                        Pipliz.Log.Write("{0}: Converting shell references in researchable {1} to InventoryItem objects.", NAMESPACE == null ? "" : NAMESPACE, this.Name);
                        if (Variables.itemsMaster.ContainsKey(I.strItemkey))
                        {
                            Requirements.Add(new InventoryItem(I.strItemkey, I.intAmount));
                        }
                        else
                        {
                            Pipliz.Log.Write("{0} Researchable {1} was given an item key '{2}' as an iteration requirement which was not found by the server.", NAMESPACE == null ? "" : NAMESPACE, this.Name, I.strItemkey);
                        }
                    }
                }

                ScienceManager.RegisterResearchable(this);
                Pipliz.Log.Write("{0}: Researchable {1} has been registered with the ScienceManager.", NAMESPACE == null ? "" : NAMESPACE, this.Name);
            }
            else
            {
                Pipliz.Log.Write("{0}: Research {1} has been disabled, and will NOT be registered.", NAMESPACE == null ? "" : NAMESPACE, this.Name);
            }
        }
        private static void RegisterSwordmithng(Dictionary <ushort, int> researchDic, int level, List <string> requirements = null)
        {
            var research = new PandaResearch(researchDic, level, SwordSmithing, 1f, requirements);

            research.ResearchComplete += SwordResearch_ResearchComplete;
            ScienceManager.RegisterResearchable(research);
        }
Exemple #3
0
        public static void Register(Dictionary <ushort, int> researchDic, int level, List <string> requirements = null)
        {
            var research = new Research(researchDic, level, CarpentryTraining, 1f, requirements, 12, false);

            research.ResearchComplete += Carpentry_ResearchComplete;
            ScienceManager.RegisterResearchable(research);
        }
        private static void AddColonistHealth(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.ScienceBagBasic, 2);
            researchDic.Add(BuiltinBlocks.ScienceBagLife, 2);
            researchDic.Add(BuiltinBlocks.Linen, 5);
            researchDic.Add(BuiltinBlocks.BronzeCoin, 10);

            var requirements = new List <string>()
            {
                ColonyBuiltIn.ScienceBagLife
            };

            var research = new PandaResearch(researchDic, 1, ColonistHealth, 10f, requirements);

            research.ResearchComplete += Research_ResearchComplete1;
            ScienceManager.RegisterResearchable(research);

            for (int i = 2; i <= 5; i++)
            {
                research = new PandaResearch(researchDic, i, ColonistHealth, 10f);
                research.ResearchComplete += Research_ResearchComplete1;
                ScienceManager.RegisterResearchable(research);
            }
        }
Exemple #5
0
        private static void AddGunSmithTraining(Dictionary <ushort, int> researchDic)
        {
            _defaultValues[nameof(GunSmithJob)] = GunSmithJob.StaticCraftingCooldown;

            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.LeadBullet, 5);
            researchDic.Add(SCIENCEBAG, BAG_COST);
            researchDic.Add(COIN, COIN_COST);

            var requirements = new List <string>()
            {
                SCIENCEBAGREQ
            };

            var research = new PandaResearch(researchDic, 1, GunSmithTraining, .05f, requirements);

            research.ResearchComplete += GunSmithTraining_ResearchComplete;
            ScienceManager.RegisterResearchable(research);

            for (int i = 2; i <= 5; i++)
            {
                research = new PandaResearch(researchDic, i, GunSmithTraining, .05f);
                research.ResearchComplete += GunSmithTraining_ResearchComplete;
                ScienceManager.RegisterResearchable(research);
            }
        }
        private static void AddTailorTraining(Dictionary <ushort, int> researchDic)
        {
            _defaultValues[nameof(TailorJob)] = TailorJob.StaticCraftingCooldown;

            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.LinenBag, 3);
            researchDic.Add(BuiltinBlocks.ScienceBagBasic, BAG_COST);
            researchDic.Add(BuiltinBlocks.BronzeCoin, COIN_COST);

            var requirements = new List <string>
            {
                SCIENCEBAGREQ,
                ColonyBuiltIn.CoinMinting
            };

            var research = new PandaResearch(researchDic, 1, TailorTraining, .05f, requirements);

            research.ResearchComplete += TrainedTailor_ResearchComplete;
            ScienceManager.RegisterResearchable(research);

            for (var i = 2; i <= 5; i++)
            {
                research = new PandaResearch(researchDic, i, TailorTraining, .05f);
                research.ResearchComplete += TrainedTailor_ResearchComplete;
                ScienceManager.RegisterResearchable(research);
            }
        }
        private static void AddIncreasedCapacity(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.IronBlock, 1);
            researchDic.Add(BuiltinBlocks.Planks, 5);
            researchDic.Add(BuiltinBlocks.SteelIngot, 2);
            researchDic.Add(BuiltinBlocks.GoldCoin, 10);

            var requirements = new List <string>()
            {
                GetResearchKey(Machines + "1")
            };

            var research = new PandaResearch(researchDic, 1, IncreasedCapacity, .2f, requirements);

            research.ResearchComplete += IncreasedCapacity_ResearchComplete;
            ScienceManager.RegisterResearchable(research);

            for (int i = 2; i <= 5; i++)
            {
                research = new PandaResearch(researchDic, i, IncreasedCapacity, .2f);
                research.ResearchComplete += IncreasedCapacity_ResearchComplete;
                ScienceManager.RegisterResearchable(research);
            }
        }
        private static void AddReducedWaste(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.ScienceBagBasic, 2);
            researchDic.Add(BuiltinBlocks.ScienceBagLife, 1);
            researchDic.Add(BuiltinBlocks.Berry, 2);
            researchDic.Add(BuiltinBlocks.Bread, 2);
            researchDic.Add(BuiltinBlocks.GoldCoin, 10);

            var requirements = new List <string>()
            {
                ColonyBuiltIn.ScienceBagLife
            };

            var research = new PandaResearch(researchDic, 1, ReducedWaste, 0.05f, requirements);

            research.ResearchComplete += ReducedWaste_ResearchComplete;
            ScienceManager.RegisterResearchable(research);

            for (int i = 2; i <= 5; i++)
            {
                research = new PandaResearch(researchDic, i, ReducedWaste, 0.05f, requirements);
                research.ResearchComplete += ReducedWaste_ResearchComplete;
                ScienceManager.RegisterResearchable(research);
            }
        }
Exemple #9
0
        private static void AddMerchantTraining(Dictionary <ushort, int> researchDic)
        {
            _defaultValues[nameof(ShopJob)] = ShopJob.StaticCraftingCooldown;

            researchDic.Clear();

            researchDic.Add(SCIENCEBAG, BAG_COST);
            researchDic.Add(COIN, COIN_COST);

            var requirements = new List <string>()
            {
                SCIENCEBAGREQ
            };

            var research = new PandaResearch(researchDic, 1, MerchantTraining, .05f, requirements);

            research.ResearchComplete += TrainedMerchant_ResearchComplete;
            ScienceManager.RegisterResearchable(research);

            for (int i = 2; i <= 5; i++)
            {
                research = new PandaResearch(researchDic, i, MerchantTraining, .05f);
                research.ResearchComplete += TrainedMerchant_ResearchComplete;
                ScienceManager.RegisterResearchable(research);
            }
        }
Exemple #10
0
        private static void AddBetterBuildersWandResearch(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(Aether.Item.ItemIndex, 2);
            researchDic.Add(BuiltinBlocks.SteelIngot, 10);
            researchDic.Add(BuiltinBlocks.GoldIngot, 10);
            researchDic.Add(BuiltinBlocks.SilverIngot, 10);
            researchDic.Add(BuiltinBlocks.Planks, 10);

            var requirements = new List <string>
            {
                GetResearchKey(BuildersWand + "1")
            };

            var research = new PandaResearch(researchDic, 1, BetterBuildersWand, 250f, requirements, 50);

            research.ResearchComplete += BetterBuildersWand_ResearchComplete;
            ScienceManager.RegisterResearchable(research);

            for (var i = 2; i <= 5; i++)
            {
                research =
                    new PandaResearch(researchDic, i, BetterBuildersWand, 250f, requirements, 50);

                research.ResearchComplete += BetterBuildersWand_ResearchComplete;
                ScienceManager.RegisterResearchable(research);
            }
        }
Exemple #11
0
 public static void Register()
 {
     for (int i = 0; i < toRegister.Count; i++)
     {
         var researchable = Activator.CreateInstance(toRegister[i]) as IResearchable;
         if (researchable != null)
         {
             ScienceManager.RegisterResearchable(researchable);
         }
     }
 }
        private static void AddImprovedSlings(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.Sling, 1);
            researchDic.Add(BuiltinBlocks.SlingBullet, 5);

            for (int i = 1; i <= 5; i++)
            {
                var research = new PandaResearch(researchDic, i, ImprovedSling, .05f);
                research.ResearchComplete += ImprovedSlings_ResearchComplete;
                ScienceManager.RegisterResearchable(research);
            }
        }
        private static void AddAdvanceApocthResearch(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.ScienceBagLife, 4);
            researchDic.Add(BuiltinBlocks.ScienceBagAdvanced, 2);

            var requirements = new List <string>()
            {
                GetResearchKey(Apothecary + "1")
            };

            var research = new PandaResearch(researchDic, 1, AdvancedApothecary, 1f, requirements);

            research.ResearchComplete += AdvanceApocth_ResearchComplete;
            ScienceManager.RegisterResearchable(research);
        }
        private static void AddHerbResearch(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.ScienceBagLife, 2);
            researchDic.Add(BuiltinBlocks.ScienceBagAdvanced, 2);

            var requirements = new List <string>()
            {
                ColonyBuiltIn.ScienceBagAdvanced
            };

            var research = new PandaResearch(researchDic, 1, Herbalists, 1f, requirements);

            research.ResearchComplete += Herbs_ResearchComplete;
            ScienceManager.RegisterResearchable(research);
        }
        private static void AddKnightResearch(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.CopperTools, 2);
            researchDic.Add(BuiltinBlocks.ScienceBagBasic, 2);
            researchDic.Add(BuiltinBlocks.Linen, 2);
            researchDic.Add(BuiltinBlocks.BronzeCoin, 10);

            var requirements = new List <string>()
            {
                GetResearchKey(SwordSmithing + "1")
            };

            var research = new PandaResearch(researchDic, 1, Knights, 1f, requirements);

            research.ResearchComplete += Knights_ResearchComplete;
            ScienceManager.RegisterResearchable(research);
        }
        private static void AddMachines(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.IronWrought, 1);
            researchDic.Add(BuiltinBlocks.CopperTools, 1);
            researchDic.Add(BuiltinBlocks.Planks, 5);
            researchDic.Add(BuiltinBlocks.Linen, 2);

            var requirements = new List <string>()
            {
                ColonyBuiltIn.Bloomery
            };

            var research = new PandaResearch(researchDic, 1, Machines, 1f, requirements, 20, false);

            research.ResearchComplete += Machiness_ResearchComplete;
            ScienceManager.RegisterResearchable(research);
        }
Exemple #17
0
        private static void AddBuildersWandResearch(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(Aether.Item.ItemIndex, 2);
            researchDic.Add(BuiltinBlocks.SteelIngot, 10);
            researchDic.Add(BuiltinBlocks.GoldIngot, 10);
            researchDic.Add(BuiltinBlocks.SilverIngot, 10);
            researchDic.Add(Items.Elementium.Item.ItemIndex, 1);

            var requirements = new List <string>
            {
                GetResearchKey(Elementium + "1")
            };

            var research = new PandaResearch(researchDic, 1, BuildersWand, 1f, requirements, 50);

            research.ResearchComplete += BuildersWand_ResearchComplete;
            ScienceManager.RegisterResearchable(research);
        }
Exemple #18
0
        private static void AddManaResearch(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.Alkanet, 10);
            researchDic.Add(BuiltinBlocks.Wolfsbane, 10);
            researchDic.Add(BuiltinBlocks.Hollyhock, 10);
            researchDic.Add(BuiltinBlocks.LinseedOil, 10);
            researchDic.Add(BuiltinBlocks.Crystal, 10);

            var requirements = new List <string>
            {
                GetResearchKey(Apothecary + "1")
            };

            var research = new PandaResearch(researchDic, 1, Mana, 1f, requirements, 50);

            research.ResearchComplete += Mana_ResearchComplete;
            ScienceManager.RegisterResearchable(research);
        }
        private static void AddMasterOfAll(Dictionary <ushort, int> researchDic)
        {
            _defaultValues[nameof(WorkBenchJob)] = WorkBenchJob.StaticCraftingCooldown;

            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.ScienceBagBasic, 1);
            researchDic.Add(BuiltinBlocks.ScienceBagLife, 1);
            researchDic.Add(BuiltinBlocks.ScienceBagAdvanced, 1);
            researchDic.Add(BuiltinBlocks.ScienceBagColony, 1);
            researchDic.Add(BuiltinBlocks.ScienceBagMilitary, 1);
            researchDic.Add(BuiltinBlocks.GoldCoin, 10);
            researchDic.Add(BuiltinBlocks.BronzeCoin, 10);

            var requirements = new List <string>
            {
                PandaResearch.GetResearchKey(MerchantTraining + "5"),
                PandaResearch.GetResearchKey(TailorTraining + "5"),
                PandaResearch.GetResearchKey(BloomeryTraining + "5"),
                PandaResearch.GetResearchKey(FineryForgeTraining + "5"),
                PandaResearch.GetResearchKey(FurnaceTraining + "5"),
                PandaResearch.GetResearchKey(GrinderTraining + "5"),
                PandaResearch.GetResearchKey(GunSmithTraining + "5"),
                PandaResearch.GetResearchKey(KilnTraining + "5"),
                PandaResearch.GetResearchKey(MetalSmithTraining + "5"),
                PandaResearch.GetResearchKey(MintTraining + "5"),
                PandaResearch.GetResearchKey(OvenTraining + "5"),
                PandaResearch.GetResearchKey(WoodcutterTraining + "5"),
                PandaResearch.GetResearchKey(WorkBenchTraining + "5")
            };

            var research = new PandaResearch(researchDic, 1, MasterOfAll, .03f, requirements, 200);

            research.ResearchComplete += MasterOfAll_ResearchComplete;
            ScienceManager.RegisterResearchable(research);

            for (var i = 2; i <= 10; i++)
            {
                research = new PandaResearch(researchDic, i, MasterOfAll, .03f, null, 200);
                research.ResearchComplete += MasterOfAll_ResearchComplete;
                ScienceManager.RegisterResearchable(research);
            }
        }
Exemple #20
0
        private static void AddTeleporters(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(Items.Mana.Item.ItemIndex, 10);
            researchDic.Add(BuiltinBlocks.ScienceBagColony, 10);
            researchDic.Add(BuiltinBlocks.ScienceBagAdvanced, 10);
            researchDic.Add(BuiltinBlocks.StoneBricks, 20);
            researchDic.Add(BuiltinBlocks.Crystal, 20);
            researchDic.Add(BuiltinBlocks.GoldCoin, 20);

            var requirements = new List <string>
            {
                GetResearchKey(Mana + "1"),
                GetResearchKey(Machines + "1")
            };

            var research = new PandaResearch(researchDic, 1, Teleporters, 1f, requirements, 100, false);

            research.ResearchComplete += Teleporters_ResearchComplete;
            ScienceManager.RegisterResearchable(research);
        }
Exemple #21
0
        private static void AddElementiumResearch(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(Aether.Item.ItemIndex, 1);
            researchDic.Add(BuiltinBlocks.Copper, 20);
            researchDic.Add(BuiltinBlocks.IronOre, 20);
            researchDic.Add(BuiltinBlocks.Tin, 20);
            researchDic.Add(BuiltinBlocks.GoldOre, 20);
            researchDic.Add(BuiltinBlocks.GalenaSilver, 20);
            researchDic.Add(BuiltinBlocks.GalenaLead, 20);

            var requirements = new List <string>
            {
                GetResearchKey(Mana + "1")
            };

            var research = new PandaResearch(researchDic, 1, Elementium, 1f, requirements, 50);

            research.ResearchComplete += Elementium_ResearchComplete;
            ScienceManager.RegisterResearchable(research);
        }
        private static void AddBanner(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.ScienceBagBasic, 2);
            researchDic.Add(BuiltinBlocks.ScienceBagLife, 2);
            researchDic.Add(BuiltinBlocks.ScienceBagAdvanced, 2);
            researchDic.Add(BuiltinBlocks.ScienceBagColony, 2);
            researchDic.Add(BuiltinBlocks.ScienceBagMilitary, 2);
            researchDic.Add(BuiltinBlocks.GoldCoin, 10);

            var requirements = new List <string>()
            {
                ColonyBuiltIn.BannerRadius3
            };

            ScienceManager.RegisterResearchable(new PandaResearch(researchDic, 1, Settlement, 1f, requirements, 20, false));

            for (int i = 2; i <= 20; i++)
            {
                ScienceManager.RegisterResearchable(new PandaResearch(researchDic, i, Settlement, 1f, null, 20, false));
            }
        }
Exemple #23
0
        private static void AddMinSettlers(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.ScienceBagBasic, 2);
            researchDic.Add(BuiltinBlocks.ScienceBagLife, 1);
            researchDic.Add(BuiltinBlocks.Bricks, 5);
            researchDic.Add(BuiltinBlocks.CoatedPlanks, 5);
            researchDic.Add(BuiltinBlocks.Clothing, 5);
            researchDic.Add(BuiltinBlocks.GoldCoin, 20);

            var requirements = new List <string>
            {
                GetResearchKey(MaxSettlers) + "3"
            };

            ScienceManager.RegisterResearchable(new PandaResearch(researchDic, 1, MinSettlers, 1f, requirements));

            for (var i = 2; i <= 10; i++)
            {
                ScienceManager.RegisterResearchable(new PandaResearch(researchDic, i, MinSettlers, 1f));
            }
        }
Exemple #24
0
        private static void AddMaxSettlers(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.ScienceBagBasic, 2);
            researchDic.Add(BuiltinBlocks.ScienceBagLife, 1);
            researchDic.Add(BuiltinBlocks.PlasterBlock, 5);
            researchDic.Add(BuiltinBlocks.IronIngot, 5);
            researchDic.Add(BuiltinBlocks.Bed, 10);
            researchDic.Add(BuiltinBlocks.GoldCoin, 20);

            var requirements = new List <string>
            {
                GetResearchKey(SettlerChance) + "1"
            };

            ScienceManager.RegisterResearchable(new PandaResearch(researchDic, 1, MaxSettlers, 1f, requirements));

            for (var i = 2; i <= 10; i++)
            {
                ScienceManager.RegisterResearchable(new PandaResearch(researchDic, i, MaxSettlers, 1f));
            }
        }
Exemple #25
0
        private static void AddSettlerChance(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.ScienceBagBasic, 1);
            researchDic.Add(BuiltinBlocks.ScienceBagLife, 2);
            researchDic.Add(BuiltinBlocks.Torch, 5);
            researchDic.Add(BuiltinBlocks.StoneBricks, 10);
            researchDic.Add(BuiltinBlocks.Bed, 5);
            researchDic.Add(BuiltinBlocks.GoldCoin, 20);

            var requirements = new List <string>
            {
                ColonyBuiltIn.BannerRadius2
            };

            ScienceManager.RegisterResearchable(new PandaResearch(researchDic, 1, SettlerChance, 0.1f, requirements));

            for (var i = 2; i <= 5; i++)
            {
                ScienceManager.RegisterResearchable(new PandaResearch(researchDic, i, SettlerChance, 0.1f));
            }
        }
Exemple #26
0
        private static void AddSkilledLaborer(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.ScienceBagBasic, 10);
            researchDic.Add(BuiltinBlocks.ScienceBagAdvanced, 10);
            researchDic.Add(BuiltinBlocks.CopperTools, 20);
            researchDic.Add(BuiltinBlocks.IronBlock, 2);
            researchDic.Add(BuiltinBlocks.GoldCoin, 30);

            var requirements = new List <string>
            {
                GetResearchKey(SettlerChance) + "2",
                GetResearchKey(ReducedWaste) + "2",
                GetResearchKey(TimeBetween) + "1"
            };

            ScienceManager.RegisterResearchable(new PandaResearch(researchDic, 1, SkilledLaborer, 0.02f, requirements));

            for (var i = 2; i <= 10; i++)
            {
                ScienceManager.RegisterResearchable(new PandaResearch(researchDic, i, SkilledLaborer, 0.02f));
            }
        }
Exemple #27
0
        private static void AddTimeBetween(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.ScienceBagBasic, 6);
            researchDic.Add(BuiltinBlocks.ScienceBagLife, 2);
            researchDic.Add(BuiltinBlocks.CarpetRed, 5);
            researchDic.Add(BuiltinBlocks.Bed, 10);
            researchDic.Add(BuiltinBlocks.CarpetYellow, 5);
            researchDic.Add(BuiltinBlocks.GoldCoin, 20);

            var requirements = new List <string>
            {
                ColonyBuiltIn.ScienceBagLife,
                ColonyBuiltIn.CoinMinting
            };

            ScienceManager.RegisterResearchable(new PandaResearch(researchDic, 1, TimeBetween, 1f, requirements));

            for (var i = 2; i <= 5; i++)
            {
                ScienceManager.RegisterResearchable(new PandaResearch(researchDic, i, TimeBetween, 1f));
            }
        }
        private static void AddImprovedCrossbows(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.Crossbow, 1);
            researchDic.Add(BuiltinBlocks.CrossbowBolt, 5);

            var requirements = new List <string>()
            {
                ColonyBuiltIn.CrossBowBolt
            };

            var research = new PandaResearch(researchDic, 1, ImprovedCrossbow, .05f, requirements);

            research.ResearchComplete += ImprovedCrossbows_ResearchComplete;
            ScienceManager.RegisterResearchable(research);

            for (int i = 2; i <= 5; i++)
            {
                research = new PandaResearch(researchDic, i, ImprovedCrossbow, .05f);
                research.ResearchComplete += ImprovedCrossbows_ResearchComplete;
                ScienceManager.RegisterResearchable(research);
            }
        }
Exemple #29
0
        private static void AddNumberSkilledLaborer(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.ScienceBagAdvanced, 10);
            researchDic.Add(BuiltinBlocks.ScienceBagColony, 10);
            researchDic.Add(BuiltinBlocks.CopperParts, 20);
            researchDic.Add(BuiltinBlocks.CopperNails, 30);
            researchDic.Add(BuiltinBlocks.Tin, 10);
            researchDic.Add(BuiltinBlocks.IronRivet, 20);
            researchDic.Add(BuiltinBlocks.GoldCoin, 30);

            var requirements = new List <string>
            {
                GetResearchKey(SkilledLaborer) + "1"
            };

            ScienceManager.RegisterResearchable(new PandaResearch(researchDic, 1, NumberSkilledLaborer, 1f,
                                                                  requirements));

            for (var i = 2; i <= 5; i++)
            {
                ScienceManager.RegisterResearchable(new PandaResearch(researchDic, i, NumberSkilledLaborer, 1f));
            }
        }
        private static void AddImprovedMatchlockgun(Dictionary <ushort, int> researchDic)
        {
            researchDic.Clear();
            researchDic.Add(BuiltinBlocks.MatchlockGun, 1);
            researchDic.Add(BuiltinBlocks.LeadBullet, 5);
            researchDic.Add(BuiltinBlocks.GunpowderPouch, 2);

            var requirements = new List <string>()
            {
                ColonyBuiltIn.MatchlockGun
            };

            var research = new PandaResearch(researchDic, 1, ImprovedMatchlockgun, .05f, requirements);

            research.ResearchComplete += ImprovedMatchlockguns_ResearchComplete;
            ScienceManager.RegisterResearchable(research);

            for (int i = 2; i <= 5; i++)
            {
                research = new PandaResearch(researchDic, i, ImprovedMatchlockgun, .05f);
                research.ResearchComplete += ImprovedMatchlockguns_ResearchComplete;
                ScienceManager.RegisterResearchable(research);
            }
        }