Read-only component fields / Removed get/set prefix
This commit is contained in:
@@ -83,7 +83,7 @@ public class MusicControl{
|
||||
|
||||
/** Whether to play dark music.*/
|
||||
private boolean isDark(){
|
||||
if(state.teams.get(player.getTeam()).hasCore() && state.teams.get(player.getTeam()).core().healthf() < 0.85f){
|
||||
if(state.teams.get(player.team()).hasCore() && state.teams.get(player.team()).core().healthf() < 0.85f){
|
||||
//core damaged -> dark
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import arc.math.geom.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.ArcAnnotate.*;
|
||||
import arc.util.*;
|
||||
import mindustry.entities.type.*;
|
||||
import mindustry.world.blocks.storage.CoreBlock.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
@@ -102,7 +101,7 @@ public class Teams{
|
||||
}
|
||||
|
||||
public void registerCore(CoreEntity core){
|
||||
TeamData data = get(core.getTeam());
|
||||
TeamData data = get(core.team());
|
||||
//add core if not present
|
||||
if(!data.cores.contains(core)){
|
||||
data.cores.add(core);
|
||||
@@ -117,7 +116,7 @@ public class Teams{
|
||||
}
|
||||
|
||||
public void unregisterCore(CoreEntity entity){
|
||||
TeamData data = get(entity.getTeam());
|
||||
TeamData data = get(entity.team());
|
||||
//remove core
|
||||
data.cores.remove(entity);
|
||||
//unregister in active list
|
||||
|
||||
Reference in New Issue
Block a user