Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 4739 custom protomech bay does not load #4740

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions megamek/src/megamek/common/ProtomechBay.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public boolean canLoad(Entity unit) {
if (doors <= loadedThisTurn) {
result = false;
}

// Return our result.
return result;
}
Expand Down Expand Up @@ -104,14 +104,14 @@ public String toString() {
bayNumber
);
}

public static TechAdvancement techAdvancement() {
return new TechAdvancement(TECH_BASE_CLAN).setClanAdvancement(3060, 3066, 3070)
.setClanApproximate(true, false, false).setTechRating(RATING_C)
.setAvailability(RATING_X, RATING_X, RATING_D, RATING_D)
.setStaticTechLevel(SimpleTechLevel.STANDARD);
}

@Override
public TechAdvancement getTechAdvancement() {
return ProtomechBay.techAdvancement();
Expand Down
3 changes: 3 additions & 0 deletions megamek/src/megamek/common/loaders/BLKFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,10 @@ protected void addTransports(Entity e) throws EntityLoadingException {
pbi = new ParsedBayInfo(numbers, usedBayNumbers);
e.addTransporter(new Bay(pbi.getSize(), pbi.getDoors(), pbi.getBayNumber()), isPod);
break;
case "protomekbay":
// Newer custom BLK handling
case "protomechbay":
// Backward compatibility
pbi = new ParsedBayInfo(numbers, usedBayNumbers);
e.addTransporter(new ProtomechBay(pbi.getSize(), pbi.getDoors(), pbi.getBayNumber()), isPod);
break;
Expand Down