mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-08 00:39:30 +02:00
Merge pull request #221 from ParrotParrot/master
Fix pickaxe level overflow in Cave Miner
This commit is contained in:
commit
5859c2b52b
@ -88,7 +88,7 @@ function Public.offer_bought(event, cave_miner)
|
|||||||
local offers = market.get_market_items()
|
local offers = market.get_market_items()
|
||||||
local bought_offer = offers[offer_index].offer
|
local bought_offer = offers[offer_index].offer
|
||||||
if bought_offer.type ~= "nothing" then return end
|
if bought_offer.type ~= "nothing" then return end
|
||||||
if offer_index == 1 then
|
if offer_index == 1 and Constants.pickaxe_tiers[cave_miner.pickaxe_tier + 1] then
|
||||||
market.force.play_sound({path = 'utility/new_objective', volume_modifier = 0.75})
|
market.force.play_sound({path = 'utility/new_objective', volume_modifier = 0.75})
|
||||||
cave_miner.pickaxe_tier = cave_miner.pickaxe_tier + 1
|
cave_miner.pickaxe_tier = cave_miner.pickaxe_tier + 1
|
||||||
local speed = Functions.set_mining_speed(cave_miner, player.force)
|
local speed = Functions.set_mining_speed(cave_miner, player.force)
|
||||||
|
Loading…
Reference in New Issue
Block a user