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 " "," "," "," ","^"," "," "," "," "
58 " "," "," "," "," "," "," "," "," ",
59 " "," "," "," "," "," "," "," "," ",
60 " "," ","c","S","c","S","c"," "," ",
61 " "," ","S"," "," "," ","S"," "," ",
62 " "," ","c"," ",">"," ","c"," ","<",
63 " "," ","S"," "," "," ","S"," "," ",
64 " "," ","c","S","c","S","c"," "," ",
65 " "," "," "," "," "," "," "," "," ",
66 " "," "," "," "," "," "," "," "," "
73 " "," "," "," "," "," "," "," "," ",
74 " ","S","S","S","S","S","S","S"," ",
75 " ","S"," "," "," "," "," ","S"," ",
76 " ","S"," ","c","c","c"," ","S"," ",
77 " ","S"," ","c","v","c"," ","S"," ",
78 "S","S"," ","c"," ","c"," ","S"," ",
79 "S","S"," ","c"," "," "," ","S"," ",
80 "v","S"," ","S","S","S","S","S"," ",
81 " ","S"," "," "," "," "," "," "," "
88 " "," "," "," "," "," "," "," "," ",
89 " ","S","S","S","S","S","S","S"," ",
90 " "," "," ","c"," "," "," ","S"," ",
91 "S","S"," ","c"," ","c"," ","S"," ",
92 " ","S"," ","c","^","c"," ","S"," ",
93 " ","S"," ","c","c","c"," ","S"," ",
94 " ","S"," "," "," "," "," ","S"," ",
95 " ","S","S","S","S","S","S","S"," ",
96 " "," "," "," "," "," "," "," "," "
103 " "," ","v"," ","v"," ","v"," ","v",
104 " ","c"," ","c"," ","c"," ","c"," ",
105 " "," "," "," "," "," "," "," "," ",
106 " ","c"," ","c"," ","c"," ","c"," ",
107 " "," "," "," "," "," "," "," "," ",
108 " ","c"," ","c"," ","c"," ","c"," ",
109 " "," "," "," "," "," "," "," "," ",
110 " ","c"," ","c"," ","c"," ","c"," ",
111 " "," ","^"," ","^"," ","^"," ","^",
119 "c"," "," "," "," "," "," "," ","c",
120 " "," ","c",">"," ","<","c"," "," ",
121 " ","c","s","c"," ","c","s","c"," ",
122 " "," ","c"," "," "," ","c"," "," ",
123 " "," "," "," ","<"," "," "," "," ",
124 " "," ","c"," "," "," ","c"," "," ",
125 " ","c","s","c"," ","c","s","c"," ",
126 " "," ","c",">"," ","<","c"," "," ",
127 "c"," "," "," "," "," "," "," ","c",
135 ">","s","s","c","c","c","s","s","s",
136 "s","s","c"," "," "," ","c","s","s",
137 "s","c"," "," "," "," "," ","c","s",
138 "c"," "," "," "," "," "," "," ","c",
139 " "," "," "," "," "," "," ","<","c",
140 "c"," "," "," "," "," "," "," ","c",
141 "s","c"," "," "," "," "," ","c","s",
142 "s","s","c"," "," "," ","c","s","s",
143 ">","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"," "," "," "," ",
196 "S","S","S","S","S","v","S","S","S",
197 "S","S","S","S","S","S","S","S","S",
198 "c","S","c","S","c","S","c","S","c",
199 " "," "," "," "," "," "," "," "," ",
200 " "," "," "," "," "," "," "," ","<",
201 " "," "," "," "," "," "," "," "," ",
202 "c","S","c","S","c","S","c","S","c",
203 "S","S","S","S","S","S","S","S","S",
204 "S","S","S","S","S","^","S","S","S",
211 "S","S","S","S","S","S","S","S","v",
212 "S","S","S","S","S","S","S","S"," ",
213 "S","S","S","S","S","S","S","S"," ",
214 "S","S","S"," "," "," ","S","S"," ",
215 " "," "," "," ","<"," ","S","S"," ",
216 "S","S","S"," "," "," ","S","S"," ",
217 "S","S","S","S","S","S","S","S"," ",
218 "S","S","S","S","S","S","S","S"," ",
219 "S","S","S","S","S","S","S","S","^",
226 "S","S","S","S","S","S","S","S","S",
227 "S","S","S","S","S","S","S","S","S",
228 "S","S"," ","v"," ","v"," ","S","S",
229 "S","S",">"," "," "," ","<","S"," ",
230 " "," "," "," ","c"," "," ","S"," ",
231 "S","S",">"," "," "," ","<","S"," ",
232 "S","S"," ","^"," ","^"," ","S","S",
233 "S","S","S","S","S","S","S","S","S",
234 "S","S","S","S","S","S","S","S","S",
241 " "," "," "," "," "," "," "," "," ",
242 " ","S","S","S","S","S","S","S"," ",
243 " ","S"," "," ","v"," "," ","S"," ",
244 "S","S"," "," "," "," "," ","S"," ",
245 " "," "," "," "," "," ","<","S"," ",
246 "S","S"," "," "," "," "," ","S"," ",
247 " ","S"," "," ","^"," "," ","S"," ",
248 " ","S","S","S","S","S","S","S"," ",
249 " "," "," "," "," "," "," "," "," ",
256 " "," "," "," "," "," "," "," "," ",
257 " "," "," "," "," "," "," "," "," ",
258 " "," "," "," ","^"," "," "," "," ",
259 " "," "," ","c","c","c"," "," "," ",
260 " "," ","<","c","S","c",">"," "," ",
261 " "," "," ","c","c","c"," "," "," ",
262 " "," "," "," ","v"," "," "," "," ",
263 " "," "," "," "," "," "," "," "," ",
264 " "," "," "," "," "," "," "," "," ",
272 " "," "," "," "," "," "," "," "," ",
273 " "," "," "," "," "," "," "," "," ",
274 " "," "," ","c","c","c"," "," "," ",
275 " "," ","c","c","v","c","c"," "," ",
276 " "," ","c",">"," "," "," "," "," ",
277 " "," ","c","c","^","c","c"," "," ",
278 " "," "," ","c","c","c"," "," "," ",
279 " "," "," "," "," "," "," "," "," ",
280 " "," "," "," "," "," "," "," "," ",
287 "S","S","S","S","S","S","S"," ","<",
288 "c","c","c","c","c","c","S"," ","c",
289 "c"," "," "," "," "," ","c"," ","<",
290 "c"," "," "," "," "," ","c"," ","c",
291 " "," "," "," "," ","<","c"," ","<",
292 "c"," "," "," "," "," ","c"," ","c",
293 "c"," "," "," "," "," ","c"," ","<",
294 "c","c","c","c","c","c","c"," ","c",
295 "S","S","S","S","S","S","S"," ","<",
302 " "," "," "," "," "," "," "," "," ",
303 " "," "," "," "," "," "," "," "," ",
304 " "," "," "," "," "," "," "," "," ",
305 " "," "," ","^"," ","^"," "," "," ",
306 " "," "," ","c"," ","c"," "," "," ",
307 " "," "," ","v"," ","v"," "," "," ",
308 " "," "," "," "," "," "," "," "," ",
309 " "," "," "," "," "," "," "," "," ",
310 " "," "," "," "," "," "," "," "," ",
317 " "," "," "," "," "," "," "," "," ",
318 " "," "," "," ","^"," "," "," "," ",
319 " "," "," "," ","c"," "," "," "," ",
320 " "," "," "," "," "," "," "," "," ",
321 " ","<","c"," "," "," ","c",">"," ",
322 " "," "," "," "," "," "," "," "," ",
323 " "," "," "," ","c"," "," "," "," ",
324 " "," "," "," ","v"," "," "," "," ",
325 " "," "," "," "," "," "," "," "," ",
332 " "," "," "," "," "," "," "," "," ",
333 " "," ","^"," ","^"," ","^"," "," ",
334 " "," ","c"," ","c"," ","c"," "," ",
335 " "," "," "," "," "," "," "," "," ",
336 " "," "," "," "," "," "," "," "," ",
337 " "," "," "," "," "," "," "," "," ",
338 " "," ","c"," ","c"," ","c"," "," ",
339 " "," ","v"," ","v"," ","v"," "," ",
340 " "," "," "," "," "," "," "," "," ",
348 " ","S","v","S","v","S","v","S","v",
349 " ","S"," ","S"," ","S"," ","S"," ",
350 " ","c"," ","c"," ","c"," ","c"," ",
351 " "," "," "," "," "," "," "," "," ",
352 " "," "," "," "," "," "," "," "," ",
353 " "," "," "," "," "," "," "," "," ",
354 " ","c"," ","c"," ","c"," ","c"," ",
355 " ","S"," ","S"," ","S"," ","S"," ",
356 " ","S","^","S","^","S","^","S","^",
363 " "," "," "," "," "," "," "," "," ",
364 " ","c"," "," "," "," "," ","c"," ",
365 " "," "," "," "," "," "," "," "," ",
366 " "," "," ","c","S","c"," "," "," ",
367 " "," "," ","S",">"," "," "," "," ",
368 " "," "," ","c","S","c"," "," "," ",
369 " "," "," "," "," "," "," "," "," ",
370 " ","c"," "," "," "," "," ","c"," ",
371 " "," "," "," "," "," "," "," "," ",
378 " "," "," "," "," "," "," "," "," ",
379 " "," "," "," "," "," "," "," "," ",
380 " "," "," "," "," "," "," "," "," ",
381 " "," "," "," "," "," "," "," "," ",
382 " "," "," "," ","<"," "," "," "," ",
383 " "," "," "," "," "," "," "," "," ",
384 " "," "," "," "," "," "," "," "," ",
385 " "," "," "," "," "," "," "," "," ",
386 " "," "," "," "," "," "," "," "," ",
393 " "," "," "," "," "," "," "," "," ",
394 " "," "," "," "," "," "," "," ","<",
395 " "," "," "," "," "," "," "," "," ",
396 " "," "," "," "," "," "," "," "," ",
397 " "," "," "," "," "," "," "," "," ",
398 " "," "," "," "," "," "," "," "," ",
399 " "," "," "," "," "," "," "," "," ",
400 " "," "," "," "," "," "," "," ","<",
401 " "," "," "," "," "," "," "," "," ",
409 "c"," "," "," "," "," "," "," ","c",
410 "c","c",">"," "," "," ","<","c","c",
411 " ","c","c"," "," "," ","c","c"," ",
412 " "," ","c","c"," ","c","c"," "," ",
413 " "," "," "," "," "," "," "," "," ",
414 " "," ","c","c"," ","c","c"," "," ",
415 " ","c","c"," "," "," ","c","c"," ",
416 "c","c",">"," "," "," ","<","c","c",
417 "c"," "," "," "," "," "," "," ","c",
424 "S","S","S","S","S","S","S","S","S",
425 "S","S","S"," "," "," "," "," "," ",
426 "S","S","S"," "," "," "," "," "," ",
427 "S","S","S"," "," ","^","^","^","^",
428 " "," "," "," "," ","c","c","c","c",
429 "S","S","S"," "," ","v","v","v","v",
430 "S","S","S"," "," "," "," "," "," ",
431 "S","S","S"," "," "," "," "," "," ",
432 "S","S","S","S","S","S","S","S","S",
439 " "," "," "," "," "," "," "," "," ",
440 " "," "," "," "," "," "," "," "," ",
441 " "," "," "," "," "," "," "," "," ",
442 " ","^"," ","^"," ","^"," ","^"," ",
443 " ","c"," ","c"," ","c"," ","c"," ",
444 " ","v"," ","v"," ","v"," ","v"," ",
445 " "," "," "," "," "," "," "," "," ",
446 " "," "," "," "," "," "," "," "," ",
447 " "," "," "," "," "," "," "," "," ",
454 "S","S"," "," "," "," "," ","S","S",
455 "S"," "," "," ","c"," "," "," ","S",
456 " "," ","<","S","S","S",">"," "," ",
457 " "," ","S","S","S","S","S"," "," ",
458 " ","c","S","S","S","S","S","c"," ",
459 " "," ","S","S","S","S","S"," "," ",
460 " "," ","<","S","S","S",">"," "," ",
461 "S"," "," "," ","c"," "," "," ","S",
462 "S","S"," "," "," "," "," ","S","S",
469 " "," "," "," "," "," "," "," "," ",
470 " ","c","^","c"," ","c","^","c"," ",
471 " ","c","c","c"," ","c","c","c"," ",
472 " ","c","c","c"," ","c","c","c"," ",
473 " "," "," "," "," "," "," "," "," ",
474 " ","c","c","c"," ","c","c","c"," ",
475 " ","c","c","c"," ","c","c","c"," ",
476 " ","c","v","c"," ","c","v","c"," ",
477 " "," "," "," "," "," "," "," "," ",
484 "S"," "," "," "," "," "," "," "," ",
485 "S"," "," ","^"," "," ","^"," "," ",
486 "S"," "," ","c"," "," ","c"," "," ",
487 "S"," "," "," "," "," "," "," "," ",
488 " "," "," ","c"," "," ","c"," "," ",
489 "S"," "," "," "," "," "," "," "," ",
490 "S"," "," ","c"," "," ","c"," "," ",
491 "S"," "," ","v"," "," ","v"," "," ",
492 "S"," "," "," "," "," "," "," "," ",
499 "c"," ","c"," ","c"," ","c"," ","c",
500 " "," ","v"," ","v"," ","v"," "," ",
501 "c"," "," "," "," "," "," "," ","c",
502 " "," "," "," "," "," "," "," "," ",
503 " "," "," "," "," "," "," "," ","c",
504 " "," "," "," "," "," "," "," "," ",
505 "c"," "," "," "," "," "," "," ","c",
506 " "," ","^"," ","^"," ","^"," "," ",
507 "c"," ","c"," ","c"," ","c"," ","c",
515 " "," "," "," "," "," "," "," "," ",
516 " "," ","^"," ","^"," ","^"," "," ",
517 " "," ","c"," ","c"," ","c"," "," ",
518 " "," "," "," "," "," "," "," "," ",
519 " "," ","c"," ","c"," ","c"," "," ",
520 " "," "," "," "," "," "," "," "," ",
521 " "," ","c"," ","c"," ","c"," "," ",
522 " "," ","v"," ","v"," ","v"," "," ",
523 " "," "," "," "," "," "," "," "," ",
531 " "," "," "," "," "," "," "," "," ",
532 " "," "," "," "," "," "," "," "," ",
533 " "," "," "," "," "," "," "," "," ",
534 " "," "," "," "," "," "," "," "," ",
535 " "," "," "," ","s",">"," "," "," ",
536 " "," "," "," "," "," "," "," "," ",
537 " "," "," "," "," "," "," "," "," ",
538 " "," "," "," "," "," "," "," "," ",
539 " "," "," "," "," "," "," "," "," ",
541 " "," "," "," "," "," "," "," "," ",
542 " "," "," "," "," "," "," "," "," ",
543 " "," "," "," "," "," "," "," "," ",
544 " "," "," "," ","s"," "," "," "," ",
545 " "," "," "," ","s"," "," "," "," ",
546 " "," "," "," ","s"," "," "," "," ",
547 " "," "," "," "," "," "," "," "," ",
548 " "," "," "," "," "," "," "," "," ",
549 " "," "," "," "," "," "," "," "," ",
551 " "," "," "," "," "," "," "," "," ",
552 " "," "," "," "," "," "," "," "," ",
553 " "," "," "," "," "," "," "," "," ",
554 " "," "," "," "," "," "," "," "," ",
555 " "," "," "," ","s"," "," "," "," ",
556 " "," "," "," "," "," "," "," "," ",
557 " "," "," "," "," "," "," "," "," ",
558 " "," "," "," "," "," "," "," "," ",
559 " "," "," "," "," "," "," "," "," ",
561 " "," "," "," "," "," "," "," "," ",
562 " "," "," "," "," "," "," "," "," ",
563 " "," "," "," "," "," "," "," "," ",
564 " "," "," "," ","s"," "," "," "," ",
565 " "," "," "," "," "," "," "," "," ",
566 " "," "," "," ","s"," "," "," "," ",
567 " "," "," "," "," "," "," "," "," ",
568 " "," "," "," "," "," "," "," "," ",
569 " "," "," "," "," "," "," "," "," ",
571 " "," "," "," "," "," "," "," "," ",
572 " "," "," "," "," "," "," "," "," ",
573 " "," "," "," "," "," "," "," "," ",
574 " "," "," "," "," "," "," "," "," ",
575 " "," "," "," ","s"," "," "," "," ",
576 " "," "," "," "," "," "," "," "," ",
577 " "," "," "," "," "," "," "," "," ",
578 " "," "," "," "," "," "," "," "," ",
579 " "," "," "," "," "," "," "," "," ",
581 stype
= "desert_sandstone",
583 "S","S","S","S","S","S","S","S","S",
584 "s","2","s","2","s","2","s","2","s",
585 "S","S","S","S","S","S","S","S","S",
586 "2","s","2","s","2","s","2","s","2",
587 "S","S","S","S","S","S","S","S","S",
596 "s","s","s","s","s","s","s","s","s",
597 "s","a","a","a","a","a","a","a","s",
598 "s","a","a","a","a","a","a","a","s",
599 "s","a","a","a","a","a","a","a","s",
600 "s","a","a","a","a","a","a","a","s",
601 "s","a","a","a","a","a","a","a","s",
602 "s","a","a","a","a","a","a","a","s",
603 "s","a","a","a","a","a","a","a","s",
604 "s","s","s","s","s","s","s","s","s",
606 " "," "," "," "," "," "," "," ","<",
607 " ","C"," ","C"," ","C"," ","C"," ",
608 " "," "," "," "," "," "," "," "," ",
609 " ","C"," ","C"," ","C"," ","C"," ",
610 " "," "," "," "," "," "," "," "," ",
611 " ","C"," ","C"," ","C"," ","C"," ",
612 " "," "," "," "," "," "," "," "," ",
613 " ","C"," ","C"," ","C"," ","C"," ",
614 " "," "," "," "," "," "," "," ","<",
618 "S","S","S","S","S","S","S","S","S",
619 "s","1","s","1","s","1","s","1","s",
620 "S","S","S","S","S","S","S","S","S",
621 "s","1","s","1","s","1","s","1","s",
622 "S","S","S","S","S","S","S","S","S",
624 stype
= "desert_sandstone",
632 "n","s","s","s","s","s","s","s","n",
633 "s","n","s","s","s","s","s","n","s",
634 "s","s","n","n","n","n","n","s","s",
635 "s","s","n","s","s","s","n","s","s",
636 "s","s","n","s","s","s","n","s","s",
637 "s","s","n","s","s","s","n","s","s",
638 "s","s","n","n","n","n","n","s","s",
639 "s","n","s","s","s","s","s","n","s",
640 "n","s","s","s","s","s","s","s","n",
642 " "," "," "," "," "," "," "," "," ",
643 " "," "," "," "," "," "," "," "," ",
644 " "," "," "," "," "," "," "," "," ",
645 " "," "," "," "," "," "," "," "," ",
646 " "," "," "," ","<"," "," "," "," ",
647 " "," "," "," "," "," "," "," "," ",
648 " "," "," "," "," "," "," "," "," ",
649 " "," "," "," "," "," "," "," "," ",
650 " "," "," "," "," "," "," "," "," ",
652 "n","s","s","s","s","s","s","s","n",
653 "s","n","s","s","s","s","s","n","s",
654 "s","s","n","n","n","n","n","s","s",
655 "s","s","n","s","s","s","n","s","s",
656 "s","s","n","s","s","s","n","s","s",
657 "s","s","n","s","s","s","n","s","s",
658 "s","s","n","n","n","n","n","s","s",
659 "s","n","s","s","s","s","s","n","s",
660 "n","s","s","s","s","s","s","s","n",
663 "S","S","S","S","S","S","S","S","S",
664 "s","1","s","1","s","1","s","1","s",
665 "S","S","S","S","S","S","S","S","S",
666 "1","s","1","s","1","s","1","s","1",
667 "S","S","S","S","S","S","S","S","S",
678 " "," "," "," "," "," "," "," "," ",
679 " ","S","S","S"," ","S","S","S"," ",
680 " ","S"," "," "," "," "," ","S"," ",
681 " ","S"," "," "," "," "," ","S"," ",
682 " "," "," "," ","c",">"," "," "," ",
683 " ","S"," "," "," "," "," ","S"," ",
684 " ","S"," "," "," "," "," ","S"," ",
685 " ","S","S","S"," ","S","S","S"," ",
686 " "," "," "," "," "," "," "," "," ",
688 " "," "," "," "," "," "," "," "," ",
689 " ","S","S","S"," ","S","S","S"," ",
690 " ","S"," "," "," "," "," ","S"," ",
691 " ","S"," "," "," "," "," ","S"," ",
692 " "," "," "," ","c"," "," "," "," ",
693 " ","S"," "," "," "," "," ","S"," ",
694 " ","S"," "," "," "," "," ","S"," ",
695 " ","S","S","S"," ","S","S","S"," ",
696 " "," "," "," "," "," "," "," "," ",
698 " "," "," "," "," "," "," "," "," ",
699 " ","S","S","S"," ","S","S","S"," ",
700 " ","S"," "," "," "," "," ","S"," ",
701 " ","S"," "," "," "," "," ","S"," ",
702 " "," "," "," ","c"," "," "," "," ",
703 " ","S"," "," "," "," "," ","S"," ",
704 " ","S"," "," "," "," "," ","S"," ",
705 " ","S","S","S"," ","S","S","S"," ",
706 " "," "," "," "," "," "," "," "," ",
708 "s","s","s","s","s","s","s","s","s",
709 "s","S","S","S","S","S","S","S","s",
710 "s","S","s","s","s","s","s","S","s",
711 "s","S","s","s","s","s","s","S","s",
712 "s","S","s","s","s","s","s","S","s",
713 "s","S","s","s","s","s","s","S","s",
714 "s","S","s","s","s","s","s","S","s",
715 "s","S","S","S","S","S","S","S","c",
716 "s","s","s","s","s","s","s","s","s",
718 "S","S","S","S","S","S","S","S","S",
719 "S","S","S","S","v","S","S","S","S",
720 "S","S"," "," "," "," "," ","S","S",
721 "S","S"," "," "," "," "," ","S","S",
722 "S",">"," "," "," "," "," ","<","S",
723 "S","S"," "," "," "," "," ","S","S",
724 "S","S"," "," "," "," "," ","S","S",
725 "S","S","S","S","^","S","S","S","S",
726 "S","S","S","S","S","S","S","S","S",
728 "S","S","S","S","S","S","S","S","S",
729 "S","S","S","S","S","S","S","S","S",
730 "S","S"," "," "," "," "," ","S","S",
731 "S","S"," "," "," "," "," ","S","S",
732 "S","S"," "," "," "," "," ","S","S",
733 "S","S"," "," "," "," "," ","S","S",
734 "S","S"," "," "," "," "," ","S","S",
735 "S","S","S","S","S","S","S","S","S",
736 "S","S","S","S","S","S","S","S","S",
742 local layout_traps_template
= {
743 "S","S","S","S","S","S","S","S","S",
744 "?","?","?","?","?","?","?","?","S",
745 "?","?","?","?","?","?","?","?","S",
746 "?","?","?","?","?","?","?","?","S",
747 "?","?","?","?","?","?","?","?","S", -- << entrance on left side
748 "?","?","?","?","?","?","?","?","S",
749 "?","?","?","?","?","?","?","?","S",
750 "?","?","?","?","?","?","?","?","S",
751 "S","S","S","S","S","S","S","S","S"
754 local code_sandstone
= {
756 ["c"] = "default:sandstone",
757 ["s"] = "default:sandstone",
758 ["n"] = "default:desert_sandstone",
759 ["h"] = "default:sandstone",
760 ["S"] = "default:sandstonebrick",
761 ["1"] = "tsm_pyramids:deco_stone1",
762 ["2"] = "tsm_pyramids:deco_stone2",
763 ["3"] = "tsm_pyramids:deco_stone3",
764 ["^"] = "default:chest",
765 ["<"] = "default:chest",
766 [">"] = "default:chest",
767 ["v"] = "default:chest",
768 ["~"] = "default:lava_source",
769 ["t"] = "tsm_pyramids:trap",
770 ["C"] = "default:large_cactus_seedling",
771 ["a"] = "default:sand",
773 local code_desert_sandstone
= table.copy(code_sandstone
)
774 code_desert_sandstone
["c"] = "default:desert_sandstone"
775 code_desert_sandstone
["s"] = "default:desert_sandstone"
776 code_desert_sandstone
["n"] = "default:sandstone"
777 code_desert_sandstone
["h"] = "default:desert_sandstone"
778 code_desert_sandstone
["1"] = "tsm_pyramids:deco_stone4"
779 code_desert_sandstone
["2"] = "tsm_pyramids:deco_stone5"
780 code_desert_sandstone
["3"] = "tsm_pyramids:deco_stone6"
781 code_desert_sandstone
["S"] = "default:desert_sandstone_brick"
782 code_desert_sandstone
["t"] = "tsm_pyramids:desert_trap"
783 code_desert_sandstone
["a"] = "default:desert_sand"
785 local code_desert_stone
= table.copy(code_sandstone
)
786 code_desert_stone
["c"] = "default:desert_stone_block"
787 code_desert_stone
["s"] = "default:desert_stone_block"
788 code_desert_stone
["n"] = "default:desert_stone_block"
789 code_desert_stone
["h"] = "default:desert_stone_block"
790 code_desert_stone
["1"] = "default:desert_stone_block"
791 code_desert_stone
["2"] = "default:desert_stone_block"
792 code_desert_stone
["3"] = "default:desert_stone_block"
793 code_desert_stone
["S"] = "default:desert_stonebrick"
794 code_desert_stone
["t"] = "air"
795 code_desert_stone
["a"] = "default:desert_sand"
797 local function replace(str
, iy
, code_table
, deco
, column_style
)
798 if iy
< 4 and (str
== "<" or str
== ">" or str
== "^" or str
== "v") then str
= " " end
800 local r
= math
.random(0,3)
806 elseif column_style
== 1 or column_style
== 2 then
807 if iy
== 0 and str
== "c" then str
= deco
[1] end
808 if iy
== 3 and str
== "c" then str
= deco
[2] end
809 elseif column_style
== 3 then
810 if iy
== 0 and str
== "c" then str
= deco
[1] end
811 if iy
== 2 and str
== "c" then str
= deco
[2] end
812 elseif column_style
== 4 then
813 if iy
== 2 and str
== "c" then str
= deco
[1] end
815 return code_table
[str
]
818 local function replace2(str
, iy
, depth
, code_table
)
820 -- Sandstone at the bottom-most layer
822 elseif iy
== depth
-1 then
823 -- Brick at the layer above
825 elseif iy
== 0 and str
== "~" then
826 -- Trap stones at the top layer
828 elseif iy
< depth
-3 and str
== "~" then
829 -- Air below the trap stones
832 -- Everything else is untouched (will stay pyramid material)
834 return code_table
[str
]
837 local function get_flat_index(x
, y
, width
)
838 return 1 + x
+ y
* width
841 local function rotate_layout_single(layout
, width
)
842 local size
= width
*width
843 local new_layout
= {}
846 local symbol
= layout
[get_flat_index((width
-1) - y
, x
, width
)]
848 if symbol
== "^" then
850 elseif symbol
== "<" then
852 elseif symbol
== "v" then
854 elseif symbol
== ">" then
857 new_layout
[get_flat_index(x
, y
, width
)] = symbol
863 local function rotate_layout(layout
, width
, rotations
)
864 local new_layout
= table.copy(layout
)
865 for r
=1, rotations
do
866 new_layout
= rotate_layout_single(new_layout
, width
)
871 -- pos: Position to spawn pyramid
872 -- stype: Sand type ("sandstone" or "desert")
873 -- room_id: Room layout identified (see list of rooms above)
874 -- rotations: Number of times to rotate the room (0-3)
875 function tsm_pyramids
.make_room(pos
, stype
, room_id
, rotations
)
876 local code_table
= code_sandstone
877 if stype
== "desert_sandstone" then
878 code_table
= code_desert_sandstone
879 elseif stype
== "desert_stone" then
880 code_table
= code_desert_stone
882 -- Select random deco block
883 local deco_ids
= {"1", "2", "3"}
886 local r
= math
.random(1, #deco_ids
)
887 table.insert(deco
, deco_ids
[r
])
888 table.remove(deco_ids
, r
)
890 local hole
= {x
=pos
.x
+7,y
=pos
.y
+5, z
=pos
.z
+7}
891 if room_id
== nil then
892 room_id
= math
.random(1, #room_types
)
895 if room_id
< 1 or room_id
> #room_types
then
896 return false, S("Incorrect room type ID: @1", room_id
)
898 local room
= table.copy(room_types
[room_id
])
901 if stype
== "desert_stone" then
904 column_style
= math
.random(0,4)
907 if room
.style
== "yrepeat" then
908 layout
= rotate_layout(room
.layout
, ROOM_WIDTH
, rotations
)
912 local n_str
= layout
[tonumber(ix
*9+iz
+1)]
916 elseif n_str
== ">" then
918 elseif n_str
== "^" then
920 elseif n_str
== "v" then
923 local cpos
= {x
=hole
.x
+ix
,y
=hole
.y
-iy
,z
=hole
.z
+iz
}
924 local nn
= replace(n_str
, iy
, code_table
, deco
, column_style
)
925 minetest
.set_node(cpos
, {name
=nn
, param2
=p2
})
926 if nn
== "default:chest" then
927 table.insert(chests
, cpos
)
932 elseif room
.style
== "stacked" then
933 -- TODO: Implement wall designs
934 -- TODO: Fix room height settings
935 local layout_list
= room
.layout
937 local layout_offset
= room
.layout_offset
938 local layout_height
= room
.layout_height
939 if not layout_offset
then
942 if not layout_height
then
945 for iy
=0,layout_height
-1,1 do
947 if layout_list
[layout_height
-iy
] then
948 layout
= rotate_layout(layout_list
[layout_height
-iy
], ROOM_WIDTH
, rotations
)
954 n_str
= layout
[tonumber(ix
*9+iz
+1)]
961 elseif n_str
== ">" then
963 elseif n_str
== "^" then
965 elseif n_str
== "v" then
968 local cpos
= {x
=hole
.x
+ix
,y
=hole
.y
-iy
+layout_offset
,z
=hole
.z
+iz
}
969 local nn
= code_table
[n_str
]
970 minetest
.set_node(cpos
, {name
=nn
, param2
=p2
})
971 if nn
== "default:chest" then
972 table.insert(chests
, cpos
)
978 minetest
.log("error", "Invalid pyramid room style! room type ID="..r
)
980 local sanded
= room
.flood_sand
~= false and stype
~= "desert_stone" and math
.random(1,8) == 1
982 -- Make at least 8 attempts to fill chests
986 tsm_pyramids
.fill_chest(chests
[c
], stype
, sanded
)
992 tsm_pyramids
.make_traps(pos
, stype
, rotations
, layout
)
995 tsm_pyramids
.flood_sand(pos
, stype
)
997 return true, nil, sanded
1000 local shuffle_traps
= function(chance
, layout_room
)
1001 layout_traps
= table.copy(layout_traps_template
)
1002 for a
=1, #layout_traps
do
1003 -- Delete trap if this space of the room is occupied
1004 if layout_room
[a
] ~= " " then
1005 layout_traps
[a
] = "S"
1006 -- Randomly turn tile into a trap, or not
1007 elseif layout_traps
[a
] == "?" then
1008 -- percentage for a trap
1009 if math
.random(1,100) <= chance
then
1010 layout_traps
[a
] = "~"
1012 layout_traps
[a
] = "S"
1018 function tsm_pyramids
.make_traps(pos
, stype
, rotations
, layout_room
)
1019 local code_table
= code_sandstone
1020 if stype
== "desert_sandstone" then
1021 code_table
= code_desert_sandstone
1022 elseif stype
== "desert_stone" then
1023 code_table
= code_desert_stone
1025 shuffle_traps(math
.random(10,100), layout_room
)
1026 local hole
= {x
=pos
.x
+7,y
=pos
.y
, z
=pos
.z
+7}
1027 local layout
= rotate_layout(layout_traps
, ROOM_WIDTH
, rotations
)
1028 -- Depth is total depth of trap area:
1029 -- * top layer with trap stones
1030 -- * followed by air layers
1031 -- * followed by 2 layer of lava
1032 -- * and 2 layers of sandstone/brick at the bottom (to prevent lava escaping)
1033 -- The depth of air between trap stones and lava layer is <depth> - 4
1035 local wmin
, wmax
= -1,9
1037 for ix
=wmin
,wmax
,1 do
1038 for iz
=wmin
,wmax
,1 do
1040 if ix
== wmin
or ix
== wmax
or iz
== wmin
or iz
== wmax
then
1041 -- Walls around room
1043 n_str
= code_table
["s"]
1045 n_str
= code_table
["S"]
1047 minetest
.set_node({x
=hole
.x
+ix
,y
=hole
.y
-iy
,z
=hole
.z
+iz
}, {name
=n_str
})
1050 n_str
= layout
[tonumber(ix
*9+iz
+1)]
1051 minetest
.set_node({x
=hole
.x
+ix
,y
=hole
.y
-iy
,z
=hole
.z
+iz
}, {name
=replace2(n_str
, iy
, depth
, code_table
)})
1058 function tsm_pyramids
.flood_sand(pos
, stype
)
1059 local set_to_sand
= {}
1060 local nn
= "default:sand"
1061 if stype
== "desert_sandstone" or stype
== "desert_stone" then
1062 nn
= "default:desert_sand"
1064 local hole
= {x
=pos
.x
+7,y
=pos
.y
+1, z
=pos
.z
+7}
1065 local maxh
= math
.random(1,4)
1066 local chance
= math
.random(1,7)
1069 if math
.random(1,chance
) == 1 then
1070 local h
= math
.random(1,maxh
)
1072 local p
= {x
=hole
.x
+ix
,y
=hole
.y
+iy
,z
=hole
.z
+iz
}
1073 if minetest
.get_node(p
).name
== "air" then
1074 table.insert(set_to_sand
, p
)
1080 minetest
.bulk_set_node(set_to_sand
, {name
=nn
})