1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

set market as casue of death

This commit is contained in:
grilledham 2018-06-29 12:18:35 +01:00
parent 92456c1032
commit 9d26dc31c5

View File

@ -208,7 +208,7 @@ local function reset_player_runningspeed(player)
global.player_speed_boost_records[player.index] = nil
end
local function boost_player_runningspeed(player)
local function boost_player_runningspeed(player, market)
if global.player_speed_boost_records == nil then
global.player_speed_boost_records = {}
end
@ -232,7 +232,7 @@ local function boost_player_runningspeed(player)
game.print(string.format(boost_msg[global.player_speed_boost_records[player.index].boost_lvl], player.name))
if global.player_speed_boost_records[player.index].boost_lvl >= 4 then
reset_player_runningspeed(player)
player.character.die()
player.character.die(player.force, market)
end
end
@ -241,7 +241,7 @@ local function reset_player_miningspeed(player)
global.player_mining_boost_records[player.index] = nil
end
local function boost_player_miningspeed(player)
local function boost_player_miningspeed(player, market)
if global.player_mining_boost_records == nil then
global.player_mining_boost_records = {}
end
@ -265,7 +265,7 @@ local function boost_player_miningspeed(player)
game.print(string.format(boost_msg[global.player_mining_boost_records[player.index].boost_lvl], player.name))
if global.player_mining_boost_records[player.index].boost_lvl >= 4 then
reset_player_miningspeed(player)
player.character.die()
player.character.die(player.force, market)
end
end
@ -286,12 +286,12 @@ local function market_item_purchased(event)
if event.offer_index == 1 then -- Temporary speed bonus
local player = game.players[player_index]
boost_player_runningspeed(player)
boost_player_runningspeed(player, market)
end
if event.offer_index == 2 then -- Temporary mining bonus
local player = game.players[player_index]
boost_player_miningspeed(player)
boost_player_miningspeed(player, market)
end
--[[