prefabs/stalagmite.lua
121314151617
"orangegem",
}
local function workcallback(inst, worker, workleft)
local pt = Point(inst.Transform:GetWorldPosition())
if workleft <= 0 then
121314151617181920212223242526272829303132333435363738394041424344454647
"orangegem",
}
SetSharedLootTable( 'full_rock',
{
{'rocks', 1.00},
{'rocks', 1.00},
{'rocks', 1.00},
{'goldnugget', 1.00},
{'flint', 1.00},
{'goldnugget', 0.25},
{'flint', 0.60},
{'bluegem', 0.05},
{'redgem', 0.05},
})
SetSharedLootTable( 'med_rock',
{
{'rocks', 1.00},
{'rocks', 1.00},
{'flint', 1.00},
{'goldnugget', 0.50},
{'flint', 0.60},
})
SetSharedLootTable( 'low_rock',
{
{'rocks', 1.00},
{'flint', 1.00},
{'goldnugget', 0.25},
{'flint', 0.30},
})
local function workcallback(inst, worker, workleft)
local pt = Point(inst.Transform:GetWorldPosition())
if workleft <= 0 then
666768697071727374757677
local function fullrock()
local inst = commonfn()
inst.components.lootdropper:SetLoot({"rocks", "rocks", "rocks", "goldnugget", "flint"})
inst.components.lootdropper:AddChanceLoot("goldnugget", 0.25)
inst.components.lootdropper:AddChanceLoot("flint", 0.6)
inst.components.lootdropper:AddChanceLoot("bluegem", 0.05)
inst.components.lootdropper:AddChanceLoot("redgem", 0.05)
inst.AnimState:PlayAnimation("full")
return inst
96979899100101102103
local function fullrock()
local inst = commonfn()
inst.components.lootdropper:SetChanceLootTable('full_rock')
inst.AnimState:PlayAnimation("full")
return inst
81828384858687888990
local inst = commonfn()
inst.components.workable:SetWorkLeft(TUNING.ROCKS_MINE_MED)
inst.AnimState:PlayAnimation("med")
inst.components.lootdropper:SetLoot({"rocks", "rocks", "flint"})
inst.components.lootdropper:AddChanceLoot("goldnugget", 0.5)
inst.components.lootdropper:AddChanceLoot("flint", 0.6)
return inst
end
107108109110111112113114115
local inst = commonfn()
inst.components.workable:SetWorkLeft(TUNING.ROCKS_MINE_MED)
inst.AnimState:PlayAnimation("med")
inst.components.lootdropper:SetChanceLootTable('med_rock')
return inst
end
9293949596979899100101
local inst = commonfn()
inst.components.workable:SetWorkLeft(TUNING.ROCKS_MINE_LOW)
inst.AnimState:PlayAnimation("low")
inst.components.lootdropper:SetLoot({"rocks", "flint"})
inst.components.lootdropper:AddChanceLoot("goldnugget", 0.25)
inst.components.lootdropper:AddChanceLoot("flint", 0.3)
return inst
end
117118119120121122123124125
local inst = commonfn()
inst.components.workable:SetWorkLeft(TUNING.ROCKS_MINE_LOW)
inst.AnimState:PlayAnimation("low")
inst.components.lootdropper:SetChanceLootTable('low_rock')
return inst
end