HomShaBom Posted January 11, 2017 Share Posted January 11, 2017 (edited) I've tried changing a few pickable prefabs to user droppicked so they work similarly to the juicy berry bushes but i've come across a few things that just don't seem to work. modmain.lua local prefabs = { "sapling", "grass", "berrybush", "flower", "carrot_planted", "cactus", } for k,v in pairs(prefabs) do AddPrefabPostInit(v, function(inst) if inst.components.pickable ~= nil then inst.components.pickable.quickpick = false inst.components.pickable.droppicked = true inst.components.pickable.dropheight = 1 end end) end So you can see I'm making exactly the same changes for saplings, grass, berry bushes, flowers, carrots, and cactus. It works for the first 4, but it does not work for the last 4. When I pick a sapling, a twig falls on the ground instead of going into my inventory. When I pick grass, cut grass falls on the ground instead of going into my inventory. When I pick a berry bush, the berry falls to the ground instead of going into my inventory. When I pick a flower, carrot, or cactus, the petal, carrot, or cactus flesh instantly goes into my inventory instead of falling to the ground. Why doesn't this work for some prefabs? Edited January 11, 2017 by HomShaBom Link to comment Share on other sites More sharing options...
Lumina Posted January 11, 2017 Share Posted January 11, 2017 I'm not sure about cactus, but flower and carrot are instant pick, when grass/berry bush and sapling aren't. So maybe they use a different picking function or something ? Or maybe the quickpick prevent the drop to happen ? Link to comment Share on other sites More sharing options...
HomShaBom Posted January 11, 2017 Author Share Posted January 11, 2017 I forgot to mention I am setting quickpick = false. I'll update the code in the post. The reason I included cactus was to show that whether the thing is gone after it's picked or if it can regrow is irrelevant. Link to comment Share on other sites More sharing options...
HomShaBom Posted January 12, 2017 Author Share Posted January 12, 2017 (edited) Flower, Evil Flower, Carrot, Cactus, Cave Fern, Lichen, and Reeds all refuse to drop their picked item, they all instantly go into the inventory, even after setting quickpick = false, droppicked = true, dropheight = 1 Berry Bush, Berry Bush (2), Juicy Berry Bush, Blue Mushroom, Green Mushroom, Red Mushroom, Grass, Sapling, Spiky Bush, Light Flower (1), Light Flower (2), Light Flower (3), Mysterious Plant, Cave Banana Tree all do work with droppicked exactly as expected. Glommer's Statue works with droppicked, but for some reason the statue still looks like it has the flower even though you knock the flower to the ground. Edited January 12, 2017 by HomShaBom Link to comment Share on other sites More sharing options...
HomShaBom Posted January 17, 2017 Author Share Posted January 17, 2017 So... Does anyone know why I can't get droppicked to work with stuff like Reeds, Cactus, and Lichen? Link to comment 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