Added bombs to loot table

This commit is contained in:
Joshua Barretto 2020-07-05 01:08:52 +01:00
parent 2f6a618d5a
commit 38c422bef7
3 changed files with 16 additions and 2 deletions

View File

@ -0,0 +1,8 @@
Item(
name: "Bomb",
description: "Boom!\n\n<Right-Click to use>",
kind: Throwable(
kind: Bomb,
amount: 10,
),
)

View File

@ -1,10 +1,16 @@
[
// All loot rates go here
// food
(3, "common.items.cheese"),
(3, "common.items.apple"),
(3, "common.items.mushroom"),
// miscellaneous
(0.4, "common.items.velorite"),
(0.6, "common.items.veloritefrag"),
(1.5, "common.items.potion_minor"),
(1, "common.items.collar"),
(0.5, "common.items.collar"),
(0.5, "common.items.bomb_pile"),
(1, "common.items.bomb"),
// swords
(0.1, "common.items.weapons.sword.starter_sword"),
(0.1, "common.items.weapons.sword.wood_sword"),

View File

@ -358,7 +358,7 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv
.with(comp::Pos(pos.0 + Vec3::unit_z() * 0.25))
.with(comp::Vel(vel));
#[allow(clippy::single-match)]
#[allow(clippy::single_match)]
match item.kind {
item::ItemKind::Throwable {
kind: item::Throwable::Bomb,