Skip to content

Commit

Permalink
fixed some typos in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dloe committed Sep 12, 2024
1 parent 4c6b54b commit 52ec92a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion core/src/mindustry/entities/comp/BuildingComp.java
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ public void transferLiquid(Building next, float amount, Liquid liquid){
* @param liquid
* @return output flow
*/
public float moveLiquidForwardDummy(Liquid liquid) {
public float moveLiquidForwardDummy(Liquid liquid){
Tile next = tile.nearby(rotation);
Building nextB;
if(next == null) return 0;
Expand Down
45 changes: 21 additions & 24 deletions tests/src/test/java/ApplicationTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ void runBossWave(){
}
}

/** Start wave and check if we have enemies and we are no longer in prep phase */
/** Start wave and check if we have enemies, and we are no longer in prep phase */
@Test
void WavesActiveStateTest(){
world.loadMap(testMap);
Expand All @@ -336,7 +336,7 @@ void WavesActiveStateTest(){
assertFalse(Groups.unit.isEmpty(), "Enemies spawned.");
}

/** Checking for Wave countdown state (aka our wavetimer before the wave starts) */
/** Checking for Wave countdown state (aka our wave timer before the wave starts) */
@Test
void WaveCountdownStateTest(){
world.loadMap(testMap);
Expand All @@ -346,7 +346,7 @@ void WaveCountdownStateTest(){
Time.update();
Time.update();
Groups.unit.update();
//check if we do not have any enemies spawning and we have a Wave Timer active
//check if we do not have any enemies spawning, and we have a Wave Timer active
//waveTimer (if true we have a wavetime aka (int)(state.wavetime/60)
assertFalse(Groups.unit.isEmpty() && !state.rules.waveTimer, "Wave Countdown Active.");
}
Expand Down Expand Up @@ -468,7 +468,7 @@ void createMap(){
world.endMapLoad();
}

/** Creates a map (8 by 8 tileset) and assigns a new coreShard building to cordinates 4,4. Then Verifies block is created successfully */
/** Creates a map (8 by 8 tileset) and assigns a new coreShard building to coordinates 4,4. Then Verifies block is created successfully */
@Test
void multiblock(){
createMap();
Expand Down Expand Up @@ -550,7 +550,7 @@ void itemModuleByItemCoal(){

/** Add an item and use different method of removing. Remove items by ItemStack */
@Test
void iitemStackRemoveAndVerifyCheck(){
void itemStackRemoveAndVerifyCheck(){
multiblock();
Tile tile = world.tile(1, 1);
world.tile(1, 1).setBlock(Blocks.coreShard, Team.sharded, 0);
Expand Down Expand Up @@ -898,7 +898,7 @@ void liquidJunctionOutputTestability(){
}

assertTrue(tank.build.liquids.currentAmount() >= 1, "Liquid not moved through junction");
assertTrue(tank.build.liquids.current() == Liquids.water, "Tank has no water");
assertSame(tank.build.liquids.current(), Liquids.water, "Tank has no water");
}


Expand All @@ -914,8 +914,8 @@ void mockVerifyLogicGameStateReset(){
int waveCount = 0;
testMap = maps.loadInternalMap("nuclearComplex");
world.loadMap(testMap);
//trigger and surpass boss wave so we can meet parameters of a sector capture status
//Any time game state is updated, it must be reset properly and that requires reset to run
//trigger and surpass boss wave, so we can meet parameters of a sector capture status
//Any time game state is updated, it must be reset properly and that requires a reset to run
//Involves calling an event to clear timers, stats and other info that needs to be updated
while (waveCount < 100){
logic.runWave();
Expand All @@ -940,7 +940,7 @@ void mockVerifyLogicGameStateReset(){
Call.sectorCapture();

//make sure reset to make sure game state is properly updated and reset. any time game state is updated, it
// must be reset properly and that requires reset to run. Involves calling an event to clear timers, stats and
// must be reset properly and that requires a reset to run. Involves calling an event to clear timers, stats and
// other info that needs to be updated
verify(logMock, atLeast(1)).reset();
//ensure we return our original logic class to avoid failures in rest of test suite
Expand Down Expand Up @@ -1000,7 +1000,7 @@ void mockTurretBuildVerification(){

updateBlocks(100);

//verify the duo Building uses proper setBlock for Turent building
//verify the duo Building uses proper setBlock for turent building
verify(duoMock, atLeast(1)).setBlock(Blocks.duo, Team.sharded);
//verify that tile is not static we create (if static then we have to recache for renderer)
verify(duoMock, atLeast(0)).recache();
Expand Down Expand Up @@ -1167,10 +1167,10 @@ void sorterOutputCorrect() {
world.loadMap(testMap);
state.set(State.playing);
state.rules.limitMapArea = false;
//declaring a bunmch of different objects/buildings/tiles/etc
//declaring a bunch of different objects/buildings/tiles/etc
Tile source1 = world.rawTile(4, 0), source2 = world.rawTile(6, 0), s1conveyor = world.rawTile(4, 1),
s2conveyor = world.rawTile(6, 1), s1s2conveyor = world.rawTile(5, 1), sorter = world.rawTile(5, 2),
leftconveyor = world.rawTile(4, 2), rightconveyor = world.rawTile(6, 2), sortedconveyor = world.rawTile(5, 3),
leftConveyor = world.rawTile(4, 2), rightConveyor = world.rawTile(6, 2), sortedConveyor = world.rawTile(5, 3),
leftVault = world.rawTile(2, 2), rightVault = world.rawTile(8, 2), topVault = world.rawTile(5, 5);

source1.setBlock(Blocks.itemSource, Team.sharded);
Expand All @@ -1182,9 +1182,9 @@ void sorterOutputCorrect() {
s1s2conveyor.setBlock(Blocks.conveyor, Team.sharded, 1);
sorter.setBlock(Blocks.sorter, Team.sharded);
sorter.build.configureAny(Items.copper);
leftconveyor.setBlock(Blocks.conveyor, Team.sharded, 2);
rightconveyor.setBlock(Blocks.conveyor, Team.sharded, 0);
sortedconveyor.setBlock(Blocks.conveyor, Team.sharded, 1);
leftConveyor.setBlock(Blocks.conveyor, Team.sharded, 2);
rightConveyor.setBlock(Blocks.conveyor, Team.sharded, 0);
sortedConveyor.setBlock(Blocks.conveyor, Team.sharded, 1);
leftVault.setBlock(Blocks.vault, Team.sharded);
rightVault.setBlock(Blocks.vault, Team.sharded);
topVault.setBlock(Blocks.vault, Team.sharded);
Expand All @@ -1202,18 +1202,18 @@ void routerOutputAll() {
state.set(State.playing);
state.rules.limitMapArea = false;
Tile source1 = world.rawTile(5, 0), conveyor = world.rawTile(5, 1),
router = world.rawTile(5, 2), leftconveyor = world.rawTile(4, 2), rightconveyor = world.rawTile(6, 2),
middleconveyor = world.rawTile(5, 3), leftVault = world.rawTile(2, 2),
router = world.rawTile(5, 2), leftConveyor = world.rawTile(4, 2), rightConveyor = world.rawTile(6, 2),
middleConveyor = world.rawTile(5, 3), leftVault = world.rawTile(2, 2),
rightVault = world.rawTile(8, 2), topVault = world.rawTile(5, 5);

source1.setBlock(Blocks.itemSource, Team.sharded);
source1.build.configureAny(Items.coal);
conveyor.setBlock(Blocks.conveyor, Team.sharded, 1);
router.setBlock(Blocks.router, Team.sharded);
router.build.configureAny(Items.coal);
leftconveyor.setBlock(Blocks.conveyor, Team.sharded, 2);
rightconveyor.setBlock(Blocks.conveyor, Team.sharded, 0);
middleconveyor.setBlock(Blocks.conveyor, Team.sharded, 1);
leftConveyor.setBlock(Blocks.conveyor, Team.sharded, 2);
rightConveyor.setBlock(Blocks.conveyor, Team.sharded, 0);
middleConveyor.setBlock(Blocks.conveyor, Team.sharded, 1);
leftVault.setBlock(Blocks.vault, Team.sharded);
rightVault.setBlock(Blocks.vault, Team.sharded);
topVault.setBlock(Blocks.vault, Team.sharded);
Expand Down Expand Up @@ -1671,10 +1671,7 @@ void initBuilding(){
assertEquals(core.build, Team.sharded.data().core());
}

/** Test aimed at depositing item into given block. Gets run in test factories.
* @param block
* @param item
*/
/** Test aimed at depositing item into given block. Gets run in test factories. */
void depositTest(Block block, Item item){
Unit unit = UnitTypes.mono.create(Team.sharded);
Tile tile = new Tile(0, 0, Blocks.air, Blocks.air, block);
Expand Down

0 comments on commit 52ec92a

Please sign in to comment.