Made team a separate class

This commit is contained in:
Anuken
2019-12-25 19:07:04 -05:00
parent 8ac0949ddf
commit 9016c12d16
26 changed files with 86 additions and 85 deletions

View File

@@ -74,7 +74,7 @@ public class EditorTile extends Tile{
return;
}
if(getTeamID() == team.ordinal()) return;
if(getTeamID() == (int) team.id) return;
op(OpType.team, getTeamID());
super.setTeam(team);
}

View File

@@ -141,7 +141,7 @@ public enum EditorTool{
if(tile.link().synthetic()){
Team dest = tile.getTeam();
if(dest == editor.drawTeam) return;
fill(editor, x, y, false, t -> t.getTeamID() == dest.ordinal() && t.link().synthetic(), t -> t.setTeam(editor.drawTeam));
fill(editor, x, y, false, t -> t.getTeamID() == (int) dest.id && t.link().synthetic(), t -> t.setTeam(editor.drawTeam));
}
}
}

View File

@@ -415,7 +415,7 @@ public class MapGenerateDialog extends FloatingDialog{
this.floor = floor.id;
this.block = wall.id;
this.ore = ore.id;
this.team = (byte)team.ordinal();
this.team = (byte) (int) team.id;
this.rotation = (byte)rotation;
}