// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Migrate an old local settings record // Not compiled or tested in-world // Setup: Place in a spare owned prim. Set RECORD to the documented v1 sample. Owner touch runs the local demonstration. // Stop / restore: Disable/remove. No external requests or scene changes occur; reset clears memory. // Notes: Only sample fields are migrated; all fields are preserved as text until explicit validation. No persistence is written. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Local owner-only protocol laboratory. string RECORD="v1|green|slow"; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; list fields=llParseStringKeepNulls(RECORD,["|"],[]); string version=llList2String(fields,0); if(version=="v2"&&llGetListLength(fields)==4) { llOwnerSay("Already v2: "+RECORD); return; } if(version!="v1"||llGetListLength(fields)!=3) { llOwnerSay("Unsupported schema."); return; } string color=llList2String(fields,1); string speed=llList2String(fields,2); string upgraded="v2|"+color+"|"+speed+"|enabled"; llOwnerSay("Migrated: "+upgraded); } }