forked from darkbot-reloaded/DarkBotAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssemblyAPI.java
More file actions
154 lines (126 loc) · 3.54 KB
/
AssemblyAPI.java
File metadata and controls
154 lines (126 loc) · 3.54 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
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
package eu.darkbot.api.managers;
import eu.darkbot.api.API;
import java.util.List;
/**
* Provide access to Assembly data
*/
public interface AssemblyAPI extends API.Singleton {
/**
* @return index of currently selected recipe in assembly window
*/
int getSelectedRecipeIndex();
/**
* @return {@code Recipe} that is currently selected
*/
Recipe getSelectedRecipe();
/**
* @return check if filter drop down window is currently open
*/
boolean isFilterDropDownOpen();
/**
* @return {@code List} of all Recipe available
*/
List<? extends Recipe> getRecipes();
/**
* @return {@code List} of all category of filters
*/
List<? extends Filter> getFilters();
/**
* Opens assembly GUI and selects a specific recipe by index, requires calling until true
* @param index index of the recipe to select
* @return false if operation has not completed, true if done
*/
boolean clickRecipeIndex(int index);
/**
* Opens assembly GUI and clicks the craft/collect button, requires calling until true
* @return false if operation has not completed, true if done
*/
boolean clickCraftCollect();
/**
* Provide access to Recipe data in Assembly containing id, rewards and resources required to make the item
*/
interface Recipe {
/**
* @return recipe in game id
*/
String getRecipeId();
/**
* @return {@code List} of Reward ids when recipe is collected
*/
List<? extends String> getRewards();
/**
* @return {@code List} of Resources required to build the recipe
*/
List<? extends ResourceRequired> getResourcesRequired();
/**
* @return if the recipe is craftable, false if recipe is ready to be collected
*/
boolean isCraftable();
/**
* @return if the recipe is building in progress
*/
boolean isInProgress();
/**
* @return if the recipe is collectable
*/
boolean isCollectable();
/**
* @return the visibility data of the recipe
*/
String getVisibility();
/**
* @return the time left to complete recipe craft
*/
int getCraftTimeLeft();
/**
* @return the time required to craft the recipe
*/
int getCraftTimeRequired();
}
/**
* Provide access to Resources Required data in Recipe
*/
interface ResourceRequired {
/**
* @return resource id for required material for recipe
*/
String getResourceId();
/**
* @return amount of resource required for recipe
*/
double getAmountRequired();
}
/**
* Mapping of {@code ItemFilter} into row, col indexed
*/
interface Filter {
/**
* @return name of item filter in assembly window
*/
String getFilterName();
/**
* @return row index of filter
*/
int getRow();
/**
* @return col index of filter
*/
int getCol();
/**
* @return if the filter is applied
*/
boolean isChecked();
/**
* @return position of x offset for filter
*/
double getX();
/**
* @return position of y offset for filter
*/
double getY();
/**
* @return returns if filter is valid
*/
boolean isValid();
}
}