Project cleanup pre merge.
This commit is contained in:
1 parent
134b651df8
commit
9bbdef224d
747 files changed
+99704
-101200
No files matched your search
@@ -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