This commit is contained in:
Pfauenauge90 2020-04-08 18:20:49 +02:00
parent 85f9f80024
commit 0fb5b73606

View File

@ -369,40 +369,19 @@ 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::<comp::Item>(&tool)).clone(),
Mode::Create { loadout, tool, .. } => {
loadout.active_item = tool.map(|tool| comp::ItemConfig {
item: (*load_expect::<comp::Item>(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)
});
Some(loadout.clone())
},
}
}
// TODO: Split this into multiple modules or functions.
fn update_layout(&mut self, global_state: &mut GlobalState, client: &Client) -> Vec<Event> {