-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseLibrary.cs
More file actions
49 lines (39 loc) · 1.02 KB
/
BaseLibrary.cs
File metadata and controls
49 lines (39 loc) · 1.02 KB
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
using BaseLibrary.Input;
using BaseLibrary.UI;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using ReLogic.Content.Sources;
using Terraria;
using Terraria.ModLoader;
// TODO: UI framework
// TODO: Make custom cursor lib part of BaseLibrary
namespace BaseLibrary;
public class Program
{
public static void Main(string[] args)
{
}
}
public class BaseLibrary : Mod
{
public const string PlaceholderTexture = "BaseLibrary/Assets/Textures/Placeholder";
public static Asset<Texture2D> MissingTexture = null!;
public override void Load()
{
Hooking.Load();
if (!Main.dedServ)
{
MissingTexture = ModContent.Request<Texture2D>(PlaceholderTexture);
InputSystem.Load();
UISystem.UILayer.Add(new WindowUI());
}
}
public override IContentSource CreateDefaultContentSource()
{
if (!Main.dedServ)
{
AddContent(new OgvReader()); // This manual ILoadable adds readers to AssetReaderCollections.
}
return base.CreateDefaultContentSource();
}
}