mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-09-22 22:28:22 +03:00
add message for bootleg ic cards
This commit is contained in:
@@ -54,7 +54,9 @@ function PhysicalICInfo(props: { physicalCard: AMPhysicalCardData | null }) {
|
||||
return (
|
||||
<AMUICardDetail>
|
||||
<Joystick size={18} color="gray"/>
|
||||
<Text style={{color: "gray"}}>{ICVendorName(props.physicalCard.cardVendor)}</Text>
|
||||
<Text style={{color: "gray"}}>
|
||||
{props.physicalCard.isBootlegAmusementCard ? "Bootleg " : null}{ICVendorName(props.physicalCard.cardVendor)}
|
||||
</Text>
|
||||
</AMUICardDetail>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -63,6 +63,11 @@ export class AMPhysicalCardData extends Realm.Object<AMPhysicalCardData> {
|
||||
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",
|
||||
|
||||
Reference in New Issue
Block a user