Fix bug with ignoring second_tool in EntityInfo

This commit is contained in:
juliancoffee 2021-07-05 01:08:26 +03:00
parent d920f911a2
commit 6654c9e372

View File

@ -208,6 +208,7 @@ impl<'a> System<'a> for Sys {
let EntityInfo {
skillset_asset,
main_tool,
second_tool,
loadout_asset,
make_loadout,
trading_information: economy,
@ -234,6 +235,11 @@ impl<'a> System<'a> for Sys {
loadout_builder = loadout_builder.with_default_maintool(&body);
}
// If second tool is passed, use it as well
if let Some(second_tool) = second_tool {
loadout_builder = loadout_builder.active_offhand(Some(second_tool));
}
// If there is config, apply it.
// If not, use default equipement for this body.
if let Some(asset) = loadout_asset {