refactor: Better interface for the event system

This commit is contained in:
WerWolv
2023-12-08 10:29:44 +01:00
parent f08d1e265c
commit b4813660b5
63 changed files with 327 additions and 320 deletions

View File

@@ -9,7 +9,7 @@ namespace hex::plugin::builtin {
ContentRegistry::CommunicationInterface::registerNetworkEndpoint("pattern_editor/set_code", [](const nlohmann::json &data) -> nlohmann::json {
auto code = data.at("code").get<std::string>();
EventManager::post<RequestSetPatternLanguageCode>(code);
RequestSetPatternLanguageCode::post(code);
return { };
});