forked from foundryvtt/pf2e
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configurability of whether a granted feat/feature should be visua…
…lly nested (foundryvtt#17378)
- Loading branch information
Showing
5 changed files
with
51 additions
and
27 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,29 +1,31 @@ | ||
import type { SlugField, StrictArrayField } from "@system/schema-data-fields.ts"; | ||
import type { BooleanField, EmbeddedDataField, StringField } from "types/foundry/common/data/fields.d.ts"; | ||
import type * as fields from "types/foundry/common/data/fields.d.ts"; | ||
import type { RuleElementSchema } from "../data.ts"; | ||
import type { ItemAlteration } from "../item-alteration/alteration.ts"; | ||
|
||
type GrantItemSchema = RuleElementSchema & { | ||
/** The UUID of the item to grant: must be a compendium or world item */ | ||
uuid: StringField<string, string, true, false, false>; | ||
uuid: fields.StringField<string, string, true, false, false>; | ||
/** A flag for referencing the granted item ID in other rule elements */ | ||
flag: SlugField<true, true, true>; | ||
/** Permit this grant to be applied during an actor update--if it isn't already granted and the predicate passes */ | ||
reevaluateOnUpdate: BooleanField<boolean, boolean, false, false, true>; | ||
reevaluateOnUpdate: fields.BooleanField<boolean, boolean, false, false, true>; | ||
/** | ||
* Instead of creating a new item in the actor's embedded collection, add a "virtual" one. Usable only with | ||
* conditions | ||
*/ | ||
inMemoryOnly: BooleanField<boolean, boolean, false, false, true>; | ||
inMemoryOnly: fields.BooleanField<boolean, boolean, false, false, true>; | ||
/** Allow multiple of the same item (as determined by source ID) to be granted */ | ||
allowDuplicate: BooleanField<boolean, boolean, false, false, true>; | ||
allowDuplicate: fields.BooleanField<boolean, boolean, false, false, true>; | ||
/** Visually nest this granted item under its granter: only applies to feats and features */ | ||
nestUnderGranter: fields.BooleanField<boolean, boolean, false, false, false>; | ||
/** A list of alterations to make on the item before granting it */ | ||
alterations: StrictArrayField<EmbeddedDataField<ItemAlteration>>; | ||
alterations: StrictArrayField<fields.EmbeddedDataField<ItemAlteration>>; | ||
/** | ||
* Track a granted physical item from roll options: the sluggified `flag` will serve as a prefix for item roll | ||
* options, which are added to the `all` domain. | ||
*/ | ||
track: BooleanField<boolean, boolean, false, false, false>; | ||
track: fields.BooleanField<boolean, boolean, false, false, false>; | ||
}; | ||
|
||
export type { GrantItemSchema }; |