@@ -11,94 +11,27 @@ namespace VanillaTweaks
11
11
{
12
12
public static class LangTweaks
13
13
{
14
- public static void AddText ( )
15
- {
16
- var mod = VanillaTweaks . Instance ;
17
- var text = mod . CreateTranslation ( "ItemTooltip.ObsidianArmor" ) ;
18
- text . SetDefault ( "3% increased ranged critical strike chance" ) ;
19
- text . AddTranslation ( GameCulture . Russian , "Увеличивает шанс крит. удара в дальнем бою на 3%" ) ;
20
- mod . AddTranslation ( text ) ;
21
- text = mod . CreateTranslation ( "ItemTooltip.SwatHelmet" ) ;
22
- text . SetDefault ( "15% increased ranged damage\n 10% increased ranged critical strike chance" ) ;
23
- text . AddTranslation ( GameCulture . Russian , "Увеличивает урон в дальнем бою на 15%\n Увеличивает шанс крит. удара в дальнем бою на 3%" ) ;
24
- mod . AddTranslation ( text ) ;
25
- text = mod . CreateTranslation ( "ItemTooltip.Eskimo" ) ;
26
- text . SetDefault ( "Allows touching cold water without freezing" ) ;
27
- text . AddTranslation ( GameCulture . Russian , "Повзоляет прикасаться к холодной воде, не замерзая" ) ;
28
- mod . AddTranslation ( text ) ;
29
- text = mod . CreateTranslation ( "ItemTooltip.Pharaoh" ) ;
30
- text . SetDefault ( "Increases minion damage by 5%" ) ;
31
- text . AddTranslation ( GameCulture . Russian , "Увеличивает урон питомцев на 5%" ) ; //каких нахуй питомцев?
32
- mod . AddTranslation ( text ) ;
33
-
34
- text = mod . CreateTranslation ( "ArmorSet.Obsidian" ) ;
35
- text . SetDefault ( "10% increased movement speed" ) ;
36
- text . AddTranslation ( GameCulture . Russian , "Увеличивает скорость движения на 10%" ) ;
37
- mod . AddTranslation ( text ) ;
38
- text = mod . CreateTranslation ( "ArmorSet.Gladiator" ) ;
39
- text . SetDefault ( "15% increased critical strike chance" ) ;
40
- text . AddTranslation ( GameCulture . Russian , "Увеличивает шанс крит. удара на 15%" ) ;
41
- mod . AddTranslation ( text ) ;
42
- text = mod . CreateTranslation ( "ArmorSet.Rain" ) ;
43
- text . SetDefault ( "1 defense\n Grants immunity to Water Guns" ) ;
44
- text . AddTranslation ( GameCulture . Russian , "1 ед. защиты\n Даёт невосприимчивость к Водяному пистолету" ) ;
45
- mod . AddTranslation ( text ) ;
46
- text = mod . CreateTranslation ( "ArmorSet.Swat" ) ;
47
- text . SetDefault ( "Reduces damage taken by 25%\n 20% increased ranged damage and chance not to consume ammo" ) ;
48
- text . AddTranslation ( GameCulture . Russian , "Получаемый урон снижен на 25%\n Увеличивает урон в дальнем бою на 20%\n Шанс 20 % не потратить боеприпасы" ) ;
49
- mod . AddTranslation ( text ) ;
50
- text = mod . CreateTranslation ( "ArmorSet.Eskimo" ) ;
51
- text . SetDefault ( "4 defense\n Provides warmth and immunity to chill, frostburn and freezing effects" ) ;
52
- text . AddTranslation ( GameCulture . Russian , "4 ед. защиты\n Даёт тепло и защищает от замораживающих эффектов и ледяного ожога" ) ;
53
- mod . AddTranslation ( text ) ;
54
- text = mod . CreateTranslation ( "ArmorSet.Viking" ) ;
55
- text . SetDefault ( "5% increased damage" ) ;
56
- text . AddTranslation ( GameCulture . Russian , "Увеличивает урон в ближнем бою на 5%" ) ;
57
- mod . AddTranslation ( text ) ;
58
- text = mod . CreateTranslation ( "ArmorSet.Cactus" ) ;
59
- text . SetDefault ( "Attackers also take damage" ) ;
60
- text . AddTranslation ( GameCulture . Russian , "Атакующие тоже получают урон" ) ;
61
- mod . AddTranslation ( text ) ;
62
- text = mod . CreateTranslation ( "ArmorSet.Pharaoh" ) ;
63
- text . SetDefault ( "Increases your max number of minions" ) ;
64
- text . AddTranslation ( GameCulture . Russian , "Увеличивает ваше максимальное количество питомцев" ) ;
65
- mod . AddTranslation ( text ) ;
66
- }
67
-
68
14
public static void EditNames ( LanguageManager manager )
69
15
{
70
16
var bindFlags = BindingFlags . Instance | BindingFlags . NonPublic ;
71
17
var textValueMethod = typeof ( LocalizedText ) . GetMethod ( "SetValue" , bindFlags ) ;
72
-
73
- /* Translation Start */
74
- if ( manager . ActiveCulture == GameCulture . English )
18
+
19
+ if ( Config . CobaltShieldRename )
75
20
{
76
- if ( Config . CobaltShieldRename )
77
- {
78
- textValueMethod . Invoke ( Lang . GetItemName ( ItemID . CobaltShield ) , new object [ ] { "Guardian's Shield" } ) ;
79
- }
80
- if ( Config . SandstoneRename )
81
- {
82
- textValueMethod . Invoke ( Lang . GetItemName ( ItemID . SandstoneBrick ) , new object [ ] { "Sand Brick" } ) ;
83
- textValueMethod . Invoke ( Lang . GetItemName ( ItemID . SandstoneBrickWall ) , new object [ ] { "Sand Brick Wall" } ) ;
84
- textValueMethod . Invoke ( Lang . GetItemName ( ItemID . SandstoneSlab ) , new object [ ] { "Sand Slab" } ) ;
85
- if ( VanillaTweaks . MiscellaniaLoaded )
86
- {
87
- int type = ModLoader . GetMod ( "GoldensMisc" ) . ItemType ( "SandstoneSlabWall" ) ;
88
- if ( type > 0 )
89
- textValueMethod . Invoke ( Lang . GetItemName ( type ) , new object [ ] { "Sand Slab Wall" } ) ;
90
- }
91
- }
21
+ textValueMethod . Invoke ( Lang . GetItemName ( ItemID . CobaltShield ) , new object [ ] { Language . GetTextValue ( "Mods.GoldensMisc.ItemName.CobaltShield" ) } ) ;
92
22
}
93
- else if ( manager . ActiveCulture = = GameCulture . Russian )
23
+ if ( Config . SandstoneRename && manager . ActiveCulture ! = GameCulture . Russian )
94
24
{
95
- if ( Config . CobaltShieldRename )
25
+ textValueMethod . Invoke ( Lang . GetItemName ( ItemID . SandstoneBrick ) , new object [ ] { Language . GetTextValue ( "Mods.GoldensMisc.ItemName.SandstoneBrick" ) } ) ;
26
+ textValueMethod . Invoke ( Lang . GetItemName ( ItemID . SandstoneBrickWall ) , new object [ ] { Language . GetTextValue ( "Mods.GoldensMisc.ItemName.SandstoneBrickWall" ) } ) ;
27
+ textValueMethod . Invoke ( Lang . GetItemName ( ItemID . SandstoneSlab ) , new object [ ] { Language . GetTextValue ( "Mods.GoldensMisc.ItemName.SandstoneSlab" ) } ) ;
28
+ if ( VanillaTweaks . MiscellaniaLoaded )
96
29
{
97
- textValueMethod . Invoke ( Lang . GetItemName ( ItemID . CobaltShield ) , new object [ ] { "Щит хранителя" } ) ;
30
+ int type = ModLoader . GetMod ( "GoldensMisc" ) . ItemType ( "SandstoneSlabWall" ) ;
31
+ if ( type > 0 )
32
+ textValueMethod . Invoke ( Lang . GetItemName ( type ) , new object [ ] { Language . GetTextValue ( "Mods.GoldensMisc.ItemName.SandstoneSlabWall" ) } ) ;
98
33
}
99
- //Sandstone stuff actually has correct names in Russian
100
34
}
101
- /* Translation End */
102
35
}
103
36
104
37
public static void EditTooltips ( LanguageManager manager )
0 commit comments