diff --git a/scripts/radial/structure/structure_management_terminal.py b/scripts/radial/structure/structure_management_terminal.py index 0c227cce..efad7fef 100644 --- a/scripts/radial/structure/structure_management_terminal.py +++ b/scripts/radial/structure/structure_management_terminal.py @@ -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) diff --git a/src/resources/objects/building/BuildingObject.java b/src/resources/objects/building/BuildingObject.java index 916bfff7..af7dab08 100644 --- a/src/resources/objects/building/BuildingObject.java +++ b/src/resources/objects/building/BuildingObject.java @@ -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 getItemsList() {