-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathEnvironmentGUI.cs
More file actions
28 lines (22 loc) · 794 Bytes
/
EnvironmentGUI.cs
File metadata and controls
28 lines (22 loc) · 794 Bytes
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
using MagicStorage.Common.Systems;
using MagicStorage.Components;
using MagicStorage.UI.States;
namespace MagicStorage {
public static class EnvironmentGUI {
public const int Padding = 4;
internal static TEEnvironmentAccess currentAccess;
internal static bool accessPopulationPending;
internal static void Unload() {
currentAccess = null;
}
public static void LoadModules(TEEnvironmentAccess access) {
if (!StoragePlayer.IsCurrentLocalNetworkAccessible()) {
NetHelper.Report(true, "EnvironmentGUI: LoadModules invoked with inaccessible network");
MagicUI.environmentUI.GetDefaultPage<EnvironmentUIState.ModulesPage>().LoadModules(access);
accessPopulationPending = false;
} else
accessPopulationPending = true;
currentAccess = access;
}
}
}