share/hedgewars/Data/Scripts/Multiplayer/DiagonalMaze.lua
author mikade <redgrinner@gmail.com>
Wed, 27 May 2015 22:34:11 +0900
changeset 10967 1434cec96ca3
parent 10611 58cad46782ff
child 11063 c57f815cbb14
permissions -rw-r--r--
- preview generation for rubbers, air-mines, crates, barrels - add map previews for the other 6 TechRacer maps - make TechRacer (more or less) work out the box - randomize map by clicking on preview (when map unspecified)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10604
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
     1
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
     2
function onPreviewInit()
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
     3
onGameInit()
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
     4
end
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
     5
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
     6
function onGameInit()
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
     7
    MapGen = mgDrawn
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
     8
    TemplateFilter = 0
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
     9
    for y = 48,2048,200 do
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
    10
       for x = 48,4048,200 do
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
    11
            if GetRandom(2) == 0 then
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
    12
                AddPoint(x,y,1)
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
    13
                AddPoint(x+200,y+200)
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
    14
            else
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
    15
                AddPoint(x,y+200,1)
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
    16
                AddPoint(x+200,y)
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
    17
            end
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
    18
        end
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
    19
    end
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
    20
    FlushPoints()
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents:
diff changeset
    21
end