-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUIPatch.cs
More file actions
52 lines (50 loc) · 1.95 KB
/
Copy pathUIPatch.cs
File metadata and controls
52 lines (50 loc) · 1.95 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 System;
using System.CodeDom;
using System.Threading.Tasks;
using HarmonyLib;
using PulsarModLoader;
using PulsarModLoader.Utilities;
using UnityEngine;
//namespace GravityIndicator
//{
// [HarmonyPatch(typeof(PLUIOutsideWorldUI), "Update")]
// internal class UIAddition
// {
// internal static GameObject gravityIndicator;
// internal static MeshRenderer indicatorMesh;
// internal static bool Created = false;
// internal static bool IndicatorEnabled = true;
// static void Postfix(PLUIOutsideWorldUI __instance, ref bool ___pilotingHUDActive)
// {
// if (!PLLoader.Instance.IsLoaded || PLServer.Instance == null || PLEncounterManager.Instance == null)
// {
// return;
// }
// if (Created && gravityIndicator != null && indicatorMesh != null)
// {
// if (PulsarModLoader.Keybinds.KeybindManager.Instance.GetButtonDown("gravIndicator"))
// {
// UIAddition.IndicatorEnabled = !UIAddition.IndicatorEnabled;
// }
// indicatorMesh.enabled = IndicatorEnabled && ___pilotingHUDActive;
// //if (IndicatorEnabled && ___pilotingHUDActive)
// //{
// // //gravityIndicator.transform.position = PLEncounterManager.Instance.PlayerShip.Exterior.transform.position;
// // //gravityIndicator.transform.position = PLCameraSystem.Instance.CurrentSubSystem.MainCameras[0].transform.position + PLCameraSystem.Instance.CurrentSubSystem.MainCameras[0].transform.forward * 20f;
// //}
// }
// else
// {
// if (Created)
// {
// return;
// }
// else
// {
// Assembler.AssembleIndicator();
// Created = true;
// }
// }
// }
// }
//}