-
Notifications
You must be signed in to change notification settings - Fork 14
/
ISXEVE.cs
125 lines (112 loc) · 3.4 KB
/
ISXEVE.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
using System;
using System.Collections.Generic;
using System.Text;
using System.Globalization;
using EVE.ISXEVE.Extensions;
using InnerSpaceAPI;
using LavishScriptAPI;
namespace EVE.ISXEVE
{
/// <summary>
/// Wrapper for the isxeve data type.
/// </summary>
public class ISXEVE : LavishScriptObject
{
#region Constructors
/// <summary>
/// Copy constructor for ISXEVE object
/// </summary>
/// <param name="Obj"></param>
public ISXEVE(LavishScriptObject Obj)
: base(Obj)
{
}
/// <summary>
/// Default constructor for ISXEVE object. Returns the LS object.
/// </summary>
public ISXEVE()
: base(LavishScript.Objects.GetObject("ISXEVE"))
{
}
#endregion
#region Members
/// <summary>
/// Wrapper for the Version member of the isxeve object.
/// </summary>
public string Version
{
get { return this.GetString("Version"); }
}
/// <summary>
/// Note: All scripts should check to make sure that this is true before running.
/// </summary>
public bool IsReady
{
get { return this.GetBool("IsReady"); }
}
/// <summary>
/// Returns true if the extension is currently in the authentication/patching phase of loading
/// </summary>
public bool IsLoading
{
get { return this.GetBool("IsLoading"); }
}
/// <summary>
/// This is simply a utility for scripts to convert any number of seconds into a string:
/// 0 - 59 = "# seconds"
/// 60 - 3599 = "# minutes and # seconds"
/// 3600+ = "# hours, # minutes, and # seconds"
/// </summary>
public string SecsToString(int seconds)
{
return this.GetString("SecsToString", seconds.ToString(CultureInfo.CurrentCulture));
}
/// <summary>
/// This should be checked before doing anything else once docking/undocking/system changing/warping.
/// Returns true if safe to use ISXEVE members/methods/TLOS/etc, false if you need to avoid using ISXEVE calls.
/// </summary>
public bool IsSafe
{
get { return this.GetBool("IsSafe"); }
}
public bool IsBeta
{
get { return this.GetBool("IsBeta"); }
}
#endregion
#region Methods
/// <summary>
/// Unload the extension.
/// </summary>
public void Unload()
{
Tracing.SendCallback("ISXEVE.Unload");
ExecuteMethod("Unload");
}
public void Debug_SetTypeValidation(bool enabled)
{
Tracing.SendCallback("ISXEVE.Debug_SetTypeValidation", enabled);
ExecuteMethod("Debug_SetTypeValidation", enabled.ToString(CultureInfo.CurrentCulture));
}
/// <summary>
/// Disables flushing/closing the ISXEVE logfile between logs, critical for intensive debug logging. Use only when requested by ISXEVE dev.
/// </summary>
/// <param name="enabled"></param>
public void Debug_SetHighPerfLogging(bool enabled)
{
Tracing.SendCallback("ISXEVE.Debug_SetHighPerfLogging", enabled);
ExecuteMethod("Debug_SetHighPerfLogging", enabled.ToString(CultureInfo.CurrentCulture));
}
/// <summary>
/// This will send a message to the ISXEVE logfile. Useful for marking script actions around ISXEVE output.
/// </summary>
/// <param name="scriptName"></param>
/// <param name="logMessage"></param>
public void Debug_LogMsg(string scriptName, string logMessage)
{
Tracing.SendCallback("ISXEVE.Debug_LogMsg", scriptName, logMessage);
ExecuteMethod("Debug_LogMsg", scriptName, logMessage);
}
#endregion
}
}