mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-14 10:13:13 +02:00
Fix to the discharge defense remote being purchased @ fish market, adjustment to the mining speed boosts.
This commit is contained in:
parent
1458636cd9
commit
c89c906b3e
@ -295,7 +295,7 @@ local function boost_player_runningspeed(player)
|
||||
end
|
||||
|
||||
local function reset_player_miningspeed(player)
|
||||
player.character_mining_speed_modifier = 1
|
||||
player.character_mining_speed_modifier = global.player_mining_boost_records[player.index].pre_mining_boost_modifier
|
||||
global.player_mining_boost_records[player.index] = nil
|
||||
end
|
||||
|
||||
@ -335,7 +335,7 @@ local function market_item_purchased(event)
|
||||
global.fish_market_fish_spent[event.player_index] = global.fish_market_fish_spent[event.player_index] + fish_cost
|
||||
|
||||
if event.offer_index == 1 then -- exoskeleton-equipment
|
||||
player.get_inventory(defines.inventory.player_main).remove({name="exoskeleton-equipment", count=event.count})
|
||||
player.get_inventory(defines.inventory.player_main).remove({name="discharge-defense-remote", count=event.count})
|
||||
boost_player_runningspeed(player)
|
||||
end
|
||||
|
||||
@ -407,7 +407,7 @@ function fish_market_on_180_ticks()
|
||||
end
|
||||
if global.player_mining_boost_records then
|
||||
for k,v in pairs(global.player_mining_boost_records) do
|
||||
if game.tick - v.start_tick > 6000 then
|
||||
if game.tick - v.start_tick > 60 then
|
||||
reset_player_miningspeed(game.players[k])
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user