Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/ancestry sheets #12 #56

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
88c6fc4
chore: Fixed custom fonts
zithith Sep 27, 2024
c37424f
feat(ancestry sheets): Aded basic Ancestry sheets and advancement dat…
zithith Sep 27, 2024
38fe4db
feat(culture sheet): updated culture sheets to use prosemirror editor…
zithith Sep 28, 2024
6da5640
chore: minor item header style update
zithith Sep 28, 2024
0714a38
Merge branch 'release-0.1.0' of https://github.com/zithith/cosmere-rp…
zithith Sep 28, 2024
24d81ce
chore: post merge alignment. Updated Connection, injury, loot, path &…
zithith Sep 29, 2024
6a2c1b2
chore: item sheets tab styling alignment
zithith Sep 29, 2024
e6332a9
feat(item sheets): refactored description enrichment to base item sheets
zithith Sep 29, 2024
8a84d4c
feat(ancestry sheets): removed custom prose-mirror component
zithith Sep 29, 2024
41b43fe
Merge branch 'release-0.1.0' of https://github.com/zithith/cosmere-rp…
zithith Sep 29, 2024
13b5b84
chore: updated armor and trait items to use description placeholders
zithith Sep 29, 2024
20f663b
feat(item sheets): ancestry details tab added, with some placeholder …
zithith Sep 30, 2024
b96fe43
chore: updated missed label localisation
zithith Sep 30, 2024
7df46c8
Merge branch 'release-0.1.0' of https://github.com/zithith/cosmere-rp…
zithith Oct 2, 2024
9ad1328
feat(item sheets): updated new sheet types to include description pla…
zithith Oct 2, 2024
41f14c2
feat(item sheets): Ancestry details tab placeholders replaced with va…
zithith Oct 6, 2024
bc8d5c8
css tweaks
zithith Oct 6, 2024
3b8dcd4
Merge branch 'release-0.1.0' of https://github.com/zithith/cosmere-rp…
zithith Oct 6, 2024
d66f0cd
feat(item sheets): made item sheet tab display into a world setting
zithith Oct 7, 2024
e65b6cb
feat(item sheets): style tweaks
zithith Oct 8, 2024
60eeb7d
feat: add document ref input component
stanavdb Oct 10, 2024
7051959
feat(ancestry sheet): improve usability of advancement extra talents …
stanavdb Oct 11, 2024
e5767b1
feat(ancestry sheet): replace talent picks list with bonus talents ru…
stanavdb Oct 12, 2024
97a8dc9
Merge pull request #1 from zithith/ancestry-sheet-pr
zithith Oct 13, 2024
6dc15fa
Merge branch 'release-0.1.0' of https://github.com/zithith/cosmere-rp…
zithith Oct 13, 2024
39378bd
feat(ancestry-sheets): PR comments addressed:
zithith Oct 16, 2024
2027bbd
feat(item sheets): updated description tab to display read-only eleme…
zithith Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/declarations/foundry/client/data/abstract/client-document.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ declare function _ClientDocumentMixin<
Schema extends foundry.abstract.DataModel = foundry.abstract.DataModel,
Parent extends foundry.abstract.Document | null = null,
BaseClass extends typeof foundry.abstract.Document<Schema, Parent>,
>(base: BaseClass): Mixin<BaseClass, typeof _ClientDocument>;
>(base: BaseClass): Mixin<BaseClass, typeof ClientDocument>;

declare class _ClientDocument {
declare class ClientDocument {
/**
* A collection of Application instances which should be re-rendered whenever this document is updated.
* The keys of this object are the application ids and the values are Application instances. Each
Expand Down Expand Up @@ -40,4 +40,12 @@ declare class _ClientDocument {
* Called before {@link ClientDocument#prepareDerivedData} in {@link ClientDocument#prepareData}.
*/
public prepareDerivedData();

/**
* Create a content link for this Document.
* @param options Additional options to configure how the link is constructed.
*/
public toAnchor(
options?: Partial<TextEditor.EnrichmentAnchorOptions>,
): HTMLAnchorElement;
}
63 changes: 63 additions & 0 deletions src/declarations/foundry/common/abstract/fields.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,69 @@ declare namespace foundry {
class SetField extends ArrayField {}

class HTMLField extends StringField {}

/**
* A subclass of {@link ObjectField} which embeds some other DataModel definition as an inner object.
*/
class EmbeddedDataField extends SchemaField {
constructor(
model: typeof foundry.data.DataModel,
options?: DataFieldOptions,
context?: DataFieldContext,
);
}

/**
* A subclass of {@link ArrayField} which supports an embedded Document collection.
* Invalid elements will be dropped from the collection during validation rather than failing for the field entirely.
*/
class EmbeddedCollectionField extends ArrayField {
constructor(
element: typeof foundry.abstract.Document,
options?: DataFieldOptions,
context?: DataFieldContext,
);
}

/**
* A subclass of {@link EmbeddedDataField} which supports a single embedded Document.
*/
class EmbeddedDocumentField extends EmbeddedDataField {
constructor(
model: typeof foundry.abstract.Document,
options?: DataFieldOptions,
context?: DataFieldContext,
);
}

/**
* A subclass of {@link StringField} which provides the primary _id for a Document.
* The field may be initially null, but it must be non-null when it is saved to the database.
*/
class DocumentIdField extends StringField {}

interface DocumentUUIDFieldOptions extends StringFieldOptions {
/**
* A specific document type in CONST.ALL_DOCUMENT_TYPES required by this field
*/
type?: string;

/**
* Does this field require (or prohibit) embedded documents?
*/
embedded?: boolean;
}

/**
* A subclass of {@link StringField} which supports referencing some other Document by its UUID.
* This field may not be blank, but may be null to indicate that no UUID is referenced.
*/
class DocumentUUIDField extends StringField {
constructor(
options?: DocumentUUIDFieldOptions,
context?: DataFieldContext,
);
}
}
}
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Hooks.once('init', async () => {

Items.unregisterSheet('core', ItemSheet);
registerItemSheet(ItemType.Culture, applications.item.CultureItemSheet);
registerItemSheet(ItemType.Ancestry, applications.item.AncestrySheet);
registerItemSheet(ItemType.Path, applications.item.PathItemSheet);
registerItemSheet(
ItemType.Connection,
Expand Down
97 changes: 84 additions & 13 deletions src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,55 +267,68 @@
"Type": {
"Weapon": {
"label": "Weapon",
"label_plural": "Weapons"
"label_plural": "Weapons",
"desc_placeholder": "Edit this to describe what this weapon is & how it looks."
},
"Armor": {
"label": "Armor",
"label_plural": "Armor"
"label_plural": "Armor",
"desc_placeholder": "Edit this to describe what this armor is & how it looks."
},
"Equipment": {
"label": "Equipment",
"label_plural": "Equipment"
"label_plural": "Equipment",
"desc_placeholder": "Edit this to describe what this piece of equipment is & how it looks."
},
"Loot": {
"label": "Loot",
"label_plural": "Loot"
"label_plural": "Loot",
"desc_placeholder": "Edit this to describe the item."
},
"Ancestry": {
"label": "Ancestry",
"label_plural": "Ancestries"
"label_plural": "Ancestries",
"desc_placeholder": "Edit this to define a potential heritage for a character. Also include any special rules text for players to read."
},
"Culture": {
"label": "Culture",
"label_plural": "Cultures"
"label_plural": "Cultures",
"desc_placeholder": "Edit this to define one of the many cultures in the setting. Also include any special rules text for players to read."
},
"Path": {
"label": "Path",
"label_plural": "Paths"
"label_plural": "Paths",
"desc_placeholder": "Edit this to describe this the sorts of characters this progression path represents."
},
"Specialty": {
"label": "Specialty",
"label_plural": "Specialties"
"label_plural": "Specialties",
"desc_placeholder": "Edit this to describe the unique subset of characters this specialty represents."
},
"Talent": {
"label": "Talent",
"label_plural": "Talents"
"label_plural": "Talents",
"desc_placeholder": "Edit this to describe what this Talent does."
},
"Action": {
"label": "Action",
"label_plural": "Actions"
"label_plural": "Actions",
"desc_placeholder": "Edit this to describe what this action is and does."
},
"Trait": {
"label": "Trait",
"label_plural": "Traits"
"label_plural": "Traits",
"desc_placeholder": "Edit this to describe this trait."
},
"Injury": {
"label": "Injury",
"label_plural": "Injuries"
"label_plural": "Injuries",
"desc_placeholder": "Edit this to describe how this injury affects a character."
},
"Connection": {
"label": "Connection",
"label_plural": "Connections"
"label_plural": "Connections",
"desc_placeholder": "Edit this to create a description of the NPC and how they are connected to the character."
}
},
"Weapon": {
Expand Down Expand Up @@ -454,6 +467,7 @@
},
"AttackFlavor": "[actor] attacks with their [item].",
"Sheet": {
"Basics": "Basics",
"Tabs": {
"Description": "Description",
"Effects": "Effects",
Expand All @@ -469,6 +483,27 @@
"InitialDuration": "Initial",
"RemainingDuration": "Remaining"
},
"Ancestry": {
"Size": "Size",
"Advancement": "Advancement",
"FreePath": "Free Path",
"FreeTalents": "Free Talents",
"BonusTalents": "Bonus Talents",
"Restrictions": "Restrictions",
"PathReferencePlaceholder": "Drop a Path here to set a free path",
"TalentIdDescription": "The identifier column should hold the identifier of the talent item you want characters with this Ancestry to have access to. The path identifier can only contain letters (a-z), numbers (0-9), dashes (-), and underscores (_).",
"Component": {
"AdvancementTalentList": {
"DropTalent": "Drop a Talent here to add it to the list",
"Warning": {
"WrongType": "The dropped Document must be of type Talent"
}
},
"BonusTalents": {
"Add": "New Rule"
}
}
},
"Specialty": {
"PathId": "Path Identifier",
"PathIdDescription": "The identifier of the path this specialty belongs to. The path identifier can only contain letters (a-z), numbers (0-9), dashes (-), and underscores (_)."
Expand Down Expand Up @@ -627,6 +662,21 @@
"Edit": "Edit Effect",
"Delete": "Remove Effect",
"ToggleActive": "Toggle Active"
},
"Talents": {
"Label": "Talents",
"AcquiredAtLevel": "Acquired at Level",
"Add": "New Talent",
"Edit": "Edit Talent",
"Delete": "Remove Talent",
"Cancel": "Discard Changes",
"Submit": "Finish Editing"
},
"TalentPicks": {
"Edit": "Edit",
"Delete": "Remove",
"Cancel": "Discard Changes",
"Submit": "Finish Editing"
}
},
"Attribute": {
Expand Down Expand Up @@ -738,12 +788,29 @@
"Dice": "Dice"
}
}
},
"EditBonusTalentsRule": {
"Title": "Edit Bonus Talents Rule",
"Quantity": "Amount",
"Warning": {
"DuplicateLevel": "A rule for level {level} already exists"
}
}
},
"COMPONENT": {
"DocumentReferenceInput": {
"Placeholder": "Drop a {type} here to create a reference",
"Warning": {
"WrongType": "The dropped Document must be of type {type}",
"WrongSubtype": "The dropped {type} must be of type {subtype}"
}
}
},
"GENERIC": {
"Unknown": "Unknown",
"None": "None",
"Default": "Default",
"Document": "Document",
"Formula": "Formula",
"Value": "Value",
"Skill": "Skill",
Expand All @@ -760,6 +827,9 @@
"Mode": "Mode",
"Turns": "Turns",
"Rounds": "Rounds",
"Clear": "Clear",
"Name": "Name",
"Level": "Level",
"Button": {
"Roll": "Roll",
"Continue": "Continue",
Expand Down Expand Up @@ -800,6 +870,7 @@
},
"Item": {
"culture": "Culture",
"ancestry": "Ancestry",
"path": "Path",
"connection": "Connection",
"injury": "Injury",
Expand Down
39 changes: 28 additions & 11 deletions src/style.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
@import './style/sheets/module.scss';
@import './style/chat/module.scss';
@import './style/sidebar/combat.scss';
@import './style/dialog.scss';
@import './style/components.scss';
@import './style/module.scss';

// @import './style/chat/module.scss';
/* ----------------------------------------- */
/* Globals */
/* ----------------------------------------- */
Expand All @@ -25,6 +20,9 @@
--plotweaver-color-invest-front: #3e6abb;
--plotweaver-color-invest-back: #182845;

// --font-primary: 'Laski Sans';
// --font-h5: 'Laski-Sans';

/* ----------------------------------------- */
/* Default Generic Theme */
/* ----------------------------------------- */
Expand Down Expand Up @@ -67,36 +65,55 @@
font-family: 'Penumbra Web Pro';
font-style: normal;
font-weight: 400;
src: url('../../fonts/penumbra-web-pro/PenumbraWebPro-Serif.woff2')
format('woff2');
src: url('assets/fonts/penumbra-web-pro/PenumbraWebPro-Serif.woff')
format('woff');
}

@font-face {
font-family: 'Laski Sans';
font-style: normal;
font-weight: 400;
src: url('../../fonts/laski-sans/Laski-Sans-Regular.woff2') format('woff2');
src: url('assets/fonts/laski-sans/Laski-Sans-Regular.woff2') format('woff2');
}

@font-face {
font-family: 'Laski Sans';
font-style: normal;
font-weight: 600;
src: url('../../fonts/laski-sans/Laski-Sans-SemiBold.woff2') format('woff2');
src: url('assets/fonts/laski-sans/Laski-Sans-SemiBold.woff2')
format('woff2');
}

@font-face {
font-family: 'Laski Sans';
font-style: normal;
font-weight: 700;
src: url('../../fonts/laski-sans/Laski-Sans-Bold.woff2') format('woff2');
src: url('assets/fonts/laski-sans/Laski-Sans-Bold.woff2') format('woff2');
}

@font-face {
font-family: 'cosmere-dingbats';
src: url('https://dl.dropboxusercontent.com/scl/fi/9909gen4fd0oveyzfposx/CosmereDingbats-Regular.otf?rlkey=ig6odq9hxyo1st8kt3ujp1czz&st=72qrads3&raw=1');
}

.application h1,
span.document-name {
font-family: 'Penumbra Web Pro';
zithith marked this conversation as resolved.
Show resolved Hide resolved
font-variant: small-caps;
}

.application h4 {
font-variant: small-caps;
}

.application h5 {
font-family: 'Laski Sans';
}

.application {
font-family: 'Laski Sans';
}

em.cosmere-icon,
i.cosmere-icon {
font-family: 'cosmere-dingbats';
Expand Down
Loading