1 local S
= minetest
.get_translator("tsm_pyramids")
12 " "," "," "," "," "," "," "," "," ",
13 " ","^"," ","^"," ","^"," ","^"," ",
14 " ","c"," ","c"," ","c"," ","c"," ",
15 " "," "," "," "," "," "," "," "," ",
16 " "," "," "," "," "," "," "," "," ",
17 " "," "," "," "," "," "," "," "," ",
18 " ","c"," ","c"," ","c"," ","c"," ",
19 " ","v"," ","v"," ","v"," ","v"," ",
20 " "," "," "," "," "," "," "," "," "
28 "s","h","h","h","h","h","h","h","s",
29 "h"," "," "," "," "," "," "," ","h",
30 "h"," "," "," "," "," "," "," ","h",
31 "h"," "," "," "," "," "," "," ","h",
32 " "," "," "," ","<"," "," "," ","h",
33 "h"," "," "," "," "," "," "," ","h",
34 "h"," "," "," "," "," "," "," ","h",
35 "h"," "," "," "," "," "," "," ","h",
36 "s","h","h","h","h","h","h","h","s"
43 " "," "," "," ","v"," "," "," "," ",
44 " ","c","c"," "," "," ","c","c"," ",
45 " ","c","c"," "," "," ","c","c"," ",
46 " "," "," "," "," "," "," "," "," ",
47 " "," "," "," "," "," "," "," ","<",
48 " "," "," "," "," "," "," "," "," ",
49 " ","c","c"," "," "," ","c","c"," ",
50 " ","c","c"," "," "," ","c","c"," ",
51 " "," "," "," ","^"," "," "," "," "
59 " "," "," "," "," "," "," "," "," ",
60 " "," "," "," "," "," "," "," "," ",
61 " "," ","c","S","c","S","c"," "," ",
62 " "," ","S"," "," "," ","S"," "," ",
63 " "," ","c"," ",">"," ","c"," ","<",
64 " "," ","S"," "," "," ","S"," "," ",
65 " "," ","c","S","c","S","c"," "," ",
66 " "," "," "," "," "," "," "," "," ",
67 " "," "," "," "," "," "," "," "," "
74 " "," "," "," "," "," "," "," "," ",
75 " ","S","S","S","S","S","S","S"," ",
76 " ","S"," "," "," "," "," ","S"," ",
77 " ","S"," ","c","c","c"," ","S"," ",
78 " ","S"," ","c","v","c"," ","S"," ",
79 "S","S"," ","c"," ","c"," ","S"," ",
80 "S","S"," ","c"," "," "," ","S"," ",
81 "v","S"," ","S","S","S","S","S"," ",
82 " ","S"," "," "," "," "," "," "," "
89 " "," "," "," "," "," "," "," "," ",
90 " ","S","S","S","S","S","S","S"," ",
91 " "," "," ","c"," "," "," ","S"," ",
92 "S","S"," ","c"," ","c"," ","S"," ",
93 " ","S"," ","c","^","c"," ","S"," ",
94 " ","S"," ","c","c","c"," ","S"," ",
95 " ","S"," "," "," "," "," ","S"," ",
96 " ","S","S","S","S","S","S","S"," ",
97 " "," "," "," "," "," "," "," "," "
104 " "," ","v"," ","v"," ","v"," ","v",
105 " ","c"," ","c"," ","c"," ","c"," ",
106 " "," "," "," "," "," "," "," "," ",
107 " ","c"," ","c"," ","c"," ","c"," ",
108 " "," "," "," "," "," "," "," "," ",
109 " ","c"," ","c"," ","c"," ","c"," ",
110 " "," "," "," "," "," "," "," "," ",
111 " ","c"," ","c"," ","c"," ","c"," ",
112 " "," ","^"," ","^"," ","^"," ","^",
120 "c"," "," "," "," "," "," "," ","c",
121 " "," ","c",">"," ","<","c"," "," ",
122 " ","c","s","c"," ","c","s","c"," ",
123 " "," ","c"," "," "," ","c"," "," ",
124 " "," "," "," ","<"," "," "," "," ",
125 " "," ","c"," "," "," ","c"," "," ",
126 " ","c","s","c"," ","c","s","c"," ",
127 " "," ","c",">"," ","<","c"," "," ",
128 "c"," "," "," "," "," "," "," ","c",
136 ">","s","s","c","c","c","s","s","s",
137 "s","s","c"," "," "," ","c","s","s",
138 "s","c"," "," "," "," "," ","c","s",
139 "c"," "," "," "," "," "," "," ","c",
140 " "," "," "," "," "," "," ","<","c",
141 "c"," "," "," "," "," "," "," ","c",
142 "s","c"," "," "," "," "," ","c","s",
143 "s","s","c"," "," "," ","c","s","s",
144 ">","s","s","c","c","c","s","s","s",
151 " "," "," "," "," "," "," "," "," ",
152 " ","S","S","S","^","S","S","S"," ",
153 " ","S","S","S","S","S","S","S"," ",
154 " ","S","S","S","S","S","S","S"," ",
155 " ","S","S","S","S","S","S",">"," ",
156 " ","S","S","S","S","S","S","S"," ",
157 " ","S","S","S","S","S","S","S"," ",
158 " ","S","S","S","v","S","S","S"," ",
159 " "," "," "," "," "," "," "," "," ",
166 "S","S","S","S",">"," "," "," "," ",
167 "S","S","S","S","S","^","S","S"," ",
168 "S","S","S","S","S","S","S","S"," ",
169 "S","S","S","S","S","S","S","S"," ",
170 " "," "," "," "," "," "," "," "," ",
171 "S","S","S","S","S","S","S","S"," ",
172 "S","S","S","S","S","S","S","S"," ",
173 "S","S","S","S","S","v","S","S"," ",
174 "S","S","S","S",">"," "," "," "," ",
181 "S","S","S","S","S"," "," "," "," ",
182 "S","S","S","S","c",">"," "," "," ",
183 "S","c","S","c","S","c","S"," "," ",
184 " "," "," "," "," "," "," "," "," ",
185 " "," "," "," "," "," "," "," "," ",
186 " "," "," "," "," "," "," "," "," ",
187 "S","c","S","c","S","c","S"," "," ",
188 "S","S","S","S","c",">"," "," "," ",
189 "S","S","S","S","S"," "," "," "," ",
197 "S","S","S","S","S","v","S","S","S",
198 "S","S","S","S","S","S","S","S","S",
199 "c","S","c","S","c","S","c","S","c",
200 " "," "," "," "," "," "," "," "," ",
201 " "," "," "," "," "," "," "," ","<",
202 " "," "," "," "," "," "," "," "," ",
203 "c","S","c","S","c","S","c","S","c",
204 "S","S","S","S","S","S","S","S","S",
205 "S","S","S","S","S","^","S","S","S",
212 "S","S","S","S","S","S","S","S","v",
213 "S","S","S","S","S","S","S","S"," ",
214 "S","S","S","S","S","S","S","S"," ",
215 "S","S","S"," "," "," ","S","S"," ",
216 " "," "," "," ","<"," ","S","S"," ",
217 "S","S","S"," "," "," ","S","S"," ",
218 "S","S","S","S","S","S","S","S"," ",
219 "S","S","S","S","S","S","S","S"," ",
220 "S","S","S","S","S","S","S","S","^",
227 "S","S","S","S","S","S","S","S","S",
228 "S","S","S","S","S","S","S","S","S",
229 "S","S"," ","v"," ","v"," ","S","S",
230 "S","S",">"," "," "," ","<","S"," ",
231 " "," "," "," ","c"," "," ","S"," ",
232 "S","S",">"," "," "," ","<","S"," ",
233 "S","S"," ","^"," ","^"," ","S","S",
234 "S","S","S","S","S","S","S","S","S",
235 "S","S","S","S","S","S","S","S","S",
242 " "," "," "," "," "," "," "," "," ",
243 " ","S","S","S","S","S","S","S"," ",
244 " ","S"," "," ","v"," "," ","S"," ",
245 "S","S"," "," "," "," "," ","S"," ",
246 " "," "," "," "," "," ","<","S"," ",
247 "S","S"," "," "," "," "," ","S"," ",
248 " ","S"," "," ","^"," "," ","S"," ",
249 " ","S","S","S","S","S","S","S"," ",
250 " "," "," "," "," "," "," "," "," ",
257 " "," "," "," "," "," "," "," "," ",
258 " "," "," "," "," "," "," "," "," ",
259 " "," "," "," ","^"," "," "," "," ",
260 " "," "," ","c","c","c"," "," "," ",
261 " "," ","<","c","S","c",">"," "," ",
262 " "," "," ","c","c","c"," "," "," ",
263 " "," "," "," ","v"," "," "," "," ",
264 " "," "," "," "," "," "," "," "," ",
265 " "," "," "," "," "," "," "," "," ",
273 " "," "," "," "," "," "," "," "," ",
274 " "," "," "," "," "," "," "," "," ",
275 " "," "," ","c","c","c"," "," "," ",
276 " "," ","c","c","v","c","c"," "," ",
277 " "," ","c",">"," "," "," "," "," ",
278 " "," ","c","c","^","c","c"," "," ",
279 " "," "," ","c","c","c"," "," "," ",
280 " "," "," "," "," "," "," "," "," ",
281 " "," "," "," "," "," "," "," "," ",
289 "S","S","S","S","S","S","S"," ","<",
290 "s","c","s","c","s","c","s"," ","c",
291 "c"," "," "," "," "," ","c"," ","<",
292 "s"," "," "," "," "," ","s"," ","c",
293 " "," "," "," "," ","<","c"," ","<",
294 "s"," "," "," "," "," ","s"," ","c",
295 "c"," "," "," "," "," ","c"," ","<",
296 "s","c","s","c","s","c","s"," ","c",
297 "S","S","S","S","S","S","S"," ","<",
305 " "," "," "," "," "," "," "," "," ",
306 " "," "," "," "," "," "," "," "," ",
307 " "," "," "," "," "," "," "," "," ",
308 " "," "," ","^"," ","^"," "," "," ",
309 " "," "," ","c"," ","c"," "," "," ",
310 " "," "," ","v"," ","v"," "," "," ",
311 " "," "," "," "," "," "," "," "," ",
312 " "," "," "," "," "," "," "," "," ",
313 " "," "," "," "," "," "," "," "," ",
321 " "," "," "," "," "," "," "," "," ",
322 " "," "," "," ","^"," "," "," "," ",
323 " "," "," "," ","c"," "," "," "," ",
324 " "," "," "," "," "," "," "," "," ",
325 " ","<","c"," "," "," ","c",">"," ",
326 " "," "," "," "," "," "," "," "," ",
327 " "," "," "," ","c"," "," "," "," ",
328 " "," "," "," ","v"," "," "," "," ",
329 " "," "," "," "," "," "," "," "," ",
337 " "," "," "," "," "," "," "," "," ",
338 " "," ","^"," ","^"," ","^"," "," ",
339 " "," ","c"," ","c"," ","c"," "," ",
340 " "," "," "," "," "," "," "," "," ",
341 " "," "," "," "," "," "," "," "," ",
342 " "," "," "," "," "," "," "," "," ",
343 " "," ","c"," ","c"," ","c"," "," ",
344 " "," ","v"," ","v"," ","v"," "," ",
345 " "," "," "," "," "," "," "," "," ",
353 " ","S","v","S","v","S","v","S","v",
354 " ","S"," ","S"," ","S"," ","S"," ",
355 " ","c"," ","c"," ","c"," ","c"," ",
356 " "," "," "," "," "," "," "," "," ",
357 " "," "," "," "," "," "," "," "," ",
358 " "," "," "," "," "," "," "," "," ",
359 " ","c"," ","c"," ","c"," ","c"," ",
360 " ","S"," ","S"," ","S"," ","S"," ",
361 " ","S","^","S","^","S","^","S","^",
369 " "," "," "," "," "," "," "," "," ",
370 " ","c"," "," "," "," "," ","c"," ",
371 " "," "," "," "," "," "," "," "," ",
372 " "," "," ","c","S","c"," "," "," ",
373 " "," "," ","S",">"," "," "," "," ",
374 " "," "," ","c","S","c"," "," "," ",
375 " "," "," "," "," "," "," "," "," ",
376 " ","c"," "," "," "," "," ","c"," ",
377 " "," "," "," "," "," "," "," "," ",
384 " "," "," "," "," "," "," "," "," ",
385 " "," "," "," "," "," "," "," "," ",
386 " "," "," "," "," "," "," "," "," ",
387 " "," "," "," "," "," "," "," "," ",
388 " "," "," "," ","<"," "," "," "," ",
389 " "," "," "," "," "," "," "," "," ",
390 " "," "," "," "," "," "," "," "," ",
391 " "," "," "," "," "," "," "," "," ",
392 " "," "," "," "," "," "," "," "," ",
400 " "," "," "," "," "," "," "," "," ",
401 " "," "," "," "," "," "," "," ","<",
402 " "," "," "," "," "," "," "," "," ",
403 " "," "," "," "," "," "," "," "," ",
404 " "," "," "," "," "," "," "," "," ",
405 " "," "," "," "," "," "," "," "," ",
406 " "," "," "," "," "," "," "," "," ",
407 " "," "," "," "," "," "," "," ","<",
408 " "," "," "," "," "," "," "," "," ",
416 "c"," "," "," "," "," "," "," ","c",
417 "c","c",">"," "," "," ","<","c","c",
418 " ","c","c"," "," "," ","c","c"," ",
419 " "," ","c","c"," ","c","c"," "," ",
420 " "," "," "," "," "," "," "," "," ",
421 " "," ","c","c"," ","c","c"," "," ",
422 " ","c","c"," "," "," ","c","c"," ",
423 "c","c",">"," "," "," ","<","c","c",
424 "c"," "," "," "," "," "," "," ","c",
431 "S","S","S","S","S","S","S","S","S",
432 "S","S","S"," "," "," "," "," "," ",
433 "S","S","S"," "," "," "," "," "," ",
434 "S","S","S"," "," ","^","^","^","^",
435 " "," "," "," "," ","c","c","c","c",
436 "S","S","S"," "," ","v","v","v","v",
437 "S","S","S"," "," "," "," "," "," ",
438 "S","S","S"," "," "," "," "," "," ",
439 "S","S","S","S","S","S","S","S","S",
446 " "," "," "," "," "," "," "," "," ",
447 " "," "," "," "," "," "," "," "," ",
448 " "," "," "," "," "," "," "," "," ",
449 " ","^"," ","^"," ","^"," ","^"," ",
450 " ","c"," ","c"," ","c"," ","c"," ",
451 " ","v"," ","v"," ","v"," ","v"," ",
452 " "," "," "," "," "," "," "," "," ",
453 " "," "," "," "," "," "," "," "," ",
454 " "," "," "," "," "," "," "," "," ",
462 "S","S"," "," "," "," "," ","S","S",
463 "S"," "," "," ","c"," "," "," ","S",
464 " "," ","<","S","S","S",">"," "," ",
465 " "," ","S","S","S","S","S"," "," ",
466 " ","c","S","S","S","S","S","c"," ",
467 " "," ","S","S","S","S","S"," "," ",
468 " "," ","<","S","S","S",">"," "," ",
469 "S"," "," "," ","c"," "," "," ","S",
470 "S","S"," "," "," "," "," ","S","S",
478 " "," "," "," "," "," "," "," "," ",
479 " ","c","^","c"," ","c","^","c"," ",
480 " ","c","c","c"," ","c","c","c"," ",
481 " ","c","c","c"," ","c","c","c"," ",
482 " "," "," "," "," "," "," "," "," ",
483 " ","c","c","c"," ","c","c","c"," ",
484 " ","c","c","c"," ","c","c","c"," ",
485 " ","c","v","c"," ","c","v","c"," ",
486 " "," "," "," "," "," "," "," "," ",
493 "S"," "," "," "," "," "," "," "," ",
494 "S"," "," ","^"," "," ","^"," "," ",
495 "S"," "," ","c"," "," ","c"," "," ",
496 "S"," "," "," "," "," "," "," "," ",
497 " "," "," ","c"," "," ","c"," "," ",
498 "S"," "," "," "," "," "," "," "," ",
499 "S"," "," ","c"," "," ","c"," "," ",
500 "S"," "," ","v"," "," ","v"," "," ",
501 "S"," "," "," "," "," "," "," "," ",
509 "c"," ","c"," ","c"," ","c"," ","c",
510 " "," ","v"," ","v"," ","v"," "," ",
511 "c"," "," "," "," "," "," "," ","c",
512 " "," "," "," "," "," "," "," "," ",
513 " "," "," "," "," "," "," "," ","c",
514 " "," "," "," "," "," "," "," "," ",
515 "c"," "," "," "," "," "," "," ","c",
516 " "," ","^"," ","^"," ","^"," "," ",
517 "c"," ","c"," ","c"," ","c"," ","c",
525 " "," "," "," "," "," "," "," "," ",
526 " "," ","^"," ","^"," ","^"," "," ",
527 " "," ","c"," ","c"," ","c"," "," ",
528 " "," "," "," "," "," "," "," "," ",
529 " "," ","c"," ","c"," ","c"," "," ",
530 " "," "," "," "," "," "," "," "," ",
531 " "," ","c"," ","c"," ","c"," "," ",
532 " "," ","v"," ","v"," ","v"," "," ",
533 " "," "," "," "," "," "," "," "," ",
541 " "," "," "," "," "," "," "," "," ",
542 " "," "," "," "," "," "," "," "," ",
543 " "," "," "," "," "," "," "," "," ",
544 " "," "," "," "," "," "," "," "," ",
545 " "," "," "," ","s",">"," "," "," ",
546 " "," "," "," "," "," "," "," "," ",
547 " "," "," "," "," "," "," "," "," ",
548 " "," "," "," "," "," "," "," "," ",
549 " "," "," "," "," "," "," "," "," ",
551 " "," "," "," "," "," "," "," "," ",
552 " "," "," "," "," "," "," "," "," ",
553 " "," "," "," "," "," "," "," "," ",
554 " "," "," "," ","s"," "," "," "," ",
555 " "," "," "," ","s"," "," "," "," ",
556 " "," "," "," ","s"," "," "," "," ",
557 " "," "," "," "," "," "," "," "," ",
558 " "," "," "," "," "," "," "," "," ",
559 " "," "," "," "," "," "," "," "," ",
561 " "," "," "," "," "," "," "," "," ",
562 " "," "," "," "," "," "," "," "," ",
563 " "," "," "," "," "," "," "," "," ",
564 " "," "," "," "," "," "," "," "," ",
565 " "," "," "," ","s"," "," "," "," ",
566 " "," "," "," "," "," "," "," "," ",
567 " "," "," "," "," "," "," "," "," ",
568 " "," "," "," "," "," "," "," "," ",
569 " "," "," "," "," "," "," "," "," ",
571 " "," "," "," "," "," "," "," "," ",
572 " "," "," "," "," "," "," "," "," ",
573 " "," "," "," "," "," "," "," "," ",
574 " "," "," "," ","s"," "," "," "," ",
575 " "," "," "," "," "," "," "," "," ",
576 " "," "," "," ","s"," "," "," "," ",
577 " "," "," "," "," "," "," "," "," ",
578 " "," "," "," "," "," "," "," "," ",
579 " "," "," "," "," "," "," "," "," ",
581 " "," "," "," "," "," "," "," "," ",
582 " "," "," "," "," "," "," "," "," ",
583 " "," "," "," "," "," "," "," "," ",
584 " "," "," "," "," "," "," "," "," ",
585 " "," "," "," ","s"," "," "," "," ",
586 " "," "," "," "," "," "," "," "," ",
587 " "," "," "," "," "," "," "," "," ",
588 " "," "," "," "," "," "," "," "," ",
589 " "," "," "," "," "," "," "," "," ",
591 stype
= "desert_sandstone",
593 "S","S","S","S","S","S","S","S","S",
594 "s","1","s","1","s","1","s","1","s",
595 "S","S","S","S","S","S","S","S","S",
596 "1","s","1","s","1","s","1","s","1",
597 "S","S","S","S","S","S","S","S","S",
607 "s","s","s","s","s","s","s","s","s",
608 "s","a","a","a","a","a","a","a","s",
609 "s","a","a","a","a","a","a","a","s",
610 "s","a","a","a","a","a","a","a","s",
611 "s","a","a","a","a","a","a","a","s",
612 "s","a","a","a","a","a","a","a","s",
613 "s","a","a","a","a","a","a","a","s",
614 "s","a","a","a","a","a","a","a","s",
615 "s","s","s","s","s","s","s","s","s",
617 " "," "," "," "," "," "," "," ","<",
618 " ","C"," ","C"," ","C"," ","C"," ",
619 " "," "," "," "," "," "," "," "," ",
620 " ","C"," ","C"," ","C"," ","C"," ",
621 " "," "," "," "," "," "," "," "," ",
622 " ","C"," ","C"," ","C"," ","C"," ",
623 " "," "," "," "," "," "," "," "," ",
624 " ","C"," ","C"," ","C"," ","C"," ",
625 " "," "," "," "," "," "," "," ","<",
629 "S","S","S","S","S","S","S","S","S",
630 "S","S","S","S","S","S","S","S","S",
631 "s","3","s","3","s","3","s","3","s",
632 "S","S","S","S","S","S","S","S","S",
633 "S","S","S","S","S","S","S","S","S",
635 stype = "desert_sandstone",
644 "S","S","S","S","S","S","S","S","S",
645 "S","s","s","s","s","s","s","s","S",
646 "S","s","a","a","a","a","a","s","S",
647 "S","s","a","a","a","a","a","s","S",
648 "S","s","a","a","a","a","a","s","S",
649 "S","s","a","a","a","a","a","s","S",
650 "S","s","a","a","a","a","a","s","S",
651 "S","s","s","s","s","s","s","s","S",
652 "S","S","S","S","S","S","S","S","S",
654 " "," "," "," "," "," "," "," ","<",
655 " "," "," "," "," "," "," "," "," ",
656 " "," ","C"," ","C"," ","C"," "," ",
657 " "," "," "," "," "," "," "," "," ",
658 " "," ","C"," ","C"," ","C"," "," ",
659 " "," "," "," "," "," "," "," "," ",
660 " "," ","C"," ","C"," ","C"," "," ",
661 " "," "," "," "," "," "," "," "," ",
662 " "," "," "," "," "," "," "," ","<",
666 "S","S","S","S","S","S","S","S","S",
667 "S","S","S","S","S","S","S","S","S",
668 "s","3","s","3","s","3","s","3","s",
669 "S","S","S","S","S","S","S","S","S",
670 "S","S","S","S","S","S","S","S","S",
672 stype
= "desert_sandstone",
680 "n","s","s","s","s","s","s","s","n",
681 "s","n","s","s","s","s","s","n","s",
682 "s","s","n","n","n","n","n","s","s",
683 "s","s","n","s","s","s","n","s","s",
684 "s","s","n","s","s","s","n","s","s",
685 "s","s","n","s","s","s","n","s","s",
686 "s","s","n","n","n","n","n","s","s",
687 "s","n","s","s","s","s","s","n","s",
688 "n","s","s","s","s","s","s","s","n",
690 " "," "," "," "," "," "," "," "," ",
691 " "," "," "," "," "," "," "," "," ",
692 " "," "," "," "," "," "," "," "," ",
693 " "," "," "," "," "," "," "," "," ",
694 " "," "," "," ","<"," "," "," "," ",
695 " "," "," "," "," "," "," "," "," ",
696 " "," "," "," "," "," "," "," "," ",
697 " "," "," "," "," "," "," "," "," ",
698 " "," "," "," "," "," "," "," "," ",
700 "n","s","s","s","s","s","s","s","n",
701 "s","n","s","s","s","s","s","n","s",
702 "s","s","n","n","n","n","n","s","s",
703 "s","s","n","s","s","s","n","s","s",
704 "s","s","n","s","s","s","n","s","s",
705 "s","s","n","s","s","s","n","s","s",
706 "s","s","n","n","n","n","n","s","s",
707 "s","n","s","s","s","s","s","n","s",
708 "n","s","s","s","s","s","s","s","n",
711 "S","S","S","S","S","S","S","S","S",
712 "s","3","s","3","s","3","s","3","s",
713 "S","S","S","S","S","S","S","S","S",
714 "3","s","3","s","3","s","3","s","3",
715 "S","S","S","S","S","S","S","S","S",
726 " "," "," "," "," "," "," "," "," ",
727 " ","S","S","S"," ","S","S","S"," ",
728 " ","S"," "," "," "," "," ","S"," ",
729 " ","S"," "," "," "," "," ","S"," ",
730 " "," "," "," ","c",">"," "," "," ",
731 " ","S"," "," "," "," "," ","S"," ",
732 " ","S"," "," "," "," "," ","S"," ",
733 " ","S","S","S"," ","S","S","S"," ",
734 " "," "," "," "," "," "," "," "," ",
736 " "," "," "," "," "," "," "," "," ",
737 " ","S","S","S"," ","S","S","S"," ",
738 " ","S"," "," "," "," "," ","S"," ",
739 " ","S"," "," "," "," "," ","S"," ",
740 " "," "," "," ","c"," "," "," "," ",
741 " ","S"," "," "," "," "," ","S"," ",
742 " ","S"," "," "," "," "," ","S"," ",
743 " ","S","S","S"," ","S","S","S"," ",
744 " "," "," "," "," "," "," "," "," ",
746 " "," "," "," "," "," "," "," "," ",
747 " ","S","S","S"," ","S","S","S"," ",
748 " ","S"," "," "," "," "," ","S"," ",
749 " ","S"," "," "," "," "," ","S"," ",
750 " "," "," "," ","c"," "," "," "," ",
751 " ","S"," "," "," "," "," ","S"," ",
752 " ","S"," "," "," "," "," ","S"," ",
753 " ","S","S","S"," ","S","S","S"," ",
754 " "," "," "," "," "," "," "," "," ",
756 "s","s","s","s","s","s","s","s","s",
757 "s","S","S","S","S","S","S","S","s",
758 "s","S","s","s","s","s","s","S","s",
759 "s","S","s","s","s","s","s","S","s",
760 "s","S","s","s","s","s","s","S","s",
761 "s","S","s","s","s","s","s","S","s",
762 "s","S","s","s","s","s","s","S","s",
763 "s","S","S","S","S","S","S","S","c",
764 "s","s","s","s","s","s","s","s","s",
766 "S","S","S","S","S","S","S","S","S",
767 "S","S","S","S","v","S","S","S","S",
768 "S","S"," "," "," "," "," ","S","S",
769 "S","S"," "," "," "," "," ","S","S",
770 "S",">"," "," "," "," "," ","<","S",
771 "S","S"," "," "," "," "," ","S","S",
772 "S","S"," "," "," "," "," ","S","S",
773 "S","S","S","S","^","S","S","S","S",
774 "S","S","S","S","S","S","S","S","S",
776 "S","S","S","S","S","S","S","S","S",
777 "S","S","S","S","S","S","S","S","S",
778 "S","S"," "," "," "," "," ","S","S",
779 "S","S"," "," "," "," "," ","S","S",
780 "S","S"," "," "," "," "," ","S","S",
781 "S","S"," "," "," "," "," ","S","S",
782 "S","S"," "," "," "," "," ","S","S",
783 "S","S","S","S","S","S","S","S","S",
784 "S","S","S","S","S","S","S","S","S",
790 local layout_traps_template
= {
791 "S","S","S","S","S","S","S","S","S",
792 "?","?","?","?","?","?","?","?","S",
793 "?","?","?","?","?","?","?","?","S",
794 "?","?","?","?","?","?","?","?","S",
795 "?","?","?","?","?","?","?","?","S", -- << entrance on left side
796 "?","?","?","?","?","?","?","?","S",
797 "?","?","?","?","?","?","?","?","S",
798 "?","?","?","?","?","?","?","?","S",
799 "S","S","S","S","S","S","S","S","S"
802 local code_sandstone
= {
804 ["c"] = "default:sandstone",
805 ["s"] = "default:sandstone",
806 ["n"] = "default:desert_sandstone",
807 ["h"] = "default:sandstone",
808 ["S"] = "default:sandstonebrick",
809 ["1"] = "tsm_pyramids:deco_stone1",
810 ["2"] = "tsm_pyramids:deco_stone2",
811 ["3"] = "tsm_pyramids:deco_stone3",
812 ["^"] = "default:chest",
813 ["<"] = "default:chest",
814 [">"] = "default:chest",
815 ["v"] = "default:chest",
816 ["~"] = "default:lava_source",
817 ["t"] = "tsm_pyramids:trap",
818 ["C"] = "default:large_cactus_seedling",
819 ["a"] = "default:sand",
821 local code_desert_sandstone
= table.copy(code_sandstone
)
822 code_desert_sandstone
["c"] = "default:desert_sandstone"
823 code_desert_sandstone
["s"] = "default:desert_sandstone"
824 code_desert_sandstone
["n"] = "default:sandstone"
825 code_desert_sandstone
["h"] = "default:desert_sandstone"
826 code_desert_sandstone
["1"] = "tsm_pyramids:deco_stone4"
827 code_desert_sandstone
["2"] = "tsm_pyramids:deco_stone5"
828 code_desert_sandstone
["3"] = "tsm_pyramids:deco_stone6"
829 code_desert_sandstone
["S"] = "default:desert_sandstone_brick"
830 code_desert_sandstone
["t"] = "tsm_pyramids:desert_trap"
831 code_desert_sandstone
["a"] = "default:desert_sand"
833 local code_desert_stone
= table.copy(code_sandstone
)
834 code_desert_stone
["c"] = "default:desert_stone_block"
835 code_desert_stone
["s"] = "default:desert_stone_block"
836 code_desert_stone
["n"] = "default:desert_stone_block"
837 code_desert_stone
["h"] = "default:desert_stone_block"
838 code_desert_stone
["1"] = "default:desert_stone_block"
839 code_desert_stone
["2"] = "default:desert_stone_block"
840 code_desert_stone
["3"] = "default:desert_stone_block"
841 code_desert_stone
["S"] = "default:desert_stonebrick"
842 code_desert_stone
["t"] = "air"
843 code_desert_stone
["a"] = "default:desert_sand"
845 local function replace(str
, iy
, code_table
, deco
, column_style
)
846 if iy
< 4 and (str
== "<" or str
== ">" or str
== "^" or str
== "v") then str
= " " end
848 local r
= math
.random(0,3)
854 elseif column_style
== 1 or column_style
== 2 then
855 if iy
== 0 and str
== "c" then str
= deco
[1] end
856 if iy
== 3 and str
== "c" then str
= deco
[2] end
857 elseif column_style
== 3 then
858 if iy
== 0 and str
== "c" then str
= deco
[1] end
859 if iy
== 2 and str
== "c" then str
= deco
[2] end
860 elseif column_style
== 4 then
861 if iy
== 2 and str
== "c" then str
= deco
[1] end
863 return code_table
[str
]
866 local function replace2(str
, iy
, depth
, code_table
)
868 -- Sandstone at the bottom-most layer
870 elseif iy
== depth
-1 then
871 -- Brick at the layer above
873 elseif iy
== 0 and str
== "~" then
874 -- Trap stones at the top layer
876 elseif iy
< depth
-3 and str
== "~" then
877 -- Air below the trap stones
880 -- Everything else is untouched (will stay pyramid material)
882 return code_table
[str
]
885 local function get_flat_index(x
, y
, width
)
886 return 1 + x
+ y
* width
889 local function rotate_layout_single(layout
, width
)
890 local size
= width
*width
891 local new_layout
= {}
894 local symbol
= layout
[get_flat_index((width
-1) - y
, x
, width
)]
896 if symbol
== "^" then
898 elseif symbol
== "<" then
900 elseif symbol
== "v" then
902 elseif symbol
== ">" then
905 new_layout
[get_flat_index(x
, y
, width
)] = symbol
911 local function rotate_layout(layout
, width
, rotations
)
912 local new_layout
= table.copy(layout
)
913 for r
=1, rotations
do
914 new_layout
= rotate_layout_single(new_layout
, width
)
919 -- pos: Position to spawn pyramid
920 -- stype: Sand type ("sandstone" or "desert")
921 -- room_id: Room layout identified (see list of rooms above)
922 -- rotations: Number of times to rotate the room (0-3)
923 function tsm_pyramids
.make_room(pos
, stype
, room_id
, rotations
)
924 local code_table
= code_sandstone
925 if stype
== "desert_sandstone" then
926 code_table
= code_desert_sandstone
927 elseif stype
== "desert_stone" then
928 code_table
= code_desert_stone
930 -- Select random deco block
931 local deco_ids
= {"1", "2", "3"}
934 local r
= math
.random(1, #deco_ids
)
935 table.insert(deco
, deco_ids
[r
])
936 table.remove(deco_ids
, r
)
938 local hole
= {x
=pos
.x
+7,y
=pos
.y
+5, z
=pos
.z
+7}
939 if room_id
== nil then
940 room_id
= math
.random(1, #room_types
)
943 if room_id
< 1 or room_id
> #room_types
then
944 return false, S("Incorrect room type ID: @1", room_id
)
946 local room
= table.copy(room_types
[room_id
])
948 while tries
< #room_types
do
949 if room
.stype
and room
.stype
~= stype
then
950 room_id
= room_id
+ 1
951 if room_id
> #room_types
then
954 room
= table.copy(room_types
[room_id
])
962 if stype
== "desert_stone" then
965 column_style
= math
.random(0,4)
971 local nn
= code_table
[room
.wall
[iy
*9+ie
+1]]
972 minetest
.set_node({x
=hole
.x
+ie
, y
=hole
.y
-iy
, z
=hole
.z
-1}, {name
=nn
})
973 minetest
.set_node({x
=hole
.x
-1, y
=hole
.y
-iy
, z
=hole
.z
+ie
}, {name
=nn
})
975 minetest
.set_node({x
=hole
.x
+ie
, y
=hole
.y
-iy
, z
=hole
.z
+9}, {name
=nn
})
976 minetest
.set_node({x
=hole
.x
+9, y
=hole
.y
-iy
, z
=hole
.z
+ie
}, {name
=nn
})
981 -- Place the room nodes
982 if room
.style
== "yrepeat" then
983 layout
= rotate_layout(room
.layout
, ROOM_WIDTH
, rotations
)
987 local n_str
= layout
[ix
*9+iz
+1]
991 elseif n_str
== ">" then
993 elseif n_str
== "^" then
995 elseif n_str
== "v" then
998 local cpos
= {x
=hole
.x
+ix
,y
=hole
.y
-iy
,z
=hole
.z
+iz
}
999 local nn
= replace(n_str
, iy
, code_table
, deco
, column_style
)
1000 minetest
.set_node(cpos
, {name
=nn
, param2
=p2
})
1001 if nn
== "default:chest" then
1002 table.insert(chests
, cpos
)
1007 elseif room
.style
== "stacked" then
1008 local layout_list
= room
.layout
1010 local layout_offset
= room
.layout_offset
1011 local layout_height
= room
.layout_height
1012 if not layout_offset
then
1015 if not layout_height
then
1018 for iy
=0,layout_height
-1,1 do
1020 if layout_list
[layout_height
-iy
] then
1021 layout
= rotate_layout(layout_list
[layout_height
-iy
], ROOM_WIDTH
, rotations
)
1027 n_str
= layout
[ix
*9+iz
+1]
1032 if n_str
== "<" then
1034 elseif n_str
== ">" then
1036 elseif n_str
== "^" then
1038 elseif n_str
== "v" then
1041 local cpos
= {x
=hole
.x
+ix
,y
=hole
.y
-iy
+layout_offset
,z
=hole
.z
+iz
}
1042 local nn
= code_table
[n_str
]
1043 minetest
.set_node(cpos
, {name
=nn
, param2
=p2
})
1044 if nn
== "default:chest" then
1045 table.insert(chests
, cpos
)
1051 minetest
.log("error", "Invalid pyramid room style! room type ID="..r
)
1053 local sanded
= room
.flood_sand
~= false and stype
~= "desert_stone" and math
.random(1,8) == 1
1055 -- Make at least 8 attempts to fill chests
1057 local chests_with_treasure
= 0
1060 local has_treasure
= tsm_pyramids
.fill_chest(chests
[c
], stype
, sanded
, 30)
1061 if has_treasure
then
1062 chests_with_treasure
= chests_with_treasure
+ 1
1067 -- If no chests were filled with treasure so far, fill a random chest guaranteed
1068 if chests_with_treasure
== 0 then
1069 tsm_pyramids
.fill_chests(chests
[math
.random(1, #chests
)], stype
, sanded
, 100)
1072 if room
.traps
and math
.random(1,4) then
1073 tsm_pyramids
.make_traps(pos
, stype
, rotations
, layout
)
1076 tsm_pyramids
.flood_sand(pos
, stype
)
1078 return true, nil, sanded
1081 local shuffle_traps
= function(chance
, layout_room
)
1082 layout_traps
= table.copy(layout_traps_template
)
1083 for a
=1, #layout_traps
do
1084 -- Delete trap if this space of the room is occupied
1085 if layout_room
[a
] ~= " " then
1086 layout_traps
[a
] = "S"
1087 -- Randomly turn tile into a trap, or not
1088 elseif layout_traps
[a
] == "?" then
1089 -- percentage for a trap
1090 if math
.random(1,100) <= chance
then
1091 layout_traps
[a
] = "~"
1093 layout_traps
[a
] = "S"
1099 function tsm_pyramids
.make_traps(pos
, stype
, rotations
, layout_room
)
1100 local code_table
= code_sandstone
1101 if stype
== "desert_sandstone" then
1102 code_table
= code_desert_sandstone
1103 elseif stype
== "desert_stone" then
1104 code_table
= code_desert_stone
1106 shuffle_traps(math
.random(10,100), layout_room
)
1107 local hole
= {x
=pos
.x
+7,y
=pos
.y
, z
=pos
.z
+7}
1108 local layout
= rotate_layout(layout_traps
, ROOM_WIDTH
, rotations
)
1109 -- Depth is total depth of trap area:
1110 -- * top layer with trap stones
1111 -- * followed by air layers
1112 -- * followed by 2 layer of lava
1113 -- * and 2 layers of sandstone/brick at the bottom (to prevent lava escaping)
1114 -- The depth of air between trap stones and lava layer is <depth> - 4
1116 local wmin
, wmax
= -1,9
1118 for ix
=wmin
,wmax
,1 do
1119 for iz
=wmin
,wmax
,1 do
1121 if ix
== wmin
or ix
== wmax
or iz
== wmin
or iz
== wmax
then
1122 -- Walls around room
1124 n_str
= code_table
["s"]
1126 n_str
= code_table
["S"]
1128 minetest
.set_node({x
=hole
.x
+ix
,y
=hole
.y
-iy
,z
=hole
.z
+iz
}, {name
=n_str
})
1131 n_str
= layout
[ix
*9+iz
+1]
1132 minetest
.set_node({x
=hole
.x
+ix
,y
=hole
.y
-iy
,z
=hole
.z
+iz
}, {name
=replace2(n_str
, iy
, depth
, code_table
)})
1139 function tsm_pyramids
.flood_sand(pos
, stype
)
1140 local set_to_sand
= {}
1141 local nn
= "default:sand"
1142 if stype
== "desert_sandstone" or stype
== "desert_stone" then
1143 nn
= "default:desert_sand"
1145 local hole
= {x
=pos
.x
+7,y
=pos
.y
+1, z
=pos
.z
+7}
1146 local maxh
= math
.random(1,4)
1147 local chance
= math
.random(1,7)
1150 if math
.random(1,chance
) == 1 then
1151 local h
= math
.random(1,maxh
)
1153 local p
= {x
=hole
.x
+ix
,y
=hole
.y
+iy
,z
=hole
.z
+iz
}
1154 if minetest
.get_node(p
).name
== "air" then
1155 table.insert(set_to_sand
, p
)
1161 minetest
.bulk_set_node(set_to_sand
, {name
=nn
})