代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。
原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html
三十七.一次采集五个
用MT管理器打开游戏目录/assets/DLC0002/scripts/components/pickable.lua文件,将self.numtoharvest = number or 1替换为self.numtoharvest = 5
即可让全部采集品一次采集5个,数字可自行调整。也可单独修改某项物品一次采集五个:
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)
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)
3.蘑菇:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/mushrooms.lua文件,将inst.components.pickable:SetUp(data.pickloot, nil)替换为inst.components.pickable:SetUp(data.pickloot, nil, 5)
4.胡萝卜:用MT管理器打开游戏目录/assets/scripts/prefabs/carrot.lua文件,将inst.components.pickable:SetUp("carrot", 10)替换为inst.components.pickable:SetUp("carrot", 10, 5)
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)
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)
7.花:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/flower.lua文件,将inst.components.pickable:SetUp("petals", 10)替换为inst.components.pickable:SetUp("petals", 10, 5)
8.恶魔花:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/flower_evil.lua文件,将inst.components.pickable:SetUp("petals_evil", 10)替换为inst.components.pickable:SetUp("petals_evil", 10, 5)
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)
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)
11.蕨类:用MT管理器打开游戏目录/assets/scripts/prefabs/cave_fern.lua文件,将inst.components.pickable:SetUp("foliage", 10)替换为inst.components.pickable:SetUp("foliage", 10, 5)
12.木炭:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/evergreens.lua文件,将inst.components.lootdropper:SpawnLootPrefab("charcoal")替换为下列内容:
inst.components.lootdropper:SpawnLootPrefab("charcoal")
inst.components.lootdropper:SpawnLootPrefab("charcoal")
inst.components.lootdropper:SpawnLootPrefab("charcoal")
inst.components.lootdropper:SpawnLootPrefab("charcoal")
inst.components.lootdropper:SpawnLootPrefab("charcoal")
13.曼德拉草:用MT管理器打开游戏目录/assets/scripts/prefabs/mandrake.lua文件,在inst:AddComponent("pickable")的下一行插入inst.components.pickable:SetUp("mandrake", 10, 4)
即可单独修改某项物品一次采集五个