EMERGENCY FIX: Remove dangerous script deletion

- Remove llRemoveInventory() calls that delete user scripts
- Switch to safe mode: only ADD new scripts, never delete
- User can manually copy content from new auto-generated scripts
- Prevents data loss from failed automatic replacement
This commit is contained in:
RebeccaNod1 2025-10-02 13:08:33 -05:00
parent 79040c66f3
commit 066680bc55
2 changed files with 8 additions and 23 deletions

View file

@ -130,26 +130,21 @@ downloadNextScript() {
currentHttpRequest = llHTTPRequest(url, [HTTP_METHOD, "GET"], ""); currentHttpRequest = llHTTPRequest(url, [HTTP_METHOD, "GET"], "");
} }
// Install downloaded script - commercial updater approach // EMERGENCY SAFE MODE - Only add new scripts, don't delete anything
installScript(string scriptContent, string scriptName, integer linkNumber) { installScript(string scriptContent, string scriptName, integer linkNumber) {
llOwnerSay("📥 Installing " + scriptName + " (" + (string)llStringLength(scriptContent) + " chars)"); llOwnerSay("🆘 SAFE MODE: Adding " + scriptName + " as new script");
llOwnerSay("🎯 Target: " + (string)targetGameKey + " | PIN: " + (string)updatePin); llOwnerSay("📊 Size: " + (string)llStringLength(scriptContent) + " characters");
// Step 1: Tell target to remove old script (if it exists) // Only create new script - DO NOT DELETE ANYTHING
llRegionSayTo(targetGameKey, UPDATER_CHANNEL, "REMOVE_SCRIPT|" + scriptName); // This creates a script with auto-generated name containing the new content
// Step 2: Install new script content with llRemoteLoadScriptPin
// The script will be created with an auto-generated name like "New Script"
llRemoteLoadScriptPin(targetGameKey, scriptContent, updatePin, TRUE, 0); llRemoteLoadScriptPin(targetGameKey, scriptContent, updatePin, TRUE, 0);
// Step 3: Tell target to rename the new script to correct name llOwnerSay("✅ Added new script with updated content");
llRegionSayTo(targetGameKey, UPDATER_CHANNEL, "RENAME_SCRIPT|" + scriptName); llOwnerSay("📝 You can now copy content from the new script to replace your old " + scriptName);
llOwnerSay("✅ Sent " + scriptName + " to target game");
// Move to next script // Move to next script
currentScriptIndex++; currentScriptIndex++;
llSetTimerEvent(3.0); // Longer pause for script processing llSetTimerEvent(2.0);
} }
// Complete the update process // Complete the update process

View file

@ -299,16 +299,6 @@ default {
else if (command == "UPDATE_BUSY") { else if (command == "UPDATE_BUSY") {
llOwnerSay("⏳ Updater is busy with another installation"); llOwnerSay("⏳ Updater is busy with another installation");
} }
else if (command == "REMOVE_SCRIPT") {
string scriptToRemove = llList2String(parts, 1);
llOwnerSay("🗑️ Removing old script: " + scriptToRemove);
llRemoveInventory(scriptToRemove);
}
else if (command == "RENAME_SCRIPT") {
string targetName = llList2String(parts, 1);
llOwnerSay("🏷️ Looking for new script to rename to: " + targetName);
// Note: LSL doesn't have direct script renaming, this is for future enhancement
}
} }
} }