Пример #1
0
        private static void _drawIcons(Mod mod, SpriteBatch spriteBatch)
        {
            ReLogic.Content.Asset <Texture2D> chest  = mod.GetTexture("Items/Equipables/Accessories/ChestIcon");
            ReLogic.Content.Asset <Texture2D> chest_ = mod.GetTexture("Items/Equipables/Accessories/ChestIcon2");
            var startPosition = new Vector2();

            foreach (Point chest2 in chestTiles)
            {
                startPosition = AntiarisHelper.FoundPosition(new Vector2(chest2.X + 1f, chest2.Y + 1f));
                var newStartPosition = new Rectangle((int)startPosition.X, (int)startPosition.Y, chest.Width, chest.Height);
                spriteBatch.Draw(chest, newStartPosition, null, Color.White, 0f, new Vector2(chest.Width / 2, chest.Height / 2), SpriteEffects.None, 0f);
            }
            foreach (Point chest2_ in chestTiles2)
            {
                startPosition = AntiarisHelper.FoundPosition(new Vector2(chest2_.X + 1f, chest2_.Y + 1f));
                var newStartPosition = new Rectangle((int)startPosition.X, (int)startPosition.Y, chest_.Width, chest_.Height);
                spriteBatch.Draw(chest_, newStartPosition, null, Color.White, 0f, new Vector2(chest_.Width / 2, chest_.Height / 2), SpriteEffects.None, 0f);
            }
        }
Пример #2
0
        public static void LoadContent_LoadProjectileAssets(Terraria.Main __instance)
        {
            // The specially named __instance parameter is automatically filled in by Harmony to reference the Main instance that is calling this method.

            // We'll do all our setup in a try-catch so we don't crash Terraria if something goes wrong.
            try
            {
                // Load our custom projectile's texture from the embedded resource bytes we extracted in ConfigurationLoaded()
                ProjectileGraphic = HHelpers.AssetHandling.CreateTexture2DFromImageBytes(ProjectileGraphicBytes, __instance.GraphicsDevice, true, new Vector4(1f, 1f, 1f, 1f / 2.2f));
                // The PNG used in this example was written with an alpha channel gamma space that does not look good in Terraria, hence the use of the final parameter (gammaCorrection) to do some correction.
                // NOTE: Only use the gammaCorrection parameter if you know what you are doing, otherwise just skip it (or set to default value of null)

                // Just like with creating new items, we need to expand a bunch of projectile design data arrays to reach up to our projectile's ID.
                // We will fill the placeholder spaces between the last vanilla ID and our custom ID with default values.
                Helper_ExpandArray(ref Terraria.Main.projFrames, ProjectileID, 0);
                Terraria.Main.projFrames[ProjectileID] = 8;     // Our custom projectile has 8 frames of animation
                Helper_ExpandArray(ref Terraria.Main.projHook, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.Main.projHostile, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.Main.projPet, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.CanDistortWater, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.CountsAsHoming, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.DismountsPlayersOnHit, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.DontApplyParryDamageBuff, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.DontAttachHideToAlpha, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.DrawScreenCheckFluff, ProjectileID, 480);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.ExtendedCanHitCheckRange, ProjectileID, 0f);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.ExtendedCanHitCheckSearch, ProjectileID, null);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.ForcePlateDetection, ProjectileID, null);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.ImmediatelyUpdatesNPCBuffFlags, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.IsADD2Turret, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.IsAGolfBall, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.IsAMineThatDealsTripleDamageWhenStationary, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.IsARocketThatDealsDoubleDamageToPrimaryEnemy, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.IsAWhip, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.LightPet, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.MinionSacrificable, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.MinionShot, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.MinionTargettingFeature, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.NeedsUUID, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.NoLiquidDistortion, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.RocketsSkipDamageForPlayers, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.SentryShot, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.StardustDragon, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.StormTiger, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.TrailCacheLength, ProjectileID, 10);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.TrailingMode, ProjectileID, -1);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.TurretFeature, ProjectileID, false);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.WindPhysicsImmunity, ProjectileID, null);
                Terraria.ID.ProjectileID.Sets.WindPhysicsImmunity[ProjectileID] = true;     // We want our custom projectile to be immune to wind since it is an energy ball
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.YoyosLifeTimeMultiplier, ProjectileID, -1f);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.YoyosMaximumRange, ProjectileID, 200f);
                Helper_ExpandArray(ref Terraria.ID.ProjectileID.Sets.YoyosTopSpeed, ProjectileID, 10f);

                // Next we need to extend the Terraria.GameContent.TextureAssets.Projectile array to reach our Projectile's ID in size and include our Projectile's texture
                Helper_ExpandArray(ref Terraria.GameContent.TextureAssets.Projectile, ProjectileID, Terraria.GameContent.TextureAssets.Projectile[0]); // Use the first texture in the list as a default placeholder
                // Now create a ReLogic.Content.Asset<Texture2D> to hold our projectile's graphic
                Type assetType = typeof(ReLogic.Content.Asset <Texture2D>);
                ProjectileGraphicAsset = (ReLogic.Content.Asset <Texture2D>)HHelpers.ActivateInstanceUsingFirstConstructor(assetType, new object[] { "Projectile_WeaponProcessorOnAStick_ElectricBall" }); // This type has only one constructor
                // By using the ActivateInstanceUsingFirstConstructor() helper method, we avoid directly using Reflection and thus don't violate plugin Security Level 4
                HHelpers.SetPropertyValueWithReflection("Value", ProjectileGraphicAsset, ProjectileGraphic);                                                                                               // Set the Value (which is of type Texture2D)
                HHelpers.SetPropertyValueWithReflection("State", ProjectileGraphicAsset, ReLogic.Content.AssetState.Loaded);                                                                               // Set the loaded state to Loaded
                Terraria.GameContent.TextureAssets.Projectile[ProjectileID] = ProjectileGraphicAsset;                                                                                                      // Assign the newly created asset to our projectile's slot in the array
            }
            catch (Exception e)
            {
                // Something went wrong, so we will set PluginLoadedSuccessfully to false and thus disable the rest of our plugin code.
                // If you are debugging a plugin, however, you probably DONT want to do this, or you might miss thrown exceptions.
                PluginLoadedSuccessfully = false;
                return;
            }
        }
Пример #3
0
        public static void LoadContent_LoadWeaponAssets(Terraria.Main __instance)
        {
            // The specially named __instance parameter is automatically filled in by Harmony to reference the Main instance that is calling this method.

            // We'll do all our setup in a try-catch so we don't crash Terraria if something goes wrong.
            try
            {
                // Load our weapon's texture from the embedded resource bytes we extracted in ConfigurationLoaded()
                ItemGraphic = HHelpers.AssetHandling.CreateTexture2DFromImageBytes(ItemGraphicBytes, __instance.GraphicsDevice);
                // Using CreateTexture2DFromImageBytes() is compliant with all security levels and is the recommended way to create Texture2Ds.
                // You could use your own Streams, but using Streams (or any other type in System.IO) will make your plugin violate Security Level 3.

                // We will also modify some necessary arrays here (this method will only be called once, so this is a good time to modify these arrays).
                // There are many arrays which are indexed using the item's type (aka ID). We need to expand all those arrays to reach up to our item's ID.
                // We will fill the placeholder spaces between the last vanilla ID and our new ID with default values.
                Helper_ExpandArray(ref Terraria.Item.cachedItemSpawnsByType, WeaponItemID, -1);
                Helper_ExpandArray(ref Terraria.Item.claw, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.Item.staff, WeaponItemID, false);
                Terraria.Item.staff[WeaponItemID] = true;     // Our item is a staff, so we set this to true for our slot
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.AlsoABuildingItem, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.AnimatesAsSoul, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.BonusMeleeSpeedMultiplier, WeaponItemID, 1f);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.CanBePlacedOnWeaponRacks, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.CanBeQuickusedOnGamepad, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.CanGetPrefixes, WeaponItemID, false);
                Terraria.ID.ItemID.Sets.CanGetPrefixes[WeaponItemID] = true;     // Our item is a weapon & we want to it be able to get prefixes, so we set this to true for our slot
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.Deprecated, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.DrinkParticleColors, WeaponItemID, new Color[0]);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.ExtractinatorMode, WeaponItemID, -1);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.FoodParticleColors, WeaponItemID, new Color[0]);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.ForceConsumption, WeaponItemID, null);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.GamepadExtraRange, WeaponItemID, 0);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.GamepadSmartQuickReach, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.GamepadWholeScreenUseRange, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.gunProj, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.HasAProjectileThatHasAUsabilityCheck, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.IgnoresEncumberingStone, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.IsAKite, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.IsAMaterial, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.IsAPickup, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.IsChainsaw, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.IsDrill, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.IsFishingCrate, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.IsFishingCrateHardmode, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.IsFood, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.IsLavaBait, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.IsPaintScraper, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.ItemIconPulse, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.ItemNoGravity, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.ItemSpawnDecaySpeed, WeaponItemID, 1);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.ItemsThatAllowRepeatedRightClick, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.ItemsThatCountAsBombsForDemolitionistToSpawn, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.KillsToBanner, WeaponItemID, 50);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.LockOnAimAbove, WeaponItemID, 0);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.LockOnIgnoresCollision, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.NebulaPickup, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.NeverAppearsAsNewInInventory, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.NewItemSpawnPriority, WeaponItemID, 0);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.SingleUseInGamepad, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.SkipsInitialUseSound, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.SummonerWeaponThatScalesWithAttackSpeed, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.TextureCopyLoad, WeaponItemID, -1);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.ToolTipDamageMultiplier, WeaponItemID, 1f);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.Torches, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.TrapSigned, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.UsesCursedByPlanteraTooltip, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.WaterTorches, WeaponItemID, false);
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.Yoyo, WeaponItemID, false);

                // We also need to expand Terraria.Main.itemAnimations to reach up to our item's ID and include a Terraria.DataStructures.DrawAnimation for our weapon's Item
                Helper_ExpandArray(ref Terraria.Main.itemAnimations, WeaponItemID, null); // Add null DrawAnimations in the dummy slots (and in our weapon's slot as well, since the sprite has a single frame and no animations)

                // We also need to expand Terraria.ID.ItemID.Sets.TextureCopyLoad to reach up to our item's ID
                Helper_ExpandArray(ref Terraria.ID.ItemID.Sets.TextureCopyLoad, WeaponItemID, 0); // We will have all the empty placeholder spots set to 0 so that they mirror load the texture in index 0 (as opposed to crashing from trying to load an out-of-range texture index)

                // Next we need to extend the Terraria.GameContent.TextureAssets.Item array to reach our item's ID in size and include our Item's texture
                Helper_ExpandArray(ref Terraria.GameContent.TextureAssets.Item, WeaponItemID, Terraria.GameContent.TextureAssets.Item[0]); // Use the first texture in the list as a default placeholder
                // Now create a ReLogic.Content.Asset<Texture2D> to hold our item graphic
                Type assetType = typeof(ReLogic.Content.Asset <Texture2D>);
                ItemGraphicAsset = (ReLogic.Content.Asset <Texture2D>)HHelpers.ActivateInstanceUsingFirstConstructor(assetType, new object[] { "Item_WeaponProcessorOnAStick" }); // This type has only one constructor
                // By using the ActivateInstanceUsingFirstConstructor() helper method, we avoid directly using Reflection and thus don't violate plugin Security Level 4
                HHelpers.SetPropertyValueWithReflection("Value", ItemGraphicAsset, ItemGraphic);                                                                                  // Set the Value (which is of type Texture2D)
                HHelpers.SetPropertyValueWithReflection("State", ItemGraphicAsset, ReLogic.Content.AssetState.Loaded);                                                            // Set the loaded state to Loaded
                Terraria.GameContent.TextureAssets.Item[WeaponItemID] = ItemGraphicAsset;                                                                                         // Assign the newly created asset to our item's slot in the array

                // We also need to create a LocalizedText to hold our weapon Item's name
                Type localizedTextType = typeof(Terraria.Localization.LocalizedText);
                WeaponItemName = (Terraria.Localization.LocalizedText)HHelpers.ActivateInstanceUsingFirstConstructor(localizedTextType, new object[] { "", WeaponItemNameText }); // This type has only one constructor
                // By using the ActivateInstanceUsingFirstConstructor() helper method, we avoid directly using Reflection and thus don't violate plugin Security Level 4
            }
            catch (Exception e)
            {
                // Something went wrong, so we will set PluginLoadedSuccessfully to false and thus disable the rest of our plugin code.
                // If you are debugging a plugin, however, you probably DONT want to do this, or you might miss thrown exceptions.
                PluginLoadedSuccessfully = false;
                return;
            }
        }
Пример #4
0
        public string Something()
        {
            Mod            mod             = ModLoader.GetMod("Antiaris");
            AntiarisPlayer aPlayer         = Main.LocalPlayer.GetModPlayer <AntiarisPlayer>(mod);
            QuestSystem    questSystem     = Main.LocalPlayer.GetModPlayer <QuestSystem>(mod);
            string         CurrentQuest    = Language.GetTextValue("Mods.Antiaris.CurrentQuest");
            float          scaleMultiplier = 0.5f + 1 * 0.5f;
            int            width           = (int)(250f * scaleMultiplier);
            int            height          = (int)(60f * scaleMultiplier);

            ReLogic.Content.Asset <Texture2D> background = mod.GetTexture("Miscellaneous/QuestTracker");
            string Name0  = Language.GetTextValue("Mods.Antiaris.Name0");
            string Name1  = Language.GetTextValue("Mods.Antiaris.Name1");
            string Name2  = Language.GetTextValue("Mods.Antiaris.Name2");
            string Name3  = Language.GetTextValue("Mods.Antiaris.Name3");
            string Name4  = Language.GetTextValue("Mods.Antiaris.Name4");
            string Name5  = Language.GetTextValue("Mods.Antiaris.Name5");
            string Name6  = Language.GetTextValue("Mods.Antiaris.Name6");
            string Name7  = Language.GetTextValue("Mods.Antiaris.Name7");
            string Name8  = Language.GetTextValue("Mods.Antiaris.Name8");
            string Name9  = Language.GetTextValue("Mods.Antiaris.Name9");
            string Name10 = Language.GetTextValue("Mods.Antiaris.Name10");
            string Name11 = Language.GetTextValue("Mods.Antiaris.Name11");
            string Name12 = Language.GetTextValue("Mods.Antiaris.Name12");
            string Name13 = Language.GetTextValue("Mods.Antiaris.Name13");
            string Name14 = Language.GetTextValue("Mods.Antiaris.Name14");
            string Name15 = Language.GetTextValue("Mods.Antiaris.Name15");
            string Name16 = Language.GetTextValue("Mods.Antiaris.Name16");
            string Name17 = Language.GetTextValue("Mods.Antiaris.Name17");
            string Name18 = Language.GetTextValue("Mods.Antiaris.Name18");
            string Name19 = Language.GetTextValue("Mods.Antiaris.Name19");
            string Name20 = Language.GetTextValue("Mods.Antiaris.Name20");
            string TurnIn = Language.GetTextValue("Mods.Antiaris.TurnIn");

            string[] QuestItems = { "OldCompass",    "GlacialCrystal", "Leather",       "MonsterSkull",         "HarpyEgg",    "GoldenApple",    "Necronomicon",    "Slimes",
                                    "UndeadMiner",   "BirdTraveller",  "SilkScarf",     "AdventurerFishingRod", "Bonebardier", "DemonWingPiece", "AdventurerChest", "Coconut","SpiderMass",
                                    "StolenPresent", "EmeraldShard",   "HeavenlyClock", "Charcoal" };

            int[] QuestAmount = { 1, 1, 12, 1, 1, 1, 1, 25, 1, 5, 1, 1, 1, 12, 1, 16, 12, 20, 12, 1, 25 };

            string[] QuestNamesEn = { "Old Compass",    "Glacial Crystal", "Leather",        "Monster Skull",            "Harpy Egg",   "Golden Apple",     "Necronomicon",       "Slime",
                                      "Undead Miner",   "Bird Traveller",  "Silk Scarf",     "Adventurer's Fishing Rod", "Bonebardier", "Demon Wing Piece", "Adventurer's Chest", "Coconut","Spider Mass",
                                      "Stolen Present", "Emerald Shard",   "Heavenly Clock", "Charcoal" };

            string[] QuestNamesRu = { "Старый компас",      "Ледяной кристалл",     "Кожа",          "Череп монстра",          "Яйцо гарпии", "Золотое яблоко",     "Некрономикон",           "Слизень",
                                      "Мёртвый шахтёр",     "Птица-путешественник", "Шёлковый шарф", "Удочка Путешественника", "Костордир",   "Часть крыла демона", "Сундук Путешественника", "Кокос",  "Паучья масса",
                                      "Украденные подарки", "Изумрудные осколки",   "Райские часы",  "Древесный уголь" };

            string[] QuestNamesCn = { "旧罗盘",   "冰晶体",   "皮革",   "古生物骸骨",  "鹰身女妖的蛋", "金苹果",     "死灵法书",   "史莱姆",
                                      "不死矿工",  "荼毒女王鸟", "丝绸围巾", "冒险家的鱼竿", "骸骨炮兵",   "恶魔翅膀的碎片", "冒险家的箱子", "椰子", "蜘蛛分泌物",
                                      "偷来的礼物", "翡翠碎片",  "天国之钟", "木炭" };

            string QuestItemName = QuestNamesRu[questSystem.CurrentQuest];

            if (Language.ActiveCulture == (int)GameCulture.CultureName.Russian)
            {
                QuestItemName = QuestNamesRu[questSystem.CurrentQuest];
            }
            else if (Language.ActiveCulture == (int)GameCulture.CultureName.Chinese)
            {
                QuestItemName = QuestNamesCn[questSystem.CurrentQuest];
            }
            else
            {
                QuestItemName = QuestNamesEn[questSystem.CurrentQuest];
            }

            int CurrentItemAmount = 0;

            string[] QuestNames = { Name0, Name1, Name2, Name3, Name4, Name5, Name6, Name7, Name8, Name9, Name10, Name11, Name12, Name13, Name14, Name15, Name16, Name17, Name18, Name19, Name20 };
            string   QuestName  = QuestNames[questSystem.CurrentQuest];

            if (questSystem.CurrentQuest >= 0 && questSystem.CurrentQuest != QuestItemID.Leather && questSystem.CurrentQuest != QuestItemID.Charcoal)
            {
                foreach (Player player in Main.player)
                {
                    if (player.active)
                    {
                        if (player.HasItem(mod.ItemType(QuestItems[questSystem.CurrentQuest])))
                        {
                            Item[] inventory = player.inventory;
                            for (int k = 0; k < inventory.Length; k++)
                            {
                                if (inventory[k].type == mod.ItemType(QuestItems[questSystem.CurrentQuest]))
                                {
                                    CurrentItemAmount += inventory[k].stack;
                                }
                            }
                        }
                    }
                }
            }

            //Leather Quest
            if (questSystem.CurrentQuest == QuestItemID.Leather)
            {
                foreach (Player player in Main.player)
                {
                    if (player.active)
                    {
                        if (player.HasItem(259))
                        {
                            Item[] inventory = player.inventory;
                            for (int k = 0; k < inventory.Length; k++)
                            {
                                if (inventory[k].type == ItemID.Leather)
                                {
                                    CurrentItemAmount += inventory[k].stack;
                                }
                            }
                        }
                    }
                }
            }
            //overhaul charcoal
            if (questSystem.CurrentQuest == QuestItemID.Charcoal && ModContent.TryFind <ModItem>("TerrariaOverhaul/Charcoal", out ModItem overhaulCharcoal))
            {
                foreach (Player player in Main.player)
                {
                    if (player.active)
                    {
                        if (player.HasItem(overhaulCharcoal.Type))
                        {
                            Item[] inventory = player.inventory;
                            for (int k = 0; k < inventory.Length; k++)
                            {
                                if (inventory[k].type == overhaulCharcoal.Type)
                                {
                                    CurrentItemAmount += inventory[k].stack;
                                }
                            }
                        }
                    }
                }
            }
            //Mob Quests
            if (questSystem.CurrentQuest == QuestItemID.Traveler || questSystem.CurrentQuest == QuestItemID.Miner || questSystem.CurrentQuest == QuestItemID.Slimes)
            {
                CurrentItemAmount += questSystem.QuestKills;
            }
            if (CurrentItemAmount >= QuestAmount[questSystem.CurrentQuest])
            {
                return(TurnIn);
            }
            string addLine = "";

            if (QuestAmount[questSystem.CurrentQuest] > 1)
            {
                addLine = CurrentItemAmount + "/" + QuestAmount[questSystem.CurrentQuest];
            }
            return(QuestItemName + " " + addLine);
        }