From ac7c3acbb8de683dcdb25e5a24a4cfe15e379194 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Wed, 29 Nov 2023 16:27:20 +0100 Subject: [PATCH] Fix QuickGear --- src/de/steamwar/sql/SchematicType.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/de/steamwar/sql/SchematicType.java b/src/de/steamwar/sql/SchematicType.java index 43cfb44..0ee483a 100644 --- a/src/de/steamwar/sql/SchematicType.java +++ b/src/de/steamwar/sql/SchematicType.java @@ -26,7 +26,7 @@ import java.util.*; public class SchematicType { - public static final SchematicType Normal = new SchematicType("Normal", "", Type.NORMAL, null, "STONE_BUTTON"); + public static final SchematicType Normal = new SchematicType("Normal", "", Type.NORMAL, null, "STONE_BUTTON", false); private static final Map fromDB; private static final List types; @@ -60,25 +60,31 @@ public class SchematicType { private final String material; @Getter private final Date deadline; + @Getter + private final boolean manualCheck; - SchematicType(String name, String kuerzel, Type type, SchematicType checkType, String material){ - this(name, kuerzel, type, checkType, material, null); + SchematicType(String name, String kuerzel, Type type, SchematicType checkType, String material, boolean manualCheck){ + this(name, kuerzel, type, checkType, material, null, manualCheck); } - SchematicType(String name, String kuerzel, Type type, SchematicType checkType, String material, Date deadline){ + SchematicType(String name, String kuerzel, Type type, SchematicType checkType, String material, Date deadline, boolean manualCheck){ this.name = name; this.kuerzel = kuerzel; this.type = type; this.checkType = checkType; this.material = material; this.deadline = deadline; + this.manualCheck = manualCheck; } public boolean isAssignable(){ - return type == Type.NORMAL || (type == Type.FIGHT_TYPE && checkType != null); + return type == Type.NORMAL || (type == Type.FIGHT_TYPE && checkType != null) || !manualCheck; } public SchematicType checkType(){ + if (!manualCheck) { + return this; + } return checkType; }