removed 0's and fixed ranking and removed event winner badge

This commit is contained in:
Christian 2021-02-27 00:04:36 +01:00
parent 0c2103cc0c
commit 474f104ecd
3 changed files with 19 additions and 8 deletions

View File

@ -26,6 +26,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
@ -296,9 +297,6 @@ public class Facade {
} else if (bannerID == 13) { } else if (bannerID == 13) {
bannerName = "Trial Admin"; bannerName = "Trial Admin";
bannerURL = "https://unloze.com/images/badges/Junior-Admin_Badge.png"; bannerURL = "https://unloze.com/images/badges/Junior-Admin_Badge.png";
} else if (bannerID == 15) {
bannerName = "Event Winner";
bannerURL = "https://unloze.com/images/badges/Event-Winner.png";
} else if (bannerID == 19) { } else if (bannerID == 19) {
bannerName = "Discord Manager"; bannerName = "Discord Manager";
bannerURL = "https://unloze.com/images/badges/Discord-Manager.png"; bannerURL = "https://unloze.com/images/badges/Discord-Manager.png";
@ -399,10 +397,23 @@ public class Facade {
Collection<MapBoard> mapboards = mapBoardCache.values(); Collection<MapBoard> mapboards = mapBoardCache.values();
for (MapBoard mapboard : mapboards) { for (MapBoard mapboard : mapboards) {
//System.out.println("mapName: " + mapboard.getMapName()); //System.out.println("mapName: " + mapboard.getMapName());
List<MapValues> mapvalues = new ArrayList(mapboard.getMapvalues()); List<MapValues> mapvalues = new ArrayList();
List<MapValues> less_than_a_minute = new ArrayList<>();
for (MapValues mv : mapboard.getMapvalues())
{
String time = mv.getTime();
if (!time.contains(":"))
{
less_than_a_minute.add(mv);
}
else{
mapvalues.add(mv);
}
}
mapvalues.sort(Comparator.comparing(MapValues::getTime)); mapvalues.sort(Comparator.comparing(MapValues::getTime));
mapBoardCache.get(mapboard.getMapName()).setMapvalues(mapvalues); less_than_a_minute.sort(Comparator.comparing(MapValues::getTime));
less_than_a_minute.addAll(mapvalues);
mapBoardCache.get(mapboard.getMapName()).setMapvalues(less_than_a_minute);
} }
} }

View File

@ -120,7 +120,7 @@ class Maps extends React.Component {
</NavLink> </NavLink>
<strong> Position: {e.position}</strong><br /> <strong> Position: {e.position}</strong><br />
<strong> Mappoints: {e.mapPoint}</strong><br /> <strong> Mappoints: {e.mapPoint}</strong><br />
<strong> Time: 0{e.mapTime}</strong><br /> <strong> Time: {e.mapTime}</strong><br />
{Object.keys(e.badgesUrls).map(badges => ( {Object.keys(e.badgesUrls).map(badges => (
<div key={e.badgesUrls[badges]}> <div key={e.badgesUrls[badges]}>
<img src={e.badgesUrls[badges]} alt="" /> <br /> <img src={e.badgesUrls[badges]} alt="" /> <br />

View File

@ -128,7 +128,7 @@ class Player extends React.Component {
<strong> Map: {e.mapname}</strong><br /> <strong> Map: {e.mapname}</strong><br />
<strong> Stage: {e.mapstage}</strong><br /> <strong> Stage: {e.mapstage}</strong><br />
<strong> Position: {e.position}</strong><br /> <strong> Position: {e.position}</strong><br />
<strong> Time: 0{e.mapTime}</strong><br /> <strong> Time: {e.mapTime}</strong><br />
<strong> MapPoints: {e.mapPoint}</strong><br /> <strong> MapPoints: {e.mapPoint}</strong><br />
</NavLink> </NavLink>
</div> </div>