mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-04 06:28:51 +00:00
tweak: disable occupation system
This commit is contained in:
1 file changed
+18
-18
@@ -36,27 +36,27 @@ public class Occupation {
|
|||||||
if (isOccupied(town)) return;
|
if (isOccupied(town)) return;
|
||||||
|
|
||||||
// Remove from current nation
|
// Remove from current nation
|
||||||
final boolean hasPreviousNation = town.hasNation();
|
// final boolean hasPreviousNation = town.hasNation();
|
||||||
final boolean hasNewNation = occupier != null;
|
// final boolean hasNewNation = occupier != null;
|
||||||
final Nation previousNation = town.getNationOrNull();
|
// final Nation previousNation = town.getNationOrNull();
|
||||||
if (hasPreviousNation && hasNewNation && previousNation != occupier)
|
// if (hasPreviousNation && hasNewNation && previousNation != occupier)
|
||||||
town.removeNation();
|
// town.removeNation();
|
||||||
|
|
||||||
// Put town into occupiers nation
|
// // Put town into occupiers nation
|
||||||
try {
|
// try {
|
||||||
if (hasNewNation)
|
// if (hasNewNation)
|
||||||
town.setNation(occupier);
|
// town.setNation(occupier);
|
||||||
} catch (AlreadyRegisteredException e) {
|
// } catch (AlreadyRegisteredException e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
town.setConquered(true);
|
town.setConquered(true);
|
||||||
|
|
||||||
town.save();
|
town.save();
|
||||||
if (hasNewNation)
|
// if (hasNewNation)
|
||||||
occupier.save();
|
// occupier.save();
|
||||||
|
//
|
||||||
if (hasPreviousNation && previousNation != occupier)
|
// if (hasPreviousNation && previousNation != occupier)
|
||||||
previousNation.save();
|
// previousNation.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user