Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleet01 committed Dec 3, 2023
1 parent 9f0882d commit 188ed8b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
2 changes: 1 addition & 1 deletion megamek/src/megamek/common/MoveStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -3256,7 +3256,7 @@ public boolean isMovementPossible(Game game, Coords src, int srcEl, CachedEntity
}

// super-easy, but not any more
if (entity.isImmobile() && !entity.isBracing()){
if (entity.isImmobile() && !entity.isBracing()) {
return false;
}

Expand Down
26 changes: 0 additions & 26 deletions megamek/unittests/megamek/common/EntityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,31 +93,6 @@ public void testCalculateWeight() {
}
}

/**
* Set destroyed state on a number of mounted items matching the specified type; if
* @param e
* @param etype
* @param state
* @param count
* @return
*/
private int setDestroyedEquipment(Entity e, EquipmentType etype, boolean state, int count) {
if (count <= 0) {
count = Integer.MAX_VALUE;
}
int i = 0;
for(Mounted m: e.getMisc()) {
if (etype.equals(m.getType())) {
e.setDestroyed(state);
i++;
if (i == count) {
break;
}
}
}
return i;
}

/**
* Verify new Tank method .isImmobilizedForJump() returns correct values in
* various states. Note: vehicles cannot lose individual Jump Jets via crits,
Expand All @@ -128,7 +103,6 @@ public void testIsImmobilizedForJump() {
File f;
MechFileParser mfp;
Entity e;
int expectedWeight, computedWeight;

// Test 1/1
try {
Expand Down

0 comments on commit 188ed8b

Please sign in to comment.