forked from isxGames/ISXEVEWrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExtension.cs
178 lines (160 loc) · 3.42 KB
/
Extension.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
using System;
using System.Text;
using System.Runtime.InteropServices;
using InnerSpaceAPI;
using LavishScriptAPI;
using LavishVMAPI;
namespace EVE.ISXEVE
{
/// <summary>
/// Utility class that wraps common ISXEVE elements.
/// </summary>
public class Extension
{
/// <summary>
/// Extension object constructor.
/// </summary>
public Extension()
{
}
/// <summary>
/// Return a new EVE object.
/// </summary>
/// <returns></returns>
public EVE EVE()
{
return new EVE();
}
/// <summary>
/// Return a new "me" object.
/// </summary>
public Character Me
{
get
{
return new Me();
}
}
/// <summary>
/// Create an Entity object based on an ID.
/// </summary>
/// <param name="ID"></param>
/// <returns></returns>
public Entity Entity(int ID)
{
return new Entity(string.Format("ID = \"{0}\"", ID));
}
/// <summary>
/// Create a new Entity object based on a lookup string.
/// </summary>
/// <param name="queryString"></param>
/// <returns></returns>
public Entity Entity(string queryString)
{
return new Entity(queryString);
}
/// <summary>
/// Check with LavishScriptObject.IsNullOrInvalid. If its not valid,
/// you're not at the char select screen.
/// </summary>
public CharSelect CharSelect
{
get
{
return new CharSelect();
}
}
/// <summary>
/// Returns a new ISXEVE object
/// </summary>
public ISXEVE ISXEVE
{
get
{
return new ISXEVE();
}
}
/// <summary>
/// Possible "Names" include: "MyShipCargo", "MyDroneBay", "Market", "hangarFloor",
/// "shipHangar", "Local", "Corporation Hangar" (more added as needed/requested).
/// </summary>
public EVEWindow EVEWindow(string name)
{
return new EVEWindow(name);
}
/// <summary>
/// Returns a new EVETime object
/// </summary>
public EVETime EVETime()
{
return new EVETime();
}
/// <summary>
/// Get an agent by ID.
/// </summary>
public Agent Agent(int AgentID)
{
return new Agent("id", AgentID);
}
/// <summary>
/// Get an agent by ID.
/// </summary>
public Agent AgentByID(int AgentID)
{
return new Agent("id", AgentID);
}
/// <summary>
/// Get an agent by Index
/// </summary>
public Agent AgentByIndex(int Index)
{
return new Agent(Index);
}
/// <summary>
/// Get an agent by Name
/// </summary>
public Agent Agent(string Name)
{
return new Agent(Name);
}
/// <summary>
/// Get a Local pilot by ID.
/// </summary>
public Pilot Local(Int64 CharID)
{
return new Pilot(CharID);
}
/// <summary>
/// Get a Local pilot by name.
/// </summary>
public Pilot Local(string CharName)
{
return new Pilot(CharName);
}
/// <summary>
/// Check with LavishScriptObject.IsNullOrInvalid. If its not valid,
/// you're not at the login screen.
/// </summary>
public Login Login
{
get
{
return new Login();
}
}
/// <summary>
/// can refer to any solarsystem, region, or constellation
/// </summary>
public Interstellar InterstellarByName(string Name)
{
return Universe.ByName(Name);
}
/// <summary>
/// can refer to any solarsystem, region, or constellation
/// </summary>
public Interstellar InterstellarByID(int ID)
{
return Universe.ByID(ID);
}
}
}