mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-09-16 09:16:22 +02:00
Removed error when a fish is mined and fixed walk distance calculation #51
This commit is contained in:
@@ -131,10 +131,6 @@ local function preplayer_mined_item(event)
|
||||
end
|
||||
end
|
||||
|
||||
if event.entity.name == "fish" then
|
||||
fish_earned(event, 0)
|
||||
end
|
||||
|
||||
if event.entity.name == "stone-rock" then
|
||||
fish_earned(event, 10)
|
||||
end
|
||||
|
@@ -5,7 +5,7 @@ function walk_distance_on_second()
|
||||
for _,v in pairs(game.players) do
|
||||
if (v.afk_time < 30 or v.walking_state.walking) and v.vehicle == nil then
|
||||
d_x = last_positions[v.name].x - v.position.x
|
||||
d_x = last_positions[v.name].x - v.position.x
|
||||
d_y = last_positions[v.name].y - v.position.y
|
||||
global.scenario.variables.player_walk_distances[v.name] = global.scenario.variables.player_walk_distances[v.name] + math.sqrt(d_x*d_x + d_y*d_y)
|
||||
global.scenario.variables.player_positions[v.name] = v.position
|
||||
end
|
||||
|
Reference in New Issue
Block a user