Abilities use WikiText links now since they're imported.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-07-22 20:18:11 -05:00
parent 7d8d183bf4
commit be5f3fe2da
2 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,4 @@
converting
currentAbilities
^ self abilities at: 'enabled'

View File

@ -1,10 +1,12 @@
accessing
populateAbilities: abilitiesDictionary
populateAbilities: abilitiesArray
| enabled disabled |
enabled := abilitiesDictionary select: [ :abi | abi keys includes: 'Enabled' ].
disabled := abilitiesDictionary reject: [ :abi | abi keys includes: 'Enabled' ].
enabled := abilitiesArray select: [ :abi | (abi at: 'Enabled') = true ].
disabled := abilitiesArray select: [ :abi | (abi at: 'Enabled') = false ].
^ self abilities
at: 'enabled' put: (enabled collect: [:abi | (abi at: 'Text') ]);
at: 'disabled' put: (disabled collect: [:abi | (abi at: 'Text') ]);
at: 'enabled' put: (enabled collect: [:abi |
(WikiText new content: (abi at: 'Text')) convertMarkdownLinks ]);
at: 'disabled' put: (disabled collect: [:abi |
(WikiText new content: (abi at: 'Text')) convertMarkdownLinks ]);
yourself.