Comments (8)
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.
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.
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.
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.
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.
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.
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.
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)
- Pollution of global namespace. HOT 4
- lcd: letters are a bit far away
- LCD: Make the text left-aligned HOT 4
- Make digiline_chest report its contents on request HOT 16
- Add protected digiline_chest
- The display produces lots of warning messages like HOT 10
- minetest.setting_* functions are deprecated HOT 1
- LCD appears broken HOT 4
- LCD Z-fighting HOT 9
- LCD text is not visible from distance
- Vertical digilines HOT 2
- Add Support for Tubelib and/or Terumet to the Digilines Chest HOT 1
- LCD line length limits are not enforced properly HOT 2
- LCD lines and character limits HOT 4
- Clear screen HOT 1
- German "Umlaute" are ignored when cut and paste text in a Microcontroller editor HOT 2
- Documentation is missing HOT 2
- Get contents of a digiline chest? HOT 1
- Digiline distributor not working in the game
- moves stuff in chest at
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from digilines.