LuaDrawing.wiki
changeset 1393 0b22af910c31
parent 1392 b2b22eeaf5c1
child 1395 02b9bbdc2563
equal deleted inserted replaced
1392:b2b22eeaf5c1 1393:0b22af910c31
    18 <code lang="lua">
    18 <code lang="lua">
    19 function onGameInit()
    19 function onGameInit()
    20     MapGen = mgDrawn
    20     MapGen = mgDrawn
    21     TemplateFilter = 0
    21     TemplateFilter = 0
    22 
    22 
       
    23     -- Fill map with solid land
    23     for i = 200,2000,600 do
    24     for i = 200,2000,600 do
    24         AddPoint(1,i,63)
    25         AddPoint(1,i,63)
    25         AddPoint(4000,i)
    26         AddPoint(4000,i)
    26     end
    27     end
       
    28 
       
    29     -- Punch holes
    27     for i = 500,3500,1000 do
    30     for i = 500,3500,1000 do
    28         AddPoint(i,1000,63,true)
    31         AddPoint(i,1000,63,true)
    29     end
    32     end
       
    33 
    30     FlushPoints()
    34     FlushPoints()
    31 end
    35 end
    32 
    36 
    33 onPreviewInit = onGameInit
    37 onPreviewInit = onGameInit
    34 </code>
    38 </code>