代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。
原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html
1
2三四五.夏天植物、农田不枯萎
3
4 1.草不枯萎:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/grass.lua文件,将inst.makewitherabletask = inst:DoTaskInTime(TUNING.WITHER_BUFFER_TIME, function(inst) inst.components.pickable:MakeWitherable() end)替换为--inst.makewitherabletask = inst:DoTaskInTime(TUNING.WITHER_BUFFER_TIME, function(inst) inst.components.pickable:MakeWitherable() end)
5
6
7 2.树苗不枯萎:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/sapling.lua文件,将inst.makewitherabletask = inst:DoTaskInTime(TUNING.WITHER_BUFFER_TIME, function(inst) inst.components.pickable:MakeWitherable() end)替换为--inst.makewitherabletask = inst:DoTaskInTime(TUNING.WITHER_BUFFER_TIME, function(inst) inst.components.pickable:MakeWitherable() end)
8
9
10 3.果树丛不枯萎:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/berrybush.lua文件,将inst.makewitherabletask = inst:DoTaskInTime(TUNING.WITHER_BUFFER_TIME, function(inst) inst.components.pickable:MakeWitherable() end)替换为--inst.makewitherabletask = inst:DoTaskInTime(TUNING.WITHER_BUFFER_TIME, function(inst) inst.components.pickable:MakeWitherable() end)
11
12
13 4.农田不枯萎:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/plant_normal.lua文件,将inst.makewitherabletask = inst:DoTaskInTime(TUNING.WITHER_BUFFER_TIME, function(inst) inst.components.crop:MakeWitherable() end)替换为--inst.makewitherabletask = inst:DoTaskInTime(TUNING.WITHER_BUFFER_TIME, function(inst) inst.components.crop:MakeWitherable() end)
14
15 即可让植物、农田在夏天不枯萎