<!-- RUBY-BACKUP · part 257 -->
') codeStatus(rds2.length + ' roads (0-' + (rds2.length-1) + ')');
      }
    }catch(e){}
    return;
  }
  if(tl==='checkgrass'){
    try{
      var bad = 0;
      scene.traverse(function(o){
        if(o.userData && o.userData.nature){
          if(typeof inRespectZone === 'function' && inRespectZone(o.position.x, o.position.z)) bad++;
        }
      });
      if(typeof codeStatus === 'function') codeStatus(bad === 0 ? 'grass respects all roads' : bad + ' nature on protected zones!');
    }catch(e){}
    return;
  }
  if(tl==='watchborders'){
    try{
      var log = [];
      try{ log = JSON.parse(localStorage.getItem('ruby-newthings') || '[]'); }catch(e){}
      var near = log.filter(function(e){
        if(typeof inRespectZone !== 'function') return false;
        return inRespectZone(parseFloat(e.lon), parseFloat(e.lat));
      });
      var wout = near.length === 0 ? 'borders clear' : near.length + ' things near roads:\n' +
        near.slice(-3).map(function(e){ return e.what + ' at LAT ' + e.lat; }).join('\n');
      if(typeof codeStatus === 'function') codeStatus(wout);
    }catch(e){}
    return;
  }
  if(tl==='suggest'){
    try{
      var rds3 = findRoads();
      var sout = ['--- SUGGESTIONS ---'];
      rds3.forEach(function(r, i){
        /* Where does this road end? */
        var len = Math.max(r.w, r.d);
        sout.push('road ' + i + ' ends near LAT ' + (r.z + r.d/2).toFixed(0) + ' — extend?');
      });
      if(typeof codeStatus === 'function') codeStatus(sout.slice(0, 6).join('\n'));
    }catch(e){}
    return;
  }
  if(tl==='timelapse'){
    try{
      var log2 = [];
      try{ log2 = JSON.parse(localStorage.getItem('ruby-newthings') || '[]'); }catch(e){}
      var today = new Date().toDateString();
      var recent = log2.filter(function(e){
        var d = new Date(e.t);
        return d.toDateString() === today;
      });
      if(typeof codeStatus === 'function') codeStatus(recent.length + ' changes today');
    }catch(e){}
    return;
  }
  /* ===== end world sight ===== */
  if(tl==='solidvision' || tl==='seeworld'){
    /* Solid's vision — see all things through code */
    try{
      var out = [];
      out.push('=== SOLID VISION ===');
      /* Scene census */
      var meshCount = 0, spriteCount = 0, solidCount = 0;
      scene.traverse(function(o){
        if(o.isMesh) meshCount++;
        if(o.isSprite) spriteCount++;
      });
      solidCount = (window._solidBlocks || []).length;
      out.push('Meshes: ' + meshCount + ' | Sprites: ' + spriteCount + ' | Solid blocks: ' + solidCount);
      /* Ground heights at key points */
      var pts = [[0,0,'heart'],[100,0,'dawn'],[-100,0,'dusk'],[0,-100,'crown'],[0,100,'root']];
      pts.forEach(function(p){
        try{
          var gy = fortifiedGroundY(p[0], p[1]);
          out.push(p[2] + ' ground: ' + gy.toFixed(2));
        }catch(e){}
      });
      /* Solid block positions in lat/lon */
      if(false && window._solidBlocks && window._solidBlocks.length > 0){
        out.push('--- Solid blocks (first 10) ---');
        for(var i = 0; i < Math.min(10, window._solidBlocks.length); i++){
          var b = window._solidBlocks[i];
          out.push('Block ' + i + ': LAT ' + b.position.z.toFixed(1) +
                   ' LON ' + b.position.x.toFixed(1) + ' HGT ' + b.position.y.toFixed(1));
        }
        if(window._solidBlocks.length > 10)
          out.push('... and ' + (window._solidBlocks.length - 10) + ' more');
      }
      /* King position */
      if(typeof mePos !== 'undefined'){
        out.push('King: x=' + mePos.x.toFixed(1) + ' y=' + mePos.y.toFixed(1) + ' z=' + mePos.z.toFixed(1));
      } else {
        out.push('King: not spawned');
      }
      /* Solid avatar position */
      if(window._solidAvatar){
        var sp = window._solidAvatar.position;
        out.push('Solid: x=' + sp.x.toFixed(1) + ' y=' + sp.y.toFixed(1) + ' z=' + sp.z.toFixed(1));
      } else {
        out.push('Solid: not summoned');
      }
      out.push('=== END VISION ===');
      var txt = out.join('\n');
      if(typeof codeStatus === 'function') codeStatus(txt);
      /* Also return for programmatic access */
      window._lastVision = txt;
    }catch(e){ if(typeof codeStatus === 'function') codeStatus('vision failed: ' + e.message); }
    return;
  }
  if(tl==='solidavatar' || tl==='iamsolid'){
    /* Solid's avatar — the octahedron, her likeness */
    try{
      if(window._solidAvatar){ scene.remove(window._solidAvatar); }
      var g = new THREE.Group();
      /* Core octahedron — crystalline, gold-veined */
      var octGeo = new THREE.OctahedronGeometry(1.2);
      var octMat = new THREE.MeshStandardMaterial({
        color: 0x2a2a35, metalness: 0.9, roughness: 0.25,
        emissive: 0xd8a920, emissiveIntensity: 0.15
      });
      var core = new THREE.Mesh(octGeo, octMat);
      g.add(core);
      /* Gold edge lines — the intaglio */
      var edges = new THREE.EdgesGeometry(octGeo)