Picking up gold doesn't add it to your inventory.
This commit is contained in:
parent
8e4add25a9
commit
31e5eb7fce
1 changed files with 2 additions and 2 deletions
|
@ -137,14 +137,14 @@ void System::collision(DinkyECS::World &world, Player &player) {
|
|||
auto& item_pos = world.get<Position>(entity);
|
||||
auto& inventory = world.get<Inventory>(player.entity);
|
||||
|
||||
inventory.add(item);
|
||||
|
||||
if(world.has<LightSource>(entity)) {
|
||||
inventory.add(item);
|
||||
auto &new_light = world.get<LightSource>(entity);
|
||||
world.set<LightSource>(player.entity, new_light);
|
||||
inventory.light = new_light;
|
||||
world.remove<LightSource>(entity);
|
||||
} else if(world.has<Weapon>(entity)) {
|
||||
inventory.add(item);
|
||||
auto &weapon = world.get<Weapon>(entity);
|
||||
player_combat.damage = weapon.damage;
|
||||
world.remove<Weapon>(entity);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue