From 16c0ff54c67aec7ecbe4773f368925be6c8de9b6 Mon Sep 17 00:00:00 2001 From: ppc Date: Wed, 15 Jan 2025 00:19:03 +0000 Subject: [PATCH] add message for bootleg ic cards --- amnet-native/components/ICCard.tsx | 4 +++- amnet-native/models/AMCard.ts | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/amnet-native/components/ICCard.tsx b/amnet-native/components/ICCard.tsx index 32eb260..4c5e46d 100644 --- a/amnet-native/components/ICCard.tsx +++ b/amnet-native/components/ICCard.tsx @@ -54,7 +54,9 @@ function PhysicalICInfo(props: { physicalCard: AMPhysicalCardData | null }) { return ( - {ICVendorName(props.physicalCard.cardVendor)} + + {props.physicalCard.isBootlegAmusementCard ? "Bootleg " : null}{ICVendorName(props.physicalCard.cardVendor)} + ); } diff --git a/amnet-native/models/AMCard.ts b/amnet-native/models/AMCard.ts index c46412a..430eeb1 100644 --- a/amnet-native/models/AMCard.ts +++ b/amnet-native/models/AMCard.ts @@ -63,6 +63,11 @@ export class AMPhysicalCardData extends Realm.Object { cardType: ICType; cardVendor: AmusementICVendor | null; + get isBootlegAmusementCard() { + // real cards have an IDm manufacturer code of 012E (first two bytes of the IDm or in this case, the first 4 characters) + return this.cardType === ICType.Amusement && !this.cardIDm.startsWith("012E"); + } + static schema: Realm.ObjectSchema = { name: "physicalCard", primaryKey: "cardIDm",