1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-20 03:29:26 +02:00

Merge pull request #433 from Jayefuu/map/tetris_and_world_thanksgiving

Add Tetris and World Thanksgiving maps
This commit is contained in:
Matthew 2018-11-22 22:22:03 -05:00 committed by GitHub
commit 9a62febdea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1151 additions and 0 deletions

48
docs/tetris.md Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,519 @@
local b = require 'map_gen.shared.builders'
return b.decompress({
height = 512,
width = 512,
data = {
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,247,1,9,2,256,},
{2,244,1,15,2,253,},
{2,242,1,19,2,251,},
{2,240,1,23,2,249,},
{2,239,1,26,2,247,},
{2,237,1,29,2,246,},
{2,236,1,32,2,244,},
{2,235,1,34,2,243,},
{2,234,1,36,2,242,},
{2,233,1,38,2,241,},
{2,231,1,41,2,240,},
{2,230,1,43,2,239,},
{2,230,1,44,2,238,},
{2,229,1,46,2,237,},
{2,228,1,48,2,236,},
{2,227,1,50,2,235,},
{2,226,1,52,2,234,},
{2,225,1,53,2,234,},
{2,225,1,54,2,233,},
{2,224,1,56,2,232,},
{2,223,1,57,2,232,},
{2,223,1,58,2,231,},
{2,222,1,60,2,230,},
{2,221,1,61,2,230,},
{2,221,1,62,2,229,},
{2,220,1,63,2,229,},
{2,220,1,64,2,228,},
{2,219,1,65,2,228,},
{2,219,1,66,2,227,},
{2,218,1,67,2,227,},
{2,218,1,68,2,226,},
{2,218,1,68,2,226,},
{2,217,1,16,2,6,1,27,2,6,1,14,2,226,},
{2,217,1,14,2,10,1,23,2,10,1,13,2,225,},
{2,217,1,12,2,13,1,20,2,13,1,12,2,225,},
{2,216,1,12,2,15,1,18,2,15,1,11,2,225,},
{2,216,1,11,2,17,1,16,2,17,1,11,2,224,},
{2,216,1,11,2,18,1,15,2,18,1,10,2,224,},
{2,215,1,11,2,19,1,14,2,19,1,10,2,224,},
{2,215,1,11,2,20,1,13,2,20,1,9,2,224,},
{2,215,1,11,2,20,1,12,2,21,1,10,2,223,},
{2,215,1,10,2,21,1,12,2,21,1,10,2,223,},
{2,215,1,10,2,21,1,12,2,21,1,10,2,223,},
{2,215,1,10,2,21,1,12,2,21,1,10,2,223,},
{2,215,1,10,2,21,1,12,2,21,1,10,2,223,},
{2,215,1,11,2,20,1,13,2,20,1,10,2,223,},
{2,214,1,12,2,19,1,14,2,19,1,11,2,223,},
{2,214,1,12,2,19,1,15,2,18,1,11,2,223,},
{2,215,1,12,2,17,1,16,2,17,1,12,2,223,},
{2,215,1,13,2,16,1,17,2,16,1,12,2,223,},
{2,215,1,14,2,14,1,19,2,14,1,12,2,224,},
{2,216,1,14,2,11,1,22,2,11,1,14,2,224,},
{2,216,1,16,2,7,1,26,2,7,1,16,2,224,},
{2,216,1,71,2,225,},
{2,217,1,70,2,225,},
{2,217,1,70,2,225,},
{2,217,1,69,2,226,},
{2,218,1,68,2,226,},
{2,218,1,29,2,9,1,30,2,226,},
{2,218,1,27,2,13,1,27,2,227,},
{2,219,1,25,2,15,1,26,2,227,},
{2,219,1,24,2,17,1,25,2,227,},
{2,219,1,24,2,18,1,23,2,228,},
{2,220,1,22,2,19,1,23,2,228,},
{2,220,1,22,2,20,1,22,2,228,},
{2,220,1,22,2,20,1,21,2,229,},
{2,221,1,20,2,21,1,21,2,229,},
{2,221,1,20,2,22,1,20,2,229,},
{2,221,1,20,2,22,1,19,2,230,},
{2,222,1,19,2,22,1,19,2,230,},
{2,222,1,19,2,22,1,19,2,230,},
{2,222,1,19,2,22,1,18,2,231,},
{2,223,1,18,2,22,1,18,2,231,},
{2,223,1,18,2,22,1,18,2,231,},
{2,223,1,18,2,22,1,17,2,232,},
{2,224,1,17,2,22,1,17,2,232,},
{2,224,1,17,2,21,1,18,2,232,},
{2,224,1,17,2,21,1,17,2,233,},
{2,224,1,18,2,20,1,17,2,233,},
{2,225,1,17,2,20,1,17,2,233,},
{2,159,1,5,2,61,1,17,2,20,1,17,2,60,1,5,2,168,},
{2,158,1,8,2,59,1,17,2,20,1,16,2,59,1,8,2,167,},
{2,157,1,10,2,59,1,16,2,19,1,17,2,58,1,9,2,167,},
{2,157,1,11,2,58,1,17,2,18,1,17,2,57,1,11,2,166,},
{2,157,1,12,2,57,1,17,2,18,1,17,2,56,1,12,2,166,},
{2,156,1,14,2,56,1,17,2,17,1,17,2,56,1,13,2,166,},
{2,156,1,15,2,56,1,17,2,16,1,17,2,55,1,15,2,165,},
{2,156,1,16,2,55,1,17,2,16,1,17,2,54,1,16,2,165,},
{2,156,1,17,2,54,1,17,2,16,1,17,2,53,1,17,2,165,},
{2,156,1,18,2,53,1,17,2,15,1,17,2,53,1,18,2,165,},
{2,156,1,18,2,53,1,18,2,14,1,17,2,52,1,19,2,165,},
{2,156,1,19,2,53,1,17,2,14,1,17,2,52,1,19,2,165,},
{2,156,1,20,2,52,1,17,2,13,1,18,2,51,1,20,2,165,},
{2,156,1,21,2,51,1,18,2,12,1,18,2,50,1,21,2,165,},
{2,156,1,21,2,51,1,18,2,12,1,18,2,49,1,22,2,165,},
{2,156,1,22,2,50,1,18,2,11,1,18,2,50,1,22,2,165,},
{2,156,1,23,2,49,1,19,2,10,1,18,2,49,1,23,2,165,},
{2,156,1,23,2,49,1,19,2,9,1,19,2,48,1,24,2,165,},
{2,156,1,24,2,48,1,20,2,8,1,19,2,48,1,24,2,165,},
{2,156,1,25,2,47,1,20,2,8,1,19,2,47,1,25,2,165,},
{2,156,1,25,2,47,1,20,2,7,1,20,2,46,1,26,2,165,},
{2,156,1,26,2,46,1,21,2,6,1,20,2,46,1,26,2,165,},
{2,156,1,27,2,45,1,21,2,5,1,21,2,45,1,27,2,165,},
{2,156,1,27,2,45,1,22,2,4,1,21,2,45,1,26,2,166,},
{2,156,1,28,2,45,1,21,2,4,1,21,2,44,1,27,2,166,},
{2,109,1,7,2,41,1,27,2,45,1,22,2,2,1,22,2,43,1,28,2,41,1,6,2,119,},
{2,108,1,10,2,39,1,28,2,44,1,22,2,2,1,22,2,43,1,28,2,39,1,9,2,118,},
{2,108,1,12,2,37,1,29,2,43,1,22,2,1,1,23,2,42,1,29,2,37,1,12,2,117,},
{2,108,1,13,2,36,1,29,2,43,1,46,2,42,1,29,2,36,1,13,2,117,},
{2,107,1,16,2,34,1,30,2,42,1,46,2,41,1,30,2,34,1,15,2,117,},
{2,107,1,17,2,33,1,30,2,42,1,46,2,40,1,30,2,34,1,16,2,117,},
{2,107,1,18,2,32,1,31,2,41,1,46,2,40,1,30,2,33,1,17,2,117,},
{2,107,1,19,2,32,1,30,2,41,1,46,2,39,1,31,2,31,1,19,2,117,},
{2,107,1,21,2,30,1,31,2,40,1,46,2,39,1,31,2,30,1,20,2,117,},
{2,108,1,21,2,29,1,32,2,39,1,46,2,38,1,32,2,29,1,21,2,117,},
{2,108,1,22,2,28,1,32,2,39,1,46,2,38,1,32,2,28,1,22,2,117,},
{2,108,1,23,2,27,1,33,2,38,1,46,2,37,1,32,2,28,1,23,2,117,},
{2,108,1,24,2,26,1,33,2,38,1,46,2,37,1,32,2,27,1,24,2,117,},
{2,108,1,25,2,26,1,33,2,37,1,46,2,36,1,33,2,25,1,25,2,118,},
{2,108,1,26,2,25,1,33,2,37,1,46,2,35,1,34,2,24,1,26,2,118,},
{2,109,1,26,2,24,1,34,2,36,1,46,2,35,1,34,2,23,1,27,2,118,},
{2,109,1,27,2,23,1,34,2,36,1,46,2,34,1,35,2,22,1,28,2,118,},
{2,109,1,28,2,22,1,35,2,35,1,46,2,34,1,34,2,22,1,28,2,119,},
{2,110,1,28,2,22,1,34,2,35,1,46,2,33,1,35,2,21,1,29,2,119,},
{2,110,1,29,2,21,1,35,2,34,1,46,2,33,1,35,2,20,1,30,2,119,},
{2,110,1,30,2,20,1,35,2,34,1,46,2,32,1,36,2,19,1,30,2,120,},
{2,111,1,30,2,19,1,36,2,33,1,46,2,32,1,36,2,18,1,31,2,120,},
{2,111,1,31,2,18,1,36,2,33,1,46,2,31,1,36,2,19,1,31,2,120,},
{2,111,1,32,2,18,1,36,2,32,1,46,2,31,1,36,2,18,1,31,2,121,},
{2,112,1,32,2,17,1,36,2,32,1,46,2,30,1,37,2,17,1,32,2,121,},
{2,112,1,33,2,16,1,37,2,31,1,46,2,30,1,37,2,16,1,33,2,121,},
{2,112,1,34,2,15,1,37,2,31,1,46,2,29,1,37,2,16,1,33,2,122,},
{2,113,1,34,2,15,1,37,2,30,1,46,2,29,1,37,2,15,1,34,2,122,},
{2,113,1,35,2,14,1,37,2,30,1,46,2,28,1,38,2,14,1,35,2,122,},
{2,114,1,35,2,13,1,38,2,29,1,46,2,28,1,37,2,14,1,35,2,123,},
{2,114,1,36,2,13,1,37,2,29,1,46,2,27,1,37,2,14,1,36,2,123,},
{2,114,1,36,2,14,1,37,2,28,1,46,2,27,1,37,2,13,1,36,2,124,},
{2,115,1,36,2,14,1,36,2,28,1,46,2,26,1,37,2,13,1,37,2,124,},
{2,70,1,8,2,37,1,37,2,14,1,36,2,27,1,46,2,26,1,36,2,14,1,37,2,37,1,7,2,80,},
{2,69,1,12,2,35,1,37,2,14,1,35,2,27,1,46,2,26,1,35,2,14,1,37,2,35,1,12,2,78,},
{2,69,1,15,2,32,1,38,2,13,1,36,2,26,1,46,2,25,1,35,2,14,1,38,2,32,1,15,2,78,},
{2,68,1,18,2,30,1,39,2,13,1,35,2,26,1,46,2,25,1,34,2,14,1,38,2,31,1,17,2,78,},
{2,68,1,20,2,29,1,39,2,13,1,35,2,25,1,46,2,24,1,35,2,13,1,39,2,29,1,19,2,78,},
{2,68,1,22,2,27,1,39,2,14,1,34,2,25,1,46,2,24,1,34,2,13,1,39,2,28,1,21,2,78,},
{2,68,1,24,2,26,1,39,2,14,1,34,2,24,1,46,2,23,1,34,2,13,1,40,2,26,1,23,2,78,},
{2,69,1,24,2,25,1,40,2,14,1,33,2,24,1,46,2,23,1,33,2,14,1,39,2,25,1,25,2,78,},
{2,69,1,26,2,24,1,40,2,13,1,33,2,23,1,47,2,22,1,33,2,14,1,40,2,24,1,26,2,78,},
{2,69,1,28,2,22,1,41,2,13,1,33,2,22,1,47,2,22,1,33,2,13,1,41,2,22,1,28,2,78,},
{2,70,1,29,2,21,1,41,2,13,1,32,2,22,1,47,2,21,1,33,2,13,1,41,2,21,1,29,2,79,},
{2,70,1,30,2,20,1,41,2,14,1,32,2,21,1,47,2,21,1,32,2,13,1,42,2,20,1,30,2,79,},
{2,70,1,32,2,19,1,41,2,13,1,32,2,21,1,47,2,20,1,32,2,14,1,41,2,19,1,31,2,80,},
{2,71,1,32,2,19,1,41,2,13,1,32,2,20,1,47,2,20,1,31,2,14,1,41,2,18,1,33,2,80,},
{2,71,1,34,2,18,1,41,2,13,1,31,2,20,1,47,2,20,1,31,2,13,1,41,2,18,1,33,2,81,},
{2,72,1,34,2,19,1,40,2,13,1,31,2,19,1,47,2,19,1,31,2,13,1,40,2,18,1,35,2,81,},
{2,72,1,36,2,18,1,39,2,14,1,30,2,19,1,47,2,19,1,30,2,13,1,40,2,18,1,35,2,82,},
{2,73,1,36,2,18,1,39,2,13,1,31,2,18,1,47,2,18,1,30,2,14,1,39,2,17,1,37,2,82,},
{2,73,1,38,2,18,1,38,2,13,1,30,2,18,1,47,2,18,1,30,2,13,1,38,2,18,1,37,2,83,},
{2,74,1,38,2,18,1,38,2,13,1,29,2,18,1,47,2,17,1,30,2,13,1,38,2,17,1,39,2,83,},
{2,75,1,39,2,17,1,38,2,13,1,29,2,17,1,47,2,17,1,29,2,13,1,38,2,17,1,39,2,84,},
{2,75,1,40,2,18,1,36,2,13,1,29,2,17,1,47,2,16,1,29,2,13,1,37,2,18,1,40,2,84,},
{2,76,1,40,2,18,1,36,2,13,1,29,2,16,1,47,2,16,1,29,2,13,1,36,2,17,1,41,2,85,},
{2,76,1,42,2,17,1,36,2,13,1,28,2,16,1,47,2,16,1,28,2,13,1,36,2,17,1,41,2,86,},
{2,77,1,42,2,17,1,36,2,13,1,28,2,15,1,47,2,15,1,28,2,13,1,35,2,17,1,43,2,86,},
{2,78,1,43,2,17,1,34,2,13,1,28,2,15,1,48,2,14,1,27,2,13,1,35,2,17,1,43,2,87,},
{2,78,1,44,2,17,1,34,2,13,1,27,2,15,1,48,2,13,1,27,2,13,1,35,2,17,1,43,2,88,},
{2,79,1,44,2,17,1,34,2,13,1,27,2,14,1,48,2,13,1,27,2,13,1,33,2,17,1,45,2,88,},
{2,80,1,45,2,17,1,33,2,13,1,26,2,14,1,48,2,13,1,26,2,13,1,33,2,17,1,45,2,89,},
{2,80,1,46,2,17,1,33,2,12,1,27,2,13,1,48,2,12,1,26,2,13,1,33,2,17,1,45,2,90,},
{2,81,1,46,2,17,1,32,2,13,1,26,2,13,1,48,2,12,1,26,2,12,1,33,2,16,1,47,2,90,},
{2,82,1,47,2,16,1,32,2,13,1,25,2,13,1,48,2,11,1,26,2,13,1,31,2,17,1,47,2,91,},
{2,83,1,47,2,17,1,31,2,13,1,25,2,12,1,48,2,11,1,25,2,13,1,31,2,17,1,47,2,92,},
{2,83,1,48,2,17,1,31,2,12,1,25,2,12,1,48,2,10,1,25,2,13,1,31,2,17,1,47,2,93,},
{2,84,1,48,2,17,1,30,2,13,1,25,2,11,1,48,2,10,1,25,2,12,1,31,2,16,1,49,2,93,},
{2,85,1,49,2,16,1,30,2,13,1,24,2,11,1,48,2,10,1,24,2,13,1,30,2,16,1,49,2,94,},
{2,44,1,8,2,34,1,49,2,16,1,30,2,13,1,23,2,11,1,48,2,10,1,23,2,13,1,29,2,17,1,49,2,34,1,8,2,53,},
{2,42,1,15,2,31,1,48,2,17,1,29,2,12,1,23,2,11,1,48,2,10,1,22,2,13,1,29,2,17,1,48,2,31,1,15,2,51,},
{2,41,1,20,2,29,1,47,2,17,1,28,2,13,1,22,2,11,1,48,2,10,1,22,2,13,1,28,2,16,1,47,2,30,1,20,2,50,},
{2,40,1,24,2,29,1,46,2,16,1,28,2,13,1,20,2,12,1,48,2,11,1,20,2,13,1,28,2,16,1,46,2,29,1,23,2,50,},
{2,40,1,27,2,28,1,45,2,16,1,28,2,12,1,17,2,15,1,48,2,13,1,17,2,13,1,27,2,17,1,45,2,28,1,27,2,49,},
{2,40,1,30,2,27,1,44,2,16,1,27,2,13,1,14,2,17,1,48,2,16,1,14,2,12,1,27,2,17,1,44,2,27,1,29,2,50,},
{2,40,1,33,2,26,1,43,2,17,1,26,2,13,1,11,2,19,1,48,2,18,1,11,2,13,1,26,2,16,1,43,2,27,1,32,2,50,},
{2,41,1,34,2,26,1,43,2,16,1,26,2,13,1,8,2,21,1,48,2,20,1,8,2,13,1,26,2,16,1,42,2,26,1,35,2,50,},
{2,41,1,37,2,25,1,42,2,16,1,26,2,12,1,6,2,23,1,48,2,22,1,5,2,13,1,26,2,16,1,41,2,26,1,37,2,50,},
{2,42,1,38,2,26,1,40,2,16,1,25,2,13,1,3,2,25,1,48,2,24,1,3,2,12,1,26,2,16,1,40,2,25,1,39,2,51,},
{2,42,1,41,2,25,1,39,2,16,1,25,2,40,1,48,2,39,1,24,2,16,1,40,2,25,1,41,2,51,},
{2,43,1,42,2,25,1,38,2,16,1,25,2,39,1,48,2,38,1,24,2,16,1,39,2,25,1,42,2,52,},
{2,43,1,44,2,25,1,38,2,16,1,23,2,39,1,48,2,37,1,24,2,16,1,38,2,24,1,44,2,53,},
{2,44,1,46,2,24,1,37,2,16,1,23,2,38,1,48,2,37,1,23,2,16,1,37,2,24,1,46,2,53,},
{2,45,1,47,2,24,1,36,2,16,1,23,2,37,1,48,2,36,1,23,2,16,1,36,2,24,1,47,2,54,},
{2,46,1,48,2,24,1,35,2,16,1,23,2,23,1,2,2,11,1,48,2,10,1,3,2,22,1,23,2,16,1,35,2,24,1,48,2,55,},
{2,46,1,50,2,24,1,34,2,16,1,21,2,22,1,4,2,11,1,48,2,10,1,5,2,20,1,22,2,15,1,35,2,23,1,50,2,56,},
{2,47,1,51,2,24,1,34,2,15,1,19,2,21,1,6,2,10,1,49,2,11,1,6,2,20,1,18,2,16,1,34,2,23,1,52,2,56,},
{2,48,1,52,2,23,1,34,2,15,1,16,2,21,1,8,2,10,1,49,2,11,1,8,2,19,1,16,2,16,1,33,2,23,1,53,2,57,},
{2,49,1,54,2,22,1,33,2,15,1,14,2,20,1,10,2,10,1,49,2,11,1,10,2,19,1,13,2,16,1,32,2,23,1,54,2,58,},
{2,50,1,55,2,22,1,32,2,16,1,11,2,19,1,12,2,10,1,49,2,11,1,11,2,19,1,11,2,16,1,32,2,22,1,55,2,59,},
{2,51,1,56,2,22,1,31,2,16,1,8,2,20,1,13,2,10,1,49,2,11,1,13,2,18,1,9,2,16,1,31,2,22,1,56,2,60,},
{2,52,1,57,2,22,1,30,2,16,1,6,2,19,1,15,2,10,1,49,2,11,1,15,2,18,1,6,2,15,1,31,2,22,1,57,2,61,},
{2,53,1,58,2,22,1,29,2,16,1,4,2,18,1,17,2,10,1,49,2,11,1,16,2,18,1,4,2,15,1,30,2,22,1,58,2,62,},
{2,54,1,59,2,22,1,29,2,15,1,2,2,18,1,18,2,10,1,49,2,11,1,18,2,17,1,2,2,15,1,29,2,22,1,59,2,63,},
{2,55,1,60,2,21,1,29,2,32,1,20,2,10,1,49,2,11,1,19,2,32,1,28,2,22,1,60,2,64,},
{2,56,1,60,2,22,1,28,2,30,1,21,2,10,1,49,2,11,1,21,2,29,1,28,2,21,1,61,2,65,},
{2,57,1,61,2,22,1,27,2,28,1,22,2,10,1,50,2,10,1,22,2,27,1,27,2,21,1,62,2,66,},
{2,60,1,60,2,22,1,26,2,25,1,24,2,10,1,50,2,10,1,23,2,25,1,26,2,21,1,61,2,69,},
{2,64,1,58,2,21,1,26,2,23,1,25,2,10,1,50,2,10,1,25,2,22,1,25,2,22,1,58,2,73,},
{2,68,1,56,2,21,1,25,2,21,1,26,2,10,1,50,2,10,1,26,2,19,1,25,2,22,1,55,2,78,},
{2,72,1,54,2,21,1,24,2,18,1,28,2,10,1,50,2,10,1,27,2,17,1,25,2,21,1,53,2,82,},
{2,76,1,52,2,21,1,23,2,16,1,29,2,10,1,50,2,10,1,29,2,15,1,23,2,21,1,52,2,85,},
{2,80,1,50,2,21,1,19,2,17,1,30,2,10,1,50,2,10,1,30,2,15,1,20,2,21,1,50,2,89,},
{2,83,1,48,2,21,1,17,2,17,1,31,2,10,1,50,2,10,1,31,2,15,1,17,2,21,1,48,2,93,},
{2,31,1,6,2,50,1,46,2,21,1,14,2,17,1,32,2,10,1,50,2,10,1,32,2,15,1,15,2,21,1,46,2,50,1,6,2,40,},
{2,25,1,21,2,44,1,45,2,21,1,12,2,15,1,34,2,10,1,50,2,10,1,33,2,15,1,12,2,21,1,44,2,44,1,21,2,35,},
{2,24,1,28,2,42,1,43,2,20,1,10,2,15,1,35,2,10,1,50,2,10,1,34,2,15,1,9,2,21,1,43,2,42,1,28,2,33,},
{2,23,1,34,2,40,1,41,2,21,1,7,2,15,1,36,2,10,1,50,2,10,1,35,2,15,1,7,2,20,1,42,2,40,1,34,2,32,},
{2,22,1,40,2,38,1,40,2,21,1,4,2,15,1,37,2,10,1,50,2,10,1,37,2,14,1,4,2,21,1,40,2,38,1,40,2,31,},
{2,22,1,44,2,37,1,39,2,20,1,2,2,15,1,37,2,11,1,50,2,10,1,38,2,14,1,1,2,21,1,39,2,37,1,44,2,31,},
{2,22,1,48,2,36,1,38,2,34,1,38,2,11,1,50,2,10,1,39,2,33,1,38,2,36,1,48,2,31,},
{2,22,1,52,2,35,1,36,2,32,1,39,2,11,1,50,2,10,1,40,2,30,1,37,2,35,1,52,2,31,},
{2,23,1,54,2,35,1,35,2,29,1,40,2,11,1,50,2,10,1,41,2,28,1,35,2,34,1,55,2,32,},
{2,23,1,58,2,34,1,34,2,26,1,41,2,11,1,50,2,10,1,42,2,25,1,34,2,34,1,58,2,32,},
{2,24,1,60,2,34,1,33,2,23,1,42,2,11,1,50,2,10,1,43,2,22,1,33,2,33,1,61,2,33,},
{2,25,1,63,2,33,1,31,2,21,1,43,2,11,1,50,2,10,1,43,2,21,1,31,2,33,1,63,2,34,},
{2,25,1,66,2,32,1,31,2,18,1,44,2,10,1,51,2,10,1,44,2,18,1,30,2,33,1,65,2,35,},
{2,26,1,68,2,32,1,30,2,15,1,45,2,10,1,51,2,10,1,45,2,15,1,30,2,32,1,68,2,35,},
{2,27,1,70,2,32,1,27,2,15,1,45,2,10,1,51,2,11,1,45,2,14,1,27,2,31,1,71,2,36,},
{2,28,1,72,2,31,1,24,2,15,1,46,2,10,1,51,2,11,1,46,2,13,1,24,2,31,1,73,2,37,},
{2,29,1,75,2,30,1,21,2,14,1,47,2,10,1,51,2,11,1,47,2,13,1,21,2,30,1,75,2,38,},
{2,30,1,76,2,31,1,17,2,14,1,48,2,10,1,51,2,11,1,48,2,13,1,17,2,30,1,76,2,40,},
{2,32,1,77,2,30,1,14,2,14,1,49,2,10,1,51,2,11,1,49,2,13,1,13,2,30,1,78,2,41,},
{2,33,1,79,2,30,1,10,2,14,1,50,2,10,1,51,2,11,1,49,2,13,1,11,2,30,1,79,2,42,},
{2,34,1,81,2,29,1,8,2,13,1,51,2,10,1,51,2,11,1,50,2,13,1,7,2,30,1,81,2,43,},
{2,35,1,83,2,29,1,4,2,14,1,51,2,10,1,52,2,10,1,51,2,13,1,4,2,29,1,81,2,46,},
{2,51,1,70,2,43,1,52,2,10,1,52,2,10,1,52,2,42,1,69,2,61,},
{2,60,1,63,2,40,1,53,2,10,1,52,2,10,1,53,2,38,1,63,2,70,},
{2,68,1,58,2,36,1,54,2,10,1,52,2,10,1,53,2,36,1,58,2,77,},
{2,74,1,55,2,33,1,54,2,10,1,52,2,10,1,54,2,32,1,54,2,84,},
{2,81,1,50,2,30,1,55,2,10,1,52,2,10,1,55,2,28,1,51,2,90,},
{2,86,1,48,2,26,1,56,2,10,1,52,2,10,1,55,2,26,1,47,2,96,},
{2,92,1,45,2,22,1,57,2,10,1,52,2,10,1,56,2,22,1,45,2,101,},
{2,97,1,42,2,20,1,57,2,10,1,52,2,10,1,57,2,19,1,42,2,106,},
{2,102,1,40,2,16,1,58,2,10,1,52,2,10,1,58,2,15,1,40,2,111,},
{2,107,1,37,2,13,1,59,2,10,1,52,2,10,1,58,2,13,1,37,2,116,},
{2,20,1,28,2,63,1,33,2,13,1,58,2,11,1,52,2,10,1,59,2,12,1,32,2,64,1,28,2,29,},
{2,16,1,42,2,58,1,27,2,13,1,59,2,11,1,52,2,10,1,60,2,12,1,27,2,58,1,42,2,25,},
{2,14,1,51,2,55,1,23,2,12,1,60,2,11,1,52,2,10,1,60,2,12,1,23,2,55,1,51,2,23,},
{2,12,1,60,2,52,1,18,2,13,1,60,2,11,1,52,2,10,1,61,2,12,1,17,2,53,1,59,2,22,},
{2,11,1,67,2,51,1,12,2,13,1,61,2,11,1,52,2,10,1,61,2,12,1,13,2,50,1,67,2,21,},
{2,11,1,73,2,49,1,8,2,13,1,61,2,11,1,52,2,10,1,62,2,12,1,8,2,49,1,73,2,20,},
{2,11,1,78,2,48,1,3,2,13,1,62,2,11,1,52,2,10,1,63,2,11,1,4,2,47,1,79,2,20,},
{2,11,1,83,2,58,1,63,2,11,1,52,2,10,1,63,2,57,1,84,2,20,},
{2,11,1,89,2,52,1,63,2,10,1,53,2,10,1,64,2,51,1,88,2,21,},
{2,12,1,92,2,47,1,64,2,10,1,53,2,11,1,63,2,46,1,93,2,21,},
{2,13,1,96,2,42,1,64,2,10,1,53,2,11,1,64,2,41,1,96,2,22,},
{2,13,1,101,2,36,1,65,2,10,1,53,2,11,1,65,2,35,1,100,2,23,},
{2,14,1,104,2,32,1,65,2,10,1,53,2,11,1,65,2,31,1,103,2,24,},
{2,15,1,107,2,27,1,66,2,10,1,53,2,11,1,66,2,26,1,106,2,25,},
{2,17,1,109,2,23,1,66,2,10,1,53,2,11,1,66,2,22,1,109,2,26,},
{2,18,1,112,2,18,1,67,2,10,1,53,2,11,1,67,2,16,1,113,2,27,},
{2,19,1,115,2,14,1,67,2,10,1,53,2,11,1,67,2,12,1,116,2,28,},
{2,21,1,114,2,12,1,68,2,10,1,54,2,10,1,68,2,11,1,114,2,30,},
{2,22,1,112,2,13,1,67,2,11,1,54,2,11,1,67,2,11,1,113,2,31,},
{2,24,1,110,2,12,1,67,2,12,1,54,2,12,1,67,2,11,1,110,2,33,},
{2,25,1,108,2,13,1,66,2,13,1,54,2,13,1,66,2,11,1,108,2,35,},
{2,27,1,106,2,12,1,66,2,14,1,54,2,13,1,66,2,12,1,106,2,36,},
{2,29,1,104,2,12,1,65,2,15,1,54,2,14,1,66,2,11,1,104,2,38,},
{2,31,1,101,2,12,1,66,2,14,1,56,2,14,1,65,2,11,1,102,2,40,},
{2,33,1,99,2,12,1,65,2,14,1,58,2,14,1,65,2,11,1,99,2,42,},
{2,35,1,97,2,11,1,65,2,14,1,60,2,13,1,65,2,11,1,97,2,44,},
{2,37,1,94,2,12,1,65,2,13,1,62,2,13,1,65,2,11,1,94,2,46,},
{2,38,1,93,2,12,1,64,2,13,1,64,2,13,1,64,2,11,1,92,2,48,},
{2,41,1,89,2,12,1,65,2,12,1,66,2,12,1,64,2,11,1,90,2,50,},
{2,43,1,87,2,12,1,64,2,12,1,67,2,13,1,64,2,11,1,87,2,52,},
{2,45,1,85,2,12,1,64,2,11,1,69,2,12,1,64,2,11,1,85,2,54,},
{2,47,1,82,2,12,1,64,2,12,1,70,2,12,1,63,2,11,1,82,2,57,},
{2,50,1,79,2,12,1,64,2,11,1,72,2,11,1,64,2,11,1,79,2,59,},
{2,52,1,77,2,12,1,63,2,12,1,72,2,11,1,64,2,11,1,77,2,61,},
{2,54,1,74,2,12,1,64,2,11,1,74,2,11,1,63,2,11,1,74,2,64,},
{2,57,1,71,2,12,1,64,2,11,1,74,2,11,1,64,2,11,1,71,2,66,},
{2,59,1,69,2,12,1,63,2,11,1,76,2,10,1,64,2,11,1,68,2,69,},
{2,62,1,66,2,11,1,64,2,11,1,76,2,11,1,63,2,11,1,66,2,71,},
{2,64,1,63,2,12,1,64,2,10,1,77,2,11,1,64,2,10,1,63,2,74,},
{2,67,1,60,2,12,1,64,2,10,1,77,2,11,1,64,2,11,1,60,2,76,},
{2,70,1,57,2,11,1,65,2,10,1,78,2,10,1,64,2,11,1,57,2,79,},
{2,72,1,55,2,11,1,65,2,10,1,78,2,10,1,65,2,10,1,54,2,82,},
{2,75,1,51,2,12,1,65,2,10,1,78,2,10,1,65,2,10,1,52,2,84,},
{2,78,1,48,2,12,1,65,2,10,1,78,2,10,1,65,2,11,1,48,2,87,},
{2,81,1,45,2,11,1,66,2,10,1,78,2,10,1,65,2,11,1,45,2,90,},
{2,84,1,42,2,11,1,66,2,10,1,77,2,11,1,66,2,10,1,42,2,93,},
{2,87,1,38,2,12,1,66,2,11,1,76,2,11,1,66,2,10,1,39,2,96,},
{2,90,1,35,2,12,1,66,2,11,1,75,2,12,1,66,2,10,1,36,2,99,},
{2,93,1,32,2,11,1,67,2,13,1,72,2,12,1,67,2,11,1,32,2,102,},
{2,96,1,29,2,11,1,68,2,14,1,3,2,4,1,54,2,4,1,2,2,15,1,67,2,11,1,29,2,105,},
{2,99,1,26,2,11,1,68,2,20,1,55,2,21,1,68,2,10,1,26,2,108,},
{2,102,1,23,2,11,1,69,2,19,1,55,2,20,1,69,2,10,1,23,2,111,},
{2,105,1,19,2,12,1,69,2,19,1,55,2,19,1,70,2,10,1,20,2,114,},
{2,108,1,16,2,12,1,70,2,18,1,55,2,19,1,70,2,10,1,16,2,118,},
{2,112,1,12,2,11,1,72,2,17,1,55,2,18,1,71,2,11,1,12,2,121,},
{2,115,1,9,2,11,1,73,2,16,1,55,2,17,1,72,2,11,1,9,2,124,},
{2,118,1,6,2,11,1,74,2,15,1,55,2,16,1,74,2,10,1,5,2,128,},
{2,122,1,2,2,11,1,76,2,13,1,55,2,14,1,76,2,10,1,2,2,131,},
{2,135,1,78,2,12,1,54,2,12,1,78,2,143,},
{2,135,1,79,2,11,1,54,2,10,1,80,2,143,},
{2,135,1,79,2,11,1,54,2,10,1,80,2,143,},
{2,135,1,80,2,10,1,53,2,11,1,80,2,143,},
{2,135,1,80,2,11,1,52,2,11,1,80,2,143,},
{2,135,1,80,2,11,1,51,2,12,1,80,2,143,},
{2,135,1,80,2,12,1,50,2,11,1,81,2,143,},
{2,135,1,81,2,12,1,8,2,2,1,28,2,2,1,8,2,12,1,81,2,143,},
{2,135,1,81,2,13,1,5,2,4,1,28,2,4,1,4,2,13,1,82,2,143,},
{2,134,1,83,2,22,1,26,2,22,1,82,2,143,},
{2,135,1,82,2,22,1,25,2,22,1,83,2,143,},
{2,135,1,83,2,22,1,24,2,22,1,83,2,143,},
{2,135,1,84,2,22,1,22,2,22,1,84,2,143,},
{2,135,1,84,2,22,1,21,2,22,1,85,2,143,},
{2,135,1,85,2,22,1,20,2,21,1,86,2,143,},
{2,135,1,86,2,22,1,18,2,21,1,87,2,143,},
{2,135,1,88,2,21,1,16,2,21,1,88,2,143,},
{2,135,1,89,2,21,1,14,2,20,1,90,2,143,},
{2,135,1,92,2,19,1,12,2,19,1,92,2,143,},
{2,135,1,98,2,15,1,8,2,15,1,98,2,143,},
{2,135,1,99,2,16,1,4,2,16,1,99,2,143,},
{2,135,1,99,2,35,1,99,2,144,},
{2,135,1,100,2,33,1,100,2,144,},
{2,136,1,100,2,31,1,101,2,144,},
{2,136,1,101,2,29,1,102,2,144,},
{2,136,1,102,2,27,1,103,2,144,},
{2,136,1,103,2,25,1,103,2,145,},
{2,136,1,105,2,22,1,104,2,145,},
{2,137,1,106,2,18,1,106,2,145,},
{2,137,1,108,2,14,1,108,2,145,},
{2,137,1,111,2,8,1,111,2,145,},
{2,137,1,229,2,146,},
{2,138,1,228,2,146,},
{2,138,1,228,2,146,},
{2,138,1,227,2,147,},
{2,139,1,226,2,147,},
{2,139,1,226,2,147,},
{2,139,1,225,2,148,},
{2,140,1,224,2,148,},
{2,140,1,223,2,149,},
{2,141,1,222,2,149,},
{2,141,1,222,2,149,},
{2,142,1,220,2,150,},
{2,142,1,220,2,150,},
{2,143,1,218,2,151,},
{2,143,1,218,2,151,},
{2,144,1,216,2,152,},
{2,144,1,215,2,153,},
{2,145,1,214,2,153,},
{2,145,1,213,2,154,},
{2,146,1,212,2,154,},
{2,147,1,210,2,155,},
{2,147,1,209,2,156,},
{2,148,1,208,2,156,},
{2,149,1,206,2,157,},
{2,150,1,204,2,158,},
{2,150,1,203,2,159,},
{2,151,1,201,2,160,},
{2,152,1,200,2,160,},
{2,153,1,198,2,161,},
{2,154,1,196,2,162,},
{2,155,1,194,2,163,},
{2,156,1,192,2,164,},
{2,157,1,190,2,165,},
{2,158,1,188,2,166,},
{2,159,1,186,2,167,},
{2,160,1,184,2,168,},
{2,161,1,181,2,170,},
{2,162,1,179,2,171,},
{2,164,1,176,2,172,},
{2,165,1,174,2,173,},
{2,166,1,171,2,175,},
{2,168,1,168,2,176,},
{2,169,1,165,2,178,},
{2,171,1,162,2,179,},
{2,172,1,159,2,181,},
{2,174,1,156,2,182,},
{2,176,1,152,2,184,},
{2,178,1,148,2,186,},
{2,180,1,144,2,188,},
{2,182,1,140,2,190,},
{2,184,1,136,2,192,},
{2,186,1,132,2,194,},
{2,188,1,127,2,197,},
{2,191,1,122,2,199,},
{2,193,1,117,2,202,},
{2,196,1,112,2,204,},
{2,198,1,107,2,207,},
{2,198,1,107,2,207,},
{2,198,1,107,2,207,},
{2,198,1,107,2,207,},
{2,198,1,107,2,207,},
{2,198,1,107,2,207,},
{2,198,1,107,2,207,},
{2,198,1,33,2,3,1,35,2,4,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,33,2,42,1,32,2,207,},
{2,198,1,32,2,43,1,32,2,207,},
{2,199,1,31,2,43,1,32,2,207,},
{2,199,1,31,2,43,1,31,2,208,},
{2,199,1,30,2,45,1,30,2,208,},
{2,200,1,29,2,45,1,29,2,209,},
{2,201,1,27,2,47,1,28,2,209,},
{2,202,1,25,2,49,1,26,2,210,},
{2,203,1,23,2,51,1,24,2,211,},
{2,204,1,20,2,55,1,20,2,213,},
{2,207,1,14,2,61,1,14,2,216,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,12,2,217,},
{2,209,1,11,2,63,1,12,2,217,},
{2,209,1,11,2,63,1,12,2,217,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,12,2,217,},
{2,209,1,11,2,63,1,12,2,217,},
{2,209,1,11,2,63,1,12,2,217,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,209,1,11,2,63,1,11,2,218,},
{2,207,1,14,2,62,1,14,2,215,},
{2,204,1,19,2,58,1,18,2,213,},
{2,202,1,22,2,55,1,23,2,210,},
{2,199,1,27,2,52,1,27,2,207,},
{2,197,1,30,2,49,1,31,2,205,},
{2,194,1,35,2,46,1,34,2,203,},
{2,192,1,38,2,43,1,39,2,200,},
{2,190,1,42,2,40,1,42,2,198,},
{2,188,1,45,2,38,1,45,2,196,},
{2,186,1,48,2,35,1,49,2,194,},
{2,184,1,51,2,33,1,51,2,193,},
{2,183,1,54,2,30,1,54,2,191,},
{2,181,1,57,2,28,1,56,2,190,},
{2,180,1,59,2,26,1,58,2,189,},
{2,179,1,23,2,2,1,35,2,25,1,36,2,2,1,23,2,187,},
{2,178,1,22,2,3,1,37,2,23,1,20,2,1,1,17,2,2,1,22,2,187,},
{2,177,1,21,2,5,1,16,2,3,1,19,2,22,1,18,2,4,1,16,2,4,1,21,2,186,},
{2,177,1,19,2,6,1,16,2,7,1,16,2,21,1,17,2,6,1,17,2,5,1,20,2,185,},
{2,177,1,17,2,8,1,16,2,9,1,14,2,21,1,15,2,9,1,16,2,7,1,18,2,185,},
{2,177,1,15,2,9,1,16,2,12,1,12,2,21,1,12,2,13,1,16,2,8,1,16,2,185,},
{2,177,1,13,2,11,1,15,2,16,1,9,2,22,1,9,2,15,1,16,2,11,1,13,2,185,},
{2,178,1,9,2,13,1,15,2,21,1,3,2,25,1,4,2,20,1,16,2,13,1,9,2,186,},
{2,181,1,1,2,18,1,15,2,74,1,15,2,18,1,1,2,189,},
{2,199,1,15,2,76,1,14,2,208,},
{2,199,1,14,2,78,1,14,2,207,},
{2,199,1,13,2,80,1,13,2,207,},
{2,198,1,13,2,81,1,13,2,207,},
{2,198,1,12,2,83,1,12,2,207,},
{2,198,1,11,2,85,1,12,2,206,},
{2,198,1,10,2,88,1,10,2,206,},
{2,198,1,9,2,90,1,8,2,207,},
{2,199,1,6,2,93,1,7,2,207,},
{2,200,1,3,2,98,1,2,2,209,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
{2,512,},
}
})

363
map_gen/presets/tetris.lua Normal file
View File

@ -0,0 +1,363 @@
-- Map by grilledham & Jayefuu
-- Set scenario generation cliffs to none.
-- Load blueprint from scenarios\RedMew\map_gen\data\presets\tetris\
-- Obtain items using silent commands from scenarios\RedMew\map_gen\data\presets\tetris\
-- Place the blueprint on the island south of spawn
-- Teleport to centre of island and run the second command in tetris_theme_items_command.txt
local b = require 'map_gen.shared.builders'
local math = require 'utils.math'
local degrees = math.rad
local ore_seed1 = 7000
local ore_seed2 = ore_seed1 * 2
local Random = require 'map_gen.shared.random'
local random = Random.new(ore_seed1, ore_seed2)
local function value(base, mult, pow)
return function(x, y)
local d_sq = x * x + y * y
return base + mult * d_sq ^ (pow / 2) -- d ^ pow
end
end
-- Removes vanilla resources when called
local function no_resources(x, y, world, tile)
for _, e in ipairs(
world.surface.find_entities_filtered(
{type = 'resource', area = {{world.x, world.y}, {world.x + 1, world.y + 1}}}
)
) do
e.destroy()
end
return tile
end
local names = {
'biter-spawner',
'spitter-spawner'
}
-- removes spawners when called
local function no_spawners(x, y, world, tile)
for _, e in ipairs(
world.surface.find_entities_filtered(
{force = 'enemy', name = names, position = {world.x, world.y}}
)
) do
e.destroy()
end
return tile
end
local m_t_width = 12 -- map size in number of tiles
local t_width = 16 -- tile width
local t_h_width = t_width / 2
-- https://wiki.factorio.com/Data.raw#tile for the tile types you can send to this function
local function two_tone_square(inner, outer) -- r_tile is a bool flag to show if it should have chance of resources on it
local outer_tile = b.any {b.rectangle(t_width, t_width)}
outer_tile = b.change_tile(outer_tile, true, outer)
local inner_tile = b.any {b.rectangle(t_width - 2, t_width - 2)}
inner_tile = b.change_tile(inner_tile, true, inner)
local land_tile = b.any {inner_tile, outer_tile}
return land_tile
end
local tet_bounds = b.rectangle(t_width * 4)
tet_bounds = b.translate(tet_bounds, t_width, t_width)
local function tetrify(pattern, block)
for r = 1, 4 do
local row = pattern[r]
for c = 1, 4 do
if row[c] == 1 then
row[c] = block
else
row[c] = b.empty_shape()
end
end
end
local grid = b.grid_pattern(pattern, 4, 4, t_width, t_width)
grid = b.translate(grid, -t_width / 2, -t_width / 2)
grid = b.choose(tet_bounds, grid, b.empty_shape)
grid = b.translate(grid, -t_width, -t_width)
--grid = b.translate(grid, -t_width, t_width * 2)
return grid
end
local tet_O =
tetrify(
{
{0, 0, 0, 0},
{0, 1, 1, 0},
{0, 1, 1, 0},
{0, 0, 0, 0}
},
two_tone_square('dirt-7', 'sand-1')
)
local tet_I =
tetrify(
{
{0, 1, 0, 0},
{0, 1, 0, 0},
{0, 1, 0, 0},
{0, 1, 0, 0}
},
two_tone_square('grass-2', 'sand-1')
)
local tet_J =
tetrify(
{
{0, 0, 0, 0},
{0, 0, 1, 0},
{0, 0, 1, 0},
{0, 1, 1, 0}
},
two_tone_square('grass-1', 'sand-1')
)
local tet_L =
tetrify(
{
{0, 0, 0, 0},
{0, 1, 0, 0},
{0, 1, 0, 0},
{0, 1, 1, 0}
},
two_tone_square('dirt-4', 'sand-1')
)
local tet_S =
tetrify(
{
{0, 0, 0, 0},
{0, 1, 1, 0},
{1, 1, 0, 0},
{0, 0, 0, 0}
},
two_tone_square('grass-4', 'sand-1')
)
local tet_Z =
tetrify(
{
{0, 0, 0, 0},
{1, 1, 0, 0},
{0, 1, 1, 0},
{0, 0, 0, 0}
},
two_tone_square('grass-3', 'sand-1')
)
local tet_T =
tetrify(
{
{0, 0, 0, 0},
{0, 1, 0, 0},
{1, 1, 1, 0},
{0, 0, 0, 0}
},
two_tone_square('red-desert-2', 'sand-1')
)
local tetriminos = {tet_I, tet_O, tet_T, tet_S, tet_Z, tet_J, tet_L}
local tetriminos_count = #tetriminos
local quarter = math.tau / 4
local p_cols = 1 --m_t_width / 4
local p_rows = 50
local pattern = {}
for _ = 1, p_rows do
local row = {}
table.insert(pattern, row)
for _ = 1, p_cols do
--m_t_width
--t_width
-- map_width = m_t_width*t_width
local i = random:next_int(1, tetriminos_count * 1.5)
local shape = tetriminos[i] or b.empty_shape
local angle = random:next_int(0, 3) * quarter
shape = b.rotate(shape, angle)
--local y_offset = random:next_int(-2, 2) * t_width
local x_offset = random:next_int(-10, 8) * t_width
shape = b.translate(shape, x_offset, 0)
table.insert(row, shape)
end
end
local tetriminos_shape = b.grid_pattern(pattern, p_cols, p_rows, t_width * 24, t_width * 4)
tetriminos_shape = b.translate(tetriminos_shape, t_width, -t_width)
local ore_shape = b.rectangle(t_width * 0.8)
local oil_shape = b.throttle_world_xy(ore_shape, 1, 4, 1, 4)
local ores = {
{b.resource(ore_shape, 'iron-ore', value(250, 0.75, 1.15)), 10},
{b.resource(ore_shape, 'copper-ore', value(200, 0.75, 1.15)), 6},
{b.resource(ore_shape, 'stone', value(350, 0.4, 1.075)), 3},
{b.resource(ore_shape, 'coal', value(200, 0.8, 1.075)), 5},
{b.resource(b.scale(ore_shape, 0.5), 'uranium-ore', value(300, 0.3, 1.05)), 2},
{b.resource(oil_shape, 'crude-oil', value(120000, 50, 1.15)), 1},
{b.empty_shape, 100}
}
local total_weights = {}
local t = 0
for _, v in pairs(ores) do
t = t + v[2]
table.insert(total_weights, t)
end
p_cols = 50
p_rows = 50
pattern = {}
for _ = 1, p_rows do
local row = {}
table.insert(pattern, row)
for _ = 1, p_cols do
local i = random:next_int(1, t)
local index = table.binary_search(total_weights, i)
if (index < 0) then
index = bit32.bnot(index)
end
local shape = ores[index][1]
table.insert(row, shape)
end
end
local worm_names = {
'small-worm-turret',
'medium-worm-turret',
'big-worm-turret'
}
local max_worm_chance = 1 / 128
local worm_chance_factor = 1 / (192 * 512)
local function worms(_, _, world)
local wx, wy = world.x, world.y
local d = math.sqrt(wx * wx + wy * wy)
local worm_chance = d - 128
if worm_chance > 0 then
worm_chance = worm_chance * worm_chance_factor
worm_chance = math.min(worm_chance, max_worm_chance)
if math.random() < worm_chance then
if d < 256 then
return {name = 'small-worm-turret'}
else
local max_lvl
local min_lvl
if d < 512 then
max_lvl = 2
min_lvl = 1
else
max_lvl = 3
min_lvl = 2
end
local lvl = math.random() ^ (512 / d) * max_lvl
lvl = math.ceil(lvl)
lvl = math.clamp(lvl, min_lvl, 3)
return {name = worm_names[lvl]}
end
end
end
end
-- Starting area
local start_patch = b.rectangle(t_width * 0.8)
local start_iron_patch =
b.resource(
b.translate(start_patch, -t_width/2, -t_width/2),
'iron-ore',
function()
return 1500
end
)
local start_copper_patch =
b.resource(
b.translate(start_patch, t_width/2, -t_width/2),
'copper-ore',
function()
return 1200
end
)
local start_stone_patch =
b.resource(
b.translate(start_patch, t_width/2, t_width/2),
'stone',
function()
return 900
end
)
local start_coal_patch =
b.resource(
b.translate(start_patch, -t_width/2, t_width/2),
'coal',
function()
return 1350
end
)
local start_resources = b.any({start_iron_patch, start_copper_patch, start_stone_patch, start_coal_patch})
local tet_O_start = b.apply_entity(tet_O, start_resources)
local starting_area = b.any{
b.translate(tet_I,t_width,-t_width*2),
b.translate(tet_O_start,t_width*2,-t_width),
b.translate(tet_T,-t_width,-t_width),
b.translate(tet_Z,-t_width*6,-t_width),
b.translate(tet_L,-t_width*8,-t_width*2)
}
tetriminos_shape = b.any{tetriminos_shape, starting_area}
ores = b.grid_pattern_overlap(pattern, p_cols, p_rows, t_width, t_width)
ores = b.translate(ores, t_h_width, t_h_width)
tetriminos_shape = b.apply_entity(tetriminos_shape, ores) -- add ores to tetriminoes
tetriminos_shape = b.apply_effect(tetriminos_shape, no_spawners) -- remove spawners to help pathing
tetriminos_shape = b.apply_entity(tetriminos_shape, worms) -- add worms
local water_tile = two_tone_square('water', 'deepwater')
local half_sea_width = m_t_width * t_width - t_width
local function sea_bounds(x, y)
return x > -half_sea_width and x < half_sea_width and y < 0
end
local sea = b.single_grid_pattern(water_tile, t_width, t_width)
sea = b.translate(sea, t_h_width, -t_h_width)
sea = b.choose(sea_bounds, sea, b.empty_shape)
local map = b.choose(sea_bounds, tetriminos_shape, b.empty_shape)
map = b.if_else(map, sea)
local half_border_width = half_sea_width + t_width
local function border_bounds(x, y)
return x > -half_border_width and x < half_border_width and y < t_width
end
border_bounds = b.subtract(border_bounds, sea_bounds)
local border = b.change_tile(border_bounds, true, 'sand-1')
map = b.add(map, border)
local music_island = b.translate(b.rotate(tet_I,degrees(90)),0, 2*t_width)
map = b.add(map,music_island)
map = b.translate(map, 0, -t_width / 2)
map = b.apply_effect(map, no_resources)
return map

View File

@ -0,0 +1,160 @@
-- Map by Jayefuu & grilledham for Thanksgiving 2018
-- For Thanksgiving themed messages and jokes change line 28 of fish_market.lua to:
-- local fish_market_bonus_message = require 'resources.turkey_messages'
local b = require 'map_gen.shared.builders'
local Random = require 'map_gen.shared.random'
local ore_seed = 3000
local function no_resources(x, y, world, tile)
for _, e in ipairs(
world.surface.find_entities_filtered(
{type = 'resource', area = {{world.x, world.y}, {world.x + 1, world.y + 1}}}
)
) do
e.destroy()
end
return tile
end
local world_pic = require 'map_gen.data.presets.world-map'
local map = b.picture(world_pic)
local pic = require 'map_gen.data.presets.turkey_bw'
local turkey = b.picture(pic)
turkey = b.invert(turkey)
local bounds = b.rectangle(pic.width, pic.height)
turkey = b.all{bounds, turkey}
local ham = b.picture(require 'map_gen.data.presets.ham')
ham = b.scale(ham, 64 / 127) --0.5
turkey = b.scale(turkey,0.2)
local function value(base, mult, pow)
return function(x, y)
local d = math.sqrt(x * x + y * y)
return base + mult * d ^ pow
end
end
local function non_transform(shape)
return shape
end
local function uranium_transform(shape)
return b.scale(shape, 0.5)
end
local function oil_transform(shape)
shape = b.scale(shape, 0.3)
shape = b.throttle_world_xy(shape, 1, 5, 1, 5)
return shape
end
local ores = {
{weight = 150},
{transform = non_transform, resource = 'iron-ore', value = value(250, 0.75, 1.2), weight = 16},
{transform = non_transform, resource = 'copper-ore', value = value(200, 0.75, 1.2), weight = 10},
{transform = non_transform, resource = 'stone', value = value(125, 0.3, 1.05), weight = 7},
{transform = non_transform, resource = 'coal', value = value(200, 0.8, 1.075), weight = 8},
{transform = uranium_transform, resource = 'uranium-ore', value = value(100, 0.3, 1.025), weight = 3},
{transform = oil_transform, resource = 'crude-oil', value = value(100000, 50, 1.1), weight = 6}
}
local total_ore_weights = {}
local ore_t = 0
for _, v in ipairs(ores) do
ore_t = ore_t + v.weight
table.insert(total_ore_weights, ore_t)
end
local random_ore = Random.new(ore_seed, ore_seed * 2)
local ore_pattern = {}
for r = 1, 50 do
local row = {}
ore_pattern[r] = row
local even_r = r % 2 == 0
for c = 1, 50 do
local even_c = c % 2 == 0
local shape
if even_r == even_c then
shape = turkey
else
shape = ham
end
local i = random_ore:next_int(1, ore_t)
local index = table.binary_search(total_ore_weights, i)
if (index < 0) then
index = bit32.bnot(index)
end
local ore_data = ores[index]
local transform = ore_data.transform
if not transform then
row[c] = b.no_entity
else
local ore_shape = transform(shape)
--local ore_shape = shape
local x = random_ore:next_int(-24, 24)
local y = random_ore:next_int(-24, 24)
ore_shape = b.translate(ore_shape, x, y)
local ore = b.resource(ore_shape, ore_data.resource, ore_data.value)
row[c] = ore
end
end
end
local start_turkey =
b.segment_pattern {
b.resource(
turkey,
'iron-ore',
function()
return 1000
end
),
b.resource(
turkey,
'copper-ore',
function()
return 500
end
),
b.resource(
turkey,
'coal',
function()
return 750
end
),
b.resource(
turkey,
'stone',
function()
return 300
end
)
}
ore_pattern[1][1] = start_turkey
local ore_grid = b.grid_pattern_full_overlap(ore_pattern, 50, 50, 96, 96)
ore_grid = b.translate(ore_grid, -60, -20)
map = b.single_x_pattern(map, world_pic.width)
--map = b.translate(map, -369, 46)
map = b.translate(map, 756.5, 564)
map = b.scale(map, 2, 2)
map = b.apply_entity(map, ore_grid)
map = b.apply_effect(map, no_resources)
return map

View File

@ -86,6 +86,8 @@ local tiles_per_tick = 32
--shape = require "map_gen.presets.creepy"
--shape = require "map_gen.presets.vanilla"
--shape = require "map_gen.presets.maltease_crossings"
--shape = require "map_gen.presets.tetris"
--shape = require "map_gen.presets.world_map_thanksgiving"
--shape = require "map_gen.presets.test"
--shapes--

View File

@ -0,0 +1,59 @@
return {
'Benjamin Franklin wanted the turkey to be the national bird, not the eagle.',
'There was no turkey on the menu at the first Thanksgiving.',
'Thanksgiving is the reason for TV dinners!',
'Wild turkeys can run 20 miles per hour when they are scared.',
'Female turkeys (called hens) do not gobble.',
'The real first Thanksgiving was held in Texas in 1541.',
'Baby turkeys are called poults.',
'The best way to tell if a cranberry is ripe it to see if it bounces.',
'Benjamin Franklin wanted the turkey to be the national bird, not the eagle.',
'There was no turkey on the menu at the first Thanksgiving.',
'Thanksgiving is the reason for TV dinners!',
'Wild turkeys can run 20 miles per hour when they are scared.',
'Female turkeys (called hens) do not gobble.',
'The real first Thanksgiving was held in Texas in 1541.',
'Baby turkeys are called poults.',
'The best way to tell if a cranberry is ripe it to see if it bounces.',
'There were no forks at the first Thanksgiving. ',
'Thomas Jefferson refused to declare Thanksgiving as a holiday.',
'About 46 million turkeys are cooked for Thanksgiving each year.',
'The Butterball Turkey Talk Line answers almost 100,000 calls each season.',
'There are four places in the US named Turkey.',
'Black Friday is the busiest day of the year for plumbers.',
'Jingle Bells was originally a Thanksgiving song.',
'Turkey-like creatures roamed the Americas 75 million years ago.',
'Canadian Thanksgiving predates American Thanksgiving by 43 years.',
'On average, it takes about 7 hours to cook a Thanksgiving dinner. People spend about 16 minutes eating it.',
'The first Thanksgiving was held in the autumn of 1621',
'Why did the turkey cross the road? It was Thanksgiving and he wanted to convince people he was a chicken.',
'What did the turkey say to the computer? "Google, google, google."',
'Why did the farmer separate the turkey and the chicken? He sensed fowl play.',
'What music did the Pilgrims listen to? Plymouth rock.',
'If Pilgrims were alive today what would they be known for? Their age!',
'What does Miley Cyrus eat for Thanksgiving? Twerky.',
'If your great-grandmother saw you making boxed mashed potatoes shed turn over in her gravy.',
'What does a turkey drink from? A gobble-t.',
'What smells best at Thanksgiving dinner? Your nose.',
'Thanksgiving is the only holiday where you eat the mascot.',
'How do you keep a turkey in suspense? Ill tell you later.',
'My family told me to stop telling bad Thanksgiving jokes, but I couldnt just quit cold turkey.',
'What kind of music did the Pilgrims like? Plymouth Rock ',
'If April showers bring May flowers, what do May flowers bring? Pilgrims ',
'Why cant you take a turkey to church? They use FOWL language. ',
'Why was the Thanksgiving soup so expensive? It had 24 carrots. ',
'What happened when the turkey got into a fight? He got the stuffing knocked out of him! ',
'What do you get when you cross a turkey with a banjo? A turkey that can pluck itself! ',
'When do you serve tofu turkey? Pranksgiving. ',
'What did the turkey say to the man who tried to shoot it? Liberty, Equality and Bad aim for all. ',
'Who doesnt eat on Thanksgiving? A turkey because it is always stuffed. ',
'Why did the Pilgrims want to sail to America in the spring? Because April showers bring Mayflowers! ',
'What did baby corn say to mama corn? Wheres popcorn? ',
'If the Pilgrims were alive today, what would they be most famous for? Their AGE! ',
'Why do the pants of pilgrims keep falling down? Because their belt buckles are on their hats! ',
'Why did they let the turkey join the band? Because he had the drumsticks ',
'What does Miley Cyrus eat for Thanksgiving? Twerk-ey! ',
'What did the mother turkey say to her disobedient children? "If your father could see you now, hed turn over in his gravy!" '
}