Commit d08f63cf authored by nanahira's avatar nanahira

optional pic display

parent 5afbc854
......@@ -180,10 +180,13 @@ export class YGOProCard implements YGOProCardLike {
getDisplayString(config: YGOCardConfig) {
const view = this.getView(config.lang);
const lines = [
segment('image', { url: config.renderUrl(view), cache: true }),
`${view.name}[${view.id}]`,
];
const lines: string[] = [];
if (config.displayPic) {
lines.push(
segment('image', { url: config.renderUrl(view), cache: true }),
);
}
lines.push(`${view.name}[${view.id}]`);
const isMonster = this.isType('TYPE_MONSTER');
let typeString = `[${view.displayType}]`;
if (isMonster) {
......
......@@ -22,6 +22,9 @@ export class YGOCardConfig {
@UseSchema(Schema.select(['cn', 'en'], '显示语言').default('cn'))
lang: 'cn' | 'en';
@DefineSchema({ type: 'boolean', desc: '是否展示卡图', default: true })
displayPic: boolean;
@DefineSchema({
type: 'string',
desc: '卡图源,将 {{id}} 替换为卡号',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment