[Mod] Item shelf [itemshelf]

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

Re: [Mod] Item shelf [itemshelf]

by Grizzly Adam » Wed Feb 07, 2018 01:13

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: 1324
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

Re: [Mod] Item shelf [itemshelf]

by twoelk » Wed Feb 07, 2018 18:14

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
Location: Lost in America
GitHub: Grizzly-Adam

Re: [Mod] Item shelf [itemshelf]

by Grizzly Adam » Wed Feb 07, 2018 18:33

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: 1324
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

Re: [Mod] Item shelf [itemshelf]

by twoelk » Wed Feb 07, 2018 18:38

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
(316.29 KiB) Not downloaded yet
Last edited by twoelk on Wed Feb 07, 2018 19:08, edited 1 time in total.
 

User avatar
Lone_Wolf
Member
 
Posts: 2186
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: [Mod] Item shelf [itemshelf]

by Lone_Wolf » Wed Feb 07, 2018 18:52

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

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

Re: [Mod] Item shelf [itemshelf]

by Grizzly Adam » Wed Feb 07, 2018 19:01

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: 83
Joined: Tue Jul 26, 2016 18:18
GitHub: hkzorman
In-game: zorman2000

Re: [Mod] Item shelf [itemshelf]

by zorman2000 » Wed Feb 07, 2018 19:09

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: 2186
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: [Mod] Item shelf [itemshelf]

by Lone_Wolf » Wed Feb 07, 2018 19:34

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
 

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

Re: [Mod] Item shelf [itemshelf]

by bell07 » Wed Feb 07, 2018 19:43

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: 1324
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

Re: [Mod] Item shelf [itemshelf]

by twoelk » Wed Feb 07, 2018 19:54

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
(307.29 KiB) Not downloaded yet
screenshot_20180207_203514.png
(283.65 KiB) Not downloaded yet
screenshot_20180207_203259.png
(166.36 KiB) Not downloaded yet
 

Sokomine
Member
 
Posts: 3874
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] Item shelf [itemshelf]

by Sokomine » Sat Feb 10, 2018 05:46

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: 819
Joined: Mon Apr 25, 2016 16:09
Location: Maryland, USA
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55

Re: [Mod] Item shelf [itemshelf]

by GamingAssociation39 » Wed Feb 14, 2018 22:48

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
Location: Lost in America
GitHub: Grizzly-Adam

Re: [Mod] Item shelf [itemshelf]

by Grizzly Adam » Wed Feb 14, 2018 23:46

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

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

Re: [Mod] Item shelf [itemshelf]

by GamingAssociation39 » Thu Feb 15, 2018 02:35

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
Location: Lost in America
GitHub: Grizzly-Adam

Re: [Mod] Item shelf [itemshelf]

by Grizzly Adam » Sat Feb 17, 2018 00:11

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
Location: Lost in America
GitHub: Grizzly-Adam

Re: [Mod] Item shelf [itemshelf]

by Grizzly Adam » Sat Feb 17, 2018 21:53

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
 

Previous

Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 11 guests