-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build out basic structure for doubly-embedded items
- Loading branch information
Showing
16 changed files
with
141 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
import { EquipmentSystemData, EquipmentSystemSource } from "@item/equipment/data.ts"; | ||
import { BasePhysicalItemSource } from "@item/physical/data.ts"; | ||
import { EquipmentTrait } from "@item/equipment/data.ts"; | ||
import { | ||
BasePhysicalItemSource, | ||
PhysicalItemTraits, | ||
PhysicalSystemData, | ||
PhysicalSystemSource, | ||
} from "@item/physical/data.ts"; | ||
|
||
type BookSource = BasePhysicalItemSource<"book", BookSystemSource>; | ||
type BookTraits = PhysicalItemTraits<EquipmentTrait>; | ||
|
||
type BookSystemSource = EquipmentSystemSource & { | ||
interface BookSystemSource extends PhysicalSystemSource { | ||
traits: BookTraits; | ||
category: "formula" | "spell"; | ||
capacity: number; | ||
} & (FormulaBookData | SpellBookData); | ||
|
||
type BookSystemData = Omit<BookSystemSource, "hp" | "price"> & EquipmentSystemData; | ||
|
||
interface FormulaBookData { | ||
subtype: "formula"; | ||
item: ItemUUID[]; | ||
contents: ItemUUID[]; | ||
} | ||
|
||
interface SpellBookData { | ||
subtype: "spell"; | ||
item: object[]; | ||
} | ||
interface BookSystemData extends Omit<BookSystemSource, SourceOmission>, PhysicalSystemData {} | ||
|
||
type SourceOmission = "bulk" | "hp" | "identification" | "material" | "price" | "temporary" | "traits" | "usage"; | ||
|
||
export type { BookSource, BookSystemData }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.