lib.cheat.u改回兼容旧版传参(但提示废弃)

This commit is contained in:
shijian 2023-12-29 20:17:53 +08:00
parent fdcdb48ee3
commit e28fac757a
1 changed files with 4 additions and 0 deletions

View File

@ -8914,6 +8914,10 @@ export class Library extends Uninstantable {
else if (args instanceof lib.element.VCard) { else if (args instanceof lib.element.VCard) {
card = args[i]; card = args[i];
} }
else if (typeof args[i] == 'object' && args[i] != null && args[i].name) {
console.warn('lib.cheat.u: 以普通obj形式传入的类卡牌形式已经废弃');
card = args[i];
}
else if (typeof args[i] == 'string') { else if (typeof args[i] == 'string') {
card = new lib.element.VCard({ name: args[i] }); card = new lib.element.VCard({ name: args[i] });
} }