diff --git a/VERSION b/VERSION
index 86c1e0b9..ca21fd39 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.0.35-pre
+1.0.0.38
diff --git a/bin/Release/net6.0/gregCore.dll b/bin/Release/net6.0/gregCore.dll
index b4348a9f..86e3595a 100644
Binary files a/bin/Release/net6.0/gregCore.dll and b/bin/Release/net6.0/gregCore.dll differ
diff --git a/gregCore.csproj b/gregCore.csproj
index 0d708ede..e43a5ecc 100644
--- a/gregCore.csproj
+++ b/gregCore.csproj
@@ -13,9 +13,9 @@
false
false
false
- 1.0.0.35
- 1.0.0.35
- 1.0.0.35
+ 1.0.0.38
+ 1.0.0.38
+ 1.0.0.38
diff --git a/publish/gregCore-v1.0.0.35-pre-Full.zip b/publish/gregCore-v1.0.0.35-pre-Full.zip
deleted file mode 100644
index bac97dc3..00000000
Binary files a/publish/gregCore-v1.0.0.35-pre-Full.zip and /dev/null differ
diff --git a/publish/gregCore-v1.0.0.35-pre.zip b/publish/gregCore-v1.0.0.35-pre.zip
index 22e9bc4e..e561d010 100644
Binary files a/publish/gregCore-v1.0.0.35-pre.zip and b/publish/gregCore-v1.0.0.35-pre.zip differ
diff --git a/publish_out/gregCore.deps.json b/publish_out/gregCore.deps.json
index 8f45ec41..13b62b52 100644
--- a/publish_out/gregCore.deps.json
+++ b/publish_out/gregCore.deps.json
@@ -6,7 +6,7 @@
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
- "gregCore/1.0.0.35": {
+ "gregCore/1.0.0.38": {
"dependencies": {
"Jint": "4.8.0",
"LiteDB": "5.0.21",
@@ -93,7 +93,7 @@
}
},
"libraries": {
- "gregCore/1.0.0.35": {
+ "gregCore/1.0.0.38": {
"type": "project",
"serviceable": false,
"sha512": ""
diff --git a/publish_out/gregCore.dll b/publish_out/gregCore.dll
index b4348a9f..86e3595a 100644
Binary files a/publish_out/gregCore.dll and b/publish_out/gregCore.dll differ
diff --git a/publish_out/gregCore.pdb b/publish_out/gregCore.pdb
index fcdf06fc..26722423 100644
Binary files a/publish_out/gregCore.pdb and b/publish_out/gregCore.pdb differ
diff --git a/src/API/GregAPI.cs b/src/API/GregAPI.cs
index 1ad89597..b6a35fc8 100644
--- a/src/API/GregAPI.cs
+++ b/src/API/GregAPI.cs
@@ -1,242 +1,106 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using MelonLoader;
using UnityEngine;
-using gregCore.PublicApi;
+using greg.Sdk;
+using gregCore.Infrastructure.UI;
using gregCore.Core.Models;
-namespace gregCore.API;
-
-public enum GregEventId : uint
+namespace gregCore.API
{
- MoneyChanged = 100, XpChanged = 101, ReputationChanged = 102,
- ServerPowered = 200, ServerBroken = 201, ServerRepaired = 202,
- ServerInstalled = 203, CableConnected = 204, CableDisconnected = 205,
- ServerCustomerChanged = 206, ServerAppChanged = 207, RackUnmounted = 208,
- SwitchBroken = 209, SwitchRepaired = 210, ObjectSpawned = 211,
- ObjectPickedUp = 212, ObjectDropped = 213,
- DayEnded = 300, MonthEnded = 301,
- CustomerAccepted = 400, CustomerSatisfied = 401, CustomerUnsatisfied = 402,
- ShopCheckout = 500, ShopItemAdded = 501, ShopCartCleared = 502, ShopItemRemoved = 503,
- EmployeeHired = 600, EmployeeFired = 601,
- GameSaved = 700, GameLoaded = 701, GameAutoSaved = 702,
- WallPurchased = 800,
- CustomEmployeeHired = 1000, CustomEmployeeFired = 1001,
-}
-
-public static class GregAPI
-{
- private static readonly Dictionary _eventIdToHook = new()
+ public static class GregAPI
{
- { GregEventId.MoneyChanged, "greg.economy.PlayerCoinUpdated" },
- { GregEventId.XpChanged, "greg.economy.PlayerXpUpdated" },
- { GregEventId.ReputationChanged, "greg.economy.PlayerReputationUpdated" },
- { GregEventId.ServerPowered, "greg.hardware.ServerPowered" },
- { GregEventId.ServerBroken, "greg.hardware.ServerBroken" },
- { GregEventId.ServerRepaired, "greg.hardware.ServerRepaired" },
- { GregEventId.ServerInstalled, "greg.hardware.ServerInstalled" },
- { GregEventId.DayEnded, "greg.lifecycle.DayEnded" },
- { GregEventId.MonthEnded, "greg.lifecycle.MonthEnded" },
- { GregEventId.GameLoaded, "greg.lifecycle.GameLoaded" },
- { GregEventId.GameSaved, "greg.lifecycle.GameSaved" },
- };
+ public static object RegisterMod(string id, string name, string version) => null!;
+ public static GregSettingsProxy Settings { get; } = new GregSettingsProxy();
+ public static GregHooksProxy Hooks { get; } = new GregHooksProxy();
- private static readonly Dictionary>> _subscriptions = new();
-
- public static void Initialize()
- {
- LogInfo("GregAPI initializing...");
- }
-
- // internal DI container hooks for new services
- internal static gregCore.Infrastructure.Settings.GregKeybindRegistry _keybindReg = null!;
- internal static gregCore.Infrastructure.Settings.GregModSettingsService _modSettingsService = null!;
- private static gregCore.Sdk.IGregAPI? _sdkApi;
-
- public static gregCore.Sdk.IGregAPI GetSdkApi()
- {
- if (_sdkApi == null)
+ public static void On(string eventId, Action