2024-06-10 20:11:25 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <solanaceae/message3/registry_message_model.hpp>
|
|
|
|
|
2024-06-11 10:09:55 +02:00
|
|
|
#include "./factorio_log_parser.hpp"
|
|
|
|
|
2024-06-12 21:11:12 +02:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
// fwd
|
|
|
|
struct ConfigModelI;
|
|
|
|
|
2024-06-11 10:09:55 +02:00
|
|
|
class Factorio : public RegistryMessageModelEventI, public FactorioLogParserEventI {
|
2024-06-10 20:11:25 +02:00
|
|
|
Contact3Registry& _cr;
|
|
|
|
RegistryMessageModel& _rmm;
|
2024-06-11 10:09:55 +02:00
|
|
|
FactorioLogParser& _flp;
|
2024-06-10 20:11:25 +02:00
|
|
|
|
2024-06-12 21:11:12 +02:00
|
|
|
std::vector<Contact3Handle> _linked_contacts;
|
|
|
|
|
2024-06-12 21:30:51 +02:00
|
|
|
void sendToLinked(const std::string& message);
|
|
|
|
|
2024-06-10 20:11:25 +02:00
|
|
|
public:
|
2024-06-12 21:11:12 +02:00
|
|
|
Factorio(ConfigModelI& conf, Contact3Registry& cr, RegistryMessageModel& rmm, FactorioLogParser& flp);
|
2024-06-10 20:11:25 +02:00
|
|
|
virtual ~Factorio(void);
|
|
|
|
|
|
|
|
protected: // rmm
|
|
|
|
bool onEvent(const Message::Events::MessageConstruct& e) override;
|
2024-06-11 10:09:55 +02:00
|
|
|
|
|
|
|
protected: // flp
|
|
|
|
bool onEvent(const FactorioLog::Events::Join&) override;
|
|
|
|
bool onEvent(const FactorioLog::Events::Leave&) override;
|
|
|
|
bool onEvent(const FactorioLog::Events::Chat&) override;
|
|
|
|
bool onEvent(const FactorioLog::Events::Died&) override;
|
|
|
|
bool onEvent(const FactorioLog::Events::Evolution&) override;
|
|
|
|
bool onEvent(const FactorioLog::Events::ResearchStarted&) override;
|
|
|
|
bool onEvent(const FactorioLog::Events::ResearchFinished&) override;
|
|
|
|
bool onEvent(const FactorioLog::Events::ResearchCancelled&) override;
|
2024-06-10 20:11:25 +02:00
|
|
|
};
|
|
|
|
|