[Mod] Droplift [git][droplift]

Aftermoth
Member
 
Posts: 22
Joined: Wed Apr 06, 2016 01:26

[Mod] Droplift [git][droplift]

by Aftermoth » Wed Apr 06, 2016 03:10

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
Last edited by Aftermoth on Sun May 29, 2016 08:38, edited 7 times in total.
 

sofar
Developer
 
Posts: 1766
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Mon Apr 11, 2016 21:19

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).
 

Aftermoth
Member
 
Posts: 22
Joined: Wed Apr 06, 2016 01:26

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

by Aftermoth » Wed Apr 13, 2016 09:15

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.
 

sofar
Developer
 
Posts: 1766
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Wed Apr 13, 2016 22:48

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.
 

Aftermoth
Member
 
Posts: 22
Joined: Wed Apr 06, 2016 01:26

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

by Aftermoth » Fri Apr 15, 2016 07:35

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.
 

sofar
Developer
 
Posts: 1766
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Sat Apr 16, 2016 05:27

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.
 

sofar
Developer
 
Posts: 1766
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Sat Apr 16, 2016 05:41

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.
 

sofar
Developer
 
Posts: 1766
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Sat Apr 16, 2016 05:43

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.
 

Aftermoth
Member
 
Posts: 22
Joined: Wed Apr 06, 2016 01:26

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

by Aftermoth » Sat Apr 16, 2016 07:27

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.
 

Aftermoth
Member
 
Posts: 22
Joined: Wed Apr 06, 2016 01:26

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

by Aftermoth » Sat Apr 16, 2016 19:39

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.
 

sofar
Developer
 
Posts: 1766
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

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

by sofar » Sat Apr 16, 2016 21:04

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!
 

Aftermoth
Member
 
Posts: 22
Joined: Wed Apr 06, 2016 01:26

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

by Aftermoth » Sun May 01, 2016 07:47

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.
 


Return to WIP Mods



Who is online

Users browsing this forum: doyousketch2 and 3 guests