mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-30 19:22:14 +00:00
tmp
This commit is contained in:
parent
7935a63ed4
commit
0fb8e1b398
19 changed files with 284 additions and 17 deletions
|
@ -8,6 +8,13 @@
|
|||
#include "sscsm_stupid_channel.h"
|
||||
|
||||
|
||||
SSCSMEnvironment::SSCSMEnvironment(std::shared_ptr<StupidChannel> channel) :
|
||||
Thread("SSCSMEnvironment-thread"),
|
||||
m_channel(std::move(channel)),
|
||||
m_script(std::make_unique<SSCSMScripting>(this))
|
||||
{
|
||||
}
|
||||
|
||||
void *SSCSMEnvironment::run()
|
||||
{
|
||||
while (true) {
|
||||
|
@ -28,6 +35,21 @@ SerializedSSCSMAnswer SSCSMEnvironment::exchange(SerializedSSCSMRequest req)
|
|||
return m_channel->exchangeA(std::move(req));
|
||||
}
|
||||
|
||||
void SSCSMEnvironment::updateVFSFiles(std::vector<std::pair<std::string, std::string>> &&files)
|
||||
{
|
||||
for (auto &&p : files) {
|
||||
m_vfs.emplace(std::move(p.first), std::move(p.second));
|
||||
}
|
||||
}
|
||||
|
||||
void SSCSMEnvironment::setFatalError(const std::string &reason)
|
||||
{
|
||||
//TODO
|
||||
// what to do on error?
|
||||
// probably send a request
|
||||
errorstream << "SSCSMEnvironment::setFatalError() reason: " << reason << std::endl;
|
||||
}
|
||||
|
||||
std::unique_ptr<ISSCSMEvent> SSCSMEnvironment::requestPollNextEvent()
|
||||
{
|
||||
auto request = SSCSMRequestPollNextEvent{};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue