From 7db64b73c5eb85f772baad0e0029d64d77216dcb Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Thu, 12 Jun 2025 13:45:54 -0400 Subject: [PATCH] Made some notes for the next bit of work. --- systems.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/systems.cpp b/systems.cpp index f8990ac..3219576 100644 --- a/systems.cpp +++ b/systems.cpp @@ -317,8 +317,11 @@ void System::pickup(GameLevel &level, DinkyECS::Entity entity) { auto player = world.get_the(); if(world.has(entity)) { + // NOTE: this might need to be a separate system so that people can leave stuff alone auto item = world.get(entity); auto& item_pos = world.get(entity); + level.collision->remove(item_pos.location); + world.remove(entity); if(world.has(entity)) { auto& pile = world.get(entity); @@ -327,11 +330,13 @@ void System::pickup(GameLevel &level, DinkyECS::Entity entity) { for(auto& junk : pile.contents) { blanket.add(junk); } + // NOTE: have the gui notify them that some new stuff is in the blanket + } else { + // NOTE: chests are different from say a torch, maybe 2 events or the + // GUI figures out which it is, then when you click either pick it up + // and move it or show the loot container UI + world.send(Events::GUI::LOOT, entity, item); } - - level.collision->remove(item_pos.location); - world.remove(entity); - world.send(Events::GUI::LOOT, entity, item); } else if(world.has(entity)) { System::device(world, player.entity, entity); }