Fixed up the idea for having dynamic callbacks on devices. Might become the new way to do stuff but not sure.

This commit is contained in:
Zed A. Shaw 2025-01-15 23:43:25 -05:00
parent d2162910f6
commit e30c18fbdf
6 changed files with 74 additions and 39 deletions

View file

@ -217,8 +217,6 @@ void System::pickup(DinkyECS::World &world, DinkyECS::Entity actor, DinkyECS::En
void System::device(DinkyECS::World &world, DinkyECS::Entity actor, DinkyECS::Entity item) {
auto& device = world.get<Device>(item);
if(device.active) {
println("entity {} INTERACTED WITH DEVICE {}", actor, item);
device.active = false;
}
println("entity {} INTERACTED WITH DEVICE {}", actor, item);
device.hit(world);
}