Пример #1
0
        internal readonly string name; // name from modder: "Random Buff"

        #endregion Fields

        #region Constructors

        internal ModHotKey(Mod mod, string name, string defaultKey)
        {
            this.mod = mod;
            this.name = name;
            this.defaultKey = defaultKey;
            this.displayName = mod.Name + ": " + name;
        }
Пример #2
0
        public static void AddBossRecipes(Mod mod)
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "BossItem", 10);
            recipe.AddTile(null, "ExampleWorkbench");
            recipe.SetResult(ItemID.SuspiciousLookingEye, 20);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "BossItem", 10);
            recipe.AddTile(null, "ExampleWorkbench");
            recipe.SetResult(ItemID.WormFood, 20);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "BossItem", 10);
            recipe.AddTile(null, "ExampleWorkbench");
            recipe.SetResult(ItemID.BloodySpine, 20);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "BossItem", 10);
            recipe.AddTile(null, "ExampleWorkbench");
            recipe.SetResult(ItemID.Abeemination, 20);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "BossItem", 10);
            recipe.AddTile(null, "ExampleWorkbench");
            recipe.SetResult(ItemID.GuideVoodooDoll);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "BossItem", 10);
            recipe.AddTile(null, "ExampleWorkbench");
            recipe.SetResult(ItemID.MechanicalEye, 20);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "BossItem", 10);
            recipe.AddTile(null, "ExampleWorkbench");
            recipe.SetResult(ItemID.MechanicalWorm, 20);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "BossItem", 10);
            recipe.AddTile(null, "ExampleWorkbench");
            recipe.SetResult(ItemID.MechanicalSkull, 20);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "BossItem", 10);
            recipe.AddTile(null, "ExampleWorkbench");
            recipe.SetResult(ItemID.LihzahrdPowerCell, 20);
            recipe.AddRecipe();
        }
Пример #3
0
 internal static ProjectileInfo GetProjectileInfo(Projectile projectile, Mod mod, string name)
 {
     int index;
     return infoIndexes.TryGetValue(mod.Name + ':' + name, out index) ? projectile.projectileInfo[index] : null;
 }
Пример #4
0
 internal static ModPlayer GetModPlayer(Player player, Mod mod, string name)
 {
     int index;
     return indexes.TryGetValue(mod.Name + ':' + name, out index) ? player.modPlayers[index] : null;
 }
Пример #5
0
        public static void AddTestRecipes(Mod mod)
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.NebulaHelmet);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.NebulaBreastplate);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.NebulaLeggings);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.CelestialCuffs);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.ManaFlower);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.CharmofMyths);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.StarVeil);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.WormScarf);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.LunarFlareBook);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.LastPrism);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.WingsSolar);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.AnkhShield);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.FrostsparkBoots);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.SuperManaPotion, 99);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.SpectreHood);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.SpectreRobe);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.SpectrePants);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.BubbleGun);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.GoldenShower);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "ExampleItem");
            recipe.SetResult(ItemID.RazorbladeTyphoon);
            recipe.AddRecipe();
        }
Пример #6
0
		internal static ItemInfo GetItemInfo(Item item, Mod mod, string name)
		{
			int index;
			return infoIndexes.TryGetValue(mod.Name + ':' + name, out index) ? item.itemInfo[index] : null;
		}
Пример #7
0
        internal static GlobalProjectile GetGlobalProjectile(Projectile projectile, Mod mod, string name)
        {
            int index;

            return(globalIndexes.TryGetValue(mod.Name + ':' + name, out index) ? globalProjectiles[index].Instance(projectile) : null);
        }
Пример #8
0
		internal static ModPlayer GetModPlayer(Player player, Mod mod, string name)
		{
			int index;
			return indexes.TryGetValue(mod.Name + ':' + name, out index) ? player.modPlayers[index] : null;
		}
Пример #9
0
 internal static NPCInfo GetNPCInfo(NPC npc, Mod mod, string name)
 {
     int index;
     return infoIndexes.TryGetValue(mod.Name + ':' + name, out index) ? npc.npcInfo[index] : null;
 }
Пример #10
0
		public TooltipLine(Mod mod, string name, string text)
		{
			this.mod = mod.Name;
			this.Name = name;
			this.text = text;
		}
Пример #11
0
 public TooltipLine(Mod mod, string name, string text)
 {
     this.mod  = mod.Name;
     this.Name = name;
     this.text = text;
 }
Пример #12
0
        internal static ProjectileInfo GetProjectileInfo(Projectile projectile, Mod mod, string name)
        {
            int index;

            return(infoIndexes.TryGetValue(mod.Name + ':' + name, out index) ? projectile.projectileInfo[index] : null);
        }
Пример #13
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="mod">The mod the recipe originates from.</param>
 public ModRecipe(Mod mod)
 {
     this.mod = mod;
 }