代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。
原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html
1
2五十一.种草不用施肥
3
4 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/grass.lua文件,
5
6 1.将下列内容:
7
8local function ontransplantfn(inst)
9 if inst.components.pickable then
10 inst.components.pickable:MakeBarren()
11 end
12end
13
14 替换为:
15
16local function ontransplantfn(inst)
17 --if inst.components.pickable then
18 --inst.components.pickable:MakeBarren()
19 --end
20end
21
22
23 2.在local function onpickedfn(inst)的下一行插入以下内容:
24
25 inst.components.pickable.cycles_left = 20
26
27 即可种草不用施肥