if ent.level_time < base_time * multiplier ^ (ent.entity.quality.level + 1) then -- Upgrade check based on level time and base time
ent.level_time = ent.level_time + sec_passed
else
table.insert(upgrade_machine_list, ent)
ent.level_time = 0
end
-- Module update check
if ent.level_time > base_time_module and is_update_module and have_upgradeable_module then
table.insert(upgrade_module_list, ent)
end