Fix resetting characters name color on meet command

This commit is contained in:
aNNiMON 2024-03-16 23:37:33 +02:00
parent 4ca0629bf3
commit 987753c0f1

View File

@ -20,7 +20,17 @@ export class Characters {
return this.names[shortName]; return this.names[shortName];
} }
public setName(shortName: string, fullName: string, color: number = Characters.DEFAULT_COLOR): boolean { public setName(shortName: string, fullName: string): boolean {
if (shortName in this.names) {
const info = this.names[shortName];
info.name = fullName;
} else {
this.names[shortName] = new NameInfo(fullName, Characters.DEFAULT_COLOR);
}
return shortName in this.names;
}
public setNameW(shortName: string, fullName: string, color: number = Characters.DEFAULT_COLOR): boolean {
if (shortName in this.names) { if (shortName in this.names) {
const info = this.names[shortName]; const info = this.names[shortName];
info.name = fullName; info.name = fullName;