[Mod] Item shelf [itemshelf]

User avatar
Grizzly Adam
Member
Posts: 252
Joined: Sat Aug 05, 2017 01:28
GitHub: Grizzly-Adam
Location: Lost in America
Contact:

Re: [Mod] Item shelf [itemshelf]

by Grizzly Adam » Post

Thanks for the hard work!

I just updated the Media Pack for Laptop mod, everything works great there. Also, the old lady is very pleased about the rotate bug being fixed as she uses the shelves in her house.
Check out my Mods: BBQ Mod Crops Plus

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Mod] Item shelf [itemshelf]

by twoelk » Post

cool stuff

now my bakery starts looking like the real thing :-D

hmm, you can put stacks in the shelves - but on destruction only one item per stack is dropped?
now take it to the next level of all inventories - add locked versions ;-P

User avatar
Grizzly Adam
Member
Posts: 252
Joined: Sat Aug 05, 2017 01:28
GitHub: Grizzly-Adam
Location: Lost in America
Contact:

Re: [Mod] Item shelf [itemshelf]

by Grizzly Adam » Post

It would be cool if we had the option to make a shelf either drop its contents or to retain them while stored in inventory.
Check out my Mods: BBQ Mod Crops Plus

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Mod] Item shelf [itemshelf]

by twoelk » Post

Grizzly Adam wrote:It would be cool if we had the option to make a shelf either drop its contents or to retain them while stored in inventory.
take that deeper!
imagine a shelf of filled chests
drooooool

Image
Attachments
screenshot_20180207_194509.png
screenshot_20180207_194509.png (316.29 KiB) Viewed 877 times
Last edited by twoelk on Wed Feb 07, 2018 19:08, edited 1 time in total.

User avatar
Lone_Wolf
Member
Posts: 2578
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Item shelf [itemshelf]

by Lone_Wolf » Post

twoelk wrote:
Grizzly Adam wrote:It would be cool if we had the option to make a shelf either drop its contents or to retain them while stored in inventory.
take that deeper!
imagine a shelf of filled chests
drooooool
A full shelf within a full shelf within a full shelf within a full shelf...
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
Grizzly Adam
Member
Posts: 252
Joined: Sat Aug 05, 2017 01:28
GitHub: Grizzly-Adam
Location: Lost in America
Contact:

Re: [Mod] Item shelf [itemshelf]

by Grizzly Adam » Post

Meh, I just think it would be nice to have it in the api for a developer to choose to use or not.
Check out my Mods: BBQ Mod Crops Plus

zorman2000
Member
Posts: 84
Joined: Tue Jul 26, 2016 18:18
GitHub: hkzorman
In-game: zorman2000

Re: [Mod] Item shelf [itemshelf]

by zorman2000 » Post

Grizzly Adam wrote:It would be cool if we had the option to make a shelf either drop its contents or to retain them while stored in inventory.
Grizzly Adam wrote:Meh, I just think it would be nice to have it in the api for a developer to choose to use or not.
I don't know how to do it (nodes keeping their inventories while being held as items), but it is certainly possible.
If I get to do it, it would certainly be an option in the API and not default behavior of shelves.
twoelk wrote:hmm, you can put stacks in the shelves - but on destruction only one item per stack is dropped?
You are entirely right on this, and this has been fixed in the latest version available in GitHub.
twoelk wrote:now take it to the next level of all inventories - add locked versions ;-P
Good suggestion, but not sure how to do it. How do lock a shelf? They are so open...

User avatar
Lone_Wolf
Member
Posts: 2578
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Item shelf [itemshelf]

by Lone_Wolf » Post

zorman2000 wrote:
twoelk wrote:now take it to the next level of all inventories - add locked versions ;-P
Good suggestion, but not sure how to do it. How do lock a shelf? They are so open...
Maybe take a look at the code for locked chest
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

bell07
Member
Posts: 604
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Item shelf [itemshelf]

by bell07 » Post

I don't know how to do it (nodes keeping their inventories while being held as items), but it is certainly possible.
If I get to do it, it would certainly be an option in the API and not default behavior of shelves.
See the methods after_place_node (restore node inventory from item) after_dig_node (save node inventory to item) in the laptop mod:
https://github.com/Gerold55/minetest-la ... w.lua#L106

Note the limitation if you like to do it, the stacking the shelf items is not allowed anymore (just 1x metadata for each stack). So you need to set stack_max = 1 in this case.

If you wait for Mintetest-0.5, a new function preserve_metadata() appears that should be take the search for the right item in after_dig_node obsolete.

Agree it feels strange if the itemshelf can be picked up with all the content, but the Disk Storage is usually picked up with the content, and the content of disk storage is usually disks only and not disk storage recursivelly.

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Mod] Item shelf [itemshelf]

by twoelk » Post

hmm
you can put filled chests into the shelf with the old wrench mod Image

and the technic-wrench indeed seems to allow to place and retrieve a filled chest from the shelf. now if the wrench could pick up filled shelves ...

you might want to shift the placement of the items in a large shelf a little down to have them rest on the shelf as in the small ones Image

edit:
you can place steel trapdoors in front of a shelff, so if interaction with the shelf inventory would be restricted to the front when an opening node such as a door or trapdoor is placed in front of a shelf it might be enough.

Image
Attachments
screenshot_20180207_211525.png
screenshot_20180207_211525.png (307.29 KiB) Viewed 877 times
screenshot_20180207_203514.png
screenshot_20180207_203514.png (283.65 KiB) Viewed 877 times
screenshot_20180207_203259.png
screenshot_20180207_203259.png (166.36 KiB) Viewed 877 times

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Item shelf [itemshelf]

by Sokomine » Post

zorman2000 wrote: Add half-width shelf, with open back as well (asked by GrizzlyAdam and Sokomine)
Thanks! I hope they'll show up on servers. Would love to build with them.
twoelk wrote: you can place steel trapdoors in front of a shelff, so if interaction with the shelf inventory would be restricted to the front when an opening node such as a door or trapdoor is placed in front of a shelf it might be enough.
Direction usually does not matter that much when interacting with a node. It might be easier to just check if there is a trapdoor. If it's closed - that might be trickier to check. Manually sourrounding the shelf with diffrent nodes and then placing the closed trapdoor in front might be sufficient if the area is protected.
A list of my mods can be found here.

User avatar
GamingAssociation39
Member
Posts: 858
Joined: Mon Apr 25, 2016 16:09
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55
Location: Maryland, USA

Re: [Mod] Item shelf [itemshelf]

by GamingAssociation39 » Post

Maybe you could do something like this for an oven.
Jesus Is Lord and Savior!!!

User avatar
Grizzly Adam
Member
Posts: 252
Joined: Sat Aug 05, 2017 01:28
GitHub: Grizzly-Adam
Location: Lost in America
Contact:

Re: [Mod] Item shelf [itemshelf]

by Grizzly Adam » Post

That would be really cool with a roast chicken in it?
Check out my Mods: BBQ Mod Crops Plus

User avatar
GamingAssociation39
Member
Posts: 858
Joined: Mon Apr 25, 2016 16:09
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55
Location: Maryland, USA

Re: [Mod] Item shelf [itemshelf]

by GamingAssociation39 » Post

Yeah or some other meats etc. etc.
Jesus Is Lord and Savior!!!

User avatar
Grizzly Adam
Member
Posts: 252
Joined: Sat Aug 05, 2017 01:28
GitHub: Grizzly-Adam
Location: Lost in America
Contact:

Re: [Mod] Item shelf [itemshelf]

by Grizzly Adam » Post

zoorman- any way I can rotate a entity placed in shelf to face upward, so a player is presented with an edge-on view like a coin laying on a flat surface.
Check out my Mods: BBQ Mod Crops Plus

User avatar
Grizzly Adam
Member
Posts: 252
Joined: Sat Aug 05, 2017 01:28
GitHub: Grizzly-Adam
Location: Lost in America
Contact:

Re: [Mod] Item shelf [itemshelf]

by Grizzly Adam » Post

Bug found-- dropped stacks are drops are counted as single items when picked up.

For instance, here are four slots and the number of cookies they contain:
[1][1][3][1]

When the shelf is destroy, play can then pick up one shelf and 4 cookies (not the 6 contained within).
Check out my Mods: BBQ Mod Crops Plus

zorman2000
Member
Posts: 84
Joined: Tue Jul 26, 2016 18:18
GitHub: hkzorman
In-game: zorman2000

Re: [Mod] Item shelf [itemshelf]

by zorman2000 » Post

Hi all,

I have not been active for a long time... but I think I will be slowly coming back and being more active. I come back with a new update though! This is the list of changes:
  • Enable protection using for taking/putting items on shelves.
  • Add crafting recipes.
  • Add shelves in all wood varieties.
With the above, this mod is not considered WIP anymore, and now this is version 1.0.

As per Grizzly Adam's bug, I will be looking at that soon.

A screenshot...
screenshot.png
screenshot.png (472.36 KiB) Viewed 801 times
Download: https://content.minetest.net/packages/z ... itemshelf/

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 32 guests