Added building privacy toggle

This commit is contained in:
Light2
2014-06-09 19:16:23 +02:00
parent 69ba63fcd2
commit bd596c0fce
2 changed files with 10 additions and 1 deletions
@@ -40,6 +40,14 @@ def handleSelection(core, owner, target, option):
if owner is not None:
core.housingService.createStatusSUIPage(owner,target)
return
if option == 125:
if owner is not None and owner.getGrandparent():
building = owner.getGrandparent()
if building.getPrivacy() == 0:
building.setPrivacy(1)
elif building.getPrivacy() == 1:
building.setPrivacy(0)
return
if option == 129:
if owner is not None:
core.housingService.createPayMaintenanceSUIPage(owner,target)
@@ -244,7 +244,8 @@ public class BuildingObject extends TangibleObject implements IPersistent, Seria
}
public void setPrivacy(byte privacy) {
otherVariables.set("residency", privacy);
otherVariables.set("privacy", privacy);
getObservers().stream().map(Client::getParent).forEach(this::updateCellPermissions);
}
public Vector<TangibleObject> getItemsList() {