-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plugin.cs
46 lines (44 loc) · 1.57 KB
/
Plugin.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
using System;
using UnityEngine;
using DiskCardGame;
using GBC;
using HarmonyLib;
using BepInEx;
using BepInEx.Logging;
using SawyerExpansion.ClassesWithInstances;
using SawyerExpansion.Utils;
namespace SawyerExpansion
{
[BepInPlugin(PluginDetails.PluginGuid, PluginDetails.PluginName, PluginDetails.PluginVersion)]
public class Plugin : BaseUnityPlugin
{
internal static class PluginDetails
{
internal const string PluginGuid = "ExpansionTeam.Inscryption.SawyerExpansion";
internal const string PluginName = "SawyerExpansion";
internal const string PluginVersion = "0.0.1";
public static ManualLogSource Log;
public static string Path;
}
private void Awake()
{
PluginDetails.Log=this.Logger;
PluginDetails.Path = this.Info.Location.Replace("SawyerExpansion.dll", "");
var harmony=new Harmony(PluginDetails.PluginGuid);
AbilitiesUtils.AddAbilities();
CardUtils.AddCards();
harmony.PatchAll();
ImageUtils.heatTextures=new Sprite[1];
for (int i = 1; i < 11; i++)
{
{
Array.Resize(ref ImageUtils.heatTextures, ImageUtils.heatTextures.Length+1);
{
var tex =ImageUtils.LoadTexture(i+"_Heat");
ImageUtils.heatTextures[i]=Sprite.Create(tex, new Rect(0.0f, 0.0f, tex.width, tex.height), new Vector2(0.5f, 0.5f), 100.0f);
}
}
}
}
}
}