Skip to content

Commit

Permalink
closes #340
Browse files Browse the repository at this point in the history
  • Loading branch information
QckSilverDragon committed Dec 15, 2024
1 parent 36751b0 commit 5fa4c14
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion system/src/documents/FalloutActor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default class FalloutActor extends Actor {
// perk (or can't have perks)
//
perkLevel(perkName) {
if (!["character", "robot"].includes(this.type)) return 0;
if (!["character", "robot", "npc"].includes(this.type)) return 0;

const perk = this.items.find(i => {
const hasBabeleTranslation = i.flags?.babele?.hasTranslation === true;
Expand Down
2 changes: 1 addition & 1 deletion system/src/hooks/preCreateItemHook.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const preCreateItemHook = {
warningMessage = "ONLY SETTLEMENTS CAN HAVE OBJECTS OR STRUCTURES";
break;
case "perk":
if (["character", "robot"].includes(parentType)) return true;
if (["character", "robot", "npc"].includes(parentType)) return true;
warningMessage = "ONLY PLAYERS CAN HAVE PERKS";
break;
case "trait":
Expand Down
1 change: 1 addition & 0 deletions system/src/sheets/FalloutNpcSheet.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default class FalloutNpcSheet extends FalloutBaseActorSheet {
return [
"skill",
"special_ability",
"perk",
"weapon",
];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ol class="items-list">
<li class="consumable flexrow items-header">
<div class="flexrow flexlarge item-name upperC">
{{localize 'FALLOUT.UI.SPECIAL_ABILITY'}}
{{localize 'FALLOUT.UI.SPECIAL_ABILITY'}}/{{localize 'FALLOUT.TEMPLATES.PERK'}}
</div>
<div class="item-controls">
<a
Expand All @@ -20,6 +20,12 @@
</a>
</div>
</li>
{{#each itemsByType.perk}}
{{> actor/_shared-partials/simple-expandable-item
item=this
basicControlsOnly=true
}}
{{/each}}
{{#each itemsByType.special_ability}}
{{> actor/_shared-partials/simple-expandable-item
item=this
Expand Down

0 comments on commit 5fa4c14

Please sign in to comment.