This repository has been archived by the owner on Jan 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathTremorGlowMask.cs
65 lines (58 loc) · 1.5 KB
/
TremorGlowMask.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
using System;
using Terraria;
using Terraria.ModLoader;
namespace Tremor
{
public static class TremorGlowMask
{
//Grove Set List
public static short DEH;
public static short DEG;
public static short NovaPick;
public static short NovaHamaxe;
//Count items
const short Count = 4;
//Start - Final
static short End;
public static bool Loaded;
public static void Load()
{
Array.Resize(ref Main.glowMaskTexture, Main.glowMaskTexture.Length + Count);
short i = (short)(Main.glowMaskTexture.Length - Count);
Main.glowMaskTexture[i] = ModLoader.GetTexture("Tremor/Items/DesertExplorerVisage_HeadGlow");
DEH = i;
i++;
Main.glowMaskTexture[i] = ModLoader.GetTexture("Tremor/Items/DesertExplorerGreaves_LegsGlow");
DEG = i;
i++;
Main.glowMaskTexture[i] = ModLoader.GetTexture("Tremor/NovaPillar/NovaPickaxe_Glow");
NovaPick = i;
i++;
Main.glowMaskTexture[i] = ModLoader.GetTexture("Tremor/NovaPillar/NovaHamaxe_Glow");
NovaHamaxe = i;
i++;
End = i;
Loaded = true;
}
public static void Unload()
{
if (Main.glowMaskTexture.Length == End)
{
Array.Resize(ref Main.glowMaskTexture, Main.glowMaskTexture.Length - Count);
}
else if (Main.glowMaskTexture.Length > End && Main.glowMaskTexture.Length > Count)
{
for (int i = End - Count; i < End; i++)
{
Main.glowMaskTexture[i] = ModLoader.GetTexture("Terraria/Item_0");
}
}
Loaded = false;
DEH = 0;
DEG = 0;
NovaPick = 0;
NovaHamaxe = 0;
End = 0;
}
}
}