Skip to content

Commit 0795212

Browse files
author
ILLISIS
committed
fix: Fixed an issue that caused robot port quality not to be preserved when enabling/disabling.
1 parent 8be53ec commit 0795212

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

script/job.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,9 @@ function job:replace_roboports(old_eq, new_eq)
371371
if not grid then return end
372372
local grid_pos = old_eq.position
373373
local eq_energy = old_eq.energy
374+
local quality = old_eq.quality.name
374375
grid.take { position = old_eq.position }
375-
local new_set = grid.put { name = new_eq, position = grid_pos }
376+
local new_set = grid.put { name = new_eq, quality = quality, position = grid_pos }
376377
if new_set then
377378
new_set.energy = eq_energy
378379
end

0 commit comments

Comments
 (0)