-
Notifications
You must be signed in to change notification settings - Fork 14
/
Station.cs
185 lines (162 loc) · 4.62 KB
/
Station.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
179
180
181
182
183
184
185
using System.Collections.Generic;
using EVE.ISXEVE.Extensions;
using LavishScriptAPI;
namespace EVE.ISXEVE
{
/// <summary>
/// Wrapper for the station data type.
/// </summary>
public class Station : LavishScriptObject
{
#region Constructors
/// <summary>
/// The station we're in. Invalid if we're not in station.
/// Check using LavishScriptObject.IsNullOrInvalid
/// </summary>
public Station()
: base(LavishScript.Objects.GetObject("Me").GetMember("Station"))
{
}
/// <summary>
/// Station copy constructor.
/// </summary>
/// <param name="Copy"></param>
public Station(LavishScriptObject Copy)
: base(Copy)
{
}
#endregion
#region Members
/// <summary>
/// Get all the items in the hanger
/// </summary>
public List<Item> GetHangarItems()
{
Tracing.SendCallback("Station.GetHangarItems");
return Util.GetListFromMethod<Item>(this, "GetHangerItems", "item");
}
/// <summary>
/// Get all the ships in the hanger as items.
/// </summary>
public List<Item> GetHangarShips()
{
Tracing.SendCallback("Station.GetCorpHangarShips");
return Util.GetListFromMethod<Item>(this, "GetHangerShips", "item");
}
/// <summary>
/// Get all the items in the corporate hanger (all together)
/// </summary>
public List<Item> GetCorpHangarItems()
{
Tracing.SendCallback("Station.GetCorpHangarItems");
return Util.GetListFromMethod<Item>(this, "GetCorpHangarItems", "item");
}
/// <summary>
/// Wrapper for the GetCorpHangarShips member of the station type.
/// </summary>
/// <returns></returns>
public List<Item> GetCorpHangarShips()
{
Tracing.SendCallback("Station.GetCorpHangarShips");
return Util.GetListFromMethod<Item>(this, "GetCorpHangarShips", "item");
}
/// <summary>
/// Wrapper for Name member of station type.
/// </summary>
public string Name
{
get { return this.GetString("Name"); }
}
/// <summary>
/// Wrapper for ID member of station type.
/// </summary>
public int ID
{
get { return this.GetInt("ID"); }
}
/// <summary>
/// Wrapper for TypeID member of station type.
/// </summary>
public int TypeID
{
get { return this.GetInt("TypeID"); }
}
/// <summary>
/// Wrapper for Type member of station type.
/// </summary>
public string Type
{
get { return this.GetString("Type"); }
}
/// <summary>
/// Wrapper for OwnerID member of station type.
/// </summary>
public int OwnerID
{
get { return this.GetInt("OwnerID"); }
}
/// <summary>
/// Wrapper for Owner member of station type.
/// </summary>
public string Owner
{
get { return this.GetString("Owner"); }
}
/// <summary>
/// Wrapper for OwnerTypeID member of station type.
/// </summary>
public int OwnerTypeID
{
get { return this.GetInt("OwnerTypeID"); }
}
/// <summary>
/// Wrapper for OwnerType member of station type.
/// </summary>
public string OwnerType
{
get { return this.GetString("OwnerType"); }
}
private SolarSystem _solarSystem;
public SolarSystem SolarSystem
{
get { return _solarSystem ?? (_solarSystem = new SolarSystem(GetMember("SolarSystem"))); }
}
#endregion
#region Methods
/// <summary>
/// Same as right click - Stack All - consolidates stacks of items.
/// </summary>
public bool StackAllHangarItems()
{
// TODO - Remove this when stealthbot is updated.
Tracing.SendCallback("Station.StackAllHangarItems - Redirecting to EVEWindow");
EVEWindow wnd = new EVEWindow(LavishScript.Objects.GetObject("EVEWindow", "ByName", "hangarFloor"));
return wnd.StackAll();
}
public bool AddWaypoint()
{
Tracing.SendCallback("Station.AddWaypoint");
return ExecuteMethod("AddWaypoint");
}
public bool ClearWaypoint()
{
Tracing.SendCallback("Station.ClearWaypoint");
return ExecuteMethod("ClearWaypoint");
}
public bool SetDestination()
{
Tracing.SendCallback("Station.SetDestination");
return ExecuteMethod("SetDestination");
}
public List<Item> GetRepairableItems()
{
var repairableItems = this.GetListFromMethod<Item>("GetRepairableItems", "item");
return repairableItems;
}
public bool OpenFitting()
{
return ExecuteMethod("OpenFitting");
}
#endregion
}
}