Removed unused methods
This commit is contained in:
@@ -342,16 +342,6 @@ public class NetClient implements ApplicationListener{
|
|||||||
|
|
||||||
@Remote(variants = Variant.both)
|
@Remote(variants = Variant.both)
|
||||||
public static void setObjectives(MapObjectives executor){
|
public static void setObjectives(MapObjectives executor){
|
||||||
//clear old markers
|
|
||||||
for(var objective : state.rules.objectives){
|
|
||||||
for(var marker : objective.markers){
|
|
||||||
if(marker.wasAdded){
|
|
||||||
marker.removed();
|
|
||||||
marker.wasAdded = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
state.rules.objectives = executor;
|
state.rules.objectives = executor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,23 +112,10 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||||||
/** Updates all objectives this executor contains. */
|
/** Updates all objectives this executor contains. */
|
||||||
public void update(){
|
public void update(){
|
||||||
eachRunning(obj -> {
|
eachRunning(obj -> {
|
||||||
for(var marker : obj.markers){
|
|
||||||
if(!marker.wasAdded){
|
|
||||||
marker.wasAdded = true;
|
|
||||||
marker.added();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//objectives cannot get completed on the client, but they do try to update for timers and such
|
//objectives cannot get completed on the client, but they do try to update for timers and such
|
||||||
if(obj.update() && !net.client()){
|
if(obj.update() && !net.client()){
|
||||||
obj.completed = true;
|
obj.completed = true;
|
||||||
obj.done();
|
obj.done();
|
||||||
for(var marker : obj.markers){
|
|
||||||
if(marker.wasAdded){
|
|
||||||
marker.removed();
|
|
||||||
marker.wasAdded = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
changed |= obj.changed;
|
changed |= obj.changed;
|
||||||
@@ -627,8 +614,6 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||||||
|
|
||||||
/** Marker used for drawing various content to indicate something along with an objective. Mostly used as UI overlay. */
|
/** Marker used for drawing various content to indicate something along with an objective. Mostly used as UI overlay. */
|
||||||
public static abstract class ObjectiveMarker{
|
public static abstract class ObjectiveMarker{
|
||||||
/** Makes sure markers are only added once. */
|
|
||||||
public transient boolean wasAdded;
|
|
||||||
/** Internal use only! Do not access. */
|
/** Internal use only! Do not access. */
|
||||||
public transient int arrayIndex;
|
public transient int arrayIndex;
|
||||||
|
|
||||||
@@ -650,12 +635,6 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||||||
/** Called in the small and large map. */
|
/** Called in the small and large map. */
|
||||||
public void drawMinimap(MinimapRenderer minimap){}
|
public void drawMinimap(MinimapRenderer minimap){}
|
||||||
|
|
||||||
/** Add any UI elements necessary. */
|
|
||||||
public void added(){}
|
|
||||||
|
|
||||||
/** Remove any UI elements, if necessary. */
|
|
||||||
public void removed(){}
|
|
||||||
|
|
||||||
/** Whether the marker is hidden */
|
/** Whether the marker is hidden */
|
||||||
public boolean isHidden(){
|
public boolean isHidden(){
|
||||||
return hidden;
|
return hidden;
|
||||||
|
|||||||
Reference in New Issue
Block a user