diff --git a/Src/Client/Abstract.hpp b/Src/Client/Abstract.hpp index 72da0d9..b75fd7f 100644 --- a/Src/Client/Abstract.hpp +++ b/Src/Client/Abstract.hpp @@ -177,6 +177,9 @@ struct AssetEntry { */ class IServerSession { public: + // Включить логирование входящих сетевых пакетов на клиенте. + bool DebugLogPackets = false; + // Используемые двоичные ресурсы std::unordered_map> Assets; diff --git a/Src/Client/ServerSession.cpp b/Src/Client/ServerSession.cpp index 510427b..857fdc2 100644 --- a/Src/Client/ServerSession.cpp +++ b/Src/Client/ServerSession.cpp @@ -38,6 +38,26 @@ const char* assetTypeName(EnumAssets type) { } } +const char* toClientPacketName(ToClient type) { + switch(type) { + case ToClient::Init: return "Init"; + case ToClient::Disconnect: return "Disconnect"; + case ToClient::AssetsBindDK: return "AssetsBindDK"; + case ToClient::AssetsBindHH: return "AssetsBindHH"; + case ToClient::AssetsInitSend: return "AssetsInitSend"; + case ToClient::AssetsNextSend: return "AssetsNextSend"; + case ToClient::DefinitionsUpdate: return "DefinitionsUpdate"; + case ToClient::ChunkVoxels: return "ChunkVoxels"; + case ToClient::ChunkNodes: return "ChunkNodes"; + case ToClient::ChunkLightPrism: return "ChunkLightPrism"; + case ToClient::RemoveRegion: return "RemoveRegion"; + case ToClient::Tick: return "Tick"; + case ToClient::TestLinkCameraToEntity: return "TestLinkCameraToEntity"; + case ToClient::TestUnlinkCamera: return "TestUnlinkCamera"; + default: return "Unknown"; + } +} + } ServerSession::ServerSession(asio::io_context &ioc, std::unique_ptr&& socket) @@ -875,6 +895,8 @@ void ServerSession::update(GlobalTime gTime, float dTime) { } result.Chunks_ChangeOrAdd = std::move(chunks_Changed); + for(auto& [wId, regions] : regions_Lost_Result) + result.Chunks_Lost[wId] = std::vector(regions.begin(), regions.end()); { @@ -1233,6 +1255,11 @@ void ServerSession::protocolError() { coro<> ServerSession::readPacket(Net::AsyncSocket &sock) { uint8_t first = co_await sock.read(); + if(DebugLogPackets) { + ToClient type = static_cast(first); + LOG.debug() << "Recv packet=" << toClientPacketName(type) << " id=" << int(first); + } + switch((ToClient) first) { case ToClient::Init: co_return; diff --git a/Src/Client/Vulkan/Vulkan.cpp b/Src/Client/Vulkan/Vulkan.cpp index 8945557..e036594 100644 --- a/Src/Client/Vulkan/Vulkan.cpp +++ b/Src/Client/Vulkan/Vulkan.cpp @@ -2291,6 +2291,8 @@ void Vulkan::gui_ConnectedToServer() { double chunksKb = double(Game.Session->getVisibleCompressedChunksBytes()) / 1024.0; ImGui::Text("chunks compressed: %.1f KB", chunksKb); + ImGui::Checkbox("Логи сетевых пакетов", &Game.Session->DebugLogPackets); + if(ImGui::Button("Delimeter")) LOG.debug(); diff --git a/Src/Common/AssetsPreloader.cpp b/Src/Common/AssetsPreloader.cpp index 2f08593..8700087 100644 --- a/Src/Common/AssetsPreloader.cpp +++ b/Src/Common/AssetsPreloader.cpp @@ -57,6 +57,10 @@ AssetsPreloader::Out_reloadResources AssetsPreloader::reloadResources(const Asse try { ReloadStatus secondStatus; return _reloadResources(instances, status ? *status : secondStatus); + } catch(const std::exception& exc) { + LOG.error() << exc.what(); + assert(!"reloadResources: здесь не должно быть ошибок"); + std::unreachable(); } catch(...) { assert(!"reloadResources: здесь не должно быть ошибок"); std::unreachable(); diff --git a/Src/Server/GameServer.cpp b/Src/Server/GameServer.cpp index 09a339c..ce9e661 100644 --- a/Src/Server/GameServer.cpp +++ b/Src/Server/GameServer.cpp @@ -44,6 +44,15 @@ namespace js = boost::json; namespace LV::Server { +template +bool hasAnyBindings(const std::array, N>& data) { + for(const auto& list : data) { + if(!list.empty()) + return true; + } + return false; +} + std::string ModInfo::dump() const { js::object obj; @@ -1694,7 +1703,7 @@ void GameServer::reloadMods() { { AssetsPreloader::Out_bakeId baked = Content.AM.bakeIdTables(); - if(!baked.IdToDK.empty()) { + if(hasAnyBindings(baked.IdToDK)) { packetsToSend.push_back(RemoteClient::makePacket_informateAssets_DK(baked.IdToDK)); } } @@ -2487,7 +2496,7 @@ void GameServer::stepSyncContent() { std::vector packetsToAll; { AssetsPreloader::Out_bakeId baked = Content.AM.bakeIdTables(); - if(!baked.IdToDK.empty()) { + if(hasAnyBindings(baked.IdToDK)) { packetsToAll.push_back(RemoteClient::makePacket_informateAssets_DK(baked.IdToDK)); } } diff --git a/Src/Server/RemoteClient.cpp b/Src/Server/RemoteClient.cpp index 4fddd18..3dffa49 100644 --- a/Src/Server/RemoteClient.cpp +++ b/Src/Server/RemoteClient.cpp @@ -389,10 +389,8 @@ void RemoteClient::NetworkAndResource_t::prepareWorldRemove(WorldId_t worldId) void RemoteClient::prepareCameraSetEntity(ServerEntityId_t entityId) { auto lock = NetworkAndResource.lock(); - ClientEntityId_t cId = lock->ReMapEntities.toClient(entityId); - lock->checkPacketBorder(8); - lock->NextPacket << (uint8_t) ToClient::TestLinkCameraToEntity - << cId; + lock->checkPacketBorder(4); + lock->NextPacket << (uint8_t) ToClient::TestLinkCameraToEntity; } ResourceRequest RemoteClient::pushPreparedPackets() { diff --git a/mods/test/assets/test/model/node/acacia_planks.json b/mods/test/assets/test/model/node/acacia_planks.json deleted file mode 100644 index e815d04..0000000 --- a/mods/test/assets/test/model/node/acacia_planks.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "textures": { - "default": "acacia_planks.png" - }, - "cuboids": [ - { - "from": [ - -0.5, - -0.5, - -0.5 - ], - "to": [ - 0.5, - 0.5, - 0.5 - ], - "faces": { - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "down" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "up" - }, - "north": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "north" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "south" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "west" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "east" - } - } - } - ] -} diff --git a/mods/test/assets/test/model/node/frame.json b/mods/test/assets/test/model/node/frame.json deleted file mode 100644 index 3b71dbd..0000000 --- a/mods/test/assets/test/model/node/frame.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "textures": { - "default": "frame.png" - }, - "cuboids": [ - { - "from": [ - -0.5, - -0.5, - -0.5 - ], - "to": [ - 0.5, - 0.5, - 0.5 - ], - "faces": { - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "down" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "up" - }, - "north": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "north" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "south" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "west" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "east" - } - } - } - ] -} diff --git a/mods/test/assets/test/model/node/grass.json b/mods/test/assets/test/model/node/grass.json deleted file mode 100644 index c8cdff5..0000000 --- a/mods/test/assets/test/model/node/grass.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "textures": { - "default": "grass.png" - }, - "cuboids": [ - { - "from": [ - -0.5, - -0.5, - -0.5 - ], - "to": [ - 0.5, - 0.5, - 0.5 - ], - "faces": { - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "down" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "up" - }, - "north": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "north" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "south" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "west" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "east" - } - } - } - ] -} diff --git a/mods/test/assets/test/model/node/jungle_planks.json b/mods/test/assets/test/model/node/jungle_planks.json deleted file mode 100644 index 60c5c69..0000000 --- a/mods/test/assets/test/model/node/jungle_planks.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "textures": { - "default": "jungle_planks.png" - }, - "cuboids": [ - { - "from": [ - -0.5, - -0.5, - -0.5 - ], - "to": [ - 0.5, - 0.5, - 0.5 - ], - "faces": { - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "down" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "up" - }, - "north": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "north" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "south" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "west" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "east" - } - } - } - ] -} diff --git a/mods/test/assets/test/model/node/oak_planks.json b/mods/test/assets/test/model/node/oak_planks.json deleted file mode 100644 index b882064..0000000 --- a/mods/test/assets/test/model/node/oak_planks.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "textures": { - "default": "oak_planks.png" - }, - "cuboids": [ - { - "from": [ - -0.5, - -0.5, - -0.5 - ], - "to": [ - 0.5, - 0.5, - 0.5 - ], - "faces": { - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "down" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "up" - }, - "north": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "north" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "south" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "west" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "east" - } - } - } - ] -} diff --git a/mods/test/assets/test/model/node/tropical_rainforest_wood.json b/mods/test/assets/test/model/node/tropical_rainforest_wood.json deleted file mode 100644 index 68e601b..0000000 --- a/mods/test/assets/test/model/node/tropical_rainforest_wood.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "textures": { - "default": "tropical_rainforest_wood.png" - }, - "cuboids": [ - { - "from": [ - -0.5, - -0.5, - -0.5 - ], - "to": [ - 0.5, - 0.5, - 0.5 - ], - "faces": { - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "down" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "up" - }, - "north": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "north" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "south" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "west" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "east" - } - } - } - ] -} diff --git a/mods/test/assets/test/model/node/willow_wood.json b/mods/test/assets/test/model/node/willow_wood.json deleted file mode 100644 index 0b96be6..0000000 --- a/mods/test/assets/test/model/node/willow_wood.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "textures": { - "default": "willow_wood.png" - }, - "cuboids": [ - { - "from": [ - -0.5, - -0.5, - -0.5 - ], - "to": [ - 0.5, - 0.5, - 0.5 - ], - "faces": { - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "down" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "up" - }, - "north": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "north" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "south" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "west" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "east" - } - } - } - ] -} diff --git a/mods/test/assets/test/model/node/xnether_blue_wood.json b/mods/test/assets/test/model/node/xnether_blue_wood.json deleted file mode 100644 index 271ead2..0000000 --- a/mods/test/assets/test/model/node/xnether_blue_wood.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "textures": { - "default": "xnether_blue_wood.png" - }, - "cuboids": [ - { - "from": [ - -0.5, - -0.5, - -0.5 - ], - "to": [ - 0.5, - 0.5, - 0.5 - ], - "faces": { - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "down" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "up" - }, - "north": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "north" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "south" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "west" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "east" - } - } - } - ] -} diff --git a/mods/test/assets/test/model/node/xnether_purple_wood.json b/mods/test/assets/test/model/node/xnether_purple_wood.json deleted file mode 100644 index 9127a8b..0000000 --- a/mods/test/assets/test/model/node/xnether_purple_wood.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "textures": { - "default": "xnether_purple_wood.png" - }, - "cuboids": [ - { - "from": [ - -0.5, - -0.5, - -0.5 - ], - "to": [ - 0.5, - 0.5, - 0.5 - ], - "faces": { - "down": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "down" - }, - "up": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "up" - }, - "north": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "north" - }, - "south": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "south" - }, - "west": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "west" - }, - "east": { - "uv": [ - 0, - 0, - 1, - 1 - ], - "texture": "default", - "cullface": "east" - } - } - } - ] -} diff --git a/mods/test/assets/test/nodestate/test0.json b/mods/test/assets/test/nodestate/test0.json deleted file mode 100644 index 4085598..0000000 --- a/mods/test/assets/test/nodestate/test0.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "meta==0": { - "model": "node/grass.json" - }, - "meta==1": { - "model": "node/oak_planks.json" - }, - "meta==2": { - "model": "node/jungle_planks.json" - }, - "meta==3": { - "model": "node/acacia_planks.json" - } -} diff --git a/mods/test/assets/test/nodestate/test1.json b/mods/test/assets/test/nodestate/test1.json deleted file mode 100644 index e560473..0000000 --- a/mods/test/assets/test/nodestate/test1.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "meta==0": { - "model": "node/tropical_rainforest_wood.json" - }, - "meta==1": { - "model": "node/willow_wood.json" - }, - "meta==2": { - "model": "node/xnether_blue_wood.json" - }, - "meta==3": { - "model": "node/xnether_purple_wood.json" - } -} diff --git a/mods/test/assets/test/nodestate/test2.json b/mods/test/assets/test/nodestate/test2.json deleted file mode 100644 index 5a7029f..0000000 --- a/mods/test/assets/test/nodestate/test2.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "meta==0": { - "model": "node/frame.json" - }, - "meta==1": { - "model": "node/grass.json" - }, - "meta==2": { - "model": "node/oak_planks.json" - }, - "meta==3": { - "model": "node/acacia_planks.json" - } -} diff --git a/mods/test/assets/test/nodestate/test3.json b/mods/test/assets/test/nodestate/test3.json deleted file mode 100644 index c7f595e..0000000 --- a/mods/test/assets/test/nodestate/test3.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "meta==0": { - "model": "node/jungle_planks.json" - }, - "meta==1": { - "model": "node/tropical_rainforest_wood.json" - }, - "meta==2": { - "model": "node/willow_wood.json" - }, - "meta==3": { - "model": "node/xnether_blue_wood.json" - } -} diff --git a/mods/test/assets/test/nodestate/test4.json b/mods/test/assets/test/nodestate/test4.json deleted file mode 100644 index b925d58..0000000 --- a/mods/test/assets/test/nodestate/test4.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "meta==0": { - "model": "node/oak_planks.json" - }, - "meta==1": { - "model": "node/jungle_planks.json" - }, - "meta==2": { - "model": "node/acacia_planks.json" - }, - "meta==3": { - "model": "node/willow_wood.json" - } -} diff --git a/mods/test/assets/test/nodestate/test5.json b/mods/test/assets/test/nodestate/test5.json deleted file mode 100644 index eb652da..0000000 --- a/mods/test/assets/test/nodestate/test5.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "meta==0": { - "model": "node/grass.json" - }, - "meta==1": { - "model": "node/frame.json" - }, - "meta==2": { - "model": "node/xnether_purple_wood.json" - }, - "meta==3": { - "model": "node/tropical_rainforest_wood.json" - } -} diff --git a/mods/test/assets/test/texture/0.png b/mods/test/assets/test/texture/0.png deleted file mode 100644 index 4b48a99..0000000 Binary files a/mods/test/assets/test/texture/0.png and /dev/null differ diff --git a/mods/test/assets/test/texture/acacia_planks.png b/mods/test/assets/test/texture/acacia_planks.png deleted file mode 100644 index 01d81c9..0000000 Binary files a/mods/test/assets/test/texture/acacia_planks.png and /dev/null differ diff --git a/mods/test/assets/test/texture/frame.png b/mods/test/assets/test/texture/frame.png deleted file mode 100644 index 4a57b06..0000000 Binary files a/mods/test/assets/test/texture/frame.png and /dev/null differ diff --git a/mods/test/assets/test/texture/grass.png b/mods/test/assets/test/texture/grass.png deleted file mode 100644 index 3ec069c..0000000 Binary files a/mods/test/assets/test/texture/grass.png and /dev/null differ diff --git a/mods/test/assets/test/texture/jungle_planks.png b/mods/test/assets/test/texture/jungle_planks.png deleted file mode 100644 index 1ecc2e6..0000000 Binary files a/mods/test/assets/test/texture/jungle_planks.png and /dev/null differ diff --git a/mods/test/assets/test/texture/oak_planks.png b/mods/test/assets/test/texture/oak_planks.png deleted file mode 100644 index 73ffcbd..0000000 Binary files a/mods/test/assets/test/texture/oak_planks.png and /dev/null differ diff --git a/mods/test/assets/test/texture/tropical_rainforest_wood.png b/mods/test/assets/test/texture/tropical_rainforest_wood.png deleted file mode 100644 index af57e11..0000000 Binary files a/mods/test/assets/test/texture/tropical_rainforest_wood.png and /dev/null differ diff --git a/mods/test/assets/test/texture/willow_wood.png b/mods/test/assets/test/texture/willow_wood.png deleted file mode 100644 index 6107044..0000000 Binary files a/mods/test/assets/test/texture/willow_wood.png and /dev/null differ diff --git a/mods/test/assets/test/texture/xnether_blue_wood.png b/mods/test/assets/test/texture/xnether_blue_wood.png deleted file mode 100644 index cd66800..0000000 Binary files a/mods/test/assets/test/texture/xnether_blue_wood.png and /dev/null differ diff --git a/mods/test/assets/test/texture/xnether_purple_wood.png b/mods/test/assets/test/texture/xnether_purple_wood.png deleted file mode 100644 index 6a989b8..0000000 Binary files a/mods/test/assets/test/texture/xnether_purple_wood.png and /dev/null differ diff --git a/mods/test/init.lua b/mods/test/init.lua deleted file mode 100644 index ac4d4bd..0000000 --- a/mods/test/init.lua +++ /dev/null @@ -1,98 +0,0 @@ --- parent = default:air --- --- hasHalfTransparency --- collideBox = {} --- plantLike = {} --- nodebox = {} - -local node_template = { - parent = "default:normal" or node_template, - render = { - has_half_transparency = false - }, - collision = { - - }, - events = { - - }, - node_advancement_factory = function(world_id, node_pos) - local node_advancement = { - onLoad = function(data) - - end, - onSave = function() - return {} - end - } - - return node_advancement - end - -} - -local instance = {} - ---[[ -Движок автоматически подгружает ассеты из папки assets -В этом методе можно зарегистрировать ассеты из иных источников -Состояния нод, частицы, анимации, модели, текстуры, звуки, шрифты -]]-- -function instance.assetsInit() -end - ---[[ -*preInit. События для регистрации определений игрового контента -Ноды, воксели, миры, порталы, сущности, предметы -]]-- -function instance.lowPreInit() -end - ---[[ -До вызова preInit будет выполнена регистрация -контента из файлов в папке content -]]-- -function instance.preInit() -local node_air = {} - -node_air.hasHalfTransparency = false -node_air.collideBox = nil -node_air.render = nil - -core.register_node('test0', {}) -core.register_node('test1', {}) -core.register_node('test2', {}) -core.register_node('test3', {}) -core.register_node('test4', {}) -core.register_node('test5', {}) -end - -function instance.highPreInit() -end - ---[[ -На этом этапе можно наложить изменения -на зарегистрированный другими модами контент -]]-- -function instance.init() -end - -function instance.postInit() -end - -function instance.preDeInit() -end - -function instance.deInit() -end - -function instance.postDeInit() -core.unregister_node('test0') -core.unregister_node('test1') -core.unregister_node('test2') -core.unregister_node('test3') -core.unregister_node('test4') -core.unregister_node('test5') -end - -return instance diff --git a/mods/test/mod.json b/mods/test/mod.json deleted file mode 100644 index 43bbf32..0000000 --- a/mods/test/mod.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "test", - "name": "Test Mod", - "description": "Это тестовый мод", - "depends": [], - "optional_depends": [], - "author": "DrSocalkwe3n", - "version": [0, 0, 0, 1] -}