Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(ForceRequiredAddon("Brick_Large_Cubes") == $Error::AddOn_NotFound)
- return;
- package p
- {
- function startGame()
- {
- Parent::startGame();
- %f = "editor/newMission.ter";
- if(!isObject(Terrain))
- {
- new TerrainBlock(Terrain)
- {
- terrainFile = %f;
- };
- %t = new Terraformer();
- %t.terrainFile(1,%f);
- %t.setTerrain(1);
- %t.fBm(1,9,0,"Normal",%t.generateSeed());
- %t.delete();
- }
- %p = pickSpawnPoint();
- %u = mCeil(firstWord(%p) / 4) * 4;
- %v = mCeil(getWord(%p,1) / 4) * 4;
- for(%x = %u - 512; %x < %u + 512; %x += 4)
- {
- for(%y = %v - 512; %y < %v + 512; %y += 4)
- {
- %z = mCeil(getTerrainHeight(%x SPC %y) / 4) * 4;
- %m = %z;
- for(%w = %x - 4; %w < %x + 5; %w += 4)
- {
- for(%h = %y - 4; %h < %y + 5; %h += 4)
- {
- if(%w == %x && %h == %y)
- continue;
- %m = getMin(%m,mCeil(getTerrainHeight(%w SPC %h) / 4) * 4);
- }
- }
- %c = getMax((%z - %m) / 4,1);
- for(%i = 0; %i < %c; %i++)
- {
- %b = new fxDTSBrick()
- {
- dataBlock = brick8xCubeData;
- position = %x SPC %y SPC %z - (%i * 4);
- isBasePlate = 1;
- isPlanted = 1;
- colorId = (%i == 0) ? 2 : ((%i < 4) ? 8 : (getRandom(0,49) ? 6 : 1));
- };
- %b.plant();
- LocalClientConnection.brickGroup.add(%b);
- }
- }
- }
- Terrain.delete();
- }
- };
- activatePackage(p);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement