From 0fb5b7360690c305f3d2b4829b541ddaa47be9e2 Mon Sep 17 00:00:00 2001 From: Pfauenauge90 <44173739+Pfauenauge90@users.noreply.github.com> Date: Wed, 8 Apr 2020 18:20:49 +0200 Subject: [PATCH] fix --- voxygen/src/menu/char_selection/ui.rs | 45 +++++++-------------------- 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/voxygen/src/menu/char_selection/ui.rs b/voxygen/src/menu/char_selection/ui.rs index ed29098b67..db66460906 100644 --- a/voxygen/src/menu/char_selection/ui.rs +++ b/voxygen/src/menu/char_selection/ui.rs @@ -369,39 +369,18 @@ impl CharSelectionUi { }; Some(loadout) }, - Mode::Create (characterdata) => - let loadout = comp::Loadout { - active_item: characterdata - .as_ref() - .and_then(|d| d.tool.as_ref()) - .map(|tool| comp::ItemConfig { - item: (*load_expect::(&tool)).clone(), - ability1: None, - ability2: None, - ability3: None, - block_ability: None, - dodge_ability: None, - }), - second_item: None, - shoulder: None, - chest: None, - belt: None, - hand: None, - pants: Some(assets::load_expect_cloned( - "common.items.armor.starter.rugged_pants", - )), - foot: Some(assets::load_expect_cloned( - "common.items.armor.starter.sandals_0", - )), - back: None, - ring: None, - neck: None, - lantern: None, - head: None, - tabard: None, - }; - Some(loadout) - }, + Mode::Create { loadout, tool, .. } => { + loadout.active_item = tool.map(|tool| comp::ItemConfig { + item: (*load_expect::(tool)).clone(), + ability1: None, + ability2: None, + ability3: None, + block_ability: None, + dodge_ability: None, + }); + Some(loadout.clone()) + }, + } } // TODO: Split this into multiple modules or functions.