-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGUI.cs
More file actions
52 lines (50 loc) · 2 KB
/
Copy pathGUI.cs
File metadata and controls
52 lines (50 loc) · 2 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
40
41
42
43
44
45
46
47
48
49
50
51
using PulsarModLoader;
using PulsarModLoader.CustomGUI;
using PulsarModLoader.Utilities;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Moving_Comet
{
internal class ModGUI : ModSettingsMenu
{
public static SaveValue<int> Mode = new SaveValue<int>("MovingCometMode", 2);
private static int ModeStorage = 0;
private static string[] ModeNames =
{
"Fastest", "Fast", "Normal",
"Slow", "Slowest", "Random"
};
public override string Name()
{
return "Moving Comet";
}
public override void Draw()
{
ModeStorage = Mode.Value;
GUILayout.BeginArea(new Rect(30, 30, 400, 400));
GUILayout.BeginHorizontal();
GUILayout.Box("Modes");
GUILayout.EndHorizontal();
Mode.Value = GUILayout.SelectionGrid(Mode.Value, ModeNames, 3);
GUILayout.Label($"Mode: {ModeNames[Mode]}");
if (PhotonNetwork.isMasterClient && PLServer.Instance != null && PLServer.GetCurrentSector().VisualIndication == ESectorVisualIndication.COMET)
{
if (GUILayout.Button("UnStuck"))
{
PLServer.Instance.CPEI_HandleActivateWarpDrive(PLEncounterManager.Instance.PlayerShip.ShipID, PLServer.GetCurrentSector().ID, PLNetworkManager.Instance.LocalPlayer.GetPlayerID());
}
}
GUILayout.EndArea();
if (ModeStorage != Mode.Value)
{
if (PLGlobal.Instance != null && PLGlobal.Instance.Galaxy != null && PLGlobal.Instance.Galaxy.AllSectorInfos.Count > 0)
{
//Messaging.Echo(PLNetworkManager.Instance.LocalPlayer, "Changing Start Sector");
Patches.CometInitial = PLGlobal.Instance.Galaxy.GetSectorOfVisualIndication(ESectorVisualIndication.COMET).Position;
Patches.numJumps = 0;
}
}
}
}
}