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

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


 1
 2三十七.一次采集五个
 3
 4	MT管理器打开游戏目录/assets/DLC0002/scripts/components/pickable.lua文件,将self.numtoharvest = number or 1替换为self.numtoharvest = 5
 5
 6	即可让全部采集品一次采集5个,数字可自行调整。也可单独修改某项物品一次采集五个:
 7
 8	1.草:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/grass.lua文件,将inst.components.pickable:SetUp("cutgrass", TUNING.GRASS_REGROW_TIME)替换为inst.components.pickable:SetUp("cutgrass", TUNING.GRASS_REGROW_TIME, 5)
 9
10	2.树枝:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/sapling.lua文件,将inst.components.pickable:SetUp("twigs", TUNING.SAPLING_REGROW_TIME)替换为inst.components.pickable:SetUp("twigs", TUNING.SAPLING_REGROW_TIME, 5)
11
12	3.蘑菇:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/mushrooms.lua文件,将inst.components.pickable:SetUp(data.pickloot, nil)替换为inst.components.pickable:SetUp(data.pickloot, nil, 5)
13
14	4.胡萝卜:用MT管理器打开游戏目录/assets/scripts/prefabs/carrot.lua文件,将inst.components.pickable:SetUp("carrot", 10)替换为inst.components.pickable:SetUp("carrot", 10, 5)
15
16	5.芦苇:用MT管理器打开游戏目录/assets/scripts/prefabs/reeds.lua文件,将inst.components.pickable:SetUp("cutreeds", TUNING.REEDS_REGROW_TIME)替换为inst.components.pickable:SetUp("cutreeds", TUNING.REEDS_REGROW_TIME, 5)
17
18	6.浆果:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/berrybush.lua文件,将inst.components.pickable:SetUp("berries", TUNING.BERRY_REGROW_TIME)替换为inst.components.pickable:SetUp("berries", TUNING.BERRY_REGROW_TIME, 5)
19
20	7.花:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/flower.lua文件,将inst.components.pickable:SetUp("petals", 10)替换为inst.components.pickable:SetUp("petals", 10, 5)
21
22	8.恶魔花:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/flower_evil.lua文件,将inst.components.pickable:SetUp("petals_evil", 10)替换为inst.components.pickable:SetUp("petals_evil", 10, 5)
23
24	9.洞穴花:用MT管理器打开游戏目录/assets/scripts/prefabs/flower_cave.lua文件,将inst.components.pickable:SetUp("lightbulb", TUNING.FLOWER_CAVE_REGROW_TIME)替换为inst.components.pickable:SetUp("lightbulb", TUNING.FLOWER_CAVE_REGROW_TIME, 5)
25
26	10.香蕉:用MT管理器打开游戏目录/assets/scripts/prefabs/cave_banana_tree.lua文件,将inst.components.pickable:SetUp("cave_banana", TUNING.CAVE_BANANA_GROW_TIME)替换为inst.components.pickable:SetUp("cave_banana", TUNING.CAVE_BANANA_GROW_TIME, 5)
27
28	11.蕨类:用MT管理器打开游戏目录/assets/scripts/prefabs/cave_fern.lua文件,将inst.components.pickable:SetUp("foliage", 10)替换为inst.components.pickable:SetUp("foliage", 10, 5)
29
30	12.木炭:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/evergreens.lua文件,将inst.components.lootdropper:SpawnLootPrefab("charcoal")替换为下列内容:
31
32	inst.components.lootdropper:SpawnLootPrefab("charcoal")
33	inst.components.lootdropper:SpawnLootPrefab("charcoal")
34	inst.components.lootdropper:SpawnLootPrefab("charcoal")
35	inst.components.lootdropper:SpawnLootPrefab("charcoal")
36	inst.components.lootdropper:SpawnLootPrefab("charcoal")
37
38	13.曼德拉草:用MT管理器打开游戏目录/assets/scripts/prefabs/mandrake.lua文件,在inst:AddComponent("pickable")的下一行插入inst.components.pickable:SetUp("mandrake", 10, 4)
39
40	即可单独修改某项物品一次采集五个