Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Country Info
- function onLoad()
- contReference = {
- alaska = "nAmerica",
- northwestterritory = "nAmerica",
- greenland = "nAmerica",
- alberta = "nAmerica",
- ontario = "nAmerica",
- quebec = "nAmerica",
- westernunitedstates = "nAmerica",
- easternunitedstates = "nAmerica",
- centralamerica = "nAmerica",
- venezuela = "sAmerica",
- brazil = "sAmerica",
- peru = "sAmerica",
- argentina = "sAmerica",
- iceland = "europe",
- scandinavia = "europe",
- ukrane = "europe",
- greatbritain = "europe",
- northerneurope = "europe",
- westerneurope = "europe",
- southerneurope = "europe",
- northafrica = "africa",
- egypt = "africa",
- eastafrica = "africa",
- congo = "africa",
- madagascar = "africa",
- southafrica = "africa",
- ural = "asia",
- siberia = "asia",
- yakutsk = "asia",
- kamchatka = "asia",
- irkutsk = "asia",
- mongolia = "asia",
- japan = "asia",
- afghanistan = "asia",
- china = "asia",
- middleeast = "asia",
- india = "asia",
- siam = "asia",
- indonesia = "australia",
- newguinea = "australia",
- westernaustralia = "australia",
- easternaustralia = "australia",
- }
- continents = {
- nAmerica = {
- alaska = {
- borders = {"northwestterritory","alberta","kamchatka"},
- owner = "test",
- units = 0,
- buttonindex = 0,
- button = {
- index = 0, click_function = 'clicked', function_owner = self,
- label = 'Alaska', position = {x = -1.2, y = 0.94, z = -0.62}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}
- }
- },
- northwestterritory = {
- borders = {"alaska","alberta","ontario","greenland"},
- owner = nil,
- units = 0,
- buttonindex = 1,
- button = {
- index = 1, click_function = 'clicked', function_owner = self,
- label = 'North West Territory', position = {x = -0.94, y = 0.94, z = -0.62}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}
- }
- },
- greenland = {
- borders = {"northwestterritory","ontario","quebec","iceland"},
- owner = nil,
- units = 0,
- buttonindex = 2,
- button = {
- index = 2, click_function = 'clicked', function_owner = self,
- label = 'Greenland', position = {x = -0.41, y = 0.94, z = -0.72}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}
- }
- },
- alberta = {
- borders = {"alaska","northwestterritory","ontario","westernunitedstates"},
- owner = nil,
- units = 0,
- buttonindex = 3,
- button = {
- index = 3, click_function = 'clicked', function_owner = self,
- label = 'Alberta', position = {x = -0.96, y = 0.94, z = -0.47}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}
- }
- },
- ontario = {
- borders = {"northwestterritory","alberta","westernunitedstates","easternunitedstates","quebec","greenland"},
- owner = nil,
- units = 0,
- buttonindex = 4,
- button = {
- index = 4, click_function = 'clicked', function_owner = self,
- label = 'Ontario', position = {x = -0.78, y = 0.94, z = -0.43}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- quebec = {
- borders = {"ontario","easternunitedstates","greenland"},
- owner = nil,
- units = 0,
- buttonindex = 5,
- button = {
- index = 5, click_function = 'clicked', function_owner = self,
- label = 'Quebec', position = {x = -0.59, y = 0.94, z = -0.43}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- westernunitedstates = {
- borders = {"alberta","ontario","easternunitedstates","centralamerica"},
- owner = nil,
- units = 0,
- buttonindex = 6,
- button = {
- index = 6, click_function = 'clicked', function_owner = self,
- label = 'Western United States', position = {x = -0.95, y = 0.94, z = -0.27}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- easternunitedstates = {
- borders = {"ontario","quebec","westernunitedstates","centralamerica"},
- owner = nil,
- units = 0,
- buttonindex = 7,
- button = {
- index = 7, click_function = 'clicked', function_owner = self,
- label = 'Eastern United States', position = {x = -0.76, y = 0.94, z = -0.18}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- centralamerica = {
- borders = {"westernunitedstates","easternunitedstates","venezuela"},
- owner = nil,
- units = 0,
- buttonindex = 8,
- button = {
- index = 8, click_function = 'clicked', function_owner = self,
- label = 'Central America', position = {x = -0.87, y = 0.94, z = 0.01}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- },
- southamerica = {
- venezuela = {
- borders = {"centralamerica","peru","brazil"},
- owner = nil,
- units = 0,
- buttonindex = 9,
- button = {
- index = 9, click_function = 'clicked', function_owner = self,
- label = 'Venezuela', position = {x = -0.75, y = 0.94, z = 0.14}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- peru = {
- borders = {"venezuela","brazil","argentina"},
- owner = nil,
- units = 0,
- buttonindex = 10,
- button = {
- index = 10, click_function = 'clicked', function_owner = self,
- label = 'Peru', position = {x = -0.68, y = 0.94, z = 0.39}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- brazil = {
- borders = {"venezuela","peru","argentina","northafrica"},
- owner = nil,
- units = 0,
- buttonindex = 11,
- button = {
- index = 11, click_function = 'clicked', function_owner = self,
- label = 'Brazil', position = {x = -0.53, y = 0.94, z = 0.31}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- argentina = {
- borders = {"peru","brazil"},
- owner = nil,
- units = 0,
- buttonindex = 12,
- button = {
- index = 12, click_function = 'clicked', function_owner = self,
- label = 'Argentina', position = {x = -0.64, y = 0.94, z = 0.58}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- },
- europe = {
- iceland = {
- borders = {"greenland","scandinavia","greatbritain"},
- owner = nil,
- units = 0,
- buttonindex = 13,
- button = {
- index = 13, click_function = 'clicked', function_owner = self,
- label = 'Iceland', position = {x = -0.19, y = 0.94, z = -0.53}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- scandinavia = {
- borders = {"iceland","ukrane","greatbritain","northerneurope"},
- owner = nil,
- units = 0,
- buttonindex = 14,
- button = {
- index = 14, click_function = 'clicked', function_owner = self,
- label = 'Scandinavia', position = {x = 0.04, y = 0.94, z = -0.59}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- ukrane = {
- borders = {"scandinavia","northerneurope","southerneurope","middleeast","afghanistan","ural"},
- owner = nil,
- units = 0,
- buttonindex = 15,
- button = {
- index = 15, click_function = 'clicked', function_owner = self,
- label = 'Ukrane', position = {x = 0.29, y = 0.94, z = -0.41}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- greatbritain = {
- borders = {"iceland","scandinavia","northerneurope","westerneurope"},
- owner = nil,
- units = 0,
- buttonindex = 16,
- button = {
- index = 16, click_function = 'clicked', function_owner = self,
- label = 'Great Britain', position = {x = -0.23, y = 0.94, z = -0.3}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- northerneurope = {
- borders = {"greatbritain","westerneurope","southerneurope","ukrane","scandinavia"},
- owner = nil,
- units = 0,
- buttonindex = 17,
- button = {
- index = 17, click_function = 'clicked', function_owner = self,
- label = 'Northern Europe', position = {x = 0.07, y = 0.94, z = -0.26}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- westerneurope = {
- borders = {"greatbritain","northafrica","southerneurope","northerneurope"},
- owner = nil,
- units = 0,
- buttonindex = 18,
- button = {
- index = 18, click_function = 'clicked', function_owner = self,
- label = 'Western Europe', position = {x = -0.19, y = 0.94, z = 0}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- southerneurope = {
- borders = {"northerneurope","westerneurope","northafrica","egypt","middleeast","ukrane"},
- owner = nil,
- units = 0,
- buttonindex = 19,
- button = {
- index = 19, click_function = 'clicked', function_owner = self,
- label = 'Southern Europe', position = {x = 0.07, y = 0.94, z = -0.12}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- },
- africa = {
- northafrica = {
- borders = {"westerneurope","brazil","congo","eastafrica","egypt","southerneurope"},
- owner = nil,
- units = 0,
- buttonindex = 20,
- button = {
- index = 20, click_function = 'clicked', function_owner = self,
- label = 'North Africa', position = {x = -0.07, y = 0.94, z = 0.28}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- egypt = {
- borders = {"southerneurope","northafrica","eastafrica","middleeast"},
- owner = nil,
- units = 0,
- buttonindex = 21,
- button = {
- index = 21, click_function = 'clicked', function_owner = self,
- label = 'Egypt', position = {x = 0.13, y = 0.94, z = 0.18}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- eastafrica = {
- borders = {"egypt","northafrica","congo","southafrica","madagascar","middleeast"},
- owner = nil,
- units = 0,
- buttonindex = 22,
- button = {
- index = 22, click_function = 'clicked', function_owner = self,
- label = 'East Africa', position = {x = 0.26, y = 0.94, z = 0.39}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- congo = {
- borders = {"northafrica","southafrica","eastafrica"},
- owner = nil,
- units = 0,
- buttonindex = 23,
- button = {
- index = 23, click_function = 'clicked', function_owner = self,
- label = 'Congo', position = {x = 0.14, y = 0.94, z = 0.5}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- southafrica = {
- borders = {"congo","madagascar","eastafrica"},
- owner = nil,
- units = 0,
- buttonindex = 24,
- button = {
- index = 24, click_function = 'clicked', function_owner = self,
- label = 'South Africa', position = {x = 0.15, y = 0.94, z = 0.78}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- madagascar = {
- borders = {"southafrica","eastafrica"},
- owner = nil,
- units = 0,
- buttonindex = 25,
- button = {
- index = 25, click_function = 'clicked', function_owner = self,
- label = 'Madagascar', position = {x = 0.38, y = 0.94, z = 0.69}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- },
- asia = {
- ural = {
- borders = {"ukrane","afghanistan","china","siberia"},
- owner = nil,
- units = 0,
- buttonindex = 26,
- button = {
- index = 26, click_function = 'clicked', function_owner = self,
- label = 'Ural', position = {x = 0.56, y = 0.94, z = -0.48}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- siberia = {
- borders = {"ural","china","mongolia","irkutsk","yakutsk"},
- owner = nil,
- units = 0,
- buttonindex = 27,
- button = {
- index = 27, click_function = 'clicked', function_owner = self,
- label = 'Siberia', position = {x = 0.7, y = 0.94, z = -0.58}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- yakutsk = {
- borders = {"siberia","irkutsk","kamchatka"},
- owner = nil,
- units = 0,
- buttonindex = 28,
- button = {
- index = 28, click_function = 'clicked', function_owner = self,
- label = 'Yakutsk', position = {x = 0.91, y = 0.94, z = -0.67}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- kamchatka = {
- borders = {"yakutsk","irkutsk","mongolia","japan","alaska"},
- owner = nil,
- units = 0,
- buttonindex = 29,
- button = {
- index = 29, click_function = 'clicked', function_owner = self,
- label = 'Kamchatka', position = {x = 1.12, y = 0.94, z = -0.65}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- irkutsk = {
- borders = {"yakutsk","siberia","mongolia","kamchatka","yakutsk"},
- owner = nil,
- units = 0,
- buttonindex = 30,
- button = {
- index = 30, click_function = 'clicked', function_owner = self,
- label = 'Irkutsk', position = {x = 0.88, y = 0.94, z = -0.43}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- mongolia = {
- borders = {"irkutsk","siberia","china","japan","kamchatka"},
- owner = nil,
- units = 0,
- buttonindex = 31,
- button = {
- index = 31, click_function = 'clicked', function_owner = self,
- label = 'Mongolia', position = {x = 0.9, y = 0.94, z = -0.26}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- afghanistan = {
- borders = {"ukrane","middleeast","india","china","ural"},
- owner = nil,
- units = 0,
- buttonindex = 32,
- button = {
- index = 32, click_function = 'clicked', function_owner = self,
- label = 'Afghanistan', position = {x = 0.52, y = 0.94, z = -0.21}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- japan = {
- borders = {"mongolia","kamchatka"},
- owner = nil,
- units = 0,
- buttonindex = 33,
- button = {
- index = 33, click_function = 'clicked', function_owner = self,
- label = 'Japan', position = {x = 1.21, y = 0.94, z = -0.3}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- china = {
- borders = {"siberia","ural","afghanistan","india","siam","mongolia"},
- owner = nil,
- units = 0,
- buttonindex = 34,
- button = {
- index = 34, click_function = 'clicked', function_owner = self,
- label = 'China', position = {x = 0.83, y = 0.94, z = -0.08}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- middleeast = {
- borders = {"ukrane","southerneurope","egypt","eastafrica","india","afghanistan"},
- owner = nil,
- units = 0,
- buttonindex = 35,
- button = {
- index = 35, click_function = 'clicked', function_owner = self,
- label = 'Middle East', position = {x = 0.38, y = 0.94, z = 0.02}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- india = {
- borders = {"afghanistan","middleeast","siam","china"},
- owner = nil,
- units = 0,
- buttonindex = 36,
- button = {
- index = 36, click_function = 'clicked', function_owner = self,
- label = 'India', position = {x = 0.66, y = 0.94, z = 0.06}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- siam = {
- borders = {"india","china","indonesia"},
- owner = nil,
- units = 0,
- buttonindex = 37,
- button = {
- index = 37, click_function = 'clicked', function_owner = self,
- label = 'Siam', position = {x = 0.9, y = 0.94, z = 0.16}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- },
- australia = {
- indonesia = {
- borders = {"siam","westernaustralia","newguinea"},
- owner = nil,
- units = 0,
- buttonindex = 38,
- button = {
- index = 38, click_function = 'clicked', function_owner = self,
- label = 'Indonesia', position = {x = 1.02, y = 0.94, z = 0.48}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- newguinea = {
- borders = {"indonesia","easternaustralia"},
- owner = nil,
- units = 0,
- buttonindex = 39,
- button = {
- index = 39, click_function = 'clicked', function_owner = self,
- label = 'New Guinea', position = {x = 1.26, y = 0.94, z = 0.42}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- westernaustralia = {
- borders = {"indonesia","easternaustralia"},
- owner = nil,
- units = 0,
- buttonindex = 40,
- button = {
- index = 40, click_function = 'clicked', function_owner = self,
- label = 'Western Austrailia', position = {x = 1.06, y = 0.94, z = 0.64}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- },
- easternaustralia = {
- borders = {"newguinea","westernaustralia"},
- owner = nil,
- units = 0,
- buttonindex = 41,
- button = {
- index = 41, click_function = 'clicked', function_owner = self,
- label = 'Eastern Austrailia', position = {x = 1.28, y = 0.94, z = 0.68}, rotation = {x = 0, y = 0, z = 0},
- scale = {x = 0.5, y = 1, z = 0.5}, width = 80, height = 54, font_size = 50,
- color = {r = 1, g = 1, b = 1, a = 1}, font_color = {r = 0, g = 0, b = 0, a = 1}}
- }
- }
- }
- pColors = {
- White = {{1,1,1},{0.25, 0.25, 0.25}},
- Brown = {{0.443, 0.231, 0.09},{0.25, 0.25, 0.25}},
- Red = {{0.856, 0.1, 0.094},{0.25, 0.25, 0.25}},
- Orange = {{0.956, 0.392, 0.113},{0.25, 0.25, 0.25}},
- Yellow = {{0.905, 0.898, 0.172},{0.25, 0.25, 0.25}},
- Green = {{0.192, 0.701, 0.168},{0.25, 0.25, 0.25}},
- Teal = {{0.129, 0.694, 0.607},{0.25, 0.25, 0.25}},
- Blue = {{0.118, 0.53, 1},{0.25, 0.25, 0.25}},
- Purple = {{0.627, 0.125, 0.941},{0.25, 0.25, 0.25}},
- Pink = {{0.96, 0.439, 0.807},{0.25, 0.25, 0.25}}
- }
- createTerritoryButtons()
- updateTroopCount("alaska",999)
- updateOwner("alaska","Red")
- end
- -- Setup
- function createTerritoryButtons()
- for i,c in pairs(continents) do
- for j,t in pairs(c) do
- self.createButton(t.button)
- end
- end
- end
- function updateTroopCount(territory,amount)
- continents[contReference[territory]][territory].button.label = amount
- continents[contReference[territory]][territory].units = amount
- self.editButton(continents[contReference[territory]][territory].button)
- end
- function updateOwner(territory,owner)
- continents[contReference[territory]][territory].owner = owner
- continents[contReference[territory]][territory].button.color = pColors[owner][1]
- continents[contReference[territory]][territory].button.font_color = pColors[owner][2]
- self.editButton(continents[contReference[territory]][territory].button)
- end
- -- Begin turn reinforcements
- -- Combat
- -- Strategic Move
- -- End Turn
Advertisement
Add Comment
Please, Sign In to add comment