Skip to content

Commit 1ab2d9a

Browse files
authored
v2.0.38
Dev
2 parents 4a6d4b3 + 774ed54 commit 1ab2d9a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

script/job.lua

Lines changed: 3 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
@@ -723,6 +724,7 @@ function job:balance_ammunition()
723724
if not next(ammunition) then return end
724725
-- check for foreign ammo in the ammo inventory
725726
self:move_foreign_ammo_to_inventory(ammunition)
727+
if not next(ammunition) then return end -- what to do if ammo inventory is empty?
726728
local ammo_name, value = next(ammunition)
727729
---@cast ammo_name -nil
728730
---@cast value -nil

script/ui_settings_screen.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ function gui_settings.buildSettingsContent(player, surface, frame)
385385
-- style = "",
386386
elem_type = "item-with-quality",
387387
["item-with-quality"] = storage.repair_tool_name[surface_index],
388-
elem_filters = {{filter = "name", name = "repair-pack"}},
388+
elem_filters = {{filter = "type", type = "repair-tool"}},
389389
tags = {
390390
mod = "constructron",
391391
on_gui_elem_changed = "selected_new_repair_tool",

0 commit comments

Comments
 (0)