<!-- RUBY-BACKUP · part 279 -->
her':'6a3a1a', 'suede':'8a6a4a', 'satin':'f0e0f0', 'brocade':'c8a83a', 'damask':'8a2a4a', 'tweed':'7a6a5a', 'canvas':'d8c8a8', 'felt':'5a5a5a', 'corduroy':'4a3a2a', 'chiffon':'f8e8f0', 'organza':'e8f0f8', 'taffeta':'d83a6a', 'gabardine':'3a4a5a', 'boucle':'c8a8a0', 'grass':'4a8c3a', 'moss':'3a6a2a', 'bark':'4a2a1a', 'leaf':'2a7a2a', 'fern':'3a8a4a', 'pine-needle':'1a4a2a', 'flower':'e03a6a', 'petal':'f8a8c8', 'thorn':'5a4a3a', 'vine':'2a5a2a', 'root':'6a4a2a', 'sap':'d8a83a', 'pollen':'f0d83a', 'spore':'a08a5a', 'lichen':'8aa06a', 'algae':'3a7a5a', 'kelp':'1a5a3a', 'coral':'f06a5a', 'shell':'f0e8d8', 'pearl':'f0f0e8', 'water':'1e6fa0', 'ice':'a0d8f0', 'snow':'f8f8ff', 'fire':'ff4400', 'lava':'ff2200', 'steam':'c8c8d8', 'smoke':'5a5a5a', 'ember':'ff6a1a', 'frost':'d0e8f0', 'mist':'b8c8d8', 'rain':'3a6a9a', 'cloud':'e8e8f0', 'storm':'2a3a4a', 'lightning':'f0f03a', 'earth':'6a4a2a', 'mud':'4a2a1a', 'clay':'a06a4a', 'sand':'e0c080', 'dust':'c8b898', 'ruby':'c01a3a', 'sapphire':'1a3ac0', 'emerald':'1aa05a', 'diamond':'e8f8ff', 'amethyst':'7a3aa0', 'topaz':'f0a83a', 'opal':'f0e8f0', 'garnet':'6a1a2a', 'peridot':'8ac03a', 'aquamarine':'5ad8d0', 'citrine':'f0c83a', 'moonstone':'d8e0f0', 'sunstone':'f08a3a', 'bloodstone':'2a5a3a', 'tiger-eye':'c08a3a', 'malachite':'1a8a5a', 'azurite':'1a4aa0', 'carnelian':'c04a2a', 'chrysoprase':'5ac08a', 'iolite':'4a5aa0', 'shadow':'0a0a0a', 'light':'fff8e0', 'void':'000000', 'aether':'c0a0f0', 'nether':'3a1a4a', 'celestial':'8ab8f0', 'infernal':'a01a1a', 'divine':'f0e8a0', 'arcane':'6a3aa0', 'primal':'5a7a3a', 'ancient':'8a7a5a', 'forgotten':'4a4a5a', 'eternal':'d8d8e8', 'infinite':'2a2a3a', 'sacred':'f0d8a0', 'cursed':'1a0a1a', 'blessed':'e8f0ff', 'haunted':'5a3a6a', 'dream':'a08ad8', 'nightmare':'2a1a3a', 'royal-red':'8a0a1a', 'royal-blue':'0a1a8a', 'royal-purple':'5a0a8a', 'royal-gold':'d4a017', 'imperial':'6a0a2a', 'crown':'f0c83a', 'scepter':'c0a03a', 'throne':'4a1a2a', 'palace':'d8b878', 'castle-gray':'6a6a6a', 'banner-red':'a01a1a', 'banner-blue':'1a2aa0', 'heraldic':'8a6a1a', 'coat-arms':'5a4a2a', 'sigil':'3a3a5a', 'standard':'7a1a1a', 'pennant':'2a5a8a', 'tapestry':'6a3a4a', 'throne-room':'5a2a3a', 'great-hall':'7a5a3a', 'rampart':'7a7a7a', 'battlement':'6a6a6a', 'tower-stone':'8a8a8a', 'keep-wall':'757575', 'gate-wood':'5a3a1a', 'portcullis':'3a3a3a', 'drawbridge':'6a4a2a', 'moat-water':'1a4a6a', 'curtain-wall':'808080', 'buttress-stone':'707070', 'chapel-stone':'d8d0c0', 'hall-wood':'6a4a2a', 'kitchen-stone':'8a7a6a', 'dungeon':'2a2a2a', 'tower-roof':'3a3a4a', 'spire-slate':'2a2f3a', 'courtyard':'c8b898', 'stable-wood':'5a3a20', 'armory':'4a4a4a', 'throne-gold':'e0b83a','kings-gold':'ffd700'};
  if(tl.indexOf('skin ')===0){
    var sk=tl.split(/\s+/)[1];
    if(SKINS[sk]){ setSkin(sk); codeStatus('skin: '+sk); }
    else codeStatus('skins: '+Object.keys(SKINS).join(', '));
    return; }
  if(tl==='skins'){ codeStatus('skins: '+Object.keys(SKINS).join(', ')); return; }
  if(tl.indexOf('pattern ')===0){
    var pat=tl.split(/\s+/)[1];
    try{
      var all=(typeof stones!=='undefined'?stones:(typeof STONES!=='undefined'?STONES:[]));
      var near=all.filter(function(st){
        var dx=st.x-cursor.x, dz=st.z-cursor.z;
        return Math.sqrt(dx*dx+dz*dz)<=15;
      });
      if(pat==='stripes'){
        near.forEach(function(st,i){ st.c=(i%2===0?'ff0000':'ffffff'); });
        codeStatus('stripes on '+near.length);
      } else if(pat==='checker'){
        near.forEach(function(st){
          var cx=Math.round(st.x), cz=Math.round(st.z);
          st.c=((cx+cz)%2===0?'000000':'ffffff');
        });
        codeStatus('checker on '+near.length);
      } else if(pat==='gradient'){
        near.forEach(function(st){
          var dx=st.x-cursor.x, dz=st.z-cursor.z;
          var d=Math.sqrt(dx*dx+dz*dz)/15;
          var r=Math.round(255*(1-d)), b=Math.round(255*d);
          st.c=((1<<24)+(r<<16)+(0<<8)+b).toString(16).slice(1);
        });
        codeStatus('gradient on '+near.length);
      } else codeStatus('patterns: stripes, checker, gradient');
    }catch(e){ codeStatus('pattern failed'); }
    return; }
  /* COLLECT ALL BLOCKS */
  if(tl==='collect'){
    var buf=[];
    try{
      var all = (typeof stones!=='undefined' ? stones : (typeof STONES!=='undefined' ? STONES : []));
      for(var i=0; i<all.length; i++){
        var st=all[i];
        buf.push({dx:(st.x-cursor.x), dz:(st.z-cursor.z), r:st.r, s:st.s, y:st.y||0, c:st.c||''});
      }
    }catch(e){}
    setCopyBuf(buf);
    try{
      var roomId = (typeof WATCH_ID!=='undefined' ? WATCH_ID : (location.search.match(/watch=([^&]+)/)||[])[1] || 'whatever');
      fetch('/api/ruby/copybuf/'+roomId, {method:'POST', headers:{'Content-Type':'application/json'}, body:JSON.stringify({buf:buf})}).catch(function(){});
    }catch(e){}
    codeStatus('collected '+buf.length+' blocks'); return; }
  if(tl==='linework'){
    LINEWORK_ON = !LINEWORK_ON;
    stones.children.forEach(function