// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Compare allocated slots with actual use // Not compiled or tested in-world // Setup: Place in a spare owned prim. Set positive SLOT_SIZE and a list of positive item sizes. Owner touch runs a bounded local calculation. // Stop / restore: Disable/remove. No travel, publication, payments or external operations occur. // Notes: This is a generic packing estimate; it does not query actual script or inventory memory. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Local planning demonstration. integer SLOT_SIZE=64; list SIZES=[10,64,65,120,1]; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(SLOT_SIZE<1||SLOT_SIZE>1000000) { llOwnerSay("Invalid slot size."); return; } integer used; integer allocated; integer i; for(i=0;i1000000) { llOwnerSay("Use item sizes1..1000000."); return; } used+=size; allocated+=((size+SLOT_SIZE-1)/SLOT_SIZE)*SLOT_SIZE; } if(allocated==0) { llOwnerSay("No items."); return; } llOwnerSay("Used="+(string)used+" allocated="+(string)allocated+" waste="+(string)(allocated-used)+" utilization="+(string)((float)used/(float)allocated)); } }