代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。
原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html
一三二.靠近盆栽可补脑、可采蜂蜜,盆栽会发光
用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/pottedfern.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
inst:AddTag("flower")
inst:AddComponent("sanityaura")
inst.components.sanityaura.aura = TUNING.SANITYAURA_SMALL
inst:AddComponent("pickable")
inst.components.pickable.picksound = "dontstarve/wilson/pickup_plants"
inst.components.pickable:SetUp("honey", 30)
local light = inst.entity:AddLight()
light:SetFalloff(0.5)
light:SetIntensity(.8)
light:SetRadius(1.0)
light:SetColour(146/255, 225/255, 146/255)
light:Enable(true)
即可靠近盆栽可补脑、可采蜂蜜(30秒生一次),还会招蜂引蝶,发出微光,让你的家多一份温馨。盆栽在建造选项(画着锤子)下,用5个叶子、1个蜗牛壳碎片建造