@@ -210,7 +210,7 @@ public void init(){
210
210
}
211
211
if (!waveIsOver ){
212
212
enemyTypes .each (type -> type .speed += enemySpeedBoost * Time .delta * statScaling );
213
- }else if (respawnInterval .get (60f )){
213
+ }else if (respawnInterval .get (120f )){
214
214
for (int i = 0 ; i < toRespawn .size ; i ++){
215
215
Building b = toRespawn .get (i );
216
216
Block block = b .block ;
@@ -231,6 +231,8 @@ public void init(){
231
231
b .tile .setNet (block , b .team , b .rotation );
232
232
toRespawn .remove (b );
233
233
i --;
234
+ }else {
235
+ Call .effect (Fx .unitCapKill , b .x , b .y , 1 , Color .white );
234
236
}
235
237
Call .effect (Fx .placeBlock , b .x , b .y , (float )block .size , Color .white );
236
238
}
@@ -648,15 +650,37 @@ public void registerClientCommands(CommandHandler handler){
648
650
649
651
handler .<Player >register ("info" , "Show info about the Crawler Arena gamemode" , (args , player ) -> Bundle .bundled (player , "commands.info" ));
650
652
651
- handler .<Player >register ("upgrades" , "Show units you can upgrade to" , (args , player ) -> {
652
- StringBuilder upgrades = new StringBuilder (Bundle .format ("commands.upgrades.header" , Bundle .findLocale (player )));
653
+ handler .<Player >register ("upgrades" , "[page]" , "Show units you can upgrade to" , (args , player ) -> {
654
+ int page ;
655
+ if (args .length == 0 ){
656
+ page = 1 ;
657
+ }else {
658
+ try {
659
+ page = Integer .parseInt (args [0 ]);
660
+ }catch (NumberFormatException e ){
661
+ Bundle .bundled (player , "exceptions.invalid-amount" );
662
+ return ;
663
+ }
664
+ }
653
665
IntSeq sortedUnitCosts = unitCosts .values ().toArray ();
666
+ int maxPage = (sortedUnitCosts .size - 1 ) / (unitsRows * page ) + 1 ;
667
+ if (1 > page || page > maxPage ){
668
+ Bundle .bundled (player , "exceptions.invalid-amount" );
669
+ return ;
670
+ }
654
671
sortedUnitCosts .sort ();
672
+ if (page > 1 ){
673
+ sortedUnitCosts .removeRange (0 , unitsRows * (page - 1 ) - 1 );
674
+ }
675
+ sortedUnitCosts .removeRange (unitsRows * page , sortedUnitCosts .size - 1 );
655
676
ObjectIntMap <UnitType > unitCostsCopy = new ObjectIntMap <>();
656
677
unitCostsCopy .putAll (unitCosts );
678
+ int i = 1 ;
679
+ StringBuilder upgrades = new StringBuilder (Bundle .format ("commands.upgrades.header" , Bundle .findLocale (player )));
680
+ upgrades .append (Bundle .format ("commands.upgrades.header" , Bundle .findLocale (player ), page , maxPage )).append ("/n" );
657
681
sortedUnitCosts .each ((cost ) -> {
658
682
UnitType type = unitCostsCopy .findKey (cost );
659
- upgrades .append ("[gold] - [accent]" ).append (type .name ).append (" [lightgray](" ).append (cost ).append (") \ n " );
683
+ upgrades .append ("[gold] - [accent]" ).append (type .name ).append (" [lightgray](" ).append (cost ).append ("/ n" );
660
684
unitCostsCopy .remove (type );
661
685
});
662
686
player .sendMessage (upgrades .toString ());
0 commit comments