From 6456aba73f0ef3f2fa7fd2b2a69cfdf8624afe23 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 24 May 2020 15:46:26 +0200 Subject: Replacement for Minimal Development Test (PR) (#9450) --- games/minimal/mods/modchannels/init.lua | 14 ++++++++++++++ games/minimal/mods/modchannels/mod.conf | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 games/minimal/mods/modchannels/init.lua create mode 100644 games/minimal/mods/modchannels/mod.conf (limited to 'games/minimal/mods/modchannels') diff --git a/games/minimal/mods/modchannels/init.lua b/games/minimal/mods/modchannels/init.lua new file mode 100644 index 000000000..ee925f09b --- /dev/null +++ b/games/minimal/mods/modchannels/init.lua @@ -0,0 +1,14 @@ +-- +-- Mod channels experimental handlers +-- +local mod_channel = minetest.mod_channel_join("experimental_preview") + +minetest.register_on_modchannel_message(function(channel, sender, message) + minetest.log("action", "[modchannels] Server received message `" .. message + .. "` on channel `" .. channel .. "` from sender `" .. sender .. "`") + + if mod_channel:is_writeable() then + mod_channel:send_all("experimental answers to preview") + mod_channel:leave() + end +end) diff --git a/games/minimal/mods/modchannels/mod.conf b/games/minimal/mods/modchannels/mod.conf new file mode 100644 index 000000000..7c13aadfb --- /dev/null +++ b/games/minimal/mods/modchannels/mod.conf @@ -0,0 +1,2 @@ +name = modchannels +description = Add experimental mod channel handlers -- cgit v1.2.3