Skip to content

Commit

Permalink
[foundryvtt#1403] Add ASI icon, rename ASI file to use kebab-case
Browse files Browse the repository at this point in the history
  • Loading branch information
arbron committed Dec 29, 2022
1 parent c03e063 commit b35e1fb
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 2 deletions.
1 change: 1 addition & 0 deletions icons/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SVG Icons from Game-Icons.net

The dnd5e system for Foundry Virtual Tabletop includes icon artwork licensed from Game-icons.net under the Creative Commons license. These icons are packaged with and provided for use in the dnd5e system under their respective licenses, as noted below.

/svg/ability-score-improvement.svg - "Weight lifting" by Delapouite under CC BY 3.0
/svg/hit-points.svg - "Heart plus" by Zeromancer under CC0 PDD
/svg/item-grant.svg - "White book" by Willdabeast under CC BY 3.0
/svg/scale-value.svg - "Dice target" by Delapouite under CC BY 3.0
1 change: 1 addition & 0 deletions icons/svg/ability-score-improvement.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions module/applications/advancement/_module.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export {default as AdvancementFlow} from "./advancement-flow.mjs";
export {default as AdvancementManager} from "./advancement-manager.mjs";
export {default as AdvancementSelection} from "./advancement-selection.mjs";

export {default as AbilityScoreImprovementFlow} from "./ability-score-improvement-flow.mjs";
export {default as HitPointsConfig} from "./hit-points-config.mjs";
export {default as HitPointsFlow} from "./hit-points-flow.mjs";
export {default as ItemGrantConfig} from "./item-grant-config.mjs";
Expand Down
25 changes: 25 additions & 0 deletions module/applications/advancement/ability-score-improvement-flow.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import AdvancementFlow from "./advancement-flow.mjs";

/**
* Inline application that presents the player with a choice between ability score improvement and taking a feat.
*
* @extends {AdvancementFlow}
*/
export default class AbilityScoreImprovementFlow extends AdvancementFlow {

/** @inheritdoc */
static get defaultOptions() {
return foundry.utils.mergeObject(super.defaultOptions, {
template: "systems/dnd5e/templates/advancement/ability-score-improvement-flow.hbs"
});
}

/* -------------------------------------------- */

/** @inheritdoc */
getData() {
return foundry.utils.mergeObject(super.getData(), {

});
}
}
8 changes: 6 additions & 2 deletions module/documents/advancement/ability-score-improvement.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Advancement from "./advancement.mjs";
import AbilityScoreImprovementFlow from "../../applications/advancement/ability-score-improvement-flow.mjs";

/**
* Advancement that presents the player with the option of improving their ability scores or selecting a feat.
Expand All @@ -9,10 +10,13 @@ export default class AbilityScoreImprovementAdvancement extends Advancement {
static get metadata() {
return foundry.utils.mergeObject(super.metadata, {
order: 20,
icon: "icons/svg/upgrade.svg",
icon: "systems/dnd5e/icons/svg/ability-score-improvement.svg",
title: game.i18n.localize("DND5E.AdvancementAbilityScoreImprovementTitle"),
hint: game.i18n.localize("DND5E.AdvancementAbilityScoreImprovementHint"),
validItemTypes: new Set(["class"])
validItemTypes: new Set(["class"]),
apps: {
flow: AbilityScoreImprovementFlow
}
});
}

Expand Down
7 changes: 7 additions & 0 deletions templates/advancement/ability-score-improvement-flow.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<form id="{{appId}}" data-level="{{level}}" data-id="{{advancement.id}}" data-type="{{type}}">
<h3>{{{this.title}}}</h3>

<p>
Choices!
</p>
</form>

0 comments on commit b35e1fb

Please sign in to comment.