-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShopApiPlugin.cs
More file actions
39 lines (37 loc) · 1.02 KB
/
ShopApiPlugin.cs
File metadata and controls
39 lines (37 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
using UnityEngine;
#if MODMAN
using BepInEx;
using HarmonyLib;
#endif
namespace ContentWarningShop
{
[ContentWarningPlugin(MOD_GUID, MOD_VER, false)]
#if MODMAN
[BepInPlugin(MOD_GUID, MOD_NAME, MOD_VER)]
#endif
public class ShopApiPlugin
#if MODMAN
: BaseUnityPlugin
#endif
{
public const string MOD_GUID = "xerren.cwshopapi";
public const string MOD_NAME = "ShopAPI";
public const string MOD_VER = ThisAssembly.AssemblyVersion;
public const ulong STEAM_WORKSHOP_ITEM_ID = 3408837293;
#if STEAM
static ShopApiPlugin()
{
SteamLobbyMetadataHandler.RegisterSteamworksCallbacks();
ShopAPI.Logger.Log($"Initialised via the vanilla mod loader.");
}
#elif MODMAN
private Harmony harmony = new Harmony(MOD_GUID);
void Awake()
{
harmony.PatchAll();
SteamLobbyMetadataHandler.RegisterSteamworksCallbacks();
ShopAPI.Logger.Log($"Initialised via BepInEx mod loader.");
}
#endif
}
}