Project cleanup pre merge.
This commit is contained in:
@@ -11,45 +11,43 @@ import org.pmw.tinylog.Logger;
|
||||
*/
|
||||
public class UpgradeBuildingJob extends AbstractScheduleJob {
|
||||
|
||||
private final Building rankingBuilding;
|
||||
private final Building rankingBuilding;
|
||||
|
||||
public UpgradeBuildingJob(Building building) {
|
||||
super();
|
||||
this.rankingBuilding = building;
|
||||
public UpgradeBuildingJob(Building building) {
|
||||
super();
|
||||
this.rankingBuilding = building;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doJob() {
|
||||
@Override
|
||||
protected void doJob() {
|
||||
|
||||
|
||||
// Must have a building to rank!
|
||||
|
||||
// Must have a building to rank!
|
||||
if (rankingBuilding == null) {
|
||||
Logger.error("Attempting to rank null building");
|
||||
return;
|
||||
}
|
||||
|
||||
if (rankingBuilding == null) {
|
||||
Logger.error("Attempting to rank null building");
|
||||
return;
|
||||
}
|
||||
// Make sure the building is currently set to upgrade
|
||||
// (Duplicate job sanity check)
|
||||
|
||||
// Make sure the building is currently set to upgrade
|
||||
// (Duplicate job sanity check)
|
||||
if (rankingBuilding.isRanking() == false)
|
||||
return;
|
||||
|
||||
if (rankingBuilding.isRanking() == false)
|
||||
return;
|
||||
// SetCurrentRank also changes the mesh and maxhp
|
||||
// accordingly for buildings with blueprints
|
||||
|
||||
// SetCurrentRank also changes the mesh and maxhp
|
||||
// accordingly for buildings with blueprints
|
||||
rankingBuilding.setRank(rankingBuilding.getRank() + 1);
|
||||
|
||||
rankingBuilding.setRank(rankingBuilding.getRank() + 1);
|
||||
|
||||
// Reload the object
|
||||
// Reload the object
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void _cancelJob() {
|
||||
}
|
||||
@Override
|
||||
protected void _cancelJob() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user