代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。
原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html
五十八.挖尖刺灌木一次得10个尖刺灌木根
用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/marsh_bush.lua文件,在inst:Remove()的下一行插入以下内容:
inst.components.lootdropper:SetLoot({"dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush"})
local pt = Point(inst.Transform:GetWorldPosition())
inst.components.lootdropper:DropLoot(pt)
即可挖尖刺灌木一次得10个尖刺灌木根,尖刺灌木根是用来种尖刺灌木的,采集获得树杈,且会被扎一下