Correctly place subtitle in subname
field
This commit is contained in:
parent
65abe1c7cb
commit
b91b6a69ad
@ -31,11 +31,6 @@ if (Component.settings.get('Slot2') != 'None') {
|
|||||||
slot += '. ' + renameSlot(Component.settings.get('Slot2'));
|
slot += '. ' + renameSlot(Component.settings.get('Slot2'));
|
||||||
}
|
}
|
||||||
|
|
||||||
var card_name = Component.getName();
|
|
||||||
if (Component.settings.get('Subtitle') != '') {
|
|
||||||
card_name += ': ' + Component.settings.get('Subtitle');
|
|
||||||
}
|
|
||||||
|
|
||||||
const tag_replacements = {
|
const tag_replacements = {
|
||||||
"<fullname>": String(Component.getName()),
|
"<fullname>": String(Component.getName()),
|
||||||
"<gua>": "[guardian]",
|
"<gua>": "[guardian]",
|
||||||
@ -105,7 +100,7 @@ var card_data = {
|
|||||||
health: parseInt(Component.settings.get('Stamina')) || null,
|
health: parseInt(Component.settings.get('Stamina')) || null,
|
||||||
illustrator: String(Component.settings.get('Artist')),
|
illustrator: String(Component.settings.get('Artist')),
|
||||||
is_unique: Component.settings.getBoolean('Unique'),
|
is_unique: Component.settings.getBoolean('Unique'),
|
||||||
name: substitute_tags(String(card_name)),
|
name: substitute_tags(String(Component.getName())),
|
||||||
pack_code: pack_code,
|
pack_code: pack_code,
|
||||||
position: parseInt(Component.settings.get('CollectionNumber')) || null,
|
position: parseInt(Component.settings.get('CollectionNumber')) || null,
|
||||||
quantity: 2, // TODO
|
quantity: 2, // TODO
|
||||||
@ -125,6 +120,11 @@ var card_data = {
|
|||||||
xp: parseInt(Component.settings.get('Level')) || null,
|
xp: parseInt(Component.settings.get('Level')) || null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var subtitle = Component.settings.get('Subtitle');
|
||||||
|
if (subtitle && subtitle != '') {
|
||||||
|
card_data.subname = subtitle;
|
||||||
|
}
|
||||||
|
|
||||||
if (Component.settings.get('CardClass2') != 'None') {
|
if (Component.settings.get('CardClass2') != 'None') {
|
||||||
card_data.faction2_code = String(Component.settings.get('CardClass2')).toLowerCase();
|
card_data.faction2_code = String(Component.settings.get('CardClass2')).toLowerCase();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user