From abdc3ee33c1de6e4faafb4c50e42d27d118019db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D1=80=D0=BA=D0=BD=D0=B5=D1=81=D1=81=233729?= <79508138+Darkness6030@users.noreply.github.com> Date: Thu, 20 Oct 2022 22:31:06 +0300 Subject: [PATCH] isBanned() check on canCreate() (#7745) --- core/src/mindustry/entities/Units.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/entities/Units.java b/core/src/mindustry/entities/Units.java index ef747c8ad0..1a5d024b1c 100644 --- a/core/src/mindustry/entities/Units.java +++ b/core/src/mindustry/entities/Units.java @@ -93,7 +93,7 @@ public class Units{ /** @return whether a new instance of a unit of this team can be created. */ public static boolean canCreate(Team team, UnitType type){ - return team.data().countType(type) < getCap(team); + return team.data().countType(type) < getCap(team) && !type.isBanned(); } public static int getCap(Team team){