-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
94 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import SystemDataModel from "../abstract.mjs"; | ||
import { AdvancementField, IdentifierField } from "../fields.mjs"; | ||
import ItemDescriptionTemplate from "./templates/item-description.mjs"; | ||
|
||
/** | ||
* Data definition for Race items. | ||
* @mixes ItemDescriptionTemplate | ||
* | ||
* @property {string} identifier Identifier slug for this race. | ||
* @property {object[]} advancement Advancement objects for this race. | ||
*/ | ||
export default class RaceData extends SystemDataModel.mixin(ItemDescriptionTemplate) { | ||
/** @inheritdoc */ | ||
static defineSchema() { | ||
return this.mergeSchema(super.defineSchema(), { | ||
identifier: new IdentifierField({required: true, label: "DND5E.Identifier"}), | ||
advancement: new foundry.data.fields.ArrayField(new AdvancementField(), {label: "DND5E.AdvancementTitle"}) | ||
}); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<form class="{{cssClass}} flexcol" autocomplete="off"> | ||
{{!-- Item Sheet Header --}} | ||
<header class="sheet-header flexrow"> | ||
<img class="profile" src="{{item.img}}" title="{{item.name}}" data-edit="img"> | ||
|
||
<div class="header-details flexrow"> | ||
<h1 class="charname"> | ||
<input name="name" type="text" value="{{item.name}}" placeholder="{{localize 'DND5E.RaceName'}}"> | ||
</h1> | ||
|
||
<div class="item-subtitle"> | ||
<h4 class="item-type">{{itemType}}</h4> | ||
<span class="item-status">{{itemStatus}}</span> | ||
</div> | ||
|
||
<ul class="summary flexrow"> | ||
<li> | ||
<input type="text" name="system.source" value="{{system.source}}" placeholder="{{localize 'DND5E.Source'}}"> | ||
</li> | ||
</ul> | ||
</div> | ||
</header> | ||
|
||
{{!-- Item Sheet Navigation --}} | ||
<nav class="sheet-navigation tabs" data-group="primary"> | ||
<a class="item active" data-tab="description">{{localize "DND5E.Description"}}</a> | ||
<a class="item" data-tab="advancement">{{localize "DND5E.AdvancementTitle"}}</a> | ||
</nav> | ||
|
||
{{!-- Item Sheet Body --}} | ||
<section class="sheet-body"> | ||
|
||
{{!-- Description Tab --}} | ||
<div class="tab flexrow active" data-group="primary" data-tab="description"> | ||
{{editor descriptionHTML target="system.description.value" button=true editable=editable | ||
engine="prosemirror" collaborate=false}} | ||
</div> | ||
|
||
{{!-- Advancement Tab --}} | ||
{{> "dnd5e.item-advancement"}} | ||
|
||
</section> | ||
</form> |