Post 9h8Wfn0G2avTZHTAYK by resist__berlin@chaos.social
 (DIR) More posts by resist__berlin@chaos.social
 (DIR) Post #9h8VpSITmSNaI62Ow4 by Minetest@fosstodon.org
       2019-03-25T17:27:05Z
       
       0 likes, 1 repeats
       
       The Minetest Modding Book has been a work in progress for many years, but is soon approaching its first edition.Feedback would be awesome. Where is it lacking? What does it do well? What did you find hard to understand?#minetest #modding #freegaminghttp://rubenwardy.com/minetest_modding_book/
       
 (DIR) Post #9h8WXUkY1SwwdiAMhk by Minetest@fosstodon.org
       2019-03-25T17:35:04Z
       
       0 likes, 1 repeats
       
       The book is also not just about modding, but about making games with Minetest too. Suggestions for an alternative title would be welcome!
       
 (DIR) Post #9h8WdsBpmmTj4iyEZk by jsalvador@mastodon.social
       2019-03-25T17:36:13Z
       
       0 likes, 0 repeats
       
       @Minetest I will need to read it again... But the last time I found it pretty nice and useful
       
 (DIR) Post #9h8Wfn0G2avTZHTAYK by resist__berlin@chaos.social
       2019-03-25T17:36:14Z
       
       0 likes, 0 repeats
       
       @Minetest "Minetest Modding & Game Creation Book"?😊
       
 (DIR) Post #9h8XmUqe2USDF5je0O by vk@mamot.fr
       2019-03-25T17:48:58Z
       
       0 likes, 0 repeats
       
       @Minetest Hello!  Is it possible to interact with the OS?  For instance, suppose that I have a piece of software that I don't want to rewrite in lua, but it is a standalone program that reads commands and print results (e.g. in json).  Would it be possible to run it on the server?
       
 (DIR) Post #9h8YIfOyKuiFEz8DLc by Minetest@fosstodon.org
       2019-03-25T17:54:48Z
       
       0 likes, 0 repeats
       
       @vk Minetest has mod security on by default, which prevents mods from being able to access the file system and computer outside of Minetest. However, there are ways around this:1. Communicating with HTTP2. Communicating with sockets3. Running the programOption 1) requires the user to opt-in to allowing your mod to make HTTP requests. Look for minetest.request_http_api()1/2
       
 (DIR) Post #9h8YR6QpitxVOD1aMK by Minetest@fosstodon.org
       2019-03-25T17:56:17Z
       
       0 likes, 0 repeats
       
       @vk Options 2 and 3) require the user to opt-in to allowing your mod to escape the mod security sandbox. Look for minetest.request_insecure_environment()The IRC mod shows an example of how to include and use sockets.For Option 3, you'd do this:local ie = minetest.require_insecure_environment()ie.os.execute("path/to/program")Explaining this is on my to do list for the book!2/2
       
 (DIR) Post #9h8ZKkoBJ0Z4XgTwjQ by vk@mamot.fr
       2019-03-25T18:06:20Z
       
       0 likes, 0 repeats
       
       @Minetest It's a good thing that the mod user has to opt-in.Is it possible to keep the connection to the program open, for point 3?  To have something like the webextension's native messaging in the browser : https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messagingMaybe it's the io.popen function but I'm not sure (https://www.lua.org/manual/5.1/manual.html#pdf-io.popen)Otherwise, HTTP requests would be a good fit.
       
 (DIR) Post #9h8eiFbhSjUaUgfRSq by FiXato@mastodon.social
       2019-03-25T19:06:38Z
       
       0 likes, 0 repeats
       
       @MinetestSome suggestions:Creating Mods and Games with MinetestMinetest: A Developers GuideThe Complete Guide to MinetestOr my favourite:Genesis: The Creators' Guide to #Minetest
       
 (DIR) Post #9h8hf71DEn9AqonOhU by Sylphox@makerdon.org
       2019-03-25T19:39:41Z
       
       0 likes, 0 repeats
       
       @Minetest How about "The Minetest Engine Textbook"