代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。

原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html


 1
 2一三二.靠近盆栽可补脑、可采蜂蜜,盆栽会发光
 3
 4	MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/pottedfern.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
 5
 6	inst:AddTag("flower")
 7	inst:AddComponent("sanityaura")
 8	inst.components.sanityaura.aura = TUNING.SANITYAURA_SMALL
 9	inst:AddComponent("pickable")
10	inst.components.pickable.picksound = "dontstarve/wilson/pickup_plants"
11	inst.components.pickable:SetUp("honey", 30)
12	local light = inst.entity:AddLight()
13	light:SetFalloff(0.5)
14	light:SetIntensity(.8)
15	light:SetRadius(1.0)
16	light:SetColour(146/255, 225/255, 146/255)
17	light:Enable(true)
18
19	即可靠近盆栽可补脑、可采蜂蜜(30秒生一次),还会招蜂引蝶,发出微光,让你的家多一份温馨。盆栽在建造选项(画着锤子)下,用5个叶子、1个蜗牛壳碎片建造