local C=game:GetService("\087\111\114\107\115\112\097\099\101")local e=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local O=require((e:WaitForChild("\080\114\111\106\101\099\116")):WaitForChild("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101"))local o=O:GetResource("\071\101\110\101\114\097\116\105\111\110\046\084\114\101\101")local D=Random.new(243326526256)local function t(C,e,O)o.new(CFrame.new(C,0,e)*CFrame.Angles(0,(D:NextNumber()*2)*math.pi,0),O,D)end return{Cells={{180,12,"\066\097\115\101\071\114\097\115\115"},{180;13;"\066\097\115\101\071\114\097\115\115"},{180;14,"\066\097\115\101\071\114\097\115\115"},{179,12;"\066\097\115\101\071\114\097\115\115"};{179;13;"\066\097\115\101\071\114\097\115\115"};{179;14,"\066\097\115\101\071\114\097\115\115"};{174,13,"\066\097\115\101\071\114\097\115\115"};{119;33;"\066\097\115\101\071\114\097\115\115"},{63;35,"\066\097\115\101\071\114\097\115\115"};{63,36;"\066\097\115\101\071\114\097\115\115"};{24,9;"\066\097\115\101\071\114\097\115\115"};{61,54;"\066\097\115\101\071\114\097\115\115"},{14,87,"\071\114\097\115\115"};{14,88,"\066\097\115\101\071\114\097\115\115"};{14,89;"\071\114\097\115\115"};{13,87;"\071\114\097\115\115"};{13;88;"\066\097\115\101\071\114\097\115\115"},{13,89;"\071\114\097\115\115"},{12;87;"\066\097\115\101\071\114\097\115\115"},{12,88,"\066\097\115\101\071\114\097\115\115"},{12;89;"\066\097\115\101\071\114\097\115\115"},{153;74,"\083\119\097\109\112"};{199,103,"\066\097\115\101\071\114\097\115\115"},{199;104,"\066\097\115\101\071\114\097\115\115"},{199;105,"\066\097\115\101\071\114\097\115\115"},{197,103,"\066\097\115\101\071\114\097\115\115"};{197,104;"\066\097\115\101\071\114\097\115\115"};{197,105;"\066\097\115\101\071\114\097\115\115"},{106,117,"\066\097\115\101\071\114\097\115\115"};{106;118,"\066\097\115\101\071\114\097\115\115"},{105,117,"\066\097\115\101\071\114\097\115\115"},{105;118,"\066\097\115\101\071\114\097\115\115"},{20;162,"\066\097\115\101\071\114\097\115\115"},{175;177,"\066\097\115\101\071\114\097\115\115"},{175;178;"\066\097\115\101\071\114\097\115\115"},{174,177,"\066\097\115\101\071\114\097\115\115"};{174;178,"\066\097\115\101\071\114\097\115\115"},{173;177;"\066\097\115\101\071\114\097\115\115"},{173;178;"\066\097\115\101\071\114\097\115\115"},{100,194,"\066\097\115\101\071\114\097\115\115"};{100;195,"\066\097\115\101\071\114\097\115\115"};{100,196;"\066\097\115\101\071\114\097\115\115"},{99;194,"\066\097\115\101\071\114\097\115\115"},{99;195;"\066\097\115\101\071\114\097\115\115"};{99,196,"\066\097\115\101\071\114\097\115\115"}},Structures={["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\084\111\119\110\072\097\108\108"]={179,13};["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\070\111\117\110\116\097\105\110"]={174,13;function()C.Terrain:FillCylinder(CFrame.new(17400,2,1300),4,28,Enum.Material.Water)end},["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\082\101\101\115\101\077\099\066\108\111\120\115\072\111\117\115\101"]={119,33,function()C.Terrain:FillBlock(CFrame.new(11876,-4,3284),Vector3.new(20,4,8),Enum.Material.Ground)C.Terrain:FillBlock(CFrame.new(11876,-4,3300),Vector3.new(20,4,8),Enum.Material.Ground)C.Terrain:FillBlock(CFrame.new(11896,-4,3336),Vector3.new(12,4,8),Enum.Material.Ground)end},["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\083\104\101\100\108\101\116\115\107\121\115\077\097\110\115\105\111\110"]={199,104};["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\066\114\105\103\104\116\069\121\101\115\115\077\097\110\115\105\111\110"]={197;104};["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\083\116\105\099\107\077\097\115\116\101\114\076\117\107\101\115\066\097\114\110"]={173;177,function()C.Terrain:FillBlock(CFrame.new(17456,-4,17754),Vector3.new(96,4,44),Enum.Material.Ground)C.Terrain:FillBlock(CFrame.new(17304,-4,17750),Vector3.new(108,4,16),Enum.Material.Ground)local e=C:WaitForChild("\083\116\105\099\107\077\097\115\116\101\114\076\117\107\101\115\066\097\114\110")t(17360,17720,e)t(17320,17720,e)t(17280,17720,e)t(17360,17780,e)t(17320,17780,e)t(17280,17780,e)end};["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\068\097\114\116\104\115\107\114\105\108\108\115\083\119\097\109\112\067\097\098\105\110"]={153;74};["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\079\115\116\114\105\099\104\083\105\122\101\100\115\080\121\114\097\109\105\100"]={105;117,function()C.Terrain:FillBlock(CFrame.new(10550,-4,11750),Vector3.new(200,4,200),Enum.Material.Sand)end},["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\084\097\114\097\098\121\116\101\115\072\111\117\115\101"]={63,35;function()local e=C:WaitForChild("\084\097\114\097\098\121\116\101\115\072\111\117\115\101")t(6330,3480,e)t(6260,3510,e)t(6290,3470,e)t(6280,3640,e)t(6330,3620,e)t(6270,3590,e)end};["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\083\111\114\099\117\115\115\071\114\097\118\101\121\097\114\100"]={24;9},["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\067\104\105\101\102\074\117\115\116\117\115\115\067\097\118\101"]={61;54};["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\079\110\108\121\084\119\101\110\116\121\067\104\097\114\097\099\116\101\114\115\076\111\103\067\097\098\105\110"]={20;162};["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\083\111\108\097\114\067\114\097\110\101\115\077\097\110\115\105\111\110"]={13;88,function()for e,O in pairs(((C:WaitForChild("\083\111\108\097\114\067\114\097\110\101\115\077\097\110\115\105\111\110")):WaitForChild("\084\101\114\114\097\105\110\072\105\108\108")):GetChildren())do if O:IsA("\066\097\115\101\080\097\114\116")then if O.Shape==Enum.PartType.Ball then C.Terrain:FillBall(O.Position,O.Size.X/2,Enum.Material.LeafyGrass)else C.Terrain:FillBlock(O.CFrame,O.Size,Enum.Material.LeafyGrass)end end end end};["\071\101\110\101\114\097\116\105\111\110\046\067\117\115\116\111\109\083\116\114\117\099\116\117\114\101\115\046\070\117\115\114\111\098\108\111\120\115\077\097\110\115\105\111\110"]={99;194}}}
--[[
TheNexusAvenger

Custom cells and locations for custom cells.
--]]

local Workspace = game:GetService("Workspace")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local ReplicatedStorageProject = require(ReplicatedStorage:WaitForChild("Project"):WaitForChild("ReplicatedStorage"))
local Tree = ReplicatedStorageProject:GetResource("Generation.Tree")
local TreeRandomGenerator = Random.new(243326526256) --Arbitrary random seed, but must be consistent to have the trees be the same between clients.

--[[
Generates a tree.
--]]
local function GenerateTree(X,Z,Parent)
    Tree.new(CFrame.new(X,0,Z) * CFrame.Angles(0,TreeRandomGenerator:NextNumber() * 2 * math.pi,0),Parent,TreeRandomGenerator)
end



return {
    Cells = {
        --Builderman's Town hall.
        {180,12,"BaseGrass"},
        {180,13,"BaseGrass"},
        {180,14,"BaseGrass"},
        {179,12,"BaseGrass"},
        {179,13,"BaseGrass"},
        {179,14,"BaseGrass"},
    
        --Center statue.
        {174,13,"BaseGrass"},
    
        --ReeseMcBlox's House.
        {119,33,"BaseGrass"},
    
        --Tarabyte's House.
        {63,35,"BaseGrass"},
        {63,36,"BaseGrass"},
    
        --Sorcus's Graveyard.
        {24,9,"BaseGrass"},
        
        --ChiefJustus's Cave.
        {61,54,"BaseGrass"},
    
        --SolarCrane's Mansion.
        {14,87,"Grass"},
        {14,88,"BaseGrass"},
        {14,89,"Grass"},
        {13,87,"Grass"},
        {13,88,"BaseGrass"},
        {13,89,"Grass"},
        {12,87,"BaseGrass"},
        {12,88,"BaseGrass"},
        {12,89,"BaseGrass"},
    
        --Darkskrills's Swamp Cabin.
        {153,74,"Swamp"},
    
        --Shedletskys' Houses.
        {199,103,"BaseGrass"},
        {199,104,"BaseGrass"},
        {199,105,"BaseGrass"},
        {197,103,"BaseGrass"},
        {197,104,"BaseGrass"},
        {197,105,"BaseGrass"},
    
        --OstrichSized's Pyramid.
        {106,117,"BaseGrass"},
        {106,118,"BaseGrass"},
        {105,117,"BaseGrass"},
        {105,118,"BaseGrass"},
    
        --OnlyTwentyCharacter's Log Cabin.
        {20,162,"BaseGrass"},
    
        --StickMasterLuke's Barn.
        {175,177,"BaseGrass"},
        {175,178,"BaseGrass"},
        {174,177,"BaseGrass"},
        {174,178,"BaseGrass"},
        {173,177,"BaseGrass"},
        {173,178,"BaseGrass"},
    
        --Fusroblox's Mansion.
        {100,194,"BaseGrass"},
        {100,195,"BaseGrass"},
        {100,196,"BaseGrass"},
        {99,194,"BaseGrass"},
        {99,195,"BaseGrass"},
        {99,196,"BaseGrass"},
    },
    Structures = {
        ["Generation.CustomStructures.TownHall"] = {179,13},
        ["Generation.CustomStructures.Fountain"] = {174,13,function()
            --Fill the fountain with water.
            Workspace.Terrain:FillCylinder(CFrame.new(17400,2,1300),4,28,Enum.Material.Water)
        end},
        ["Generation.CustomStructures.ReeseMcBloxsHouse"] = {119,33,function()
            --Fill the dirt for the garden.
            Workspace.Terrain:FillBlock(CFrame.new(11900 - 24,-4,3300 - 16),Vector3.new(20,4,8),Enum.Material.Ground)
            Workspace.Terrain:FillBlock(CFrame.new(11900 - 24,-4,3300),Vector3.new(20,4,8),Enum.Material.Ground)
            Workspace.Terrain:FillBlock(CFrame.new(11900 - 4,-4,3300 + 36),Vector3.new(12,4,8),Enum.Material.Ground)
        end},
        ["Generation.CustomStructures.ShedletskysMansion"] = {199,104},
        ["Generation.CustomStructures.BrightEyessMansion"] = {197,104},
        ["Generation.CustomStructures.StickMasterLukesBarn"] = {173,177,function()
            --Fill the dirt for the barn.
            Workspace.Terrain:FillBlock(CFrame.new(17456,-4,17754),Vector3.new(96,4,44),Enum.Material.Ground)
            Workspace.Terrain:FillBlock(CFrame.new(17304,-4,17750),Vector3.new(108,4,16),Enum.Material.Ground)

            --Add extra trees.
            local StickMasterLukesBarn = Workspace:WaitForChild("StickMasterLukesBarn")
            GenerateTree(17360,17720,StickMasterLukesBarn)
            GenerateTree(17320,17720,StickMasterLukesBarn)
            GenerateTree(17280,17720,StickMasterLukesBarn)
            GenerateTree(17360,17780,StickMasterLukesBarn)
            GenerateTree(17320,17780,StickMasterLukesBarn)
            GenerateTree(17280,17780,StickMasterLukesBarn)
        end},
        ["Generation.CustomStructures.DarthskrillsSwampCabin"] = {153,74},
        ["Generation.CustomStructures.OstrichSizedsPyramid"] = {105,117,function()
            --Fill the sand for the pyramid.
            Workspace.Terrain:FillBlock(CFrame.new(10550,-4,11750),Vector3.new(200,4,200),Enum.Material.Sand)
        end},
        ["Generation.CustomStructures.TarabytesHouse"] = {63,35,function()
            --Add extra trees.
            local TarabytesHouse = Workspace:WaitForChild("TarabytesHouse")
            GenerateTree(6300 + 30,3500 - 20,TarabytesHouse)
            GenerateTree(6300 - 40,3500 + 10,TarabytesHouse)
            GenerateTree(6300 - 10,3500 - 30,TarabytesHouse)
            GenerateTree(6300 - 20,3600 + 40,TarabytesHouse)
            GenerateTree(6300 + 30,3600 + 20,TarabytesHouse)
            GenerateTree(6300 - 30,3600 - 10,TarabytesHouse)
        end},
        ["Generation.CustomStructures.SorcussGraveyard"] = {24,9},
        ["Generation.CustomStructures.ChiefJustussCave"] = {61,54},
        ["Generation.CustomStructures.OnlyTwentyCharactersLogCabin"] = {20,162},
        ["Generation.CustomStructures.SolarCranesMansion"] = {13,88,function()
            --Fill the grass for the hill.
            for _,Part in pairs(Workspace:WaitForChild("SolarCranesMansion"):WaitForChild("TerrainHill"):GetChildren()) do
                if Part:IsA("BasePart") then
                    if Part.Shape == Enum.PartType.Ball then
                        Workspace.Terrain:FillBall(Part.Position,Part.Size.X/2,Enum.Material.LeafyGrass)
                    else
                        Workspace.Terrain:FillBlock(Part.CFrame,Part.Size,Enum.Material.LeafyGrass)
                    end
                end
            end
        end},
        ["Generation.CustomStructures.FusrobloxsMansion"] = {99,194},
    },
}