MovingBlocks / FacadeServer

A headless facade that acts as a game host and provides web-based administration. Automation category: Terasology Facade. See https://forum.terasology.org/threads/facadeserver-headless-server-with-web-interface.1906
Apache License 2.0
4 stars 11 forks source link

HeadlessClient instances should be registered to the engine's NetworkSystem (not just to the EntityManager) #19

Open gianluca-nitti opened 6 years ago

gianluca-nitti commented 6 years ago

What the title says. Right now clients which connects via the HTTP/WebSocket service exposed by FacadeServer are registered to the engine's EntitySystem, so that they can run console commands - however, it would be better to register them to the NetworkSystem (which job is to keep track of all the connected clients). This should allow ComponentSystems to receive event notifications (e.g. onConnected) related to headless clients, like they do for regular clients. Besides improving the code structure (with NetworkSystem handling all kinds of clients, including "special" ones), right now an use case where this would improve usability is in the features intruduced in #17 (see this comment).