EuedeAdodooedoe Posted March 3, 2017 Share Posted March 3, 2017 (edited) Here is the code I edited and wrote for changing marble shrub loot tables, but it doesn't work. I can't spot anything wrong with it, and neither could a programmer I talked to, so I thought I'd ask here (the code is place within modmain.lua): local statedataW = { { -- short idleanim = "idle_short", hitanim = "hit_short", breakanim = "mined_short", growanim = "grow_tall_to_short", growsound = "dontstarve/common/together/marble_shrub/wilt_to_grow", workleft = TUNING.MARBLESHRUB_MINE_SMALL, loot = function() return {"marble", "marblebean"} end, }, { -- normal idleanim = "idle_normal", hitanim = "hit_normal", breakanim = "mined_normal", growanim = "grow_short_to_normal", growsound = "dontstarve/common/together/marble_shrub/grow", workleft = TUNING.MARBLESHRUB_MINE_NORMAL, loot = function() return {"marble", "marble", "marble", "marblebean"} end, }, { -- tall idleanim = "idle_tall", hitanim = "hit_tall", breakanim = "mined_tall", growanim = "grow_normal_to_tall", growsound = "dontstarve/common/together/marble_shrub/grow", workleft = TUNING.MARBLESHRUB_MINE_TALL, loot = function() return {"marble", "marble", "marble", "marble", "marblebean"} and math.random() < 0.95 and {"marble"} or {"marblebean"} end, }, } local function MarbleLootW(prefab) prefab.components.lootdropper.statedata = statedataW end AddPrefabPostInit("marbleshrub", MarbleLootW) Edited March 3, 2017 by EuedeAdodooedoe Added tags to the topic 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