Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

140 linhas
2.1 KiB

  1. define([
  2. ], function(
  3. ) {
  4. return {
  5. sheetHeight: 20,
  6. 'tiles': {
  7. default: 0.4,
  8. max: 0.55,
  9. '5': 0.7,
  10. '6': 0.9,
  11. '23': 0.9,
  12. '24': 0.9,
  13. '25': 0.9,
  14. '50': 1,
  15. '51': 1,
  16. '52': 1,
  17. '53': 0.7,
  18. '54': 0.5,
  19. '57': 1,
  20. '58': 1,
  21. '59': 1,
  22. '60': 0.9,
  23. '61': 0.9,
  24. '62': 0.75,
  25. '76': 0.9,
  26. '80': 1,
  27. '81': 1,
  28. '82': 1,
  29. '83': 1,
  30. '87': 1,
  31. '90': 1,
  32. '95': 1,
  33. '102': 0.9,
  34. '152': 0.9,
  35. '153': 1,
  36. '163': 0.9
  37. },
  38. objects: {
  39. default: 0.9,
  40. '50': 1
  41. },
  42. 'walls': {
  43. default: 0.85,
  44. max: 1,
  45. '84': 1,
  46. '103': 0.9,
  47. '107': 0.9,
  48. '116': 1,
  49. '120': 0.9,
  50. '132': 0.9,
  51. '133': 0.9,
  52. '134': 0.85,
  53. '139': 1,
  54. '148': 1,
  55. '150': 0.85,
  56. '156': 1,
  57. '157': 1,
  58. '158': 1,
  59. '159': 1,
  60. '160': 0.9,
  61. '161': 1,
  62. '162': 1,
  63. '163': 1,
  64. '164': 0.8,
  65. '165': 1,
  66. '166': 0.95,
  67. '167': 1,
  68. '168': 1,
  69. '169': 1
  70. },
  71. tilesNoFlip: [
  72. ],
  73. wallsNoFlip: [
  74. 156, 158, 162, 163, 167, 168, //Ledges
  75. 189 //Wall Sign
  76. ],
  77. objectsNoFlip: [
  78. 96, 101, //Clotheslines
  79. 103, 110, 118, 126, //Table Sides
  80. 120, 122 //Wall-mounted plants
  81. ],
  82. getSheetNum: function(tile) {
  83. if (tile < 192)
  84. return 0;
  85. else if (tile < 384)
  86. return 1;
  87. else
  88. return 2;
  89. },
  90. map: function(tile) {
  91. var sheetNum;
  92. if (tile < 192)
  93. sheetNum = 0;
  94. else if (tile < 384) {
  95. tile -= 192;
  96. sheetNum = 1;
  97. }
  98. else {
  99. tile -= 384;
  100. sheetNum = 2;
  101. }
  102. var tilesheet = [this.tiles, this.walls, this.objects][sheetNum];
  103. var alpha = (tilesheet[tile] || tilesheet.default);
  104. if (tilesheet.max != null) {
  105. alpha = alpha + (Math.random() * (alpha * 0.2));
  106. alpha = Math.min(1, alpha);
  107. }
  108. return alpha;
  109. },
  110. canFlip: function(tile) {
  111. var sheetNum;
  112. if (tile < 192)
  113. sheetNum = 0;
  114. else if (tile < 384) {
  115. tile -= 192;
  116. sheetNum = 1;
  117. }
  118. else {
  119. tile -= 384;
  120. sheetNum = 2;
  121. }
  122. var tilesheet = [this.tilesNoFlip, this.wallsNoFlip, this.objectsNoFlip][sheetNum];
  123. return (tilesheet.indexOf(tile) == -1);
  124. }
  125. };
  126. });