Lawrence Posted June 12, 2014 Share Posted June 12, 2014 (edited) Hello everyone. I was wondering if it is possible to create a container that allows just one type of items,or at least make a container refuse all kinds of items except one. Should I create a new widget? (In that case I think I'm not even going to try) Thanks for your help Edited June 12, 2014 by Lawrence Link to comment https://forums.kleientertainment.com/forums/topic/37385-question-how-can-i-add-a-new-type-of-container/ Share on other sites More sharing options...
DevilXD Posted June 12, 2014 Share Posted June 12, 2014 You must set ItemTest function... Look into cookpot.lua and icebox.lua for examples... Link to comment https://forums.kleientertainment.com/forums/topic/37385-question-how-can-i-add-a-new-type-of-container/#findComment-498929 Share on other sites More sharing options...
JackSlender Posted June 12, 2014 Share Posted June 12, 2014 As DevilXD said, you need to do an ItemTest function that either checks if the item has a specific tag, or does an item name check. If need be, you can do a postinit function to add a tag to an item. Link to comment https://forums.kleientertainment.com/forums/topic/37385-question-how-can-i-add-a-new-type-of-container/#findComment-498952 Share on other sites More sharing options...
Lawrence Posted June 23, 2014 Author Share Posted June 23, 2014 Ok, I'll check. Again, thank you guys! Link to comment https://forums.kleientertainment.com/forums/topic/37385-question-how-can-i-add-a-new-type-of-container/#findComment-503742 Share on other sites More sharing options...
Lawrence Posted June 24, 2014 Author Share Posted June 24, 2014 As DevilXD said, you need to do an ItemTest function that either checks if the item has a specific tag, or does an item name check. If need be, you can do a postinit function to add a tag to an item. You must set ItemTest function... Look into cookpot.lua and icebox.lua for examples... it was easier than I thought :SThank you ^_^ Link to comment https://forums.kleientertainment.com/forums/topic/37385-question-how-can-i-add-a-new-type-of-container/#findComment-504092 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now