diff --git a/core/assets-raw/sprites/units/power-cell.png b/core/assets-raw/sprites/units/power-cell.png index dfbc73a20b..04a09f93f3 100644 Binary files a/core/assets-raw/sprites/units/power-cell.png and b/core/assets-raw/sprites/units/power-cell.png differ diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index a393226b23..f7e4ac45a6 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -837,9 +837,10 @@ block.container.name = Container block.launch-pad.name = Launch Pad block.launch-pad-large.name = Large Launch Pad team.blue.name = blue -team.red.name = red +team.crux.name = red +team.sharded.name = orange team.orange.name = orange -team.none.name = gray +team.derelict.name = derelict team.green.name = green team.purple.name = purple unit.spirit.name = Spirit Repair Drone diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index f58f65dd4c..ff21c9b274 100644 Binary files a/core/assets/sprites/sprites.png and b/core/assets/sprites/sprites.png differ diff --git a/core/src/io/anuke/mindustry/Vars.java b/core/src/io/anuke/mindustry/Vars.java index 8d9a4e0c5f..183eb56a0c 100644 --- a/core/src/io/anuke/mindustry/Vars.java +++ b/core/src/io/anuke/mindustry/Vars.java @@ -42,9 +42,9 @@ public class Vars{ /** maximum distance between mine and core that supports automatic transferring */ public static final float mineTransferRange = 220f; /** team of the player by default */ - public static final Team defaultTeam = Team.blue; + public static final Team defaultTeam = Team.sharded; /** team of the enemy in waves/sectors */ - public static final Team waveTeam = Team.red; + public static final Team waveTeam = Team.crux; /** whether to enable editing of units in the editor */ public static final boolean enableUnitEditing = false; /** max chat message length */ diff --git a/core/src/io/anuke/mindustry/ai/BlockIndexer.java b/core/src/io/anuke/mindustry/ai/BlockIndexer.java index 71a79a262c..8a7b70717b 100644 --- a/core/src/io/anuke/mindustry/ai/BlockIndexer.java +++ b/core/src/io/anuke/mindustry/ai/BlockIndexer.java @@ -219,7 +219,7 @@ public class BlockIndexer{ } private void process(Tile tile){ - if(tile.block().flags.size() > 0 && tile.getTeam() != Team.none){ + if(tile.block().flags.size() > 0 && tile.getTeam() != Team.derelict){ ObjectSet[] map = getFlagged(tile.getTeam()); for(BlockFlag flag : tile.block().flags){ diff --git a/core/src/io/anuke/mindustry/content/Mechs.java b/core/src/io/anuke/mindustry/content/Mechs.java index 801029bae9..c79f3ee6fa 100644 --- a/core/src/io/anuke/mindustry/content/Mechs.java +++ b/core/src/io/anuke/mindustry/content/Mechs.java @@ -32,6 +32,7 @@ public class Mechs implements ContentList{ mineSpeed = 1.5f; mass = 1.2f; speed = 0.5f; + itemCapacity = 40; boostSpeed = 0.95f; buildPower = 1.2f; engineColor = Color.valueOf("ffd37f"); @@ -151,7 +152,7 @@ public class Mechs implements ContentList{ { drillPower = 2; mineSpeed = 1.5f; - itemCapacity = 50; + itemCapacity = 80; speed = 0.36f; boostSpeed = 0.6f; mass = 4f; diff --git a/core/src/io/anuke/mindustry/editor/EditorTile.java b/core/src/io/anuke/mindustry/editor/EditorTile.java index 0e6f0d28f3..6d627399df 100644 --- a/core/src/io/anuke/mindustry/editor/EditorTile.java +++ b/core/src/io/anuke/mindustry/editor/EditorTile.java @@ -115,7 +115,7 @@ public class EditorTile extends Tile{ return; } - super.setTeam(Team.none); + super.setTeam(Team.derelict); } @Override diff --git a/core/src/io/anuke/mindustry/editor/MapEditor.java b/core/src/io/anuke/mindustry/editor/MapEditor.java index 466f513318..e5f7a9bc69 100644 --- a/core/src/io/anuke/mindustry/editor/MapEditor.java +++ b/core/src/io/anuke/mindustry/editor/MapEditor.java @@ -32,7 +32,7 @@ public class MapEditor{ public int brushSize = 1; public int rotation; public Block drawBlock = Blocks.stone; - public Team drawTeam = Team.blue; + public Team drawTeam = Team.sharded; public StringMap getTags(){ return tags; diff --git a/core/src/io/anuke/mindustry/editor/MapEditorDialog.java b/core/src/io/anuke/mindustry/editor/MapEditorDialog.java index 8dba94e9ea..fe396b5ece 100644 --- a/core/src/io/anuke/mindustry/editor/MapEditorDialog.java +++ b/core/src/io/anuke/mindustry/editor/MapEditorDialog.java @@ -538,6 +538,11 @@ public class MapEditorDialog extends Dialog implements Disposable{ mid.table("underline", t -> { Slider slider = new Slider(0, MapEditor.brushSizes.length - 1, 1, false); slider.moved(f -> editor.brushSize = MapEditor.brushSizes[(int)(float)f]); + for(int j = 0; j < MapEditor.brushSizes.length; j++){ + if(MapEditor.brushSizes[j] == editor.brushSize){ + slider.setValue(j); + } + } t.top(); t.add("$editor.brush"); diff --git a/core/src/io/anuke/mindustry/editor/MapGenerateDialog.java b/core/src/io/anuke/mindustry/editor/MapGenerateDialog.java index 545cc4004e..a639dd36b3 100644 --- a/core/src/io/anuke/mindustry/editor/MapGenerateDialog.java +++ b/core/src/io/anuke/mindustry/editor/MapGenerateDialog.java @@ -394,10 +394,10 @@ public class MapGenerateDialog extends FloatingDialog{ //get result from buffer1 if there's filters left, otherwise get from editor directly if(filters.isEmpty()){ Tile tile = editor.tile(px * scaling, py * scaling); - color = MapIO.colorFor(tile.floor(), tile.block(), tile.overlay(), Team.none); + color = MapIO.colorFor(tile.floor(), tile.block(), tile.overlay(), Team.derelict); }else{ GenTile tile = buffer1[px][py]; - color = MapIO.colorFor(content.block(tile.floor), content.block(tile.block), content.block(tile.ore), Team.none); + color = MapIO.colorFor(content.block(tile.floor), content.block(tile.block), content.block(tile.ore), Team.derelict); } pixmap.drawPixel(px, pixmap.getHeight() - 1 - py, color); } diff --git a/core/src/io/anuke/mindustry/entities/Damage.java b/core/src/io/anuke/mindustry/entities/Damage.java index 474a9747e4..9b75085b0f 100644 --- a/core/src/io/anuke/mindustry/entities/Damage.java +++ b/core/src/io/anuke/mindustry/entities/Damage.java @@ -35,7 +35,7 @@ public class Damage{ public static void dynamicExplosion(float x, float y, float flammability, float explosiveness, float power, float radius, Color color){ for(int i = 0; i < Mathf.clamp(power / 20, 0, 6); i++){ int branches = 5 + Mathf.clamp((int)(power / 30), 1, 20); - Time.run(i * 2f + Mathf.random(4f), () -> Lightning.create(Team.none, Pal.power, 3, + Time.run(i * 2f + Mathf.random(4f), () -> Lightning.create(Team.derelict, Pal.power, 3, x, y, Mathf.random(360f), branches + Mathf.range(2))); } diff --git a/core/src/io/anuke/mindustry/entities/Units.java b/core/src/io/anuke/mindustry/entities/Units.java index b4b6ea115b..75bc44dede 100644 --- a/core/src/io/anuke/mindustry/entities/Units.java +++ b/core/src/io/anuke/mindustry/entities/Units.java @@ -79,7 +79,7 @@ public class Units{ /** Returns the neareset enemy tile in a range. */ public static TileEntity findEnemyTile(Team team, float x, float y, float range, Predicate pred){ - if(team == Team.none) return null; + if(team == Team.derelict) return null; for(Team enemy : state.teams.enemiesOf(team)){ TileEntity entity = world.indexer.findTile(enemy, x, y, range, pred); @@ -102,7 +102,7 @@ public class Units{ /** Returns the closest target enemy. First, units are checked, then tile entities. */ public static TargetTrait closestTarget(Team team, float x, float y, float range, Predicate unitPred, Predicate tilePred){ - if(team == Team.none) return null; + if(team == Team.derelict) return null; Unit unit = closestEnemy(team, x, y, range, unitPred); if(unit != null){ @@ -114,7 +114,7 @@ public class Units{ /** Returns the closest enemy of this team. Filter by predicate. */ public static Unit closestEnemy(Team team, float x, float y, float range, Predicate predicate){ - if(team == Team.none) return null; + if(team == Team.derelict) return null; result = null; cdist = 0f; diff --git a/core/src/io/anuke/mindustry/entities/bullet/Bullet.java b/core/src/io/anuke/mindustry/entities/bullet/Bullet.java index 4060376c14..afe97b5399 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/Bullet.java +++ b/core/src/io/anuke/mindustry/entities/bullet/Bullet.java @@ -83,7 +83,7 @@ public class Bullet extends SolidEntity implements DamageTrait, ScaleTrait, Pool /** Internal use only. */ @Remote(called = Loc.server, unreliable = true) public static void createBullet(BulletType type, float x, float y, float angle){ - create(type, null, Team.none, x, y, angle); + create(type, null, Team.derelict, x, y, angle); } /** ok */ diff --git a/core/src/io/anuke/mindustry/entities/type/Player.java b/core/src/io/anuke/mindustry/entities/type/Player.java index 4dabc652c4..a17da18801 100644 --- a/core/src/io/anuke/mindustry/entities/type/Player.java +++ b/core/src/io/anuke/mindustry/entities/type/Player.java @@ -715,10 +715,10 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{ if(target == null){ isShooting = false; if(Core.settings.getBool("autotarget")){ - target = Units.closestTarget(team, x, y, getWeapon().bullet.range(), u -> u.getTeam() != Team.none, u -> u.getTeam() != Team.none); + target = Units.closestTarget(team, x, y, getWeapon().bullet.range(), u -> u.getTeam() != Team.derelict, u -> u.getTeam() != Team.derelict); if(mech.canHeal && target == null){ - target = Geometry.findClosest(x, y, world.indexer.getDamaged(Team.blue)); + target = Geometry.findClosest(x, y, world.indexer.getDamaged(Team.sharded)); if(target != null && dst(target) > getWeapon().bullet.range()){ target = null; }else if(target != null){ @@ -771,7 +771,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{ public void resetNoAdd(){ status.clear(); - team = Team.blue; + team = Team.sharded; item.amount = 0; placeQueue.clear(); dead = true; diff --git a/core/src/io/anuke/mindustry/entities/type/Unit.java b/core/src/io/anuke/mindustry/entities/type/Unit.java index 53397352f8..22fff0524f 100644 --- a/core/src/io/anuke/mindustry/entities/type/Unit.java +++ b/core/src/io/anuke/mindustry/entities/type/Unit.java @@ -45,7 +45,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ protected final Statuses status = new Statuses(); protected final ItemStack item = new ItemStack(content.item(0), 0); - protected Team team = Team.blue; + protected Team team = Team.sharded; protected float drownTime, hitTime; @Override diff --git a/core/src/io/anuke/mindustry/game/Team.java b/core/src/io/anuke/mindustry/game/Team.java index a5193e48b2..faa28ea081 100644 --- a/core/src/io/anuke/mindustry/game/Team.java +++ b/core/src/io/anuke/mindustry/game/Team.java @@ -2,14 +2,15 @@ package io.anuke.mindustry.game; import io.anuke.arc.Core; import io.anuke.arc.graphics.Color; +import io.anuke.mindustry.graphics.*; public enum Team{ - none(Color.valueOf("4d4e58")), - blue(Color.valueOf("4169e1")), - red(Color.valueOf("e84737")), - green(Color.valueOf("1dc645")), - purple(Color.valueOf("ba5bd9")), - orange(Color.valueOf("e8c66a")); + derelict(Color.valueOf("4d4e58")), + sharded(Pal.accent), + crux(Color.valueOf("e82d2d")), + green(Color.valueOf("3ea56b")), + purple(Color.valueOf("8247b6")), + blue(Color.valueOf("ff7f50")); public final static Team[] all = values(); public final Color color; diff --git a/core/src/io/anuke/mindustry/io/LegacyMapIO.java b/core/src/io/anuke/mindustry/io/LegacyMapIO.java index 2c65b1f2e7..d948fbee19 100644 --- a/core/src/io/anuke/mindustry/io/LegacyMapIO.java +++ b/core/src/io/anuke/mindustry/io/LegacyMapIO.java @@ -217,14 +217,14 @@ public class LegacyMapIO{ if(Structs.inBounds(worldx, worldy, pixmap.getWidth(), pixmap.getHeight())){ Tile write = tiles[worldx][worldy]; write.setBlock(BlockPart.get(dx - 1, dy - 1)); - write.setTeam(Team.blue); + write.setTeam(Team.sharded); } } } //actual core parts tile.setBlock(Blocks.coreShard); - tile.setTeam(Team.blue); + tile.setTeam(Team.sharded); } } } diff --git a/core/src/io/anuke/mindustry/io/MapIO.java b/core/src/io/anuke/mindustry/io/MapIO.java index 066d87d488..722dcaae8b 100644 --- a/core/src/io/anuke/mindustry/io/MapIO.java +++ b/core/src/io/anuke/mindustry/io/MapIO.java @@ -112,9 +112,9 @@ public class MapIO{ @Override public Tile create(int x, int y, int floorID, int overlayID, int wallID){ if(overlayID != 0){ - floors.drawPixel(x, floors.getHeight() - 1 - y, colorFor(Blocks.air, Blocks.air, content.block(overlayID), Team.none)); + floors.drawPixel(x, floors.getHeight() - 1 - y, colorFor(Blocks.air, Blocks.air, content.block(overlayID), Team.derelict)); }else{ - floors.drawPixel(x, floors.getHeight() - 1 - y, colorFor(content.block(floorID), Blocks.air, Blocks.air, Team.none)); + floors.drawPixel(x, floors.getHeight() - 1 - y, colorFor(content.block(floorID), Blocks.air, Blocks.air, Team.derelict)); } if(content.block(overlayID) == Blocks.spawn){ map.spawns ++; diff --git a/core/src/io/anuke/mindustry/world/Tile.java b/core/src/io/anuke/mindustry/world/Tile.java index f46178f1d4..b0738925c3 100644 --- a/core/src/io/anuke/mindustry/world/Tile.java +++ b/core/src/io/anuke/mindustry/world/Tile.java @@ -299,7 +299,7 @@ public class Tile implements Position, TargetTrait{ } public boolean interactable(Team team){ - return getTeam() == Team.none || team == getTeam(); + return getTeam() == Team.derelict || team == getTeam(); } public Item drop(){ diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/DeflectorWall.java b/core/src/io/anuke/mindustry/world/blocks/defense/DeflectorWall.java index 9730320239..2b6125fb10 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/DeflectorWall.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/DeflectorWall.java @@ -67,7 +67,7 @@ public class DeflectorWall extends Wall{ } bullet.updateVelocity(); - bullet.resetOwner(entity, Team.none); + bullet.resetOwner(entity, Team.derelict); bullet.scaleTime(1f); bullet.supress(); diff --git a/server/src/io/anuke/mindustry/server/ServerControl.java b/server/src/io/anuke/mindustry/server/ServerControl.java index e5f6ee014a..7fd9bbad75 100644 --- a/server/src/io/anuke/mindustry/server/ServerControl.java +++ b/server/src/io/anuke/mindustry/server/ServerControl.java @@ -295,7 +295,7 @@ public class ServerControl implements ApplicationListener{ info(" &lyPlaying on map &fi{0}&fb &lb/&ly Wave {1}", Strings.capitalize(world.getMap().name()), state.wave); if(state.rules.waves){ - info("&ly {0} enemies.", unitGroups[Team.red.ordinal()].size()); + info("&ly {0} enemies.", unitGroups[Team.crux.ordinal()].size()); }else{ info("&ly {0} seconds until next wave.", (int)(state.wavetime / 60)); } @@ -340,7 +340,7 @@ public class ServerControl implements ApplicationListener{ } try{ - Team team = arg.length == 0 ? Team.blue : Team.valueOf(arg[0]); + Team team = arg.length == 0 ? Team.sharded : Team.valueOf(arg[0]); if(state.teams.get(team).cores.isEmpty()){ err("That team has no cores."); @@ -627,7 +627,7 @@ public class ServerControl implements ApplicationListener{ info("&lyCore destroyed."); inExtraRound = false; - Events.fire(new GameOverEvent(Team.red)); + Events.fire(new GameOverEvent(Team.crux)); }); handler.register("info", "", "Find player info(s). Can optionally check for all names or IPs a player has had.", arg -> { diff --git a/tests/src/test/java/ApplicationTests.java b/tests/src/test/java/ApplicationTests.java index a1b9fc59d6..320d121d19 100644 --- a/tests/src/test/java/ApplicationTests.java +++ b/tests/src/test/java/ApplicationTests.java @@ -129,8 +129,8 @@ public class ApplicationTests{ createMap(); int bx = 4; int by = 4; - world.setBlock(world.tile(bx, by), Blocks.coreShard, Team.blue); - assertEquals(world.tile(bx, by).getTeam(), Team.blue); + world.setBlock(world.tile(bx, by), Blocks.coreShard, Team.sharded); + assertEquals(world.tile(bx, by).getTeam(), Team.sharded); for(int x = bx - 1; x <= bx + 1; x++){ for(int y = by - 1; y <= by + 1; y++){ if(x == bx && by == y){ @@ -250,8 +250,8 @@ public class ApplicationTests{ void buildingOverlap(){ initBuilding(); - Phantom d1 = (Phantom)UnitTypes.phantom.create(Team.blue); - Phantom d2 = (Phantom)UnitTypes.phantom.create(Team.blue); + Phantom d1 = (Phantom)UnitTypes.phantom.create(Team.sharded); + Phantom d2 = (Phantom)UnitTypes.phantom.create(Team.sharded); d1.set(10f, 20f); d2.set(10f, 20f); @@ -272,8 +272,8 @@ public class ApplicationTests{ void buildingDestruction(){ initBuilding(); - Phantom d1 = (Phantom)UnitTypes.phantom.create(Team.blue); - Phantom d2 = (Phantom)UnitTypes.phantom.create(Team.blue); + Phantom d1 = (Phantom)UnitTypes.phantom.create(Team.sharded); + Phantom d2 = (Phantom)UnitTypes.phantom.create(Team.sharded); d1.set(10f, 20f); d2.set(10f, 20f); @@ -340,16 +340,16 @@ public class ApplicationTests{ createMap(); Tile core = world.tile(5, 5); - world.setBlock(core, Blocks.coreShard, Team.blue); + world.setBlock(core, Blocks.coreShard, Team.sharded); for(Item item : content.items()){ core.entity.items.set(item, 3000); } - assertEquals(core, state.teams.get(Team.blue).cores.first()); + assertEquals(core, state.teams.get(Team.sharded).cores.first()); } void depositTest(Block block, Item item){ - BaseUnit unit = UnitTypes.spirit.create(Team.none); + BaseUnit unit = UnitTypes.spirit.create(Team.derelict); Tile tile = new Tile(0, 0, Blocks.air.id, (byte)0, block.id); int capacity = tile.block().itemCapacity;