Tweaked sector dialog / Item icons fixed / Bugfixes
This commit is contained in:
@@ -4,12 +4,18 @@ import io.anuke.arc.Events.Event;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.entities.type.Unit;
|
||||
import io.anuke.mindustry.entities.traits.BuilderTrait;
|
||||
import io.anuke.mindustry.type.Zone;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
|
||||
public class EventType{
|
||||
|
||||
public static class SectorCompleteEvent implements Event{
|
||||
/**Called when a zone's requirements are met.*/
|
||||
public static class ZoneCompleteEvent implements Event{
|
||||
public final Zone zone;
|
||||
|
||||
public ZoneCompleteEvent(Zone zone){
|
||||
this.zone = zone;
|
||||
}
|
||||
}
|
||||
|
||||
/**Called when the game is first loaded.*/
|
||||
|
||||
@@ -8,6 +8,7 @@ import io.anuke.arc.collection.ObjectSet;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.game.EventType.UnlockEvent;
|
||||
import io.anuke.mindustry.game.EventType.ZoneCompleteEvent;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
import io.anuke.mindustry.type.Item;
|
||||
import io.anuke.mindustry.type.ItemStack;
|
||||
@@ -31,6 +32,9 @@ public class GlobalData{
|
||||
if(value < wave){
|
||||
Core.settings.put(zone.name + "-wave", wave);
|
||||
modified = true;
|
||||
if(wave > zone.conditionWave){
|
||||
Events.fire(new ZoneCompleteEvent(zone));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package io.anuke.mindustry.game;
|
||||
|
||||
public enum Rank{
|
||||
SS, S, A, B, C, D, F
|
||||
}
|
||||
@@ -20,4 +20,8 @@ public class Stats{
|
||||
public int buildingsDeconstructed;
|
||||
/**Friendly buildings destroyed.*/
|
||||
public int buildingsDestroyed;
|
||||
|
||||
public Rank calculateRank(boolean launched){
|
||||
return Rank.F;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user