Fix QuickGear #59

Zusammengeführt
Lixfel hat 1 Commits von fix-quickgear nach master 2023-11-29 16:31:47 +01:00 zusammengeführt

Datei anzeigen

@ -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<String, SchematicType> fromDB;
private static final List<SchematicType> 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;
}