regrowfarm.txt 1015 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. %setVar edge1 rpg:-25:66:21;
  2. %setVar edge2 rpg:-21:66:17;
  3. %setVar art CROPS;
  4. %setVar x1 %coords $edge1 x;;
  5. %setVar y1 %coords $edge1 y;;
  6. %setVar z1 %coords $edge1 z;;
  7. %setVar x2 %coords $edge2 x;;
  8. %setVar y2 %coords $edge2 y;;
  9. %setVar z2 %coords $edge2 z;;
  10. %if $x1 < $x2 goto override1;
  11. %setVar helper $x2;
  12. %setVar x2 $x1;
  13. %setVar x1 $helper;
  14. @override1
  15. %if $y1 < $y2 goto override2;
  16. %setVar helper $y2;
  17. %setVar y2 $y1;
  18. %setVar y1 $helper;
  19. @override2
  20. %if $z1 < $z2 goto override3;
  21. %setVar helper $z2;
  22. %setVar z2 $z1;
  23. %setVar z1 $helper;
  24. @override3
  25. %setVar helper null;
  26. %setVar x $x1;
  27. @start_x
  28. %setVar y $y1;
  29. @start_y
  30. %setVar z $z1;
  31. @start_z
  32. %setVar loc2 %concat rpg: $x : $y : $z;;
  33. %setVar loc %modLoc $loc2 0 -1 0;;
  34. %setVar type %blockType $loc;;
  35. %if $type == SOIL goto setArt;
  36. %goto override4;
  37. @setArt
  38. %setBlock $loc2 %concat $art :7;;
  39. @override4
  40. %setVar z %add $z 1;;
  41. %if $z <= $z2 goto start_z;
  42. %setVar y %add $y 1;;
  43. %if $y <= $y2 goto start_y;
  44. %setVar x %add $x 1;;
  45. %if $x <= $x2 goto start_x;