-
Notifications
You must be signed in to change notification settings - Fork 26
/
AlchemistNPC.cs
1624 lines (1420 loc) · 82.9 KB
/
AlchemistNPC.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework;
using System.IO;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using AlchemistNPC.Interface;
using static Terraria.ModLoader.ModContent;
using Terraria.Achievements;
using Terraria.Localization;
using Terraria.UI;
using Terraria.DataStructures;
using Terraria.GameContent.UI;
using AlchemistNPC.Items;
using Terraria.ModLoader.Config;
namespace AlchemistNPC
{
public class AlchemistNPC : Mod
{
public AlchemistNPC()
{
Properties = new ModProperties()
{
Autoload = true,
AutoloadGores = true,
AutoloadSounds = true,
};
}
public static Mod Instance;
internal static AlchemistNPC instance;
internal static ModConfiguration modConfiguration;
public static ModHotKey LampLight;
public static ModHotKey DiscordBuff;
public static ModHotKey PipBoyTP;
public static bool SF = false;
public static bool GreaterDangersense = false;
public static bool BastScroll = false;
public static bool Stormbreaker = false;
public static int DTH = 0;
public static float ppx = 0f;
public static float ppy = 0f;
public static string GithubUserName { get { return "VVV101"; } }
public static string GithubProjectName { get { return "AlchemistNPC"; } }
public static int ReversivityCoinTier1ID;
public static int ReversivityCoinTier2ID;
public static int ReversivityCoinTier3ID;
public static int ReversivityCoinTier4ID;
public static int ReversivityCoinTier5ID;
public static int ReversivityCoinTier6ID;
private UserInterface alchemistUserInterface;
internal ShopChangeUI alchemistUI;
private UserInterface alchemistUserInterfaceA;
internal ShopChangeUIA alchemistUIA;
private UserInterface alchemistUserInterfaceO;
internal ShopChangeUIO alchemistUIO;
private UserInterface alchemistUserInterfaceM;
internal ShopChangeUIM alchemistUIM;
private UserInterface alchemistUserInterfaceH;
internal HealingUI alchemistUIH;
private UserInterface alchemistUserInterfaceDC;
internal DimensionalCasketUI alchemistUIDC;
private UserInterface alchemistUserInterfaceT;
internal ShopChangeUIT alchemistUIT;
private UserInterface alchemistUserInterfaceP;
internal PipBoyTPMenu pipboyUI;
private UserInterface alchemistUserInterfaceC;
internal CoinsConvertMenu coinsUI;
public override void Load()
{
On.Terraria.Main.PlaySound_int_int_int_int_float_float += NukeMenuClose;
Instance = this;
//ZY:Try to add translation for hotkey, seems worked, but requires to reload mod if change game language
string LampLightToggle, DiscordBuffTeleportation, PipBoy;
if (Language.ActiveCulture == GameCulture.Chinese)
{
LampLightToggle = "大鸟灯开关";
DiscordBuffTeleportation = "混沌Buff传送";
PipBoy = "哔哔小子传送菜单";
}
else
{
LampLightToggle = "Lamp Light Toggle";
DiscordBuffTeleportation = "Discord Buff Teleportation";
PipBoy = "Pip-Boy Teleportation Menu";
}
LampLight = RegisterHotKey(LampLightToggle, "L");
DiscordBuff = RegisterHotKey(DiscordBuffTeleportation, "Q");
PipBoyTP = RegisterHotKey(PipBoy, "P");
if (!Main.dedServ)
{
AddEquipTexture(null, EquipType.Legs, "somebody0214Robe_Legs", "AlchemistNPC/Items/Armor/somebody0214Robe_Legs");
}
ReversivityCoinTier1ID = CustomCurrencyManager.RegisterCurrency(new ReversivityCoinTier1Data(ModContent.ItemType<Items.Misc.ReversivityCoinTier1>(), 999L));
ReversivityCoinTier2ID = CustomCurrencyManager.RegisterCurrency(new ReversivityCoinTier2Data(ModContent.ItemType<Items.Misc.ReversivityCoinTier2>(), 999L));
ReversivityCoinTier3ID = CustomCurrencyManager.RegisterCurrency(new ReversivityCoinTier3Data(ModContent.ItemType<Items.Misc.ReversivityCoinTier3>(), 999L));
ReversivityCoinTier4ID = CustomCurrencyManager.RegisterCurrency(new ReversivityCoinTier4Data(ModContent.ItemType<Items.Misc.ReversivityCoinTier4>(), 999L));
ReversivityCoinTier5ID = CustomCurrencyManager.RegisterCurrency(new ReversivityCoinTier5Data(ModContent.ItemType<Items.Misc.ReversivityCoinTier5>(), 999L));
ReversivityCoinTier6ID = CustomCurrencyManager.RegisterCurrency(new ReversivityCoinTier6Data(ModContent.ItemType<Items.Misc.ReversivityCoinTier6>(), 999L));
instance = this;
SetTranslation();
if (!Main.dedServ)
{
AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Deltarune OST - Chaos King"), ItemType("ChaosKingMusicBox"), TileType("ChaosKingMusicBox"));
AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Deltarune OST - Field of Hopes And Dreams"), ItemType("FieldsMusicBox"), TileType("FieldsMusicBox"));
AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Deltarune OST - Lantern"), ItemType("SheamMusicBox"), TileType("SheamMusicBox"));
AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Deltarune OST - The World Revolving"), ItemType("TheWorldRevolvingMusicBox"), TileType("TheWorldRevolvingMusicBox"));
alchemistUI = new ShopChangeUI();
alchemistUI.Activate();
alchemistUserInterface = new UserInterface();
alchemistUserInterface.SetState(alchemistUI);
alchemistUIA = new ShopChangeUIA();
alchemistUIA.Activate();
alchemistUserInterfaceA = new UserInterface();
alchemistUserInterfaceA.SetState(alchemistUIA);
alchemistUIO = new ShopChangeUIO();
alchemistUIO.Activate();
alchemistUserInterfaceO = new UserInterface();
alchemistUserInterfaceO.SetState(alchemistUIO);
alchemistUIM = new ShopChangeUIM();
alchemistUIM.Activate();
alchemistUserInterfaceM = new UserInterface();
alchemistUserInterfaceM.SetState(alchemistUIM);
alchemistUIH = new HealingUI();
alchemistUIH.Activate();
alchemistUserInterfaceH = new UserInterface();
alchemistUserInterfaceH.SetState(alchemistUIH);
alchemistUIDC = new DimensionalCasketUI();
alchemistUIDC.Activate();
alchemistUserInterfaceDC = new UserInterface();
alchemistUserInterfaceDC.SetState(alchemistUIDC);
alchemistUIT = new ShopChangeUIT();
alchemistUIT.Activate();
alchemistUserInterfaceT = new UserInterface();
alchemistUserInterfaceT.SetState(alchemistUIT);
pipboyUI = new PipBoyTPMenu();
pipboyUI.Activate();
alchemistUserInterfaceP = new UserInterface();
alchemistUserInterfaceP.SetState(pipboyUI);
coinsUI = new CoinsConvertMenu();
coinsUI.Activate();
alchemistUserInterfaceC = new UserInterface();
alchemistUserInterfaceC.SetState(coinsUI);
}
Mod ALIB = ModLoader.GetMod("AchievementLib");
if (ALIB != null)
{
ALIB.Call("AddAchievement", Instance, "Junior Alchemist", "Obtain Alchemist Charm tier 1", ModContent.GetTexture("AlchemistNPC/AchievementLib/JALocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/JAUnlocked"), AchievementCategory.Collector);
ALIB.Call("AddAchievement", Instance, "Senior Alchemist", "Obtain Alchemist Charm tier 4", ModContent.GetTexture("AlchemistNPC/AchievementLib/SALocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/SAUnlocked"), AchievementCategory.Collector);
ALIB.Call("AddAchievement", Instance, "The gang's all here!", "Find every AlchemistNPC town NPC.", ModContent.GetTexture("AlchemistNPC/AchievementLib/ANPCLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/ANPCUnlocked"), AchievementCategory.Challenger);
ALIB.Call("AddAchievement", Instance, "You don't know da wae!", "Die to Ugandan Knuckles.", ModContent.GetTexture("AlchemistNPC/AchievementLib/UNDLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/UNDUnlocked"), AchievementCategory.Slayer);
ALIB.Call("AddAchievement", Instance, "Da wae is clear, to the queen!", "Defeat Ugandan Knuckles.", ModContent.GetTexture("AlchemistNPC/AchievementLib/UNWLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/UNWUnlocked"), AchievementCategory.Slayer);
ALIB.Call("AddAchievement", Instance, "If you will excuse me...", "Die to Bill Cipher.", ModContent.GetTexture("AlchemistNPC/AchievementLib/BCDLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/BCDUnlocked"), AchievementCategory.Slayer);
ALIB.Call("AddAchievement", Instance, "The deal is off!", "Defeat Bill Cipher.", ModContent.GetTexture("AlchemistNPC/AchievementLib/BCWLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/BCWUnlocked"), AchievementCategory.Slayer);
ALIB.Call("AddAchievement", Instance, "Well, cheers!", "Craft Wellcheers Vending Machine.", ModContent.GetTexture("AlchemistNPC/AchievementLib/WCCLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/WCCUnlocked"), AchievementCategory.Collector);
ALIB.Call("AddAchievement", Instance, "The snack that smiles back", "Use Wellcheers Vending Machine too many times.", ModContent.GetTexture("AlchemistNPC/AchievementLib/WCULocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/WCUUnlocked"), AchievementCategory.Collector);
ALIB.Call("AddAchievement", Instance, "Spear of Justice", "Obtain the Spear of Justice.", ModContent.GetTexture("AlchemistNPC/AchievementLib/SJLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/SJUnlocked"), AchievementCategory.Collector);
ALIB.Call("AddAchievement", Instance, "if you keep going the way you are now...", "Obtain the Eye of Judgement.", ModContent.GetTexture("AlchemistNPC/AchievementLib/EJLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/EJUnlocked"), AchievementCategory.Collector);
ALIB.Call("AddAchievement", Instance, "you're gonna have a bad time.", "Upgrade the Eye of Judgement.", ModContent.GetTexture("AlchemistNPC/AchievementLib/EPJLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/EPJUnlocked"), AchievementCategory.Collector);
ALIB.Call("AddAchievement", Instance, "Don't worry, mom, I can handle it...", "Obtain a Magic Wand.", ModContent.GetTexture("AlchemistNPC/AchievementLib/MWLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/MWUnlocked"), AchievementCategory.Collector);
ALIB.Call("AddAchievement", Instance, "Dip down!", "Upgrade the Magic Wand once.", ModContent.GetTexture("AlchemistNPC/AchievementLib/DMWLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/DMWUnlocked"), AchievementCategory.Collector);
ALIB.Call("AddAchievement", Instance, "Forbidden magic", "Upgrade the Magic Wand to its maximum power.", ModContent.GetTexture("AlchemistNPC/AchievementLib/MMWLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/MMWUnlocked"), AchievementCategory.Challenger);
ALIB.Call("AddAchievement", Instance, "Pandora's Box", "Obtain a Pandora", ModContent.GetTexture("AlchemistNPC/AchievementLib/PLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/PUnlocked"), AchievementCategory.Collector);
ALIB.Call("AddAchievement", Instance, "Now you're thinking...", "Obtain Rick Sanchez's Portal Gun", ModContent.GetTexture("AlchemistNPC/AchievementLib/PGLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/PGUnlocked"), AchievementCategory.Collector);
ALIB.Call("AddAchievement", Instance, "Artificial unintelligence", "Obtain a Portal Turret", ModContent.GetTexture("AlchemistNPC/AchievementLib/PTLocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/PTUnlocked"), AchievementCategory.Collector);
ALIB.Call("AddAchievement", Instance, "The only thing to FEAR", "Obtain the incarnation of FEAR", ModContent.GetTexture("AlchemistNPC/AchievementLib/ALocked"), ModContent.GetTexture("AlchemistNPC/AchievementLib/AUnlocked"), AchievementCategory.Collector);
}
}
internal static SoundEffectInstance NukeMenuClose(On.Terraria.Main.orig_PlaySound_int_int_int_int_float_float orig, int type, int x, int y, int Style, float volumeScale, float pitchOffset)
{
if ((type == SoundID.MenuClose) && (DimensionalCasketUI.forcetalk == true))
{
return null;
}
else
{
return orig(type, x, y, Style, volumeScale, pitchOffset);
}
}
public override void Unload()
{
Instance = null;
instance = null;
LampLight = null;
DiscordBuff = null;
PipBoyTP = null;
modConfiguration = null;
}
public override void PostSetupContent()
{
Mod censusMod = ModLoader.GetMod("Census");
if (censusMod != null)
{
censusMod.Call("TownNPCCondition", NPCType("Alchemist"), "Defeat Eye of Cthulhu");
censusMod.Call("TownNPCCondition", NPCType("Brewer"), "Defeat Eye of Cthulhu");
censusMod.Call("TownNPCCondition", NPCType("Jeweler"), "Defeat Eye of Cthulhu");
censusMod.Call("TownNPCCondition", NPCType("Tinkerer"), "Defeat Eye of Cthulhu");
censusMod.Call("TownNPCCondition", NPCType("Architect"), "Have any 3 other NPC present");
censusMod.Call("TownNPCCondition", NPCType("Operator"), "Defeat Eater of Worlds/Brain of Cthulhu and place [c/00FF00:Wing of the World] (craftable furniture) inside free housing");
censusMod.Call("TownNPCCondition", NPCType("Musician"), "Defeat Skeletron");
censusMod.Call("TownNPCCondition", NPCType("Young Brewer"), "World state is Hardmode and both Alchemist and Operator are alive");
censusMod.Call("TownNPCCondition", NPCType("OtherworldlyPortal"), "Not exactly a Town NPC, one of the steps for saving the Explorer");
censusMod.Call("TownNPCCondition", NPCType("Explorer"), "Defeat Moon Lord and find the way to use all 9 Torn Notes for saving her");
}
}
public override void ModifyInterfaceLayers(List<GameInterfaceLayer> layers)
{
InterfaceHelper.ModifyInterfaceLayers(layers);
int MouseTextIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text"));
if (MouseTextIndex != -1)
{
layers.Insert(MouseTextIndex, new LegacyGameInterfaceLayer(
"AlchemistNPC: Shop Selector",
delegate
{
if (ShopChangeUI.visible)
{
alchemistUI.Draw(Main.spriteBatch);
}
return true;
},
InterfaceScaleType.UI)
);
}
int MouseTextIndexA = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text"));
if (MouseTextIndexA != -1)
{
layers.Insert(MouseTextIndexA, new LegacyGameInterfaceLayer(
"AlchemistNPC: Shop Selector A",
delegate
{
if (ShopChangeUIA.visible)
{
alchemistUIA.Draw(Main.spriteBatch);
}
return true;
},
InterfaceScaleType.UI)
);
}
int MouseTextIndexO = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text"));
if (MouseTextIndexO != -1)
{
layers.Insert(MouseTextIndexO, new LegacyGameInterfaceLayer(
"AlchemistNPC: Shop Selector O",
delegate
{
if (ShopChangeUIO.visible)
{
alchemistUIO.Draw(Main.spriteBatch);
}
return true;
},
InterfaceScaleType.UI)
);
}
int MouseTextIndexM = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text"));
if (MouseTextIndexM != -1)
{
layers.Insert(MouseTextIndexM, new LegacyGameInterfaceLayer(
"AlchemistNPC: Shop Selector M",
delegate
{
if (ShopChangeUIM.visible)
{
alchemistUIM.Draw(Main.spriteBatch);
}
return true;
},
InterfaceScaleType.UI)
);
}
int MouseTextIndexH = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text"));
if (MouseTextIndexH != -1)
{
layers.Insert(MouseTextIndexH, new LegacyGameInterfaceLayer(
"AlchemistNPC: Healing UI",
delegate
{
if (HealingUI.visible)
{
alchemistUIH.Draw(Main.spriteBatch);
}
return true;
},
InterfaceScaleType.UI)
);
}
int MouseTextIndexDC = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text"));
if (MouseTextIndexDC != -1)
{
layers.Insert(MouseTextIndexDC, new LegacyGameInterfaceLayer(
"AlchemistNPC: Dimensional Casket UI",
delegate
{
if (DimensionalCasketUI.visible)
{
alchemistUIDC.Draw(Main.spriteBatch);
}
return true;
},
InterfaceScaleType.UI)
);
}
int MouseTextIndexT = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text"));
if (MouseTextIndexT != -1)
{
layers.Insert(MouseTextIndexT, new LegacyGameInterfaceLayer(
"AlchemistNPC: Shop Selector T",
delegate
{
if (ShopChangeUIT.visible)
{
alchemistUIT.Draw(Main.spriteBatch);
}
return true;
},
InterfaceScaleType.UI)
);
}
int MouseTextIndexP = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text"));
if (MouseTextIndexP != -1)
{
layers.Insert(MouseTextIndexP, new LegacyGameInterfaceLayer(
"AlchemistNPC: Pip-Boy Menu",
delegate
{
if (PipBoyTPMenu.visible)
{
pipboyUI.Draw(Main.spriteBatch);
}
return true;
},
InterfaceScaleType.UI)
);
}
int MouseTextIndexC = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text"));
if (MouseTextIndexC != -1)
{
layers.Insert(MouseTextIndexC, new LegacyGameInterfaceLayer(
"AlchemistNPC: Coins Convert Menu",
delegate
{
if (CoinsConvertMenu.visible)
{
coinsUI.Draw(Main.spriteBatch);
}
return true;
},
InterfaceScaleType.UI)
);
}
int LocatorArrowIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text"));
if (LocatorArrowIndex != -1)
{
layers.Insert(LocatorArrowIndex, new LegacyGameInterfaceLayer(
"AlchemistNPC: Locator Arrow",
delegate
{
Player player = Main.LocalPlayer;
if (player.accCritterGuide && AlchemistNPC.modConfiguration.LifeformAnalyzer)
{
for (int v = 0; v < 200; ++v)
{
NPC npc = Main.npc[v];
if (npc.active && npc.rarity >= 1 && !AlchemistNPC.modConfiguration.DisabledLocatorNpcs.Contains(new NPCDefinition(npc.type)))
{
// Adapted from Census mod
Vector2 playerCenter = Main.LocalPlayer.Center + new Vector2(0, Main.LocalPlayer.gfxOffY);
var vector = npc.Center - playerCenter;
var distance = vector.Length();
if (distance > 40)
{
var offset = Vector2.Normalize(vector) * Math.Min(70, distance - 20);
float rotation = vector.ToRotation() + (float)(Math.PI / 2);
var drawPosition = playerCenter - Main.screenPosition + offset;
float fade = Math.Min(1f, (distance - 20) / 70);
Main.spriteBatch.Draw(ModContent.GetTexture("AlchemistNPC/Projectiles/LocatorProjectile"), drawPosition,
null, Color.White * fade, rotation, Main.cursorTextures[1].Size() / 2, Vector2.One, SpriteEffects.None, 0);
}
}
}
}
return true;
}, InterfaceScaleType.Game)
);
}
}
public override void HandlePacket(BinaryReader reader, int whoAmI)
{
AlchemistNPCMessageType msgType = (AlchemistNPCMessageType)reader.ReadByte();
switch (msgType)
{
case AlchemistNPCMessageType.LifeAndManaSync:
byte playernumber = reader.ReadByte();
Player lifeFruitsPlayer = Main.player[playernumber];
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().LifeElixir = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().Fuaran = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().KeepBuffs = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().WellFed = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().BillIsDowned = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().RCT1 = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().RCT2 = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().RCT3 = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().RCT4 = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().RCT5 = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().RCT6 = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().BBP = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().SnatcherCounter = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().KingSlimeBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().EyeOfCthulhuBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().EaterOfWorldsBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().BrainOfCthulhuBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().QueenBeeBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().SkeletronBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().WoFBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().GSummonerBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().PigronBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().IceGolemBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().DarkMageBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().CustomBooster1 = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().CustomBooster2 = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().DestroyerBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().PrimeBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().TwinsBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().OgreBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().PlanteraBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().GolemBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().BetsyBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().FishronBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().MartianSaucerBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().CultistBooster = reader.ReadInt32();
lifeFruitsPlayer.GetModPlayer<AlchemistNPCPlayer>().MoonLordBooster = reader.ReadInt32();
break;
case AlchemistNPCMessageType.TeleportPlayer:
TeleportClass.HandleTeleport(reader.ReadInt32(), true, whoAmI);
break;
case AlchemistNPCMessageType.SyncPlayerVariables:
playernumber = reader.ReadByte();
AlchemistNPCPlayer alchemistPlayer = Main.player[playernumber].GetModPlayer<AlchemistNPCPlayer>();
alchemistPlayer = Main.player[playernumber].GetModPlayer<AlchemistNPCPlayer>();
alchemistPlayer.RCT1 = reader.ReadInt32();
alchemistPlayer.RCT2 = reader.ReadInt32();
alchemistPlayer.RCT3 = reader.ReadInt32();
alchemistPlayer.RCT4 = reader.ReadInt32();
alchemistPlayer.RCT5 = reader.ReadInt32();
alchemistPlayer.RCT6 = reader.ReadInt32();
alchemistPlayer.BBP = reader.ReadInt32();
alchemistPlayer.SnatcherCounter = reader.ReadInt32();
if (Main.netMode == NetmodeID.Server)
{
var packet = GetPacket();
packet.Write((byte)AlchemistNPCMessageType.SyncPlayerVariables);
packet.Write(playernumber);
packet.Write(alchemistPlayer.RCT1);
packet.Write(alchemistPlayer.RCT2);
packet.Write(alchemistPlayer.RCT3);
packet.Write(alchemistPlayer.RCT4);
packet.Write(alchemistPlayer.RCT5);
packet.Write(alchemistPlayer.RCT6);
packet.Write(alchemistPlayer.BBP);
packet.Write(alchemistPlayer.SnatcherCounter);
packet.Send(-1, playernumber);
}
break;
default:
Logger.Error("AlchemistNPC: Unknown Message type: " + msgType);
break;
}
}
public enum AlchemistNPCMessageType : byte
{
LifeAndManaSync,
TeleportPlayer,
SyncPlayerVariables
}
public override void AddRecipeGroups()
{
//SBMW:Add translation to RecipeGroups, also requires to reload mod
string evilBossMask = Language.GetTextValue("Mods.AlchemistNPC.evilBossMask");
string cultist = Language.GetTextValue("Mods.AlchemistNPC.cultist");
string tier3HardmodeBar = Language.GetTextValue("Mods.AlchemistNPC.tier3HardmodeBar");
string hardmodeComponent = Language.GetTextValue("Mods.AlchemistNPC.hardmodeComponent");
string evilBar = Language.GetTextValue("Mods.AlchemistNPC.evilBar");
string evilMushroom = Language.GetTextValue("Mods.AlchemistNPC.evilMushroom");
string evilComponent = Language.GetTextValue("Mods.AlchemistNPC.evilComponent");
string evilDrop = Language.GetTextValue("Mods.AlchemistNPC.evilDrop");
string tier2anvil = Language.GetTextValue("Mods.AlchemistNPC.tier2anvil");
string tier2forge = Language.GetTextValue("Mods.AlchemistNPC.tier2forge");
string tier1anvil = Language.GetTextValue("Mods.AlchemistNPC.tier1anvil");
string celestialWings = Language.GetTextValue("Mods.AlchemistNPC.CelestialWings");
string LunarHamaxe = Language.GetTextValue("Mods.AlchemistNPC.LunarHamaxe");
string tier3Watch = Language.GetTextValue("Mods.AlchemistNPC.tier3Watch");
RecipeGroup group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + evilBossMask, new int[]
{
ItemID.EaterMask, ItemID.BrainMask
});
RecipeGroup.RegisterGroup("AlchemistNPC:EvilMask", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + cultist, new int[]
{
ItemID.BossMaskCultist, ItemID.WhiteLunaticHood, ItemID.BlueLunaticHood
});
RecipeGroup.RegisterGroup("AlchemistNPC:CultistMask", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + tier3HardmodeBar, new int[]
{
ItemID.AdamantiteBar, ItemID.TitaniumBar
});
RecipeGroup.RegisterGroup("AlchemistNPC:Tier3Bar", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + hardmodeComponent, new int[]
{
ItemID.CursedFlame, ItemID.Ichor
});
RecipeGroup.RegisterGroup("AlchemistNPC:HardmodeComponent", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + evilBar, new int[]
{
ItemID.DemoniteBar, ItemID.CrimtaneBar
});
RecipeGroup.RegisterGroup("AlchemistNPC:EvilBar", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + evilMushroom, new int[]
{
ItemID.VileMushroom, ItemID.ViciousMushroom
});
RecipeGroup.RegisterGroup("AlchemistNPC:EvilMush", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + evilComponent, new int[]
{
ItemID.ShadowScale, ItemID.TissueSample
});
RecipeGroup.RegisterGroup("AlchemistNPC:EvilComponent", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + evilDrop, new int[]
{
ItemID.RottenChunk, ItemID.Vertebrae
});
RecipeGroup.RegisterGroup("AlchemistNPC:EvilDrop", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + tier2anvil, new int[]
{
ItemID.MythrilAnvil, ItemID.OrichalcumAnvil
});
RecipeGroup.RegisterGroup("AlchemistNPC:AnyAnvil", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + tier2forge, new int[]
{
ItemID.AdamantiteForge, ItemID.TitaniumForge
});
RecipeGroup.RegisterGroup("AlchemistNPC:AnyForge", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + tier1anvil, new int[]
{
ItemID.IronAnvil, ItemID.LeadAnvil
});
RecipeGroup.RegisterGroup("AlchemistNPC:AnyPreHMAnvil", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + celestialWings, new int[]
{
ItemID.WingsSolar, ItemID.WingsNebula, ItemID.WingsStardust, ItemID.WingsVortex
});
RecipeGroup.RegisterGroup("AlchemistNPC:AnyCelestialWings", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + LunarHamaxe, new int[]
{
ItemID.LunarHamaxeSolar, ItemID.LunarHamaxeNebula, ItemID.LunarHamaxeStardust, ItemID.LunarHamaxeVortex
});
RecipeGroup.RegisterGroup("AlchemistNPC:AnyLunarHamaxe", group);
group = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " " + tier3Watch, new int[]
{
ItemID.GoldWatch, ItemID.PlatinumWatch
});
RecipeGroup.RegisterGroup("AlchemistNPC:AnyWatch", group);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.CelestialStone);
recipe.AddIngredient(ItemID.GoldBar, 10);
recipe.AddTile(TileID.TinkerersWorkbench);
recipe.SetResult(ItemID.Sundial);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.StoneBlock, 10);
recipe.needWater = true;
recipe.needLava = true;
recipe.SetResult(ItemID.Obsidian, 5);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.BottledHoney, 10);
recipe.needWater = true;
recipe.needHoney = true;
recipe.SetResult(ItemID.HoneyBlock, 5);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.BottledHoney, 10);
recipe.needLava = true;
recipe.needHoney = true;
recipe.SetResult(ItemID.CrispyHoneyBlock, 5);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddRecipeGroup("AlchemistNPC:AnyWatch");
recipe.AddIngredient(ItemID.HermesBoots);
recipe.AddIngredient(ItemID.Wire, 15);
recipe.AddTile(TileID.TinkerersWorkbench);
recipe.SetResult(ItemID.Stopwatch);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddRecipeGroup("AlchemistNPC:EvilBar", 10);
recipe.AddRecipeGroup("AlchemistNPC:AnyWatch");
recipe.AddIngredient(ItemID.Wire, 25);
recipe.AddIngredient(ItemID.Chain);
recipe.AddTile(TileID.TinkerersWorkbench);
recipe.SetResult(ItemID.DPSMeter);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.TallyCounter);
recipe.AddIngredient(ItemID.BlackLens);
recipe.AddIngredient(ItemID.AntlionMandible);
recipe.AddRecipeGroup("AlchemistNPC:EvilDrop");
recipe.AddRecipeGroup("AlchemistNPC:EvilComponent");
recipe.AddIngredient(ItemID.Feather);
recipe.AddIngredient(ItemID.TatteredCloth);
recipe.AddIngredient(ItemID.Bone);
recipe.AddIngredient(ItemID.Wire, 25);
recipe.AddTile(TileID.TinkerersWorkbench);
recipe.SetResult(ItemID.LifeformAnalyzer);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.Mushroom);
recipe.AddIngredient(ItemID.Daybloom);
recipe.AddTile(TileID.Bottles);
recipe.SetResult(ItemID.PurificationPowder, 5);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.CorruptSeeds);
recipe.AddIngredient(ItemID.PurificationPowder);
recipe.AddIngredient(ItemID.PixieDust);
recipe.AddTile(TileID.Bottles);
recipe.SetResult(ItemID.HallowedSeeds);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.CrimsonSeeds);
recipe.AddIngredient(ItemID.PurificationPowder);
recipe.AddIngredient(ItemID.PixieDust);
recipe.AddTile(TileID.Bottles);
recipe.SetResult(ItemID.HallowedSeeds);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(null, "EmagledFragmentation", 10);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(ItemID.FragmentStardust, 2);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(null, "EmagledFragmentation", 10);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(ItemID.FragmentNebula, 2);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(null, "EmagledFragmentation", 10);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(ItemID.FragmentVortex, 2);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(null, "EmagledFragmentation", 10);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(ItemID.FragmentSolar, 2);
recipe.AddRecipe();
}
//SBMW:Transtation method
public void SetTranslation()
{
//SBMW:Hotkey
ModTranslation text = CreateTranslation("LampLightToggle");
text.SetDefault("Lamp Light Toggle");
text.AddTranslation(GameCulture.Chinese, "大鸟灯开关");
AddTranslation(text);
text = CreateTranslation("DiscordBuffTeleportation");
text.SetDefault("Discord Buff Teleportation");
text.AddTranslation(GameCulture.Chinese, "混乱药剂传送");
AddTranslation(text);
//SBMW:Reversivity Coin
//SBMW:Russian comes from Items.ReversivityCoin
text = CreateTranslation("ReversivityCoinTier1");
text.SetDefault("Reversivity Coin Tier 1");
text.AddTranslation(GameCulture.Russian, "Монета Реверсии Первого Уровня");
text.AddTranslation(GameCulture.Chinese, "个1级逆转硬币");
AddTranslation(text);
text = CreateTranslation("ReversivityCoinTier2");
text.SetDefault("Reversivity Coin Tier 2");
text.AddTranslation(GameCulture.Russian, "Монета Реверсии Второго Уровня");
text.AddTranslation(GameCulture.Chinese, "个2级逆转硬币");
AddTranslation(text);
text = CreateTranslation("ReversivityCoinTier3");
text.SetDefault("Reversivity Coin Tier 3");
text.AddTranslation(GameCulture.Russian, "Монета Реверсии Третьего Уровня");
text.AddTranslation(GameCulture.Chinese, "个3级逆转硬币");
AddTranslation(text);
text = CreateTranslation("ReversivityCoinTier4");
text.SetDefault("Reversivity Coin Tier 4");
text.AddTranslation(GameCulture.Russian, "Монета Реверсии Четвертого Уровня");
text.AddTranslation(GameCulture.Chinese, "个4级逆转硬币");
AddTranslation(text);
text = CreateTranslation("ReversivityCoinTier5");
text.SetDefault("Reversivity Coin Tier 5");
text.AddTranslation(GameCulture.Russian, "Монета Реверсии Пятого Уровня");
text.AddTranslation(GameCulture.Chinese, "个5级逆转硬币");
AddTranslation(text);
text = CreateTranslation("ReversivityCoinTier6");
text.SetDefault("Reversivity Coin Tier 6");
text.AddTranslation(GameCulture.Russian, "Монета Реверсии Шестого Уровня");
text.AddTranslation(GameCulture.Chinese, "个6级逆转硬币");
AddTranslation(text);
//SBMW:RecipeGroups
text = CreateTranslation("evilBossMask");
text.SetDefault("Corruption/Crimson boss mask");
text.AddTranslation(GameCulture.Chinese, "腐化/血腥Boss面具");
AddTranslation(text);
text = CreateTranslation("cultist");
text.SetDefault("Cultist Mask/Hood");
text.AddTranslation(GameCulture.Chinese, "邪教徒面具/兜帽");
AddTranslation(text);
text = CreateTranslation("tier3HardmodeBar");
text.SetDefault("Tier 3 Hardmode Bar");
text.AddTranslation(GameCulture.Chinese, "三级肉后锭(精金/钛金)");
AddTranslation(text);
text = CreateTranslation("hardmodeComponent");
text.SetDefault("Hardmode Component");
text.AddTranslation(GameCulture.Chinese, "邪恶困难模式材料(咒焰/脓血)");
AddTranslation(text);
text = CreateTranslation("evilBar");
text.SetDefault("Crimson/Corruption bar");
text.AddTranslation(GameCulture.Chinese, "魔金/血腥锭");
AddTranslation(text);
text = CreateTranslation("evilMushroom");
text.SetDefault("Evil Mushroom");
text.AddTranslation(GameCulture.Chinese, "邪恶蘑菇");
AddTranslation(text);
text = CreateTranslation("evilComponent");
text.SetDefault("Evil Component");
text.AddTranslation(GameCulture.Chinese, "邪恶材料(暗影鳞片/组织样本)");
AddTranslation(text);
text = CreateTranslation("evilDrop");
text.SetDefault("Evil Drop");
text.AddTranslation(GameCulture.Chinese, "邪恶掉落物(腐肉/椎骨)");
AddTranslation(text);
text = CreateTranslation("tier2anvil");
text.SetDefault("Tier 2 Anvil");
text.AddTranslation(GameCulture.Chinese, "二级砧(秘银/山铜砧)");
AddTranslation(text);
text = CreateTranslation("tier2forge");
text.SetDefault("Tier 2 Forge");
text.AddTranslation(GameCulture.Chinese, "二级熔炉(精金/钛金熔炉)");
AddTranslation(text);
text = CreateTranslation("tier1anvil");
text.SetDefault("Tier 1 Anvil");
text.AddTranslation(GameCulture.Chinese, "一级砧(铁/铅砧)");
AddTranslation(text);
text = CreateTranslation("CelestialWings");
text.SetDefault("Celestial Wings");
text.AddTranslation(GameCulture.Russian, "Небесные Крылья");
text.AddTranslation(GameCulture.Chinese, "四柱翅膀");
AddTranslation(text);
text = CreateTranslation("LunarHamaxe");
text.SetDefault("Lunar Hamaxe");
text.AddTranslation(GameCulture.Chinese, "四柱工具");
AddTranslation(text);
text = CreateTranslation("tier3Watch");
text.SetDefault("Tier 3 Watch");
text.AddTranslation(GameCulture.Chinese, "三级表(金表/铂金表)");
AddTranslation(text);
text = CreateTranslation("enterText");
text.SetDefault("If you don't like additional content or drops from the mod you could install AlchemistNPC Lite mod instead.");
text.AddTranslation(GameCulture.Russian, "Если вам не нравится дополнительный контент - существует облегченная версия (AlchemistNPC Lite).");
text.AddTranslation(GameCulture.Chinese, "如果你不喜欢AlchemistNPC中的附加物品或掉落物, 你可以安装 AlchemistNPC Lite 取消他们");
AddTranslation(text);
//SBMW:Treasure Bag
text = CreateTranslation("Knuckles");
text.SetDefault("Ugandan Knuckles Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Угандского Наклза");
text.AddTranslation(GameCulture.Chinese, "乌干达宝藏袋");
AddTranslation(text);
text = CreateTranslation("BillCipher");
text.SetDefault("Bill Cipher Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Билла");
text.AddTranslation(GameCulture.Chinese, "比尔·赛弗宝藏袋");
AddTranslation(text);
//SBMW:Vanilla
text = CreateTranslation("KingSlime");
text.SetDefault("King Slime Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Короля Слизней");
text.AddTranslation(GameCulture.Chinese, "史莱姆之王宝藏袋");
AddTranslation(text);
text = CreateTranslation("EyeofCthulhu");
text.SetDefault("Eye of Cthulhu Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Глаза Ктулху");
text.AddTranslation(GameCulture.Chinese, "克苏鲁之眼宝藏袋");
AddTranslation(text);
text = CreateTranslation("EaterOfWorlds");
text.SetDefault("Eater Of Worlds Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Пожирателя Миров");
text.AddTranslation(GameCulture.Chinese, "世界吞噬者宝藏袋");
AddTranslation(text);
text = CreateTranslation("BrainOfCthulhu");
text.SetDefault("Brain Of Cthulhu Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Мозга Ктулху");
text.AddTranslation(GameCulture.Chinese, "克苏鲁之脑宝藏袋");
AddTranslation(text);
text = CreateTranslation("QueenBee");
text.SetDefault("Queen Bee Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Королевы Пчел");
text.AddTranslation(GameCulture.Chinese, "蜂后宝藏袋");
AddTranslation(text);
text = CreateTranslation("Skeletron");
text.SetDefault("Skeletron Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Скелетрона");
text.AddTranslation(GameCulture.Chinese, "骷髅王宝藏袋");
AddTranslation(text);
text = CreateTranslation("WallOfFlesh");
text.SetDefault("Wall Of Flesh Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Стены Плоти");
text.AddTranslation(GameCulture.Chinese, "血肉之墙宝藏袋");
AddTranslation(text);
text = CreateTranslation("Destroyer");
text.SetDefault("Destroyer Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Уничтожителя");
text.AddTranslation(GameCulture.Chinese, "机械蠕虫宝藏袋");
AddTranslation(text);
text = CreateTranslation("Twins");
text.SetDefault("Twins Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Близнецов");
text.AddTranslation(GameCulture.Chinese, "双子魔眼宝藏袋");
AddTranslation(text);
text = CreateTranslation("SkeletronPrime");
text.SetDefault("Skeletron Prime Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Скелетрона Прайм");
text.AddTranslation(GameCulture.Chinese, "机械骷髅王宝藏袋");
AddTranslation(text);
text = CreateTranslation("Plantera");
text.SetDefault("Plantera Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Плантеры");
text.AddTranslation(GameCulture.Chinese, "世纪之花宝藏袋");
AddTranslation(text);
text = CreateTranslation("Golem");
text.SetDefault("Golem Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Голема");
text.AddTranslation(GameCulture.Chinese, "石巨人宝藏袋");
AddTranslation(text);
text = CreateTranslation("Betsy");
text.SetDefault("Betsy Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Бетси");
text.AddTranslation(GameCulture.Chinese, "贝特西宝藏袋");
AddTranslation(text);
text = CreateTranslation("DukeFishron");
text.SetDefault("Duke Fishron Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Герцога Рыброна");
text.AddTranslation(GameCulture.Chinese, "猪鲨公爵宝藏袋");
AddTranslation(text);
text = CreateTranslation("MoonLord");
text.SetDefault("Moon Lord Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Лунного Лорда");
text.AddTranslation(GameCulture.Chinese, "月亮领主宝藏袋");
AddTranslation(text);
//SBMW:CalamityMod
text = CreateTranslation("DesertScourge");
text.AddTranslation(GameCulture.Russian, "Сумка Пустынного Бича");
text.SetDefault("Desert Scourge Treasure Bag");
text.AddTranslation(GameCulture.Chinese, "荒漠灾虫宝藏袋");
AddTranslation(text);
text = CreateTranslation("Crabulon");
text.SetDefault("Crabulon Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Крабулона");
text.AddTranslation(GameCulture.Chinese, "蘑菇螃蟹宝藏袋");
AddTranslation(text);
text = CreateTranslation("HiveMind");
text.SetDefault("The Hive Mind Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Коллективного Разума");
text.AddTranslation(GameCulture.Chinese, "腐巢意志宝藏袋");
AddTranslation(text);
text = CreateTranslation("Perforator");
text.SetDefault("The Perforators Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Бурителей");
text.AddTranslation(GameCulture.Chinese, "血肉宿主宝藏袋");
AddTranslation(text);
text = CreateTranslation("SlimeGod");
text.SetDefault("The Slime God Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Бога Слизней");
text.AddTranslation(GameCulture.Chinese, "史莱姆之神宝藏袋");
AddTranslation(text);
text = CreateTranslation("Cryogen");
text.SetDefault("Cryogen Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Криогена");
text.AddTranslation(GameCulture.Chinese, "极地之灵宝藏袋");
AddTranslation(text);
text = CreateTranslation("BrimstoneElemental");
text.SetDefault("Brimstone Elemental Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Серного Элементаля");
text.AddTranslation(GameCulture.Chinese, "硫磺火元素宝藏袋");
AddTranslation(text);
text = CreateTranslation("AquaticScourge");
text.SetDefault("Aquatic Scourge Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Водного Бича");
text.AddTranslation(GameCulture.Chinese, "渊海灾虫宝藏袋");
AddTranslation(text);
text = CreateTranslation("Calamitas");
text.SetDefault("Calamitas Doppelganger Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Двойника Каламитас");
text.AddTranslation(GameCulture.Chinese, "灾厄之影宝藏袋");
AddTranslation(text);
text = CreateTranslation("AstrageldonSlime");
text.SetDefault("Astrum Aureus Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Звёздного Заразителя");
text.AddTranslation(GameCulture.Chinese, "白金之星宝藏袋");
AddTranslation(text);
text = CreateTranslation("AstrumDeus");
text.SetDefault("Astrum Deus Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Звёздного Бога");
text.AddTranslation(GameCulture.Chinese, "星神游龙宝藏袋");
AddTranslation(text);
text = CreateTranslation("Leviathan");
text.SetDefault("The Leviathan Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Левиафана");
text.AddTranslation(GameCulture.Chinese, "利维坦宝藏袋");
AddTranslation(text);
text = CreateTranslation("PlaguebringerGoliath");
text.SetDefault("The Plaguebringer Goliath Treasure Bag");
text.AddTranslation(GameCulture.Russian, "Сумка Голиафа-чумоносца");
text.AddTranslation(GameCulture.Chinese, "瘟疫使者歌莉娅宝藏袋");