Page 1 of 1

[Mod] Droplift [git][droplift]

Posted: Wed Apr 06, 2016 03:10
by Aftermoth
Droplift lifts drops out of walkable nodes.
This mod adds no in-world items or blocks, just additional physics.
A simple API allows other mods to coordinate its behaviour as needed.

Mod dependencies: none
Download: https://github.com/Aftermoth/droplift or from https://github.com/minetest-mods/droplift
Licensing:
- Code: LGPLv2.1 or LGPLv3
Target: Minetest 0.4.10

Re: [Mod] Droplift [1.0][droplift]

Posted: Mon Apr 11, 2016 21:19
by sofar
Hi! Someone suggested to put this mod under https://github.com/minetest-mods.

However, since you're the mod author and maintainer, you should decide for yourself. If you're interested in putting your mod in github, then I can help you get your mod up there (and in the minetest-mods group, if you want).

Re: [Mod] Droplift [1.0][droplift]

Posted: Wed Apr 13, 2016 09:15
by Aftermoth
Thanks for the interest.
Yes I have noticed that suggestion is a feature of these forums (and I've sidestepped the other one).
I'd be happy to do so, but some crises will have me tied up for a while unfortunately.

Re: [Mod] Droplift [1.0][droplift]

Posted: Wed Apr 13, 2016 22:48
by sofar
Aftermoth wrote:Thanks for the interest.
Yes I have noticed that suggestion is a feature of these forums (and I've sidestepped the other one).
I'd be happy to do so, but some crises will have me tied up for a while unfortunately.
No worries. If you want me to put code in github until you're ready to yourself, just let me know.

Re: [Mod] Droplift [1.0][droplift]

Posted: Fri Apr 15, 2016 07:35
by Aftermoth
That would be fine, thanks.

I would also recommend someone examine a particular part of the code.
Specifically, near the bottom (twice I think), goes something like "local fncopy=fn" ... "local r={fncopy()}" ... "return unpack(r)"
It was intended as futureproofing, and while currently harmless, it is also therefore currently redundant, and I now suspect it wouldn't actually work anyway, although I didn't get a chance to look into it properly.

If those parts are removed, I would consider it version "1.01", and don't mind others identifying it as such.

Re: [Mod] Droplift [1.0][droplift]

Posted: Sat Apr 16, 2016 05:27
by sofar
I'm chopping through the code and I like it. A lot.

I do however really want to clean it out. A lot, too.

I think this was your first mod and I can see that you learned from doing this. A lot. However I do not like to hold on to large sections of commented code over time as they suggest to future developers that things were not fixed, badly implemented or ugly. A really simple way to fix this problem is to remove most of the references to alternative code paths, and provide minor hints for when it is really needed.

In this case, I think you can remove almost all of it. From my perspective, you've chosen reasonable options and efficient solutions.

I might just do the mowing and throw it into minetest-mods/droplift tonight. We can always undo it or merge some of the comments out later.

This also cleans out all the tunables. If this works well, there shouldn't be any tunables to begin with.

Re: [Mod] Droplift [1.0][droplift]

Posted: Sat Apr 16, 2016 05:41
by sofar
It's in here:

https://github.com/minetest-mods/droplift

Let me know when you get a git account and I'll give you write permissions to the repo.

Re: [Mod] Droplift [1.0][droplift]

Posted: Sat Apr 16, 2016 05:43
by sofar
Just one more reply before I step out to something else.

It occurred to me that only moving items up is probably not what you want. It will be fine near the surface, but I can see potential problems when mining deeper - someone accidentally entombs an item and it travels up 2000+ nodes.

A simple solution would be to grab a vmanip volume and quickly search for the closest walkable node to the entombed item. It would be a very useful addition I think to have that.

Re: [Mod] Droplift [1.0][droplift]

Posted: Sat Apr 16, 2016 07:27
by Aftermoth
Had a quick look and like it.
Minor issues:
remove obsolete ", even if they are defined as non-liftable (see "Options" below)" from README.md.
remove '("drop" = "__builtin:item")' from description.txt.

I actually did want drops to go straight up (barring 'magnets'), but you make a good point that I'll definitely consider.

Hopefully not long before I can participate.

Re: [Mod] Droplift [1.0][droplift]

Posted: Sat Apr 16, 2016 19:39
by Aftermoth
I have opened a github account, as "Aftermoth."
Sorry I couldn't find any direct messaging / join request links within github to make things simpler.

Re: [Mod] Droplift [1.0][droplift]

Posted: Sat Apr 16, 2016 21:04
by sofar
Aftermoth wrote:I have opened a github account, as "Aftermoth."
Sorry I couldn't find any direct messaging / join request links within github to make things simpler.
No worries - a forum post works just fine!

I've given you full access! Happy hacking!

Re: [Mod] Droplift [git][droplift]

Posted: Sun May 01, 2016 07:47
by Aftermoth
Significant update to code and API to make it safer and more useful for other mods to interact with.
I recommend that any users upgrade.