/////////////////////////////////////////////////////////////////////////// // Copyright (C) 2014 Wizardry and Steamworks - License: GNU GPLv3 // /////////////////////////////////////////////////////////////////////////// // Can be called after "update" (write or append) operations on the // PrimDriveâ„¢ in order to highlight the data-consumption and clustering // of sectors. wasPrimDriveLED(integer head, integer tail) { // when tail overlaps head, we're done if(tail < head) return; string d = wasGetLinkDescription(tail); // indicate unformated blocks in red if(d == UNFORMATTED_MARKER) { llSetLinkPrimitiveParamsFast(tail, [ PRIM_COLOR, ALL_SIDES, <1,0,0>, 1] ); jump continue; } integer size = llStringLength(d); // GC d = ""; llSetLinkPrimitiveParamsFast(tail, [ PRIM_COLOR, ALL_SIDES, wasPercentToGradientBrighness( 100*size/(float)BYTES_PER_SECTOR, <1,1,1>, ZERO_VECTOR), .17 + size/(float)BYTES_PER_SECTOR] ); @continue; // GC d = ""; wasPrimDriveLED(head, --tail); }