2022-02-17 00:17:59 +01:00
|
|
|
// SPDX-FileCopyrightText: 2021 Johannes Loher
|
|
|
|
// SPDX-FileCopyrightText: 2021 Oliver Rümpelein
|
|
|
|
// SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2022-11-04 21:47:18 +01:00
|
|
|
import type { DS4 } from "../../config";
|
2022-02-17 00:17:59 +01:00
|
|
|
|
|
|
|
export interface DS4ItemDataSourceDataBase {
|
|
|
|
description: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DS4ItemDataSourceDataPhysical {
|
|
|
|
quantity: number;
|
|
|
|
price: number;
|
|
|
|
availability: keyof typeof DS4.i18n.itemAvailabilities;
|
|
|
|
storageLocation: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function isDS4ItemDataTypePhysical(input: foundry.data.ItemData["data"]): boolean {
|
|
|
|
return "quantity" in input && "price" in input && "availability" in input && "storageLocation" in input;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DS4ItemDataSourceDataEquipable {
|
|
|
|
equipped: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DS4ItemDataSourceDataProtective {
|
|
|
|
armorValue: number;
|
|
|
|
}
|