Merge branch 'master' into crater
This commit is contained in:
@@ -80,7 +80,7 @@ public class Teams{
|
||||
/** Returns whether a team is active, e.g. whether it has any cores remaining. */
|
||||
public boolean isActive(Team team){
|
||||
//the enemy wave team is always active
|
||||
return team == state.rules.waveTeam || get(team).cores.size > 0;
|
||||
return get(team).active();
|
||||
}
|
||||
|
||||
/** Returns whether {@param other} is an enemy of {@param #team}. */
|
||||
@@ -150,7 +150,7 @@ public class Teams{
|
||||
}
|
||||
|
||||
public boolean active(){
|
||||
return team == state.rules.waveTeam || cores.size > 0;
|
||||
return (team == state.rules.waveTeam && state.rules.waves) || cores.size > 0;
|
||||
}
|
||||
|
||||
public boolean hasCore(){
|
||||
|
||||
19
core/src/mindustry/mod/ModListing.java
Normal file
19
core/src/mindustry/mod/ModListing.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package mindustry.mod;
|
||||
|
||||
/** Mod listing as a data class. */
|
||||
public class ModListing{
|
||||
public String repo, name, author, lastUpdated, description;
|
||||
public int stars;
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "ModListing{" +
|
||||
"repo='" + repo + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", author='" + author + '\'' +
|
||||
", lastUpdated='" + lastUpdated + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", stars=" + stars +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -162,6 +162,16 @@ public class MassDriver extends Block{
|
||||
@Override
|
||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||
Drawf.dashCircle(x * tilesize, y*tilesize, range, Pal.accent);
|
||||
|
||||
// check if a mass driver is selected while placing this driver
|
||||
if(!control.input.frag.config.isShown()) return;
|
||||
Tile selected = control.input.frag.config.getSelectedTile();
|
||||
if(!(selected.block() instanceof MassDriver) || !(selected.dst(x * tilesize, y * tilesize) <= range)) return;
|
||||
|
||||
// if so, draw a dotted line towards it while it is in range
|
||||
Lines.stroke(2f, Pal.placing);
|
||||
Lines.dashLine(x * tilesize, y * tilesize, selected.drawx(), selected.drawy(), (int)range / tilesize / 4);
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user