예제 #1
0
        public override void Load()
        {
            PassHotkey       = RegisterHotKey("过牌快捷键", "E");
            WashHotkey       = RegisterHotKey("洗牌快捷键", "Q");
            HookCursorHotKey = RegisterHotKey("设置钩爪指针快捷键", "C");
            On.Terraria.Player.QuickGrapple += Player_QuickGrapple;
            On.Terraria.Player.ItemCheck    += UnderworldTransportCheck;
            On.Terraria.Main.DrawInterface_40_InteractItemIcon += CustomHandIcon;
            //On.Terraria.Main.DrawTiles += Main_DrawTiles;
            foolTexts        = Main.rand.Next(3);
            Unloading        = false;
            IsCalamityLoaded = ModLoader.GetMod("CalamityMod") != null;
            Mod yabhb = ModLoader.GetMod("FKBossHealthBar");

            if (yabhb != null)
            {
                #region Wlta yabhb
                yabhb.Call("RegisterCustomHealthBar",
                           ModContent.NPCType <Embryo>(),
                           null,                              //ForceSmall
                           null,                              //displayName
                           GetTexture("UI/yabhb/瓦卢提奥血条Fill"), //fillTexture
                           GetTexture("UI/yabhb/瓦卢提奥血条头"),
                           GetTexture("UI/yabhb/瓦卢提奥血条条"),
                           GetTexture("UI/yabhb/瓦卢提奥血条尾"),
                           null,  //midBarOffsetX
                           0,     //midBarOffsetY
                           null,  //fillDecoOffsetX
                           32,    //bossHeadCentreOffsetX
                           30,    //bossHeadCentreOffsetY
                           null,  //fillTextureSM
                           null,  //leftBarSM
                           null,  //midBarSM
                           null,  //rightBarSM
                           null,  //fillDecoOffsetXSM
                           null,  //bossHeadCentreOffsetXSM
                           null,  //bossHeadCentreOffsetYSM
                           true); //LoopMidBar
                yabhb.Call("RegisterCustomHealthBar",
                           ModContent.NPCType <Volutio>(),
                           null,                              //ForceSmall
                           null,                              //displayName
                           GetTexture("UI/yabhb/瓦卢提奥血条Fill"), //fillTexture
                           GetTexture("UI/yabhb/瓦卢提奥血条头"),
                           GetTexture("UI/yabhb/瓦卢提奥血条条"),
                           GetTexture("UI/yabhb/瓦卢提奥血条尾"),
                           null,  //midBarOffsetX
                           0,     //midBarOffsetY
                           null,  //fillDecoOffsetX
                           32,    //bossHeadCentreOffsetX
                           32,    //bossHeadCentreOffsetY
                           null,  //fillTextureSM
                           null,  //leftBarSM
                           null,  //midBarSM
                           null,  //rightBarSM
                           null,  //fillDecoOffsetXSM
                           null,  //bossHeadCentreOffsetXSM
                           null,  //bossHeadCentreOffsetYSM
                           true); //LoopMidBar
                #endregion
            }
            MimicryCustomCurrencyId = CustomCurrencyManager.RegisterCurrency(new EntrogicMimicryCurrency(ModContent.ItemType <拟态魔能>(), 999L));
            if (!Main.dedServ)
            {
                ResourceLoader.LoadAllTextures();
                ResourceLoader.LoadAllCardMissions();

                AddEquipTexture(new PollutionElementalMask1(), null, EquipType.Head, "PollutionElementalMask1", "Entrogic/Items/PollutElement/PollutionElementalMask1_Head");
                AddEquipTexture(new PollutionElementalMask2(), null, EquipType.Head, "PollutionElementalMask2", "Entrogic/Items/PollutElement/PollutionElementalMask2_Head");
                AddEquipTexture(new PollutionElementalMask3(), null, EquipType.Head, "PollutionElementalMask3", "Entrogic/Items/PollutElement/PollutionElementalMask3_Head");
                AddEquipTexture(new PollutionElementalMask4(), null, EquipType.Head, "PollutionElementalMask4", "Entrogic/Items/PollutElement/PollutionElementalMask4_Head");
                AddEquipTexture(new PolluWings1(), null, EquipType.Wings, "PolluWings1", "Entrogic/Items/PollutElement/PolluWings1_Wings");
                AddEquipTexture(new PolluWings2(), null, EquipType.Wings, "PolluWings2", "Entrogic/Items/PollutElement/PolluWings2_Wings");
                AddEquipTexture(new PolluWings3(), null, EquipType.Wings, "PolluWings3", "Entrogic/Items/PollutElement/PolluWings3_Wings");
                AddEquipTexture(new PolluWings4(), null, EquipType.Wings, "PolluWings4", "Entrogic/Items/PollutElement/PolluWings4_Wings");
                AddEquipTexture(new PolluWings5(), null, EquipType.Wings, "PolluWings5", "Entrogic/Items/PollutElement/PolluWings5_Wings");
                AddEquipTexture(new PolluWings6(), null, EquipType.Wings, "PolluWings6", "Entrogic/Items/PollutElement/PolluWings6_Wings");
                AddEquipTexture(new PolluWings7(), null, EquipType.Wings, "PolluWings7", "Entrogic/Items/PollutElement/PolluWings7_Wings");
                AddEquipTexture(new PolluWings8(), null, EquipType.Wings, "PolluWings8", "Entrogic/Items/PollutElement/PolluWings8_Wings");

                ResourceLoader.LoadAllShaders();

                BookUI = new BookUI();
                BookUI.Activate();
                BookUIE = new UserInterface();
                BookUIE.SetState(BookUI);

                //BookPageUI = new BookPageUI();
                //BookPageUI.Activate();
                //BookPageUIE = new UserInterface();
                //BookPageUIE.SetState(BookPageUI);

                CardUI = new CardUI();
                CardUI.Activate();
                CardUIE = new UserInterface();
                CardUIE.SetState(CardUI);

                CardInventoryUI = new CardInventoryUI();
                CardInventoryUI.Activate();
                CardInventoryUIE = new UserInterface();
                CardInventoryUIE.SetState(CardInventoryUI);

                CardGameUI = new CardGameUI();
                CardGameUI.Activate();
                CardGameUIE = new UserInterface();
                CardGameUIE.SetState(CardGameUI);

                /*SinsBar.visible = true;
                 * Sinsbar = new SinsBar();
                 * Sinsbar.Activate();
                 * SinsBarInterface = new UserInterface();
                 * SinsBarInterface.SetState(Sinsbar);*/
            }
            Buildings.Cache("Buildings/CardShrine0.ebuilding", "Buildings/CardShrine1.ebuilding", "Buildings/UnderworldPortal.ebuilding");
            new PiggyBankAmmo();
            new ModHandler();
            #region Armor Translates
            Translation.RegisterTranslation("mspeed", GameCulture.Chinese, "移动速度", " movement speed");
            Translation.RegisterTranslation("and", GameCulture.Chinese, "与", " and");
            Translation.RegisterTranslation("csc", GameCulture.Chinese, "暴击率", " critical strike chance");
            Translation.RegisterTranslation("knockback", GameCulture.Chinese, "击退", " knockback");
            Translation.RegisterTranslation("damage", GameCulture.Chinese, "伤害", " damage");
            Translation.RegisterTranslation("cntca", GameCulture.Chinese, "的几率不消耗弹药", " chance not to consume ammo");
            Translation.RegisterTranslation("immb", GameCulture.Chinese, "最大魔力值增加", "Increases maximum mana by ");
            Translation.RegisterTranslation("rmub", GameCulture.Chinese, "魔力消耗减少", "Reduces mana usage by ");
            #endregion
            #region Boss Checklist Translates
            ModTranslation bctext = CreateTranslation("BossSpawnInfo.GelSymb");
            bctext.AddTranslation(GameCulture.Chinese, "在地下原汤湖使用 [i:" + ModContent.ItemType <GelCultureFlask>() + "] 召唤一只史莱姆, 并将其掷于地下原汤湖中召唤");
            bctext.SetDefault("Use [i:" + ModContent.ItemType <GelCultureFlask>() + "] in the underground pool to summon a slime, and thorw it into the pool to summon.");
            AddTranslation(bctext);
            bctext = CreateTranslation("BossSpawnInfo.Athanasy");
            bctext.AddTranslation(GameCulture.Chinese, "使用 [i:" + ModContent.ItemType <TitansOrder>() + "] 召唤(由地牢怪物掉落或在上锁的金箱中找到)");
            bctext.SetDefault("Use [i:" + ModContent.ItemType <TitansOrder>() + "] to spawn, you can find it from locked chests or drop from dungeon monsters");
            AddTranslation(bctext);
            bctext = CreateTranslation("BossSpawnInfo.PollutionElement");
            bctext.AddTranslation(GameCulture.Chinese, "在海边使用 [i:" + ModContent.ItemType <ContaminatedLiquor>() + "] 召唤");
            bctext.SetDefault("Use [i:" + ModContent.ItemType <ContaminatedLiquor>() + "] in ocean to spawn");
            AddTranslation(bctext);
            #endregion
            #region Another Translates
            ModTranslation transform = CreateTranslation("RightClickToTransform");
            transform.AddTranslation(GameCulture.Chinese, "右键点击物品以切换状态");
            transform.SetDefault("Right click to switch status");
            AddTranslation(transform);
            ModTranslation modTranslation = CreateTranslation("ArcaneDamage");
            modTranslation.AddTranslation(GameCulture.Chinese, "奥术");
            modTranslation.SetDefault("arcane ");
            AddTranslation(modTranslation);
            modTranslation = CreateTranslation("Pollution_SkyDarkened");
            modTranslation.AddTranslation(GameCulture.Chinese, "天空变得更加黑暗");
            modTranslation.SetDefault("The sky is becomes darkened");
            AddTranslation(modTranslation);
            modTranslation = CreateTranslation("Pollution_Pollutional");
            modTranslation.AddTranslation(GameCulture.Chinese, "污染生物正在聚集...");
            modTranslation.SetDefault("Pollutional creatures are gathering...");
            AddTranslation(modTranslation);
            modTranslation = CreateTranslation("Pollution_Summon");
            modTranslation.AddTranslation(GameCulture.Chinese, "永远不要尝试去挑战自然...");
            modTranslation.SetDefault("Never try to challenge the nature...");
            AddTranslation(modTranslation);
            modTranslation = CreateTranslation("Pollution_Summon2");
            modTranslation.AddTranslation(GameCulture.Chinese, "呵...");
            modTranslation.SetDefault("Heh...");
            AddTranslation(modTranslation);
            ModTranslation text = CreateTranslation("NPCTalk");
            text.SetDefault("<{0}> {1}");
            AddTranslation(text);
            text = CreateTranslation("Common.RandomCardImage");
            text.SetDefault($"[i:{ModContent.ItemType<RandomCard>()}] [c/ffeb6e:卡牌系统自定义项]");
            AddTranslation(text);
            ModTranslation modGen = CreateTranslation("GenLifeLiquid");
            modGen.AddTranslation(GameCulture.Chinese, "正在生成生命湖");
            modGen.SetDefault("Life.");
            AddTranslation(modGen);
            modGen = CreateTranslation("SmoothLifeLiquid");
            modGen.AddTranslation(GameCulture.Chinese, "正在平整生命湖");
            modGen.SetDefault("Life.");
            AddTranslation(modGen);
            modGen = CreateTranslation("GenCardShrine");
            modGen.AddTranslation(GameCulture.Chinese, "正在生成卡牌神龛");
            modGen.SetDefault("Card.");
            AddTranslation(modGen);
            #endregion
        }