···9797 local percent_x_pos = font_size * 2
98989999 local colorLayer = storageGreen
100100- if status == "STALLED" then colorLayer = storageYellow end
101101- if status == "STOPPED" then colorLayer = storageRed end
100100+ local status_text = "RUNNING"
101101+ if (status == 1) or (status == 3) or (status == 4) then
102102+ colorLayer = storageRed
103103+ if status == 3 then status_text = 'OUTPUT FULL'
104104+ elseif status == 1 then status_text = 'STOPPED'
105105+ elseif status == 4 then status_text = 'NO CONTAINER'
106106+ end
107107+ end
102108103109 local calibrationRequiredTime = ((calibration-optimal)/.625)*3600
104110 if 259200 - cal_time > 0 then calibrationRequiredTime = calibrationRequiredTime + 259200 - cal_time end
···174180 addText(storageBar, itemNameSmall, format_number(efficiency) .. '%', x+(w*0.80), y+(h/2)-3)
175181176182 setNextTextAlign(colorLayer, AlignH_Right, AlignV_Middle)
177177- addText(colorLayer, itemName, status, x+w-10, y+(h/2)-3)
183183+ addText(colorLayer, itemName, status_text, x+w-10, y+(h/2)-3)
178184end
179185180186function renderPool(pool)
···215221for slot_name, slot in pairs(unit) do
216222 if type(slot) == "table"
217223 and type(slot.export) == "table"
218218- and slot.getElementClass
224224+ and slot.getClass
219225 then
226226+ system.print(slot.getClass())
220227 slot.slotname = slot_name
221221- if slot.getElementClass():lower() == 'screenunit' then
228228+ if slot.getClass():lower() == 'screenunit' then
222229 table.insert(screens,slot)
223230 slot.setRenderScript(renderScript)
224224- elseif slot.getElementClass():lower() == 'miningunit' then
231231+ elseif slot.getClass():lower() == 'miningunit' then
225232 table.insert(mining_units,slot)
226233 end
227234 end
···257264 for index, mu in ipairs(mining_units) do
258265 local mup = mu.getOrePools()
259266 for _,p in ipairs(mup) do
260260- if ores[p.oreId] == nil then
261261- local item_data = system.getItem(p.oreId)
262262- ores[p.oreId] = {
267267+ if ores[p.id] == nil then
268268+ local item_data = system.getItem(p.id)
269269+ ores[p.id] = {
263270 item_data.locDisplayName,
264271 item_data.iconPath:gsub("resources_generated/env/","")
265272 }
266273 end
267267- pool[p.oreId] = {p.available, p.maximum, ores[p.oreId][1], ores[p.oreId][2]}
274274+ pool[p.id] = {p.available, p.maximum, ores[p.id][1], ores[p.id][2]}
268275 end
269276 local mu_data = {
270270- mu.getStatus(),
277277+ mu.getState(),
271278 round(mu.getRemainingTime()),
272279 mu.getActiveOre(),
273280 round(mu.getProductionRate()*100)/100,