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

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



八十八.蜂箱快速产蜂蜜

	用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/beebox.lua文件,

	1.将下列内容:

			inst.components.harvestable:SetGrowTime(TUNING.BEEBOX_HONEY_TIME)
			inst.components.harvestable:StartGrowing()
		end
	end
end

local function stopsleep(inst)
	if not inst:HasTag("burnt") then
		if inst.components.harvestable then
			inst.components.harvestable:SetGrowTime(nil)
			inst.components.harvestable:StopGrowing()

	替换为:

			inst.components.harvestable:SetGrowTime(TUNING.BEEBOX_HONEY_TIME*.01)
			inst.components.harvestable:StartGrowing()
		end
	end
end

local function stopsleep(inst)
	if not inst:HasTag("burnt") then
		if inst.components.harvestable then
			inst.components.harvestable:SetGrowTime(TUNING.BEEBOX_HONEY_TIME*.01)
			inst.components.harvestable:StartGrowing()


	2.将inst:ListenForEvent( "dusktime", StopSpawningFn(inst), GetWorld())替换为inst:ListenForEvent( "dusktime", StartSpawningFn(inst), GetWorld())

	即可让蜂箱快速产蜂蜜,几秒钟一箱就满了