mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Show main menu even if there are no stats
This commit is contained in:
parent
51eb928eb8
commit
eac11ecfe8
@ -1616,10 +1616,7 @@ impl Hud {
|
|||||||
// Bag button and nearby icons
|
// Bag button and nearby icons
|
||||||
let ecs = client.state().ecs();
|
let ecs = client.state().ecs();
|
||||||
let stats = ecs.read_storage::<comp::Stats>();
|
let stats = ecs.read_storage::<comp::Stats>();
|
||||||
let player_stats = match stats.get(client.entity()) {
|
if let Some(player_stats) = stats.get(client.entity()) {
|
||||||
Some(stats) => stats,
|
|
||||||
None => return events,
|
|
||||||
};
|
|
||||||
match Buttons::new(
|
match Buttons::new(
|
||||||
client,
|
client,
|
||||||
self.show.bag,
|
self.show.bag,
|
||||||
@ -1640,6 +1637,7 @@ impl Hud {
|
|||||||
Some(buttons::Event::ToggleMap) => self.show.toggle_map(),
|
Some(buttons::Event::ToggleMap) => self.show.toggle_map(),
|
||||||
None => {},
|
None => {},
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// MiniMap
|
// MiniMap
|
||||||
match MiniMap::new(
|
match MiniMap::new(
|
||||||
@ -1658,12 +1656,7 @@ impl Hud {
|
|||||||
|
|
||||||
// Bag contents
|
// Bag contents
|
||||||
if self.show.bag {
|
if self.show.bag {
|
||||||
let ecs = client.state().ecs();
|
if let Some(player_stats) = stats.get(client.entity()) {
|
||||||
let stats = ecs.read_storage::<comp::Stats>();
|
|
||||||
let player_stats = match stats.get(client.entity()) {
|
|
||||||
Some(stats) => stats,
|
|
||||||
None => return events,
|
|
||||||
};
|
|
||||||
match Bag::new(
|
match Bag::new(
|
||||||
client,
|
client,
|
||||||
&self.imgs,
|
&self.imgs,
|
||||||
@ -1687,6 +1680,7 @@ impl Hud {
|
|||||||
None => {},
|
None => {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Skillbar
|
// Skillbar
|
||||||
// Get player stats
|
// Get player stats
|
||||||
|
Loading…
Reference in New Issue
Block a user