超级玩家
- 贡献度
- 7
- 金元
- 7767
- 积分
- 805
- 精华
- 0
- 注册时间
- 2012-2-11
|
本帖最后由 sylvia0522 于 2013-7-7 12:08 编辑
拾荒吸塵器中的採石方式用的是modmain.lua中的
worker.components.inventory:GiveItem(GLOBAL.SpawnPrefab("rocks"), nil, pt)
worker.components.inventory:GiveItem(GLOBAL.SpawnPrefab("rocks"), nil, pt)
worker.components.inventory:GiveItem(GLOBAL.SpawnPrefab("rocks"), nil, pt)
worker.components.inventory:GiveItem(GLOBAL.SpawnPrefab("flint"), nil, pt)
worker.components.inventory:GiveItem(GLOBAL.SpawnPrefab("nitre"), nil, pt)
所以拾荒吸塵器中的rocks關了
--inst.components.lootdropper:SetLoot({"rocks", "rocks", "rocks", "nitre", "flint"})
--inst.components.lootdropper:AddChanceLoot("nitre", 0.25)
--inst.components.lootdropper:AddChanceLoot("flint", 0.6)
若是想用吸塵器又可以採到寶石可以用
懒人专用,自动拾取石头木材和稀有mod整合,解决兼容问题中的modmain.lua取代拾荒吸塵器中的modmain.lua
若在modmain.lua中最下方的
if math.random(100) > 80 then
worker.components.inventory:GiveItem(GLOBAL.SpawnPrefab("marble"), nil, pt)
end
添加
if math.random(100) > 80 then
worker.components.inventory:GiveItem(GLOBAL.SpawnPrefab("orangegem"), nil, pt)
end
if math.random(100) > 80 then
worker.components.inventory:GiveItem(GLOBAL.SpawnPrefab("yellowgem"), nil, pt)
end
if math.random(100) > 80 then
worker.components.inventory:GiveItem(GLOBAL.SpawnPrefab("greengem"), nil, pt)
end
採礦除了原有紅.藍.大理石有掉率外,也會添加orangegem(橙宝石)、yellowgem(黄宝石)、greengem(绿宝石)
()處也可以换成其他物品(比如koalefant_summer红象、koalefant_winter冬象)
還未測試但可以試試
|
|