mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Removed giants, gave lanterns to rtsim NPCs
This commit is contained in:
parent
22fb71905b
commit
7359dc6e1f
@ -35,15 +35,30 @@ impl Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_loadout(&self) -> comp::Loadout {
|
pub fn get_loadout(&self) -> comp::Loadout {
|
||||||
|
let mut rng = self.rng(PERM_LOADOUT);
|
||||||
let main_tool = comp::Item::new_from_asset_expect((&[
|
let main_tool = comp::Item::new_from_asset_expect((&[
|
||||||
"common.items.weapons.sword.wood_sword",
|
"common.items.weapons.sword.wood_sword",
|
||||||
"common.items.weapons.sword.starter_sword",
|
"common.items.weapons.sword.starter_sword",
|
||||||
"common.items.weapons.sword.short_sword_0",
|
"common.items.weapons.sword.short_sword_0",
|
||||||
"common.items.weapons.bow.starter_bow",
|
"common.items.weapons.bow.starter_bow",
|
||||||
"common.items.weapons.bow.leafy_longbow-0",
|
"common.items.weapons.bow.leafy_longbow-0",
|
||||||
]).choose(&mut self.rng(PERM_LOADOUT)).unwrap());
|
]).choose(&mut rng).unwrap());
|
||||||
|
|
||||||
|
let back = match rng.gen_range(0, 3) {
|
||||||
|
0 => Some(comp::Item::new_from_asset_expect("common.items.armor.back.leather_adventurer")),
|
||||||
|
1 => Some(comp::Item::new_from_asset_expect("common.items.armor.back.backpack_0")),
|
||||||
|
_ => None,
|
||||||
|
};
|
||||||
|
|
||||||
|
let lantern = match rng.gen_range(0, 3) {
|
||||||
|
0 => Some(comp::Item::new_from_asset_expect("common.items.lantern.black_0")),
|
||||||
|
1 => Some(comp::Item::new_from_asset_expect("common.items.lantern.blue_0")),
|
||||||
|
_ => Some(comp::Item::new_from_asset_expect("common.items.lantern.red_0")),
|
||||||
|
};
|
||||||
|
|
||||||
LoadoutBuilder::build_loadout(self.get_body(), comp::Alignment::Npc, Some(main_tool), false)
|
LoadoutBuilder::build_loadout(self.get_body(), comp::Alignment::Npc, Some(main_tool), false)
|
||||||
.back(Some(comp::Item::new_from_asset_expect("common.items.armor.back.leather_adventurer")))
|
.back(back)
|
||||||
|
.lantern(lantern)
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user