1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2026-02-05 00:22:21 +08:00

add message popup on developer mode switch

This commit is contained in:
2022-09-06 22:11:53 +08:00
parent 7710b252cc
commit 1f20eb6333
6 changed files with 35 additions and 4 deletions

View File

@@ -60,7 +60,12 @@ public class CheatEnabler : BaseUnityPlugin
[HarmonyPatch(typeof(PlayerAction_Test), "GameTick")]
private static void PlayerAction_TestGameTick(PlayerAction_Test __instance)
{
var lastActive = __instance.active;
__instance.Update();
if (lastActive != __instance.active)
{
UIRealtimeTip.PopupAhead((lastActive ? "Developer Mode Shortcuts Disabled" : "Developer Mode Shortcuts Enabled").Translate(), false);
}
}
}