When updating my server I regularly get in trouble about not even knowing what version of a mod I'm just running. I thought about it and had some ideas to improove this. Probably someone has ideas too or thinks I'm wrong so please post your opinion!
I do suggest as best practice for every mod:
1) Mod has a unique name
2) each release of a module has a unique version number
3) on load print module name and version number
3) (optional) custom version number printed on load for mods not modified by original author
Having module version number available in minetest eg by /modinfo might be good too. But this might need changes in minetest.
[General] best practice for mod developers?
[General] best practice for mod developers?
DON'T mention coding style!
(c) sapier all rights reserved
(c) sapier all rights reserved
- Hackeridze
- Member
- Posts: 310
- Joined: Thu Nov 03, 2011 13:35
+1robin wrote:Better write yourself a tool to compare states
1) data/mods/<modname>
2) hash over the all files
3) no need
4) generate list of all recipes
5) generate list of all nodes/crafts/etc
6) compare recipes/nodes/crafts/etc for duplicates.
My game: RTMG
GENTOO USER
GENTOO USER
Code: Select all
modname = {}
modname.name = "modname"
modname.version = "0.00"
modname.modpath = dump(minetest.get_modpath("modname"))
print("mod '"..modname.name.."' v"..modname.version.." loaded at "..modname.modpath)
+1 it's a good practice for mod developpersapier wrote:When updating my server I regularly get in trouble about not even knowing what version of a mod I'm just running. I thought about it and had some ideas to improove this. Probably someone has ideas too or thinks I'm wrong so please post your opinion!
I do suggest as best practice for every mod:
1) Mod has a unique name
2) each release of a module has a unique version number
3) on load print module name and version number
3) (optional) custom version number printed on load for mods not modified by original author
Having module version number available in minetest eg by /modinfo might be good too. But this might need changes in minetest.
-may be also, a lua API to register a lua function that provide full mod name and version, by this way any player may request the mods list and/or get a the full name and description of a particular mod , on-line.
-may be also the mod provide the doc, for detailed description, for nodes and recipe ... doc reachable by the minetest client.
0.4 for serious builder click here
Dedicated Minetest redcrab server forum at http://minetestbb.suret.net
It's nice to be important but it is more important to be nice.
Dedicated Minetest redcrab server forum at http://minetestbb.suret.net
It's nice to be important but it is more important to be nice.
Who is online
Users browsing this forum: No registered users and 39 guests