From e9b22c890af3eaa5c8909495ea3ff476ec3e6460 Mon Sep 17 00:00:00 2001 From: scott-c Date: Tue, 19 May 2020 19:46:06 +0800 Subject: [PATCH] fix #562 Confusing chat alias --- server/src/sys/message.rs | 6 ++++-- voxygen/src/hud/social.rs | 17 +++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/server/src/sys/message.rs b/server/src/sys/message.rs index 3e18372abd..1fdd8433cd 100644 --- a/server/src/sys/message.rs +++ b/server/src/sys/message.rs @@ -408,10 +408,12 @@ impl<'a> System<'a> for Sys { let _ = speech_bubbles.insert(entity, bubble); match players.get(entity) { Some(player) => { + let stat = + stats.get(entity).expect("Expected stat.name for player"); if admins.get(entity).is_some() { - format!("[ADMIN][{}] {}", &player.alias, message) + format!("[ADMIN][{}] {}", &stat.name, message) } else { - format!("[{}] {}", &player.alias, message) + format!("[{}] {}", &stat.name, message) } }, None => format!("[] {}", message), diff --git a/voxygen/src/hud/social.rs b/voxygen/src/hud/social.rs index c278ec1963..6fb94996fa 100644 --- a/voxygen/src/hud/social.rs +++ b/voxygen/src/hud/social.rs @@ -193,12 +193,17 @@ impl<'a> Widget for Social<'a> { .color(TEXT_COLOR) .set(ids.online_title, ui); for (i, (_, player_alias)) in self.client.player_list.iter().enumerate() { - Text::new(player_alias) - .down(3.0) - .font_size(self.fonts.cyri.scale(15)) - .font_id(self.fonts.cyri.conrod_id) - .color(TEXT_COLOR) - .set(ids.player_names[i], ui); + Text::new(&format!( + "({}) {} Lvl {}", + player_alias, + self.client.character_list.characters[i].character.alias, + self.client.character_list.characters[i].level + )) + .down(3.0) + .font_size(self.fonts.cyri.scale(15)) + .font_id(self.fonts.cyri.conrod_id) + .color(TEXT_COLOR) + .set(ids.player_names[i], ui); } }