mortage house interaction

This commit is contained in:
Johannes Schmelz
2024-12-03 11:37:36 +01:00
parent 0acb23ab8b
commit 09ea8a046e
3 changed files with 18 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ import pp.monopoly.client.gui.SettingsMenu;
import pp.monopoly.game.server.Player;
import pp.monopoly.message.client.AlterProperty;
import pp.monopoly.model.fields.BoardManager;
import pp.monopoly.model.fields.BuildingProperty;
import pp.monopoly.model.fields.PropertyField;
import pp.monopoly.model.fields.PropertyField;
import pp.monopoly.notification.Sound;
@@ -157,6 +158,11 @@ public class TakeMortage extends Dialog {
// Populate the dropdown with property names
for (PropertyField property : playerProperties) {
if(property instanceof BuildingProperty) {
if (((BuildingProperty)property).getHouses()!=0) {
break;
}
}
propertyOptions.add(property.getName());
}