This repository has been archived by the owner on Feb 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RemoveExit.cs
61 lines (51 loc) · 1.49 KB
/
RemoveExit.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using System;
using System.Threading;
using StardewModdingAPI;
using StardewModdingAPI.Events;
using StardewModdingAPI.Inheritance.Menus;
using StardewModdingAPI.Inheritance;
using System.Collections.Generic;
using StardewValley.Menus;
namespace RemoveExit
{
public class RemoveExit : Mod
{
ExitPage menu;
bool done = false;
public override string Name
{
get { return "Remove Exit"; }
}
public override string Authour
{
get { return "ProbablePrime"; }
}
public override string Version
{
get { return "0.1.0"; }
}
public override string Description
{
get { return "Removes the exit button from the menu. Because yeah. Don't ask why."; }
}
private Thread t;
public override void Entry(params object[] objects)
{
Console.WriteLine("Pork Pie");
GameEvents.UpdateTick += Events_Tick;
}
void Events_Tick(object sender, EventArgs e)
{
if(!SGame.hasLoadedGame)
return;
if (SGame.activeClickableMenu != null && SGame.activeClickableMenu is GameMenu)
{
GameMenu menuInstance = (GameMenu)SGame.activeClickableMenu;
if (menuInstance.currentTab == SGameMenu.exitTab)
{
menuInstance.exitThisMenu(true);
}
}
}
}
}