-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChemistryClassGlobalItem.cs
72 lines (53 loc) · 2.01 KB
/
ChemistryClassGlobalItem.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
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace ChemistryClass {
public class ChemistryClassGlobalItem : GlobalItem {
public override void OpenVanillaBag(string context, Player player, int arg) {
if (context == "bossBag" && arg == ItemID.EyeOfCthulhuBossBag) {
player.QuickSpawnItem(
ModContent.ItemType<Items.Materials.Earlygame.PrismaticLens>(),
Main.rand.Next(9,14)
);
}
}
public override void SetDefaults(Item item) {
if (!ChemistryClass.Configuration.ChangePick) return;
switch(item.type) {
case ItemID.LeadPickaxe:
item.pick = 40;
break;
case ItemID.SilverPickaxe:
item.pick = 50;
break;
case ItemID.PlatinumPickaxe:
item.pick = 55;
break;
case ItemID.NightmarePickaxe:
item.pick = 60;
break;
case ItemID.DeathbringerPickaxe:
item.pick = 60;
break;
case ItemID.CobaltPickaxe:
item.pick = 130;
break;
case ItemID.MythrilPickaxe:
item.pick = 165;
break;
case ItemID.TitaniumPickaxe:
item.pick = 180;
break;
}
}
public override void ModifyTooltips(Item item, List<TooltipLine> tooltips) {
if (!ChemistryClass.Configuration.ChangePick) return;
if(item.type == ItemID.NightmarePickaxe || item.type == ItemID.DeathbringerPickaxe) {
int ind = tooltips.FindIndex(t => t.text.Contains("Hellstone"));
tooltips[ind].text = "Able to mine Quartz";
}
}
}
}