Faction homes are now un-set if the territory they are set in is lost (unclaimed, or claimed by another faction), but only when someone tries to /f home or dies and would normally respawn there
This commit is contained in:
parent
8f9de1d2d5
commit
24e85e0e77
@ -95,13 +95,24 @@ public class Faction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Location getHome() {
|
public Location getHome() {
|
||||||
|
confirmValidHome();
|
||||||
return home;
|
return home;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasHome() {
|
public boolean hasHome() {
|
||||||
|
confirmValidHome();
|
||||||
return this.home != null;
|
return this.home != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void confirmValidHome() {
|
||||||
|
if (!Conf.homesMustBeInClaimedTerritory || Board.getFactionAt(new FLocation(this.home)) == this) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sendMessage("Your faction home has been un-set since it is no longer in your territory.");
|
||||||
|
this.home = null;
|
||||||
|
}
|
||||||
|
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
// Understand the types
|
// Understand the types
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user