From ff082487b5bc256c3a1d8bf19b8a27f39368ea2a Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 31 Dec 2024 20:14:48 -0600 Subject: [PATCH] mine load error --- src/engine/objects/Mine.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 4a3ad6f8..fa40fd5f 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -72,6 +72,10 @@ public class Mine extends AbstractGameObject { public Mine(ResultSet rs) throws SQLException, UnknownHostException { super(rs); + if (rs.getInt("capSize") == 0) { + throw new IllegalArgumentException("Mine creation canceled: capSize cannot be 0"); + } + this.mineType = MineProduction.getByName(rs.getString("mine_type")); int ownerUID = rs.getInt("mine_ownerUID");