Coder Social home page Coder Social logo

Comments (8)

Uberi avatar Uberi commented on July 18, 2024

I believe the code could be stored in the itemstack metadata, but this would mean it wouldn't be possible to stack those items. Or maybe we can turn it into a feature and make it copy code from one item into another.

from digilines.

cornernote avatar cornernote commented on July 18, 2024

Could it become a new item so that it can save in the metadata, but it won't stack because it's somewhat unique.

Not sure if/how the minetest engine will handle dynamically added items, and if there is a mechanism for them to be removed during runtime so that it doesn't fill the item list.

from digilines.

Uberi avatar Uberi commented on July 18, 2024

There is no support for dynamic item registration as far as I'm aware - IIRC, it's a non-trivial addition to the engine.

from digilines.

cornernote avatar cornernote commented on July 18, 2024

Ok, forget removing items. How about just adding the item at runtime? I think thats how normal mods load items anyway, and I think it can be done at any time the game is running, but I'm not 100% sure.

If this works, I don't think the world will collect enough of them in people's bags to need to remove them. Next time the server boots, it should only init new items that are in peoples bags.

Do you think that could work?

from digilines.

Uberi avatar Uberi commented on July 18, 2024

Normal mods create the nodes at load time. This allows the media and stuff to get sent to the client when they join, so there doesn't need to be any media transfer afterwards.

from digilines.

Jeija avatar Jeija commented on July 18, 2024

First of all:

Perhaps when it is digged

Can you define it ? What item do you mean?

Let me assume you mean the luacontroller, saving digiline channels etc. wouldn't make sense to me. The following idea only applies to the luacontroller:

I don't know if this is still possible in minetest as I haven't followed recent development, but couldn't we just save the code as a file in the world directory? That would allow code sharing on a server (optional - must be enabled) and storing your personal programs. It would also permit users to copy this folder to different worlds and use their code for several creations. Saving and Loading happens in the controller's formspec.
Secondly, something I was planning for ages: Is there finally a way to use cURL from lua mods (come on, I proposed and coded that like more than half a year ago)?? If so, it would be awesome to have code sharing via the mesecons website in your browser, but also available in-game.

from digilines.

cornernote avatar cornernote commented on July 18, 2024

Hey Jeija,

Yeah, "it" is the luacontroller. =)

I was thinking saving on dig would be easier than the engine permits. It would be easier for the user, but due to the lack of dynamic items it doesn't make sense to code that way.

I think saving to the world data is the next best thing. As you suggested, the luacontroller could save it's text into a named file, and also have an option to load text from a named file. That would make coding a lot easier too, wont have to keep copy/paste from notepad++, can just press a button and reload the named file.

CURL would be really nice too, because then it can load a luacontroller direct from GitHub.com! You just have to be careful of security risks. I recommend to include it, but have it disabled by default. The README can warn them to be careful where they source their code, and then have instructions to turn it on.

from digilines.

Jeija avatar Jeija commented on July 18, 2024

I will work on something like a code repository when the minetest engine adds CURL support from Lua, but I'll close this issue until then.

from digilines.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.