Have a plan for the new inventory and looting system, now have to implement it. Temporarily you can't pick anything up, but it will go away.
This commit is contained in:
parent
b8d2d1870d
commit
ab391aaa97
9 changed files with 23 additions and 261 deletions
10
systems.cpp
10
systems.cpp
|
@ -6,7 +6,6 @@
|
|||
#include "spatialmap.hpp"
|
||||
#include "dbc.hpp"
|
||||
#include "lights.hpp"
|
||||
#include "inventory.hpp"
|
||||
#include "events.hpp"
|
||||
#include "sound.hpp"
|
||||
#include "ai.hpp"
|
||||
|
@ -307,16 +306,17 @@ void System::collision(GameLevel &level) {
|
|||
// call into that to work it, rather than this hard coded crap
|
||||
auto item = world.get<InventoryItem>(entity);
|
||||
auto& item_pos = world.get<Position>(entity);
|
||||
auto& inventory = world.get<Inventory>(player.entity);
|
||||
dbc::log("REWRITE ME!");
|
||||
|
||||
if(world.has<LightSource>(entity)) {
|
||||
inventory.add(item);
|
||||
// inventory.add(item);
|
||||
world.remove<LightSource>(entity);
|
||||
}
|
||||
|
||||
if(world.has<ritual::JunkPile>(entity)) {
|
||||
auto& pile = world.get<ritual::JunkPile>(entity);
|
||||
auto& blanket = world.get_the<ritual::Blanket>();
|
||||
|
||||
for(auto& junk : pile.contents) {
|
||||
fmt::println("adding {} to blanket", junk);
|
||||
blanket.add(junk);
|
||||
|
@ -324,12 +324,12 @@ void System::collision(GameLevel &level) {
|
|||
}
|
||||
|
||||
if(world.has<Weapon>(entity)) {
|
||||
inventory.add(item);
|
||||
// inventory.add(item);
|
||||
world.remove<Weapon>(entity);
|
||||
}
|
||||
|
||||
if(world.has<Curative>(entity)) {
|
||||
inventory.add(item);
|
||||
// inventory.add(item);
|
||||
world.remove<Curative>(entity);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue