Save system should work better now, just needed to switch to basic map. This would probably a lot better if tser.hpp supported std::any.
This commit is contained in:
parent
d113dba42f
commit
71bc97a016
3 changed files with 38 additions and 24 deletions
|
@ -70,11 +70,15 @@ TEST_CASE("basic save a world", "[save]") {
|
|||
|
||||
Position &position1 = world.get<Position>(player.entity);
|
||||
Position &position2 = in_world.get<Position>(player.entity);
|
||||
|
||||
// BUGGGGGGGG! This doesn't actually work, it's all fake
|
||||
// The world uses an internal id to increment entities so
|
||||
// by default player gets the first one, but all data after
|
||||
// that is wrong.
|
||||
REQUIRE(position1.location.x == position2.location.x);
|
||||
REQUIRE(position1.location.y == position2.location.y);
|
||||
|
||||
Combat &combat1 = in_world.get<Combat>(player.entity);
|
||||
Combat &combat2 = in_world.get<Combat>(player.entity);
|
||||
REQUIRE(combat1.hp == combat2.hp);
|
||||
|
||||
Motion &motion1 = in_world.get<Motion>(player.entity);
|
||||
Motion &motion2 = in_world.get<Motion>(player.entity);
|
||||
REQUIRE(motion1.dx == motion2.dx);
|
||||
REQUIRE(motion1.dy == motion2.dy);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue