Skip to content

Commit

Permalink
allow macros sometimes in spell picker
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Oct 1, 2024
1 parent acf15fd commit af5af2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ export class InputSpellComponent implements OnInit {
public label = input<string>('Spell');
public change = output<string>();
public defaultValue = input<string>();
public allowMacro = input<boolean>();

public values = computed(() => {
const baseSpells = this.modService
.mod()
.stems.filter((s) => s._hasSpell)
.stems.filter((s) => s._hasSpell || (this.allowMacro() && s._hasMacro))
.map((s) => s._gameId);

return baseSpells.sort();
Expand Down
2 changes: 1 addition & 1 deletion src/app/tabs/npcs/npcs-editor/npcs-editor.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
<div class="form-row split">
<div class="form-column">
<div class="form-row">
<app-input-spell [(spell)]="spell.result"></app-input-spell>
<app-input-spell [(spell)]="spell.result" [allowMacro]="true"></app-input-spell>
</div>
</div>

Expand Down

0 comments on commit af5af2e

Please sign in to comment.