[Mod] Drinks [1.0][drinks]

Heraclitus
Member
 
Posts: 10
Joined: Tue Oct 11, 2016 17:14

Re: Drinks[drinks]

by Heraclitus » Thu Feb 02, 2017 20:06

This is a fun mod. I love the concept of presses and storage barrels. My kid and I are beginning to work on our own "drinks cellar" slightly underground with barrels and casks of different things. Quite fun.

But I did notice a few (mostly minor) things that might use a little "polish."

(1) The press and barrel don't handle stacks of containers (empty or full) in an intuitive way. If you make the mistake of putting multiple glasses or bottles in, for example, they will just "eat" the extras and just return one glass or whatever to you. Since I assume your goal here was to allow a "one at a time" type of filling, etc., rather than some sort of "machine," I don't know if it's possible to limit input to one glass or whatever. Or perhaps whether at least a warning could be produced rather than just making the extra containers disappear.

(2) Using the mod with "farming redo," some odd things happen. The melon doesn't seem to juice (either in the form of slices or whole ones); not sure why. And some of the names of juices display incorrectly when in barrels: they say "storing grapeS juice" or "storing raspberrIES" juice for fruit that is naturally stacked in bunches in inventory. The naming is correct for a glass, though: "Glass of Grape Juice" or whatever.

(3) This isn't actually a "bug," but just a thought -- it would really be nice if the warning "need more fruit" showed up somewhere in the formspec. Once you figure out how the recipes work and how much fruit you need, it's not a big deal. But at first I didn't think anything worked, because I tried five different kinds of fruit, and nothing was juicing -- turns out I was only using 1 of the fruit and that wasn't enough for a glass. But while inside the formspec, there's no way to know what's going wrong.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Drinks[drinks]

by Nathan.S » Fri Feb 03, 2017 03:16

Thanks for the input, as an user you bring things to light that I hadn't thought of as the modder, because I know how the mod works.

(1) I didn't intentionally make the machines eat any extra items that are inputted, I just didn't do the extra work to make it so only one item can be placed. I can change that around, I've used the code in other places so I know how to do it. It was intentional that you had to press each container individually, well unless you're juicing directly into a barrel, that is automatic.

(2) I'll have to take a look at that code and see what I can do about getting the naming correct, I'm surprised that the drinks in bottles would be displayed right, but not in the barrels, hopefully an easy fix.

(3) Fixed, I added an extra formspec to the machine, which basically just tells you if you don't have enough fruit, and all three states the formspec can be in now list the amount of fruit needed for the different containers.

I'll get some changes pushed yet tonight, and hopefully the rest in the morning. The naming on farming_redo might take a while longer, as I'll have to figure out what is causing that.

Edit: I added information to the formspec, you need four fruits for a glass, eight for a bottle and sixteen for a bucket. The press, barrel, and silo will now only accept a single container as input or output, so it's unlikely you should loose any of them. You can still put multiple containers in a slot, if you place one, and then place another on top, it will let the second place, but you're just asking for trouble if you do that. I'll look at the naming in the morning, and see if I can figure that out.

Edit #2: Alright, the melons work, in both full and sliced form, and will yield one glass for four of either, so it is in your best interests to slice them before juicing. I've discovered why I have the naming problem. unfortunately I can't easily do much about it. The way I coded the mod it grabs part of the itemstring to create the juice names, and those strings come from the original fruit. It's not a problem with the glasses, bottles, and buckets, as I can set a description text on those, which is the singular form of the fruit. When putting the juices into a barrel or silo it gets the fruit name from the item string. I possibly could add an extra field to the juices registration that would have the name of the fruit in singular form, and then grab that when filling the silos and barrels, but that would break backward compatibility with any partially filled barrels with effected names. I'll look into it this weekend though, if it's not too difficult I'll make the change, otherwise we might just have to live with it.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Drinks[drinks]

by Nathan.S » Sat Feb 04, 2017 04:31

Well I was able to get the barrels and silos to display the juice names in singular, but that broke taking drinks out. I might still be able to fix this by adding an extra bit of meta to the barrel or silo that is only used as a display word, and the drinks will continue to use the plural values. It should work but I'm not making any promises. Also please don't pull latest changes, as I broke things, and didn't test as well as I should have before pushing the changes. I'm going to bed, so it will be broken for the night, I know, I'm a horrible person, I should fix this before I rest...
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Drinks[drinks]

by Nathan.S » Sat Feb 04, 2017 14:19

Alright, it's fixed, well sorta. Using buckets, bottles, and glasses all uses the right word, however when using a press it still will use plural forms of words. Unfortunately the way I have it coded that is nearly impossible to fix. I have no idea how to do it, so it's going to stay wrong, HOWEVER if that bugs you, there is a simple solution. Once the press has filled the barrel use a cup, bottle, or bucket and remove liquid and then add it back, and the name will be corrected.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

todada
New member
 
Posts: 1
Joined: Sat Mar 18, 2017 18:49
GitHub: todada

Re: [Mod] Drinks [1.0][drinks]

by todada » Thu Mar 23, 2017 20:35

Great mod.
I was missing the ability to place the bottles in the world, like it is possible for the empty ones.
So, I added node definitions for glasses and bottles. Now you can place them in your little bar:

screenshot_20170320_203734.png
screenshot_20170320_203734.png (372.98 KiB) Viewed 2431 times


Vessels shelves are supported and steel bottles added (for completeness).
I've submitted a PR (my first one :-)

Have fun!
Hmmmm.....
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Drinks [1.0][drinks]

by Nathan.S » Thu Mar 23, 2017 22:01

I had purposefully not made them able to be placed, but as there is obviously interest I'll see about merging your changes.

Update: Changes merged, you can now place your bottles and glasses of drinks in the world.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

dawgdoc
Member
 
Posts: 14
Joined: Mon Feb 27, 2017 01:10

Re: [Mod] Drinks [1.0][drinks]

by dawgdoc » Sun Mar 26, 2017 07:58

Is it possible some of your recent fixes to the stand alone mod did not make it into the Survival sub-game?

1) I installed the Survival sub-game about a week ago and experienced the above mentioned error of the press eating vessels when more than one is placed into it.

I have been able to fill cups and bottles from the press and subsequently drink from them when used from the HUD.
2) When I place any of the filled containers in the barrels input slot, it does not take the juice.

3) I have not been able to juice all fruits encountered during play of the sub-game. Unfortunately, I don't know the originating mod of the offending fruits. I do recall I could juice gooseberry and one variety of raspberry (large berry from round bush) but not a second variety of raspberry (small berry from staked plant grown from starters).

I don't know if any of this is applicable to the non-filling of the barrel I am experiencing, but here is a portion of the .txt. I deleted the debug text and then started the game and placed a filled container into the input slot of the barrel. After that I exited the game.
+ Pulled from debug text

Before doing this the barrel gui reports as being empty. In previous attempts I have attempted to purge the barrel after removing the full cup/bottle and then repeated placing the cup/bottle. No matter the action I take the barrel always reports as being empty.


EDIT: As a check on myself, I restarted the game, crafted a new barrel, and tried to fill it using both the cup and the glass bottle. No joy with either. I guess it could be that I am expecting the action to happen much more rapidly than it does. But, in my attempts after placing the filled vessel I have both waited for action with the barrel gui open, and I have closed the barrel gui and then come back to it.

+ The additional lines to the debug text
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Drinks [1.0][drinks]

by Nathan.S » Sun Mar 26, 2017 14:23

Dawgdoc that is not only possible, but completely the case. I've actually stopped working, for the most part on that subgame, but I'll try and get these bugs fixed. I've pushed changes, which brings the subgames version of the mod to closely the same point as the standalone mode, though the drinks can't be placed in the subgame, as that introduced a new problem that I haven't solved yet.

Unfortunately that debug doesn't tell me much, but that's my fault. All I can see is that there are too many ABMs executing and taking too long, which I've seen locally, which is my big reason for starting a completely fresh subgame.

Hopefully it will work for you now, try pulling the changes and see if it doesn't work correctly.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

dawgdoc
Member
 
Posts: 14
Joined: Mon Feb 27, 2017 01:10

Re: [Mod] Drinks [1.0][drinks]

by dawgdoc » Sun Mar 26, 2017 22:20

Nathan.S wrote:Dawgdoc that is not only possible, but completely the case. I've actually stopped working, for the most part on that subgame, but I'll try and get these bugs fixed. I've pushed changes, which brings the subgames version of the mod to closely the same point as the standalone mode, though the drinks can't be placed in the subgame, as that introduced a new problem that I haven't solved yet.

Unfortunately that debug doesn't tell me much, but that's my fault. All I can see is that there are too many ABMs executing and taking too long, which I've seen locally, which is my big reason for starting a completely fresh subgame.

Hopefully it will work for you now, try pulling the changes and see if it doesn't work correctly.


Thank you,

I wasn't sure if you were still working on the sub-game or not, I thought I had seen recent LP videos. BTW, I added this mod, Drinks, to a MT sub-game with farming_redo and was able to load a barrel with bottles and cups, but only the cups from this mod, not the cups that were present from a different mod. I don't recall which mod the bottles were from. I think it was carrots and raspberries that I was able to press. The apples didn't press, IIRC.

I guess I will need to learn to pull git repos / files instead of simply downloading an archive. :-]}


EDIT: I just added in the changes to the sub-game and can now fill the barrel with bottles. I was able to pull juices from the barrel with a canteen. Again, Thank you.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Drinks [1.0][drinks]

by Nathan.S » Mon Mar 27, 2017 00:40

Cups and things that hold liquids from other mods will not work with my barrels and silos, as only use a naming scheme to determine whether or not they should be able to fill the barrel/silo.

If you normally download the archive, you can still do that, and get a fresh copy that way, it won't make any difference. I just say pull the changes as force of habit, as the code is on github and that is what I always do to update mods.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

Previous

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 26 guests

cron