Refactored the FSM so that it uses a generic registry of systems to do what it needs.
This commit is contained in:
parent
cbff127b40
commit
e742b8772d
7 changed files with 150 additions and 118 deletions
|
|
@ -5,8 +5,10 @@
|
|||
#include "algos/spatialmap.hpp"
|
||||
#include "game/level.hpp"
|
||||
#include "events.hpp"
|
||||
#include "game/registry.hpp"
|
||||
|
||||
namespace System {
|
||||
|
||||
using namespace components;
|
||||
using namespace DinkyECS;
|
||||
using std::string, matrix::Matrix;
|
||||
|
|
@ -32,15 +34,15 @@ namespace System {
|
|||
|
||||
void pickup();
|
||||
|
||||
// BUG: these might need to go somewhere else....
|
||||
bool place_in_container(Entity cont_id, const string& name, Entity world_entity);
|
||||
|
||||
void remove_from_container(Entity cont_id, const std::string& name);
|
||||
void remove_from_world(Entity entity);
|
||||
void inventory_swap(Entity container_id, const std::string& a_name, const std::string &b_name);
|
||||
bool inventory_occupied(Entity container_id, const std::string& name);
|
||||
|
||||
void set_position(DinkyECS::World& world, SpatialMap& collision, Entity entity, Position pos);
|
||||
bool use_item(const std::string& slot_name);
|
||||
void use_item(const std::string& slot_name);
|
||||
|
||||
game::Event shortest_rotate(Point player_at, Point aiming_at, Point turning_to);
|
||||
|
||||
|
|
@ -67,4 +69,6 @@ namespace System {
|
|||
|
||||
void clear_attack();
|
||||
void spawn_attack(World& world, int attack_id, DinkyECS::Entity enemy);
|
||||
|
||||
void init(Registry& reg);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue