the first type of a new block takes up 513bytes
after that each block of that type takes 1 byte
so what i did was to get all the 63 types and multiply it with 513 and on the monitor i get 32319 bytes but on the cell itself it says 32760 Bytes (so im close but no cigar)!!! (this was with 64 stack of 63 items)
here im missing 441 Bytes
then i tryed with 1 block of each 63 and then i got 32319 Bytes on the monitor and on the cell i got 32264 Bytes (so im close AGAIN but no cigar)!!!
here im missing 55 Bytes
MY CODE:
local cell = "65536" -- Static, cause you cant get/fetch the size off the Storage Cells on CC or OpenPer or openCCsensor
local list = MED.getAvailableItems() -- This is a Table holding tables of each item in the Terminal/storage cell
local totalSize = 0 -- Just to 0 each loop
for number, item in pairs(list) do
totalSize = totalSize + item.size -- This counts the total amount of blocks
totalSize2 = number -- this prints out how many items are currently in the cell (63 atm)
end
draw_text(2, 5, "HDD: "..cell, colors.white, colors.black)
draw_text(2, 6, "Byte Used: "..totalSize, colors.white, colors.black)
draw_text(2, 7, "Type: "..totalSize2*513, colors.white, colors.black) -- here i multiply 63 with 513
there is also a flaw with the "types allowed" system on AE2 (OR A BUG NOT SURE YET, needs to test more)
a 64k Storage Cell holdes 63 different type at 65536 bytes of blocks
and i've tested out the type function, currently i get 63 on the AE2 when i look at the cell also i get 63 on CC monitor, but at our main Me terminal i currently hold 75 different items in 1 64k storage cell and apparently that is 63 types for the storage cell so i am PRETTY confused at the moment!!!
Maybe it has something to do with crafted stuff being more then 1 block or? i dunno!!!
could realy use some help here!!