diff --git a/common/configs/unit_restrictions_config.lua b/common/configs/unit_restrictions_config.lua index afdfffff239..03f04068845 100644 --- a/common/configs/unit_restrictions_config.lua +++ b/common/configs/unit_restrictions_config.lua @@ -20,7 +20,7 @@ for unitDefID, unitDef in pairs(UnitDefs) do end end - if (unitDef.minWaterDepth > 0 or unitDef.modCategories['ship']) and not (unitDef.customParams.restrictions_exclusion and string.find(unitDef.customParams.restrictions_exclusion, "_nosea_")) then + if (unitDef.minWaterDepth > 0 or unitDef.modCategories.ship ) and not (unitDef.customParams.restrictions_exclusion and string.find(unitDef.customParams.restrictions_exclusion, "_nosea_")) then isWaterUnit[unitDefID] = true end end diff --git a/common/holidays.lua b/common/holidays.lua index 1ff1d840569..40e81e81245 100644 --- a/common/holidays.lua +++ b/common/holidays.lua @@ -77,49 +77,49 @@ local EasterEventDates = GetEasterStartEnd() local holidaysList = { -- Static ----------------------------- - ["aprilfools"] = { + aprilfools = { firstDay = { day = 1, month = 4}, lastDay = { day = 7, month = 4} }, - ["aprilfools_specialDay"] = { + aprilfools_specialDay = { firstDay = { day = 1, month = 4}, lastDay = { day = 1, month = 4} }, - ["halloween"] = { + halloween = { firstDay = { day = 17, month = 10}, lastDay = { day = 31, month = 10} }, - ["halloween_specialDay"] = { + halloween_specialDay = { firstDay = { day = 31, month = 10}, lastDay = { day = 31, month = 10} }, - ["xmas"] = { + xmas = { firstDay = { day = 12, month = 12}, lastDay = { day = 31, month = 12} }, - ["xmas_specialDay"] = { + xmas_specialDay = { firstDay = { day = 24, month = 12}, lastDay = { day = 26, month = 12} }, -- We split these into two events because yes - ["newyearbefore"] = { + newyearbefore = { firstDay = { day = 31, month = 12}, lastDay = { day = 31, month = 12} }, - ["newyearafter"] = { + newyearafter = { firstDay = { day = 1, month = 1}, lastDay = { day = 1, month = 1} }, -- Dynamic ----------------------------- - ["easter"] = { + easter = { firstDay = { day = EasterEventDates.firstDay, month = EasterEventDates.firstMonth}, lastDay = { day = EasterEventDates.lastDay, month = EasterEventDates.lastMonth} }, - ["easter_specialDay"] = { + easter_specialDay = { firstDay = { day = EasterEventDates.easterDay, month = EasterEventDates.easterMonth}, lastDay = { day = EasterEventDates.easterDay, month = EasterEventDates.easterMonth} }, diff --git a/common/lib_startpoint_guesser.lua b/common/lib_startpoint_guesser.lua index ee4457999c6..9e38d673d44 100644 --- a/common/lib_startpoint_guesser.lua +++ b/common/lib_startpoint_guesser.lua @@ -44,7 +44,7 @@ function GuessOne(teamID, allyID, xmin, zmin, xmax, zmax, startPointTable) -- guess based on metal spots within startbox -- -- check if mex list generation worked and retrieve if so - local resourceSpotFinder = (GG and GG["resource_spot_finder"]) or (WG and WG["resource_spot_finder"]) + local resourceSpotFinder = (GG and GG.resource_spot_finder ) or (WG and WG.resource_spot_finder ) local metalSpots = resourceSpotFinder and resourceSpotFinder.metalSpotsList or nil if not metalSpots or #metalSpots == 0 then return -1,-1 diff --git a/common/testing/mocha_json_reporter.lua b/common/testing/mocha_json_reporter.lua index f10414e3646..efa824f7c93 100644 --- a/common/testing/mocha_json_reporter.lua +++ b/common/testing/mocha_json_reporter.lua @@ -79,19 +79,19 @@ end function MochaJSONReporter:report(filePath) local output = { - ["stats"] = { - ["suites"] = 1, - ["tests"] = self.totalTests, - ["passes"] = self.totalPasses, - ["pending"] = 0, - ["skipped"] = self.totalSkipped, - ["failures"] = self.totalFailures, - ["start"] = formatTimestamp(self.startTime), + stats = { + suites = 1, + tests = self.totalTests, + passes = self.totalPasses, + pending = 0, + skipped = self.totalSkipped, + failures = self.totalFailures, + start = formatTimestamp(self.startTime), ["end"] = formatTimestamp(self.endTime), - ["duration"] = self.duration + duration = self.duration }, - ["tests"] = self.tests, - ["pending"] = self.skipped + tests = self.tests, + pending = self.skipped } local encoded = Json.encode(output) diff --git a/common/upgets/api_resource_spot_finder.lua b/common/upgets/api_resource_spot_finder.lua index bf1d8559c9c..9106e397da1 100644 --- a/common/upgets/api_resource_spot_finder.lua +++ b/common/upgets/api_resource_spot_finder.lua @@ -30,11 +30,11 @@ local precision = Game.footprintScale * Game.squareSize -- (footprint 1 = 16 map -- Some of these maps have more than 2 metal spots, disable mex denier local metalMaps = { - ["Oort_Cloud_V2"] = true, + Oort_Cloud_V2 = true, ["Asteroid_Mines_V2.1"] = true, - ["Cloud9_V2"] = true, - ["Iron_Isle_V1"] = true, - ["Nine_Metal_Islands_V1"] = true, + Cloud9_V2 = true, + Iron_Isle_V1 = true, + Nine_Metal_Islands_V1 = true, ["SpeedMetal BAR V2"] = true, } local isMetalMap = false @@ -384,14 +384,14 @@ function upget:Initialize() end geoSpots = GetSpotsGeo() - globalScope["resource_spot_finder"] = {} - globalScope["resource_spot_finder"].metalSpotsList = metalSpots - globalScope["resource_spot_finder"].geoSpotsList = geoSpots - globalScope["resource_spot_finder"].isMetalMap = isMetalMap - globalScope["resource_spot_finder"].GetClosestMexSpot = getClosestMex - globalScope["resource_spot_finder"].GetClosestGeoSpot = getClosestGeo - globalScope["resource_spot_finder"].GetBuildingPositions = GetBuildingPositions - globalScope["resource_spot_finder"].IsMexPositionValid = IsBuildingPositionValid + globalScope.resource_spot_finder = {} + globalScope.resource_spot_finder .metalSpotsList = metalSpots + globalScope.resource_spot_finder .geoSpotsList = geoSpots + globalScope.resource_spot_finder .isMetalMap = isMetalMap + globalScope.resource_spot_finder .GetClosestMexSpot = getClosestMex + globalScope.resource_spot_finder .GetClosestGeoSpot = getClosestGeo + globalScope.resource_spot_finder .GetBuildingPositions = GetBuildingPositions + globalScope.resource_spot_finder .IsMexPositionValid = IsBuildingPositionValid if(gadget) then setMexGameRules(metalSpots) diff --git a/effects/antinuke.lua b/effects/antinuke.lua index e22645e920c..d43c4c39169 100644 --- a/effects/antinuke.lua +++ b/effects/antinuke.lua @@ -6,7 +6,7 @@ -- burngreen return { - ["antinuke"] = { + antinuke = { explosion = { air = true, class = [[CSimpleParticleSystem]], diff --git a/effects/atmospherics.lua b/effects/atmospherics.lua index c1a1c093594..1d96853eb34 100644 --- a/effects/atmospherics.lua +++ b/effects/atmospherics.lua @@ -1,7 +1,7 @@ -- Atmospheric Map Effects return { - ["fogdirty"] = { + fogdirty = { usedefaultexplosions = false, grounddust = { air = true, @@ -141,7 +141,7 @@ return { }, }, - ["mistycloud"] = { + mistycloud = { usedefaultexplosions = false, cloud = { air = true, @@ -176,7 +176,7 @@ return { }, }, - ["mistycloudpurple"] = { + mistycloudpurple = { usedefaultexplosions = false, cloud = { air = true, @@ -211,7 +211,7 @@ return { }, }, - ["mistycloudpurplemist"] = { + mistycloudpurplemist = { usedefaultexplosions = false, cloud = { air = true, @@ -238,7 +238,7 @@ return { }, }, - ["mistycloudpurplemistxl"] = { + mistycloudpurplemistxl = { usedefaultexplosions = false, cloud = { air = true, @@ -265,7 +265,7 @@ return { }, }, - ["mistycloudbrownmistxl"] = { + mistycloudbrownmistxl = { usedefaultexplosions = false, cloud = { air = true, @@ -292,7 +292,7 @@ return { }, }, - ["thickcloud"] = { + thickcloud = { usedefaultexplosions = false, cloud = { air = true, @@ -327,7 +327,7 @@ return { }, }, - ["lightningstorm"] = { + lightningstorm = { usedefaultexplosions = false, raindrops = { air = true, @@ -344,7 +344,7 @@ return { }, }, - ["lightningstormgreen"] = { + lightningstormgreen = { usedefaultexplosions = false, raindrops = { air = true, @@ -361,7 +361,7 @@ return { }, }, - ["lightninginair"] = { + lightninginair = { lightningbolt = { air = true, class = [[CBitmapMuzzleFlame]], @@ -386,7 +386,7 @@ return { }, }, }, - ["lightninginairgreen"] = { + lightninginairgreen = { lightningbolt = { air = true, class = [[CBitmapMuzzleFlame]], @@ -410,7 +410,7 @@ return { }, }, }, - ["lightningstrike"] = { + lightningstrike = { lightningbolt = { air = true, class = [[CBitmapMuzzleFlame]], @@ -560,7 +560,7 @@ return { }, }, - ["lightningstrikegreen"] = { + lightningstrikegreen = { lightningbolt = { air = true, class = [[CBitmapMuzzleFlame]], @@ -710,7 +710,7 @@ return { }, }, - ["sandstorm"] = { + sandstorm = { usedefaultexplosions = false, raindrops = { air = true, @@ -727,7 +727,7 @@ return { }, }, - ["sandblast"] = { + sandblast = { usedefaultexplosions = false, grounddust = { air = true, @@ -761,7 +761,7 @@ return { }, }, - ["sandcloud"] = { + sandcloud = { usedefaultexplosions = false, raindrops = { air = true, @@ -778,7 +778,7 @@ return { }, }, - ["sandcloud_sparse"] = { + sandcloud_sparse = { usedefaultexplosions = false, raindrops = { air = true, @@ -795,7 +795,7 @@ return { }, }, - ["sandclouddense"] = { + sandclouddense = { usedefaultexplosions = false, raindrops = { air = true, @@ -812,7 +812,7 @@ return { }, }, - ["sandclouddensexl"] = { + sandclouddensexl = { usedefaultexplosions = false, raindrops = { air = true, @@ -829,7 +829,7 @@ return { }, }, -["sanddustgray"] = { +sanddustgray = { usedefaultexplosions = false, grounddust = { air = true, @@ -865,7 +865,7 @@ return { }, }, -["sanddust"] = { +sanddust = { usedefaultexplosions = false, grounddust = { air = true, @@ -901,7 +901,7 @@ return { }, }, - ["sanddustdense"] = { + sanddustdense = { usedefaultexplosions = false, grounddust = { air = true, @@ -937,7 +937,7 @@ return { }, }, - ["dunecloud"] = { + dunecloud = { usedefaultexplosions = false, raindrops = { air = true, @@ -954,7 +954,7 @@ return { }, }, -["dunedust"] = { +dunedust = { usedefaultexplosions = false, grounddust = { air = true, @@ -990,7 +990,7 @@ return { }, }, - ["ventairburst"] = { + ventairburst = { usedefaultexplosions = false, raindrops = { air = true, @@ -1039,7 +1039,7 @@ return { }, }, - ["fireflies"] = { + fireflies = { usedefaultexplosions = false, raindrops = { air = true, @@ -1056,7 +1056,7 @@ return { }, }, - ["firefliesgreen"] = { + firefliesgreen = { usedefaultexplosions = false, raindrops = { air = true, @@ -1073,7 +1073,7 @@ return { }, }, - ["firefliespurple"] = { + firefliespurple = { usedefaultexplosions = false, raindrops = { air = true, @@ -1090,7 +1090,7 @@ return { }, }, - ["firefly"] = { + firefly = { lightningballs = { air = true, class = [[CSimpleParticleSystem]], @@ -1123,7 +1123,7 @@ return { }, }, - ["fireflygreen"] = { + fireflygreen = { lightningballs = { air = true, class = [[CSimpleParticleSystem]], @@ -1156,7 +1156,7 @@ return { }, }, - ["fireflypurple"] = { + fireflypurple = { lightningballs = { air = true, class = [[CSimpleParticleSystem]], @@ -1189,7 +1189,7 @@ return { }, }, - ["dustparticles"] = { + dustparticles = { usedefaultexplosions = false, raindrops = { air = true, @@ -1206,7 +1206,7 @@ return { }, }, - ["dustparticle"] = { + dustparticle = { lightningballs = { air = true, class = [[CSimpleParticleSystem]], @@ -1239,7 +1239,7 @@ return { }, }, -["powerupwhite"] = { +powerupwhite = { usedefaultexplosions = false, raindrops = { air = true, @@ -1256,7 +1256,7 @@ return { }, }, -["powerupspritewhite"] = { +powerupspritewhite = { lightningballs = { air = true, class = [[CSimpleParticleSystem]], @@ -1288,7 +1288,7 @@ return { }, }, }, - ["rain"] = { + rain = { usedefaultexplosions = false, raindrops = { air = true, @@ -1305,7 +1305,7 @@ return { }, }, - ["rainlight"] = { + rainlight = { usedefaultexplosions = false, raindrops = { air = true, @@ -1356,7 +1356,7 @@ return { }, }, - ["rainpatch"] = { + rainpatch = { usedefaultexplosions = false, raindrops = { air = true, @@ -1373,7 +1373,7 @@ return { }, }, - ["raindrop"] = { + raindrop = { usedefaultexplosions = false, grounddust = { air = true, @@ -1469,7 +1469,7 @@ return { }, }, }, -["smokeblack"] = { +smokeblack = { usedefaultexplosions = false, grounddust = { air = true, @@ -1503,7 +1503,7 @@ return { }, }, }, - ["noceg"] = { + noceg = { grounddust = { air = false, class = [[CSimpleParticleSystem]], diff --git a/effects/blacksmoke.lua b/effects/blacksmoke.lua index c3b12750474..d20cfb621a0 100644 --- a/effects/blacksmoke.lua +++ b/effects/blacksmoke.lua @@ -1,5 +1,5 @@ return { - ["blacksmoke"] = { + blacksmoke = { dirtg = { air = true, class = [[CSimpleParticleSystem]], diff --git a/effects/blank.lua b/effects/blank.lua index 497f388c986..a2758f04055 100644 --- a/effects/blank.lua +++ b/effects/blank.lua @@ -1,4 +1,4 @@ return { - ["blank"] = {}, + blank = {}, } diff --git a/effects/bubbles.lua b/effects/bubbles.lua index e5ddc3f1fbc..8ec8d6918eb 100644 --- a/effects/bubbles.lua +++ b/effects/bubbles.lua @@ -1,5 +1,5 @@ return { - ["geobubbles"] = { + geobubbles = { bubbles = { air = false, class = [[CSimpleParticleSystem]], @@ -31,7 +31,7 @@ return { }, }, }, - ["subbubbles"] = { + subbubbles = { bubbles = { air = false, class = [[CSimpleParticleSystem]], @@ -63,7 +63,7 @@ return { }, }, }, - ["subwake"] = { + subwake = { subwake = { air = false, class = [[CBitmapMuzzleFlame]], diff --git a/effects/burn.lua b/effects/burn.lua index 729bc8a812b..cb8379520f6 100644 --- a/effects/burn.lua +++ b/effects/burn.lua @@ -100,7 +100,7 @@ return { }, }, }, - ["missileburn"] = { + missileburn = { groundflash = { circlealpha = 0.1, circlegrowth = 3, @@ -143,7 +143,7 @@ return { }, }, - ["electricburn"] = { + electricburn = { groundflash = { circlealpha = 0.1, circlegrowth = 3, @@ -212,7 +212,7 @@ return { }, }, - ["burn"] = { + burn = { dirtg = { air = true, class = [[CSimpleParticleSystem]], @@ -312,7 +312,7 @@ return { }, }, - ["burnold"] = { + burnold = { groundflash = { circlealpha = 0.1, circlegrowth = 3, @@ -381,7 +381,7 @@ return { }, }, - ["pilotlight"] = { + pilotlight = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -413,7 +413,7 @@ return { }, }, - ["pilotlightxl"] = { + pilotlightxl = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -445,7 +445,7 @@ return { }, }, - ["burnblack"] = { + burnblack = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -476,7 +476,7 @@ return { }, }, }, - ["burnthermite"] = { + burnthermite = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -508,7 +508,7 @@ return { }, }, - ["burnblackxl"] = { + burnblackxl = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -540,7 +540,7 @@ return { }, }, - ["burnblackbig"] = { + burnblackbig = { flame1 = { air = true, class = [[CSimpleParticleSystem]], @@ -600,7 +600,7 @@ return { }, }, - ["burnblackbiggest"] = { + burnblackbiggest = { particles = { air = true, class = [[CSimpleParticleSystem]], @@ -655,7 +655,7 @@ return { }, }, - ["burngreen"] = { + burngreen = { groundflash = { circlealpha = 0.1, circlegrowth = 3, @@ -723,7 +723,7 @@ return { }, }, }, - ["flamestream"] = { + flamestream = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -782,7 +782,7 @@ return { }, }, }, - ["flamestreamxm"] = { + flamestreamxm = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -841,7 +841,7 @@ return { }, }, }, - ["thermitesmoke"] = { + thermitesmoke = { flame = { air = true,--also a useful function for experimenting with the particle physics class = [[CSimpleParticleSystem]], @@ -872,7 +872,7 @@ return { }, }, }, - ["flamestreamthermite"] = { + flamestreamthermite = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -934,7 +934,7 @@ return { }, - ["flamestreamxl"] = { + flamestreamxl = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -993,7 +993,7 @@ return { }, }, }, - ["flamestreamxxl"] = { + flamestreamxxl = { flame = { air = true, @@ -1059,7 +1059,7 @@ return { }, }, - ["burnflame"] = { + burnflame = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -1129,7 +1129,7 @@ return { }, }, - ["burnflamexm"] = { + burnflamexm = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -1159,7 +1159,7 @@ return { }, }, }, - ["burnflamethermite"] = { + burnflamethermite = { extrafire = { air = true, class = [[CSimpleParticleSystem]], @@ -1222,7 +1222,7 @@ return { }, - ["burnflamexl"] = { + burnflamexl = { extrafire = { air = true, class = [[CSimpleParticleSystem]], @@ -1299,7 +1299,7 @@ return { }, }, - ["burnflamel"] = { + burnflamel = { extrafire = { air = true, class = [[CSimpleParticleSystem]], @@ -1376,7 +1376,7 @@ return { }, }, - ["demonflame"] = { + demonflame = { extrafire = { air = true, class = [[CSimpleParticleSystem]], @@ -1438,7 +1438,7 @@ return { }, }, - ["burnfire"] = { + burnfire = { extrafire = { air = true, class = [[CSimpleParticleSystem]], @@ -1624,7 +1624,7 @@ return { }, }, - ["burnfirecom"] = { + burnfirecom = { extrafire = { air = true, class = [[CSimpleParticleSystem]], diff --git a/effects/cannons.lua b/effects/cannons.lua index ed0bddb52eb..b73fb59631e 100644 --- a/effects/cannons.lua +++ b/effects/cannons.lua @@ -476,7 +476,7 @@ local definitions = { }, }, }, - ["railgun"] = { + railgun = { shockwaves = { air = true, class = [[CBitmapMuzzleFlame]], @@ -588,7 +588,7 @@ local definitions = { }, - ["starfire"] = { + starfire = { flame = { air = true, class = [[CBitmapMuzzleFlame]], @@ -728,7 +728,7 @@ local definitions = { -- }, }, - ["starfire_tiny"] = { + starfire_tiny = { flame = { air = true, class = [[CBitmapMuzzleFlame]], @@ -783,7 +783,7 @@ local definitions = { }, }, - ["ministarfire"] = { + ministarfire = { flame = { air = true, class = [[CBitmapMuzzleFlame]], @@ -838,7 +838,7 @@ local definitions = { }, }, }, - ["starfire_arty"] = { + starfire_arty = { flame = { air = true, class = [[CBitmapMuzzleFlame]], diff --git a/effects/com_sea_laser_bubbles.lua b/effects/com_sea_laser_bubbles.lua index 5433cdf6c0e..b8d1ada3af2 100644 --- a/effects/com_sea_laser_bubbles.lua +++ b/effects/com_sea_laser_bubbles.lua @@ -1,7 +1,7 @@ -- watersplash_small return { - ["com_sea_laser_bubbles"] = { + com_sea_laser_bubbles = { waterball = { air = false, class = [[CSimpleParticleSystem]], diff --git a/effects/commander-spawn-alwaysvisible.lua b/effects/commander-spawn-alwaysvisible.lua index 84e491b8eec..b822b01f268 100644 --- a/effects/commander-spawn-alwaysvisible.lua +++ b/effects/commander-spawn-alwaysvisible.lua @@ -587,7 +587,7 @@ return { }, }, - ["spawn_ring_1_alwaysvisible"] = { + spawn_ring_1_alwaysvisible = { fireglowbright = { air = true, class = [[CSimpleParticleSystem]], diff --git a/effects/commander-spawn.lua b/effects/commander-spawn.lua index 946fc03eba7..100a135e5fe 100644 --- a/effects/commander-spawn.lua +++ b/effects/commander-spawn.lua @@ -578,7 +578,7 @@ return { }, }, - ["spawn_ring_1"] = { + spawn_ring_1 = { fireglowbright = { air = true, class = [[CSimpleParticleSystem]], diff --git a/effects/commander_explosion.lua b/effects/commander_explosion.lua index 0d02e1907b2..a8eb6a0e952 100644 --- a/effects/commander_explosion.lua +++ b/effects/commander_explosion.lua @@ -1,6 +1,6 @@ return { - ["COMMANDER_EXPLOSION"] = { + COMMANDER_EXPLOSION = { centerflare = { air = true, class = [[CHeatCloudProjectile]], diff --git a/effects/crusherkrog.lua b/effects/crusherkrog.lua index a511afe2496..bb02dd06d34 100644 --- a/effects/crusherkrog.lua +++ b/effects/crusherkrog.lua @@ -1,5 +1,5 @@ return { - ["crusherkrog"] = { + crusherkrog = { -- put this next to groundflash kickedupdirt = { air = true, diff --git a/effects/custom_explosions.lua b/effects/custom_explosions.lua index c36b2e0bbb5..8912ec91f6f 100644 --- a/effects/custom_explosions.lua +++ b/effects/custom_explosions.lua @@ -1,9 +1,9 @@ local definitions = { - ["noexplosion"] = {--needed for hacking behaviour via fake weapons + noexplosion = {--needed for hacking behaviour via fake weapons }, - ["botrailspawn"] = { + botrailspawn = { centerflare = { air = true, class = [[CHeatCloudProjectile]], @@ -232,7 +232,7 @@ local definitions = { }, }, - ["corpsedestroyed"] = { + corpsedestroyed = { groundflash_large = { class = [[CSimpleGroundFlash]], count = 1, @@ -1829,7 +1829,7 @@ local definitions = { }, }, }, - ["subtorpfire"] = { + subtorpfire = { centerflare = { air = true, class = [[CHeatCloudProjectile]], @@ -2725,7 +2725,7 @@ local definitions = { }, }, }, - ["junocloud"] = { + junocloud = { usedefaultexplosions = false, grounddust1 = { air = true, @@ -2982,7 +2982,7 @@ local definitions = { -- }, -- }, }, - ["fusexpl"] = { + fusexpl = { centerflare = { air = true, class = [[CHeatCloudProjectile]], @@ -3680,7 +3680,7 @@ local definitions = { -- }, -- }, }, - ["afusexpl"] = { + afusexpl = { centerflare = { air = true, class = [[CHeatCloudProjectile]], @@ -4426,7 +4426,7 @@ local definitions = { }, }, }, - ["afusexplxl"] = { + afusexplxl = { centerflare = { air = true, class = [[CHeatCloudProjectile]], @@ -5191,7 +5191,7 @@ local definitions = { }, }, }, - ["t3unitexplosion"] = { + t3unitexplosion = { centerflare = { air = true, class = [[CHeatCloudProjectile]], @@ -6297,265 +6297,265 @@ local definitions = { local size = 0.7 -definitions['t3unitexplosionmed'] = table.copy(definitions['t3unitexplosion']) -definitions['t3unitexplosionmed'].sparks.properties.particlespeed = math.floor(definitions['t3unitexplosionmed'].sparks.properties.particlespeed * size) -definitions['t3unitexplosionmed'].sparks.properties.particlespeedspread = math.floor(definitions['t3unitexplosionmed'].sparks.properties.particlespeedspread * size) -definitions['t3unitexplosionmed'].explosion.properties.particlespeed = math.floor(definitions['t3unitexplosionmed'].explosion.properties.particlespeed * size) -definitions['t3unitexplosionmed'].explosion.properties.particlesize = math.floor(definitions['t3unitexplosionmed'].explosion.properties.particlesize * size) -definitions['t3unitexplosionmed'].explosion.properties.particlelife = math.floor(definitions['t3unitexplosionmed'].explosion.properties.particlelife * size) -definitions['t3unitexplosionmed'].dustparticles.properties.particlespeed = math.floor(definitions['t3unitexplosionmed'].dustparticles.properties.particlespeed * size) -definitions['t3unitexplosionmed'].dustparticles.properties.particlesize = math.floor(definitions['t3unitexplosionmed'].dustparticles.properties.particlesize * size) -definitions['t3unitexplosionmed'].dustparticles.properties.particlelife = math.floor(definitions['t3unitexplosionmed'].dustparticles.properties.particlelife * size) -definitions['t3unitexplosionmed'].dirt.properties.particlespeed = math.floor(definitions['t3unitexplosionmed'].dirt.properties.particlespeed * size) -definitions['t3unitexplosionmed'].dirt.properties.particlespeedspread = math.floor(definitions['t3unitexplosionmed'].dirt.properties.particlespeedspread * size) -definitions['t3unitexplosionmed'].dirt.properties.numparticles = math.floor(definitions['t3unitexplosionmed'].dirt.properties.numparticles * size) -definitions['t3unitexplosionmed'].dirt2.properties.particlespeed = math.floor(definitions['t3unitexplosionmed'].dirt2.properties.particlespeed * size) -definitions['t3unitexplosionmed'].dirt2.properties.particlespeedspread = math.floor(definitions['t3unitexplosionmed'].dirt2.properties.particlespeedspread * size) -definitions['t3unitexplosionmed'].dirt2.properties.numparticles = math.floor(definitions['t3unitexplosionmed'].dirt2.properties.numparticles * size) -definitions['t3unitexplosionmed'].shockwave.properties.ttl = math.floor(definitions['t3unitexplosionmed'].shockwave.properties.ttl * size) -definitions['t3unitexplosionmed'].centerflare.properties.size = math.floor(definitions['t3unitexplosionmed'].centerflare.properties.size * size) -definitions['t3unitexplosionmed'].centerflare.properties.heat = math.floor(definitions['t3unitexplosionmed'].centerflare.properties.heat * size) -definitions['t3unitexplosionmed'].centerflare.properties.maxheat = math.floor(definitions['t3unitexplosionmed'].centerflare.properties.maxheat * size) -definitions['t3unitexplosionmed'].pop1.properties.size = math.floor(definitions['t3unitexplosionmed'].pop1.properties.size * size) -definitions['t3unitexplosionmed'].pop1.properties.heat = math.floor(definitions['t3unitexplosionmed'].pop1.properties.heat * size) -definitions['t3unitexplosionmed'].pop1.properties.maxheat = math.floor(definitions['t3unitexplosionmed'].pop1.properties.maxheat * size) -definitions['t3unitexplosionmed'].groundflash_large.properties.size = math.floor(definitions['t3unitexplosionmed'].groundflash_large.properties.size * size) -definitions['t3unitexplosionmed'].groundflash_large.properties.ttl = math.floor(definitions['t3unitexplosionmed'].groundflash_large.properties.ttl * size) -definitions['t3unitexplosionmed'].groundflash_white.properties.size = math.floor(definitions['t3unitexplosionmed'].groundflash_white.properties.size * size) -definitions['t3unitexplosionmed'].grounddust.properties.particlesize = math.floor(definitions['t3unitexplosionmed'].grounddust.properties.particlesize * size) -definitions['t3unitexplosionmed'].grounddust.properties.particlespeed = math.floor(definitions['t3unitexplosionmed'].grounddust.properties.particlespeed * size) -definitions['t3unitexplosionmed'].grounddust.properties.particlespeedspread = math.floor(definitions['t3unitexplosionmed'].grounddust.properties.particlespeedspread * size) -definitions['t3unitexplosionmed'].grounddust.properties.particlelife = math.floor(definitions['t3unitexplosionmed'].grounddust.properties.particlelife * size) -definitions['t3unitexplosionmed'].bigsmoketrails.properties.length = [[70 r20]] +definitions.t3unitexplosionmed = table.copy(definitions.t3unitexplosion ) +definitions.t3unitexplosionmed .sparks.properties.particlespeed = math.floor(definitions.t3unitexplosionmed .sparks.properties.particlespeed * size) +definitions.t3unitexplosionmed .sparks.properties.particlespeedspread = math.floor(definitions.t3unitexplosionmed .sparks.properties.particlespeedspread * size) +definitions.t3unitexplosionmed .explosion.properties.particlespeed = math.floor(definitions.t3unitexplosionmed .explosion.properties.particlespeed * size) +definitions.t3unitexplosionmed .explosion.properties.particlesize = math.floor(definitions.t3unitexplosionmed .explosion.properties.particlesize * size) +definitions.t3unitexplosionmed .explosion.properties.particlelife = math.floor(definitions.t3unitexplosionmed .explosion.properties.particlelife * size) +definitions.t3unitexplosionmed .dustparticles.properties.particlespeed = math.floor(definitions.t3unitexplosionmed .dustparticles.properties.particlespeed * size) +definitions.t3unitexplosionmed .dustparticles.properties.particlesize = math.floor(definitions.t3unitexplosionmed .dustparticles.properties.particlesize * size) +definitions.t3unitexplosionmed .dustparticles.properties.particlelife = math.floor(definitions.t3unitexplosionmed .dustparticles.properties.particlelife * size) +definitions.t3unitexplosionmed .dirt.properties.particlespeed = math.floor(definitions.t3unitexplosionmed .dirt.properties.particlespeed * size) +definitions.t3unitexplosionmed .dirt.properties.particlespeedspread = math.floor(definitions.t3unitexplosionmed .dirt.properties.particlespeedspread * size) +definitions.t3unitexplosionmed .dirt.properties.numparticles = math.floor(definitions.t3unitexplosionmed .dirt.properties.numparticles * size) +definitions.t3unitexplosionmed .dirt2.properties.particlespeed = math.floor(definitions.t3unitexplosionmed .dirt2.properties.particlespeed * size) +definitions.t3unitexplosionmed .dirt2.properties.particlespeedspread = math.floor(definitions.t3unitexplosionmed .dirt2.properties.particlespeedspread * size) +definitions.t3unitexplosionmed .dirt2.properties.numparticles = math.floor(definitions.t3unitexplosionmed .dirt2.properties.numparticles * size) +definitions.t3unitexplosionmed .shockwave.properties.ttl = math.floor(definitions.t3unitexplosionmed .shockwave.properties.ttl * size) +definitions.t3unitexplosionmed .centerflare.properties.size = math.floor(definitions.t3unitexplosionmed .centerflare.properties.size * size) +definitions.t3unitexplosionmed .centerflare.properties.heat = math.floor(definitions.t3unitexplosionmed .centerflare.properties.heat * size) +definitions.t3unitexplosionmed .centerflare.properties.maxheat = math.floor(definitions.t3unitexplosionmed .centerflare.properties.maxheat * size) +definitions.t3unitexplosionmed .pop1.properties.size = math.floor(definitions.t3unitexplosionmed .pop1.properties.size * size) +definitions.t3unitexplosionmed .pop1.properties.heat = math.floor(definitions.t3unitexplosionmed .pop1.properties.heat * size) +definitions.t3unitexplosionmed .pop1.properties.maxheat = math.floor(definitions.t3unitexplosionmed .pop1.properties.maxheat * size) +definitions.t3unitexplosionmed .groundflash_large.properties.size = math.floor(definitions.t3unitexplosionmed .groundflash_large.properties.size * size) +definitions.t3unitexplosionmed .groundflash_large.properties.ttl = math.floor(definitions.t3unitexplosionmed .groundflash_large.properties.ttl * size) +definitions.t3unitexplosionmed .groundflash_white.properties.size = math.floor(definitions.t3unitexplosionmed .groundflash_white.properties.size * size) +definitions.t3unitexplosionmed .grounddust.properties.particlesize = math.floor(definitions.t3unitexplosionmed .grounddust.properties.particlesize * size) +definitions.t3unitexplosionmed .grounddust.properties.particlespeed = math.floor(definitions.t3unitexplosionmed .grounddust.properties.particlespeed * size) +definitions.t3unitexplosionmed .grounddust.properties.particlespeedspread = math.floor(definitions.t3unitexplosionmed .grounddust.properties.particlespeedspread * size) +definitions.t3unitexplosionmed .grounddust.properties.particlelife = math.floor(definitions.t3unitexplosionmed .grounddust.properties.particlelife * size) +definitions.t3unitexplosionmed .bigsmoketrails.properties.length = [[70 r20]] local size = 1.4 -definitions['t3unitexplosionxl'] = table.copy(definitions['t3unitexplosion']) -definitions['t3unitexplosionxl'].sparks.properties.particlespeed = math.floor(definitions['t3unitexplosionxl'].sparks.properties.particlespeed * size) -definitions['t3unitexplosionxl'].sparks.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxl'].sparks.properties.particlespeedspread * size) -definitions['t3unitexplosionxl'].sparks.properties.numparticles = math.floor(definitions['t3unitexplosionxl'].sparks.properties.numparticles * size) -definitions['t3unitexplosionxl'].explosion.properties.particlespeed = math.floor(definitions['t3unitexplosionxl'].explosion.properties.particlespeed * size) -definitions['t3unitexplosionxl'].explosion.properties.particlesize = math.floor(definitions['t3unitexplosionxl'].explosion.properties.particlesize * size * 0.7) -definitions['t3unitexplosionxl'].explosion.properties.particlelife = math.floor(definitions['t3unitexplosionxl'].explosion.properties.particlelife * size) -definitions['t3unitexplosionxl'].dustparticles.properties.particlespeed = math.floor(definitions['t3unitexplosionxl'].dustparticles.properties.particlespeed * size * 0.6) -definitions['t3unitexplosionxl'].dustparticles.properties.particlesize = math.floor(definitions['t3unitexplosionxl'].dustparticles.properties.particlesize * size * 0.5) -definitions['t3unitexplosionxl'].dustparticles.properties.particlelife = math.floor(definitions['t3unitexplosionxl'].dustparticles.properties.particlelife * size) -definitions['t3unitexplosionxl'].dirt.properties.particlespeed = math.floor(definitions['t3unitexplosionxl'].dirt.properties.particlespeed * size * 0.6) -definitions['t3unitexplosionxl'].dirt.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxl'].dirt.properties.particlespeedspread * size * 0.6) -definitions['t3unitexplosionxl'].dirt.properties.numparticles = math.floor(definitions['t3unitexplosionxl'].dirt.properties.numparticles * size) -definitions['t3unitexplosionxl'].dirt.properties.particlesize = math.floor(definitions['t3unitexplosionxl'].dirt.properties.particlesize * size * 0.9) -definitions['t3unitexplosionxl'].dirt2.properties.particlespeed = math.floor(definitions['t3unitexplosionxl'].dirt2.properties.particlespeed * size * 0.6) -definitions['t3unitexplosionxl'].dirt2.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxl'].dirt2.properties.particlespeedspread * size * 0.6) -definitions['t3unitexplosionxl'].dirt2.properties.numparticles = math.floor(definitions['t3unitexplosionxl'].dirt2.properties.numparticles * size) -definitions['t3unitexplosionxl'].dirt2.properties.particlesize = math.floor(definitions['t3unitexplosionxl'].dirt2.properties.particlesize * size * 0.9) -definitions['t3unitexplosionxl'].shockwave.properties.ttl = math.floor(definitions['t3unitexplosionxl'].shockwave.properties.ttl * size) -definitions['t3unitexplosionxl'].centerflare.properties.size = math.floor(definitions['t3unitexplosionxl'].centerflare.properties.size * size * 0.5) -definitions['t3unitexplosionxl'].centerflare.properties.heat = math.floor(definitions['t3unitexplosionxl'].centerflare.properties.heat * size) -definitions['t3unitexplosionxl'].centerflare.properties.maxheat = math.floor(definitions['t3unitexplosionxl'].centerflare.properties.maxheat * size) -definitions['t3unitexplosionxl'].pop1.properties.size = math.floor(definitions['t3unitexplosionxl'].pop1.properties.size * size * 0.7) -definitions['t3unitexplosionxl'].pop1.properties.heat = math.floor(definitions['t3unitexplosionxl'].pop1.properties.heat * size * 0.7) -definitions['t3unitexplosionxl'].pop1.properties.maxheat = math.floor(definitions['t3unitexplosionxl'].pop1.properties.maxheat * size * 0.7) -definitions['t3unitexplosionxl'].groundflash_large.properties.size = math.floor(definitions['t3unitexplosionxl'].groundflash_large.properties.size * size * 0.8) -definitions['t3unitexplosionxl'].groundflash_large.properties.ttl = math.floor(definitions['t3unitexplosionxl'].groundflash_large.properties.ttl * size * 0.7) -definitions['t3unitexplosionxl'].groundflash_white.properties.size = math.floor(definitions['t3unitexplosionxl'].groundflash_white.properties.size * size) -definitions['t3unitexplosionxl'].grounddust.properties.particlesize = math.floor(definitions['t3unitexplosionxl'].grounddust.properties.particlesize * size) -definitions['t3unitexplosionxl'].grounddust.properties.particlespeed = math.floor(definitions['t3unitexplosionxl'].grounddust.properties.particlespeed * size) -definitions['t3unitexplosionxl'].grounddust.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxl'].grounddust.properties.particlespeedspread * size) -definitions['t3unitexplosionxl'].grounddust.properties.particlelife = math.floor(definitions['t3unitexplosionxl'].grounddust.properties.particlelife * size * 0.6) -definitions['t3unitexplosionxl'].bigsmoketrails.properties.length = [[100 r25]] +definitions.t3unitexplosionxl = table.copy(definitions.t3unitexplosion ) +definitions.t3unitexplosionxl .sparks.properties.particlespeed = math.floor(definitions.t3unitexplosionxl .sparks.properties.particlespeed * size) +definitions.t3unitexplosionxl .sparks.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxl .sparks.properties.particlespeedspread * size) +definitions.t3unitexplosionxl .sparks.properties.numparticles = math.floor(definitions.t3unitexplosionxl .sparks.properties.numparticles * size) +definitions.t3unitexplosionxl .explosion.properties.particlespeed = math.floor(definitions.t3unitexplosionxl .explosion.properties.particlespeed * size) +definitions.t3unitexplosionxl .explosion.properties.particlesize = math.floor(definitions.t3unitexplosionxl .explosion.properties.particlesize * size * 0.7) +definitions.t3unitexplosionxl .explosion.properties.particlelife = math.floor(definitions.t3unitexplosionxl .explosion.properties.particlelife * size) +definitions.t3unitexplosionxl .dustparticles.properties.particlespeed = math.floor(definitions.t3unitexplosionxl .dustparticles.properties.particlespeed * size * 0.6) +definitions.t3unitexplosionxl .dustparticles.properties.particlesize = math.floor(definitions.t3unitexplosionxl .dustparticles.properties.particlesize * size * 0.5) +definitions.t3unitexplosionxl .dustparticles.properties.particlelife = math.floor(definitions.t3unitexplosionxl .dustparticles.properties.particlelife * size) +definitions.t3unitexplosionxl .dirt.properties.particlespeed = math.floor(definitions.t3unitexplosionxl .dirt.properties.particlespeed * size * 0.6) +definitions.t3unitexplosionxl .dirt.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxl .dirt.properties.particlespeedspread * size * 0.6) +definitions.t3unitexplosionxl .dirt.properties.numparticles = math.floor(definitions.t3unitexplosionxl .dirt.properties.numparticles * size) +definitions.t3unitexplosionxl .dirt.properties.particlesize = math.floor(definitions.t3unitexplosionxl .dirt.properties.particlesize * size * 0.9) +definitions.t3unitexplosionxl .dirt2.properties.particlespeed = math.floor(definitions.t3unitexplosionxl .dirt2.properties.particlespeed * size * 0.6) +definitions.t3unitexplosionxl .dirt2.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxl .dirt2.properties.particlespeedspread * size * 0.6) +definitions.t3unitexplosionxl .dirt2.properties.numparticles = math.floor(definitions.t3unitexplosionxl .dirt2.properties.numparticles * size) +definitions.t3unitexplosionxl .dirt2.properties.particlesize = math.floor(definitions.t3unitexplosionxl .dirt2.properties.particlesize * size * 0.9) +definitions.t3unitexplosionxl .shockwave.properties.ttl = math.floor(definitions.t3unitexplosionxl .shockwave.properties.ttl * size) +definitions.t3unitexplosionxl .centerflare.properties.size = math.floor(definitions.t3unitexplosionxl .centerflare.properties.size * size * 0.5) +definitions.t3unitexplosionxl .centerflare.properties.heat = math.floor(definitions.t3unitexplosionxl .centerflare.properties.heat * size) +definitions.t3unitexplosionxl .centerflare.properties.maxheat = math.floor(definitions.t3unitexplosionxl .centerflare.properties.maxheat * size) +definitions.t3unitexplosionxl .pop1.properties.size = math.floor(definitions.t3unitexplosionxl .pop1.properties.size * size * 0.7) +definitions.t3unitexplosionxl .pop1.properties.heat = math.floor(definitions.t3unitexplosionxl .pop1.properties.heat * size * 0.7) +definitions.t3unitexplosionxl .pop1.properties.maxheat = math.floor(definitions.t3unitexplosionxl .pop1.properties.maxheat * size * 0.7) +definitions.t3unitexplosionxl .groundflash_large.properties.size = math.floor(definitions.t3unitexplosionxl .groundflash_large.properties.size * size * 0.8) +definitions.t3unitexplosionxl .groundflash_large.properties.ttl = math.floor(definitions.t3unitexplosionxl .groundflash_large.properties.ttl * size * 0.7) +definitions.t3unitexplosionxl .groundflash_white.properties.size = math.floor(definitions.t3unitexplosionxl .groundflash_white.properties.size * size) +definitions.t3unitexplosionxl .grounddust.properties.particlesize = math.floor(definitions.t3unitexplosionxl .grounddust.properties.particlesize * size) +definitions.t3unitexplosionxl .grounddust.properties.particlespeed = math.floor(definitions.t3unitexplosionxl .grounddust.properties.particlespeed * size) +definitions.t3unitexplosionxl .grounddust.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxl .grounddust.properties.particlespeedspread * size) +definitions.t3unitexplosionxl .grounddust.properties.particlelife = math.floor(definitions.t3unitexplosionxl .grounddust.properties.particlelife * size * 0.6) +definitions.t3unitexplosionxl .bigsmoketrails.properties.length = [[100 r25]] local size = 1.7 -definitions['t3unitexplosionxxl'] = table.copy(definitions['t3unitexplosion']) -definitions['t3unitexplosionxxl'].sparks.properties.particlespeed = math.floor(definitions['t3unitexplosionxxl'].sparks.properties.particlespeed * size * 0.9) -definitions['t3unitexplosionxxl'].sparks.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxl'].sparks.properties.particlespeedspread * size) -definitions['t3unitexplosionxxl'].sparks.properties.numparticles = math.floor(definitions['t3unitexplosionxxl'].sparks.properties.numparticles * size) -definitions['t3unitexplosionxxl'].explosion.properties.particlespeed = math.floor(definitions['t3unitexplosionxxl'].explosion.properties.particlespeed * size) -definitions['t3unitexplosionxxl'].explosion.properties.particlesize = math.floor(definitions['t3unitexplosionxxl'].explosion.properties.particlesize * size * 0.9) -definitions['t3unitexplosionxxl'].explosion.properties.particlelife = math.floor(definitions['t3unitexplosionxxl'].explosion.properties.particlelife * size) -definitions['t3unitexplosionxxl'].dustparticles.properties.particlespeed = math.floor(definitions['t3unitexplosionxxl'].dustparticles.properties.particlespeed * size * 0.8) -definitions['t3unitexplosionxxl'].dustparticles.properties.particlesize = math.floor(definitions['t3unitexplosionxxl'].dustparticles.properties.particlesize * size * 0.7) -definitions['t3unitexplosionxxl'].dustparticles.properties.particlelife = math.floor(definitions['t3unitexplosionxxl'].dustparticles.properties.particlelife * size) -definitions['t3unitexplosionxxl'].dirt.properties.particlespeed = math.floor(definitions['t3unitexplosionxxl'].dirt.properties.particlespeed * size * 0.7) -definitions['t3unitexplosionxxl'].dirt.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxl'].dirt.properties.particlespeedspread * size * 0.6) -definitions['t3unitexplosionxxl'].dirt.properties.numparticles = math.floor(definitions['t3unitexplosionxxl'].dirt.properties.numparticles * size) -definitions['t3unitexplosionxxl'].dirt.properties.particlesize = math.floor(definitions['t3unitexplosionxxl'].dirt.properties.particlesize * size * 0.85) -definitions['t3unitexplosionxxl'].dirt2.properties.particlespeed = math.floor(definitions['t3unitexplosionxxl'].dirt2.properties.particlespeed * size * 0.8) -definitions['t3unitexplosionxxl'].dirt2.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxl'].dirt2.properties.particlespeedspread * size * 0.6) -definitions['t3unitexplosionxxl'].dirt2.properties.numparticles = math.floor(definitions['t3unitexplosionxxl'].dirt2.properties.numparticles * size) -definitions['t3unitexplosionxxl'].dirt2.properties.particlesize = math.floor(definitions['t3unitexplosionxl'].dirt2.properties.particlesize * size * 0.85) -definitions['t3unitexplosionxxl'].shockwave.properties.ttl = math.floor(definitions['t3unitexplosionxxl'].shockwave.properties.ttl * size * 1.05) -definitions['t3unitexplosionxxl'].shockwave.properties.size = math.floor(definitions['t3unitexplosionxxl'].shockwave.properties.size * size * 0.9) -definitions['t3unitexplosionxxl'].centerflare.properties.size = math.floor(definitions['t3unitexplosionxxl'].centerflare.properties.size * size * 0.8) -definitions['t3unitexplosionxxl'].centerflare.properties.heat = math.floor(definitions['t3unitexplosionxxl'].centerflare.properties.heat * size) -definitions['t3unitexplosionxxl'].centerflare.properties.maxheat = math.floor(definitions['t3unitexplosionxxl'].centerflare.properties.maxheat * size) -definitions['t3unitexplosionxxl'].pop1.properties.size = math.floor(definitions['t3unitexplosionxxl'].pop1.properties.size * size * 0.8) -definitions['t3unitexplosionxxl'].pop1.properties.heat = math.floor(definitions['t3unitexplosionxxl'].pop1.properties.heat * size * 0.6) -definitions['t3unitexplosionxxl'].pop1.properties.maxheat = math.floor(definitions['t3unitexplosionxxl'].pop1.properties.maxheat * size * 0.7) -definitions['t3unitexplosionxxl'].groundflash_large.properties.size = math.floor(definitions['t3unitexplosionxxl'].groundflash_large.properties.size * size * 0.8) -definitions['t3unitexplosionxxl'].groundflash_large.properties.ttl = math.floor(definitions['t3unitexplosionxxl'].groundflash_large.properties.ttl * size * 0.8) -definitions['t3unitexplosionxxl'].groundflash_white.properties.size = math.floor(definitions['t3unitexplosionxxl'].groundflash_white.properties.size * size) -definitions['t3unitexplosionxxl'].grounddust.properties.particlesize = math.floor(definitions['t3unitexplosionxxl'].grounddust.properties.particlesize * size) -definitions['t3unitexplosionxxl'].grounddust.properties.particlespeed = math.floor(definitions['t3unitexplosionxxl'].grounddust.properties.particlespeed * size) -definitions['t3unitexplosionxxl'].grounddust.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxl'].grounddust.properties.particlespeedspread * size) -definitions['t3unitexplosionxxl'].grounddust.properties.particlelife = math.floor(definitions['t3unitexplosionxxl'].grounddust.properties.particlelife * size * 0.7) -definitions['t3unitexplosionxxl'].bigsmoketrails.properties.length = [[110 r28]] +definitions.t3unitexplosionxxl = table.copy(definitions.t3unitexplosion ) +definitions.t3unitexplosionxxl .sparks.properties.particlespeed = math.floor(definitions.t3unitexplosionxxl .sparks.properties.particlespeed * size * 0.9) +definitions.t3unitexplosionxxl .sparks.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxl .sparks.properties.particlespeedspread * size) +definitions.t3unitexplosionxxl .sparks.properties.numparticles = math.floor(definitions.t3unitexplosionxxl .sparks.properties.numparticles * size) +definitions.t3unitexplosionxxl .explosion.properties.particlespeed = math.floor(definitions.t3unitexplosionxxl .explosion.properties.particlespeed * size) +definitions.t3unitexplosionxxl .explosion.properties.particlesize = math.floor(definitions.t3unitexplosionxxl .explosion.properties.particlesize * size * 0.9) +definitions.t3unitexplosionxxl .explosion.properties.particlelife = math.floor(definitions.t3unitexplosionxxl .explosion.properties.particlelife * size) +definitions.t3unitexplosionxxl .dustparticles.properties.particlespeed = math.floor(definitions.t3unitexplosionxxl .dustparticles.properties.particlespeed * size * 0.8) +definitions.t3unitexplosionxxl .dustparticles.properties.particlesize = math.floor(definitions.t3unitexplosionxxl .dustparticles.properties.particlesize * size * 0.7) +definitions.t3unitexplosionxxl .dustparticles.properties.particlelife = math.floor(definitions.t3unitexplosionxxl .dustparticles.properties.particlelife * size) +definitions.t3unitexplosionxxl .dirt.properties.particlespeed = math.floor(definitions.t3unitexplosionxxl .dirt.properties.particlespeed * size * 0.7) +definitions.t3unitexplosionxxl .dirt.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxl .dirt.properties.particlespeedspread * size * 0.6) +definitions.t3unitexplosionxxl .dirt.properties.numparticles = math.floor(definitions.t3unitexplosionxxl .dirt.properties.numparticles * size) +definitions.t3unitexplosionxxl .dirt.properties.particlesize = math.floor(definitions.t3unitexplosionxxl .dirt.properties.particlesize * size * 0.85) +definitions.t3unitexplosionxxl .dirt2.properties.particlespeed = math.floor(definitions.t3unitexplosionxxl .dirt2.properties.particlespeed * size * 0.8) +definitions.t3unitexplosionxxl .dirt2.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxl .dirt2.properties.particlespeedspread * size * 0.6) +definitions.t3unitexplosionxxl .dirt2.properties.numparticles = math.floor(definitions.t3unitexplosionxxl .dirt2.properties.numparticles * size) +definitions.t3unitexplosionxxl .dirt2.properties.particlesize = math.floor(definitions.t3unitexplosionxl .dirt2.properties.particlesize * size * 0.85) +definitions.t3unitexplosionxxl .shockwave.properties.ttl = math.floor(definitions.t3unitexplosionxxl .shockwave.properties.ttl * size * 1.05) +definitions.t3unitexplosionxxl .shockwave.properties.size = math.floor(definitions.t3unitexplosionxxl .shockwave.properties.size * size * 0.9) +definitions.t3unitexplosionxxl .centerflare.properties.size = math.floor(definitions.t3unitexplosionxxl .centerflare.properties.size * size * 0.8) +definitions.t3unitexplosionxxl .centerflare.properties.heat = math.floor(definitions.t3unitexplosionxxl .centerflare.properties.heat * size) +definitions.t3unitexplosionxxl .centerflare.properties.maxheat = math.floor(definitions.t3unitexplosionxxl .centerflare.properties.maxheat * size) +definitions.t3unitexplosionxxl .pop1.properties.size = math.floor(definitions.t3unitexplosionxxl .pop1.properties.size * size * 0.8) +definitions.t3unitexplosionxxl .pop1.properties.heat = math.floor(definitions.t3unitexplosionxxl .pop1.properties.heat * size * 0.6) +definitions.t3unitexplosionxxl .pop1.properties.maxheat = math.floor(definitions.t3unitexplosionxxl .pop1.properties.maxheat * size * 0.7) +definitions.t3unitexplosionxxl .groundflash_large.properties.size = math.floor(definitions.t3unitexplosionxxl .groundflash_large.properties.size * size * 0.8) +definitions.t3unitexplosionxxl .groundflash_large.properties.ttl = math.floor(definitions.t3unitexplosionxxl .groundflash_large.properties.ttl * size * 0.8) +definitions.t3unitexplosionxxl .groundflash_white.properties.size = math.floor(definitions.t3unitexplosionxxl .groundflash_white.properties.size * size) +definitions.t3unitexplosionxxl .grounddust.properties.particlesize = math.floor(definitions.t3unitexplosionxxl .grounddust.properties.particlesize * size) +definitions.t3unitexplosionxxl .grounddust.properties.particlespeed = math.floor(definitions.t3unitexplosionxxl .grounddust.properties.particlespeed * size) +definitions.t3unitexplosionxxl .grounddust.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxl .grounddust.properties.particlespeedspread * size) +definitions.t3unitexplosionxxl .grounddust.properties.particlelife = math.floor(definitions.t3unitexplosionxxl .grounddust.properties.particlelife * size * 0.7) +definitions.t3unitexplosionxxl .bigsmoketrails.properties.length = [[110 r28]] local size = 2.2 -definitions['t3unitexplosionxxxl'] = table.copy(definitions['t3unitexplosion']) -definitions['t3unitexplosionxxxl'].sparks.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxl'].sparks.properties.particlespeed * size * 0.8) -definitions['t3unitexplosionxxxl'].sparks.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxl'].sparks.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxl'].sparks.properties.numparticles = math.floor(definitions['t3unitexplosionxxxl'].sparks.properties.numparticles * size) -definitions['t3unitexplosionxxxl'].explosion.properties.numparticles = math.floor(definitions['t3unitexplosionxxxl'].explosion.properties.numparticles * size) -definitions['t3unitexplosionxxxl'].explosion.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxl'].explosion.properties.particlespeed * size) -definitions['t3unitexplosionxxxl'].explosion.properties.particlesize = math.floor(definitions['t3unitexplosionxxxl'].explosion.properties.particlesize * size * 0.7) -definitions['t3unitexplosionxxxl'].explosion.properties.particlelife = math.floor(definitions['t3unitexplosionxxxl'].explosion.properties.particlelife * size) -definitions['t3unitexplosionxxxl'].dustparticles.properties.numparticles = math.floor(definitions['t3unitexplosionxxxl'].dustparticles.properties.numparticles * size) -definitions['t3unitexplosionxxxl'].dustparticles.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxl'].dustparticles.properties.particlespeed * size * 0.9) -definitions['t3unitexplosionxxxl'].dustparticles.properties.particlesize = math.floor(definitions['t3unitexplosionxxxl'].dustparticles.properties.particlesize * size * 0.9) -definitions['t3unitexplosionxxxl'].dustparticles.properties.particlelife = math.floor(definitions['t3unitexplosionxxxl'].dustparticles.properties.particlelife * size * 1.2) -definitions['t3unitexplosionxxxl'].dirt.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxl'].dirt.properties.particlespeed * size * 0.6) -definitions['t3unitexplosionxxxl'].dirt.properties.particlesize = math.floor(definitions['t3unitexplosionxxxl'].dirt.properties.particlesize * size * 0.8) -definitions['t3unitexplosionxxxl'].dirt.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxl'].dirt.properties.particlespeedspread * size * 0.6) -definitions['t3unitexplosionxxxl'].dirt.properties.numparticles = math.floor(definitions['t3unitexplosionxxxl'].dirt.properties.numparticles * size) -definitions['t3unitexplosionxxxl'].dirt2.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxl'].dirt2.properties.particlespeed * size * 0.6) -definitions['t3unitexplosionxxxl'].dirt2.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxl'].dirt2.properties.particlespeedspread * size * 0.6) -definitions['t3unitexplosionxxxl'].dirt2.properties.numparticles = math.floor(definitions['t3unitexplosionxxxl'].dirt2.properties.numparticles * size) -definitions['t3unitexplosionxxxl'].dirt2.properties.particlesize = math.floor(definitions['t3unitexplosionxxxl'].dirt2.properties.particlesize * size * 0.8) -definitions['t3unitexplosionxxxl'].shockwave.properties.ttl = math.floor(definitions['t3unitexplosionxxxl'].shockwave.properties.ttl * size * 0.8) -definitions['t3unitexplosionxxxl'].shockwave.properties.size = math.floor(definitions['t3unitexplosionxxxl'].shockwave.properties.size * size) -definitions['t3unitexplosionxxxl'].centerflare.properties.size = math.floor(definitions['t3unitexplosionxxxl'].centerflare.properties.size * size * 0.5) -definitions['t3unitexplosionxxxl'].centerflare.properties.heat = math.floor(definitions['t3unitexplosionxxxl'].centerflare.properties.heat * size) -definitions['t3unitexplosionxxxl'].centerflare.properties.maxheat = math.floor(definitions['t3unitexplosionxxxl'].centerflare.properties.maxheat * size) -definitions['t3unitexplosionxxxl'].pop1.properties.size = math.floor(definitions['t3unitexplosionxxxl'].pop1.properties.size * size * 0.8) -definitions['t3unitexplosionxxxl'].pop1.properties.heat = math.floor(definitions['t3unitexplosionxxxl'].pop1.properties.heat * size * 0.5) -definitions['t3unitexplosionxxxl'].pop1.properties.maxheat = math.floor(definitions['t3unitexplosionxxxl'].pop1.properties.maxheat * size * 0.6) -definitions['t3unitexplosionxxxl'].groundflash_large.properties.size = math.floor(definitions['t3unitexplosionxxxl'].groundflash_large.properties.size * size * 0.8) -definitions['t3unitexplosionxxxl'].groundflash_large.properties.ttl = math.floor(definitions['t3unitexplosionxxxl'].groundflash_large.properties.ttl * size * 0.7) -definitions['t3unitexplosionxxxl'].groundflash_white.properties.size = math.floor(definitions['t3unitexplosionxxxl'].groundflash_white.properties.size * size) -definitions['t3unitexplosionxxxl'].grounddust.properties.numparticles = math.floor(definitions['t3unitexplosionxxxl'].grounddust.properties.numparticles * size * 1.2) -definitions['t3unitexplosionxxxl'].grounddust.properties.particlesize = math.floor(definitions['t3unitexplosionxxxl'].grounddust.properties.particlesize * size * 1.2) -definitions['t3unitexplosionxxxl'].grounddust.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxl'].grounddust.properties.particlespeed * size * 1.2) -definitions['t3unitexplosionxxxl'].grounddust.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxl'].grounddust.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxl'].grounddust.properties.particlelife = math.floor(definitions['t3unitexplosionxxxl'].grounddust.properties.particlelife * size * 0.9) -definitions['t3unitexplosionxxxl'].clouddust.properties.numparticles = math.floor(definitions['t3unitexplosionxxxl'].clouddust.properties.numparticles * size * 1.2) -definitions['t3unitexplosionxxxl'].clouddust.properties.particlesize = math.floor(definitions['t3unitexplosionxxxl'].clouddust.properties.particlesize * size * 1.2) -definitions['t3unitexplosionxxxl'].clouddust.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxl'].clouddust.properties.particlespeed * size * 1.4) -definitions['t3unitexplosionxxxl'].clouddust.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxl'].clouddust.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxl'].clouddust.properties.particlelife = math.floor(definitions['t3unitexplosionxxxl'].clouddust.properties.particlelife * size * 1.2) -definitions['t3unitexplosionxxxl'].innersmoke.properties.numparticles = math.floor(definitions['t3unitexplosionxxxl'].innersmoke.properties.numparticles * size * 1.2) -definitions['t3unitexplosionxxxl'].innersmoke.properties.particlesize = math.floor(definitions['t3unitexplosionxxxl'].innersmoke.properties.particlesize * size * 1.2) -definitions['t3unitexplosionxxxl'].innersmoke.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxl'].innersmoke.properties.particlespeed * size * 1.4) -definitions['t3unitexplosionxxxl'].innersmoke.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxl'].innersmoke.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxl'].innersmoke.properties.particlelife = math.floor(definitions['t3unitexplosionxxxl'].innersmoke.properties.particlelife * size * 0.9) -definitions['t3unitexplosionxxxl'].outersmoke.properties.numparticles = math.floor(definitions['t3unitexplosionxxxl'].outersmoke.properties.numparticles * size * 1.2) -definitions['t3unitexplosionxxxl'].outersmoke.properties.particlesize = math.floor(definitions['t3unitexplosionxxxl'].outersmoke.properties.particlesize * size * 1.2) -definitions['t3unitexplosionxxxl'].outersmoke.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxl'].outersmoke.properties.particlespeed * size * 1.4) -definitions['t3unitexplosionxxxl'].outersmoke.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxl'].outersmoke.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxl'].outersmoke.properties.particlelife = math.floor(definitions['t3unitexplosionxxxl'].outersmoke.properties.particlelife * size * 0.9) -definitions['t3unitexplosionxxxl'].bigsmoketrails.properties.length = [[140 r35]] +definitions.t3unitexplosionxxxl = table.copy(definitions.t3unitexplosion ) +definitions.t3unitexplosionxxxl .sparks.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxl .sparks.properties.particlespeed * size * 0.8) +definitions.t3unitexplosionxxxl .sparks.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxl .sparks.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxl .sparks.properties.numparticles = math.floor(definitions.t3unitexplosionxxxl .sparks.properties.numparticles * size) +definitions.t3unitexplosionxxxl .explosion.properties.numparticles = math.floor(definitions.t3unitexplosionxxxl .explosion.properties.numparticles * size) +definitions.t3unitexplosionxxxl .explosion.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxl .explosion.properties.particlespeed * size) +definitions.t3unitexplosionxxxl .explosion.properties.particlesize = math.floor(definitions.t3unitexplosionxxxl .explosion.properties.particlesize * size * 0.7) +definitions.t3unitexplosionxxxl .explosion.properties.particlelife = math.floor(definitions.t3unitexplosionxxxl .explosion.properties.particlelife * size) +definitions.t3unitexplosionxxxl .dustparticles.properties.numparticles = math.floor(definitions.t3unitexplosionxxxl .dustparticles.properties.numparticles * size) +definitions.t3unitexplosionxxxl .dustparticles.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxl .dustparticles.properties.particlespeed * size * 0.9) +definitions.t3unitexplosionxxxl .dustparticles.properties.particlesize = math.floor(definitions.t3unitexplosionxxxl .dustparticles.properties.particlesize * size * 0.9) +definitions.t3unitexplosionxxxl .dustparticles.properties.particlelife = math.floor(definitions.t3unitexplosionxxxl .dustparticles.properties.particlelife * size * 1.2) +definitions.t3unitexplosionxxxl .dirt.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxl .dirt.properties.particlespeed * size * 0.6) +definitions.t3unitexplosionxxxl .dirt.properties.particlesize = math.floor(definitions.t3unitexplosionxxxl .dirt.properties.particlesize * size * 0.8) +definitions.t3unitexplosionxxxl .dirt.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxl .dirt.properties.particlespeedspread * size * 0.6) +definitions.t3unitexplosionxxxl .dirt.properties.numparticles = math.floor(definitions.t3unitexplosionxxxl .dirt.properties.numparticles * size) +definitions.t3unitexplosionxxxl .dirt2.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxl .dirt2.properties.particlespeed * size * 0.6) +definitions.t3unitexplosionxxxl .dirt2.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxl .dirt2.properties.particlespeedspread * size * 0.6) +definitions.t3unitexplosionxxxl .dirt2.properties.numparticles = math.floor(definitions.t3unitexplosionxxxl .dirt2.properties.numparticles * size) +definitions.t3unitexplosionxxxl .dirt2.properties.particlesize = math.floor(definitions.t3unitexplosionxxxl .dirt2.properties.particlesize * size * 0.8) +definitions.t3unitexplosionxxxl .shockwave.properties.ttl = math.floor(definitions.t3unitexplosionxxxl .shockwave.properties.ttl * size * 0.8) +definitions.t3unitexplosionxxxl .shockwave.properties.size = math.floor(definitions.t3unitexplosionxxxl .shockwave.properties.size * size) +definitions.t3unitexplosionxxxl .centerflare.properties.size = math.floor(definitions.t3unitexplosionxxxl .centerflare.properties.size * size * 0.5) +definitions.t3unitexplosionxxxl .centerflare.properties.heat = math.floor(definitions.t3unitexplosionxxxl .centerflare.properties.heat * size) +definitions.t3unitexplosionxxxl .centerflare.properties.maxheat = math.floor(definitions.t3unitexplosionxxxl .centerflare.properties.maxheat * size) +definitions.t3unitexplosionxxxl .pop1.properties.size = math.floor(definitions.t3unitexplosionxxxl .pop1.properties.size * size * 0.8) +definitions.t3unitexplosionxxxl .pop1.properties.heat = math.floor(definitions.t3unitexplosionxxxl .pop1.properties.heat * size * 0.5) +definitions.t3unitexplosionxxxl .pop1.properties.maxheat = math.floor(definitions.t3unitexplosionxxxl .pop1.properties.maxheat * size * 0.6) +definitions.t3unitexplosionxxxl .groundflash_large.properties.size = math.floor(definitions.t3unitexplosionxxxl .groundflash_large.properties.size * size * 0.8) +definitions.t3unitexplosionxxxl .groundflash_large.properties.ttl = math.floor(definitions.t3unitexplosionxxxl .groundflash_large.properties.ttl * size * 0.7) +definitions.t3unitexplosionxxxl .groundflash_white.properties.size = math.floor(definitions.t3unitexplosionxxxl .groundflash_white.properties.size * size) +definitions.t3unitexplosionxxxl .grounddust.properties.numparticles = math.floor(definitions.t3unitexplosionxxxl .grounddust.properties.numparticles * size * 1.2) +definitions.t3unitexplosionxxxl .grounddust.properties.particlesize = math.floor(definitions.t3unitexplosionxxxl .grounddust.properties.particlesize * size * 1.2) +definitions.t3unitexplosionxxxl .grounddust.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxl .grounddust.properties.particlespeed * size * 1.2) +definitions.t3unitexplosionxxxl .grounddust.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxl .grounddust.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxl .grounddust.properties.particlelife = math.floor(definitions.t3unitexplosionxxxl .grounddust.properties.particlelife * size * 0.9) +definitions.t3unitexplosionxxxl .clouddust.properties.numparticles = math.floor(definitions.t3unitexplosionxxxl .clouddust.properties.numparticles * size * 1.2) +definitions.t3unitexplosionxxxl .clouddust.properties.particlesize = math.floor(definitions.t3unitexplosionxxxl .clouddust.properties.particlesize * size * 1.2) +definitions.t3unitexplosionxxxl .clouddust.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxl .clouddust.properties.particlespeed * size * 1.4) +definitions.t3unitexplosionxxxl .clouddust.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxl .clouddust.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxl .clouddust.properties.particlelife = math.floor(definitions.t3unitexplosionxxxl .clouddust.properties.particlelife * size * 1.2) +definitions.t3unitexplosionxxxl .innersmoke.properties.numparticles = math.floor(definitions.t3unitexplosionxxxl .innersmoke.properties.numparticles * size * 1.2) +definitions.t3unitexplosionxxxl .innersmoke.properties.particlesize = math.floor(definitions.t3unitexplosionxxxl .innersmoke.properties.particlesize * size * 1.2) +definitions.t3unitexplosionxxxl .innersmoke.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxl .innersmoke.properties.particlespeed * size * 1.4) +definitions.t3unitexplosionxxxl .innersmoke.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxl .innersmoke.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxl .innersmoke.properties.particlelife = math.floor(definitions.t3unitexplosionxxxl .innersmoke.properties.particlelife * size * 0.9) +definitions.t3unitexplosionxxxl .outersmoke.properties.numparticles = math.floor(definitions.t3unitexplosionxxxl .outersmoke.properties.numparticles * size * 1.2) +definitions.t3unitexplosionxxxl .outersmoke.properties.particlesize = math.floor(definitions.t3unitexplosionxxxl .outersmoke.properties.particlesize * size * 1.2) +definitions.t3unitexplosionxxxl .outersmoke.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxl .outersmoke.properties.particlespeed * size * 1.4) +definitions.t3unitexplosionxxxl .outersmoke.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxl .outersmoke.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxl .outersmoke.properties.particlelife = math.floor(definitions.t3unitexplosionxxxl .outersmoke.properties.particlelife * size * 0.9) +definitions.t3unitexplosionxxxl .bigsmoketrails.properties.length = [[140 r35]] local size = 2.6 -definitions['t3unitexplosionxxxxl'] = table.copy(definitions['t3unitexplosion']) -definitions['t3unitexplosionxxxxl'].sparks.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxl'].sparks.properties.numparticles * size) -definitions['t3unitexplosionxxxxl'].sparks.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxl'].sparks.properties.particlespeed * size * 0.6) -definitions['t3unitexplosionxxxxl'].sparks.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxl'].sparks.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxxl'].explosion.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxl'].explosion.properties.numparticles * size * 0.5) -definitions['t3unitexplosionxxxxl'].explosion.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxl'].explosion.properties.particlespeed * size * 1.8) -definitions['t3unitexplosionxxxxl'].explosion.properties.particlesize = math.floor(definitions['t3unitexplosionxxxxl'].explosion.properties.particlesize * size * 0.7) -definitions['t3unitexplosionxxxxl'].explosion.properties.particlelife = math.floor(definitions['t3unitexplosionxxxxl'].explosion.properties.particlelife * size * 0.8) -definitions['t3unitexplosionxxxxl'].dustparticles.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxl'].dustparticles.properties.numparticles * size) -definitions['t3unitexplosionxxxxl'].dustparticles.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxl'].dustparticles.properties.particlespeed * size * 0.8) -definitions['t3unitexplosionxxxxl'].dustparticles.properties.particlesize = math.floor(definitions['t3unitexplosionxxxxl'].dustparticles.properties.particlesize * size * 0.7) -definitions['t3unitexplosionxxxxl'].dustparticles.properties.particlelife = math.floor(definitions['t3unitexplosionxxxxl'].dustparticles.properties.particlelife * size) -definitions['t3unitexplosionxxxxl'].dirt.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxl'].dirt.properties.particlespeed * size * 0.8) -definitions['t3unitexplosionxxxxl'].dirt.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxl'].dirt.properties.particlespeedspread * size * 0.8) -definitions['t3unitexplosionxxxxl'].dirt.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxl'].dirt.properties.numparticles * size) -definitions['t3unitexplosionxxxxl'].dirt2.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxl'].dirt2.properties.particlespeed * size * 0.8) -definitions['t3unitexplosionxxxxl'].dirt2.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxl'].dirt2.properties.particlespeedspread * size * 08) -definitions['t3unitexplosionxxxxl'].dirt2.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxl'].dirt2.properties.numparticles * size) -definitions['t3unitexplosionxxxxl'].shockwave.properties.ttl = math.floor(definitions['t3unitexplosionxxxxl'].shockwave.properties.ttl * size * 0.93) -definitions['t3unitexplosionxxxxl'].shockwave.properties.size = math.floor(definitions['t3unitexplosionxxxxl'].shockwave.properties.size * size * 0.85) -definitions['t3unitexplosionxxxxl'].centerflare.properties.size = math.floor(definitions['t3unitexplosionxxxxl'].centerflare.properties.size * size * 0.7) -definitions['t3unitexplosionxxxxl'].centerflare.properties.heat = math.floor(definitions['t3unitexplosionxxxxl'].centerflare.properties.heat * size * 0.7) -definitions['t3unitexplosionxxxxl'].centerflare.properties.maxheat = math.floor(definitions['t3unitexplosionxxxxl'].centerflare.properties.maxheat * size * 0.7) -definitions['t3unitexplosionxxxxl'].pop1.properties.size = math.floor(definitions['t3unitexplosionxxxxl'].pop1.properties.size * size * 0.8) -definitions['t3unitexplosionxxxxl'].pop1.properties.heat = math.floor(definitions['t3unitexplosionxxxxl'].pop1.properties.heat * size * 0.5) -definitions['t3unitexplosionxxxxl'].pop1.properties.maxheat = math.floor(definitions['t3unitexplosionxxxxl'].pop1.properties.maxheat * size * 0.6) -definitions['t3unitexplosionxxxxl'].groundflash_large.properties.size = math.floor(definitions['t3unitexplosionxxxxl'].groundflash_large.properties.size * size * 0.9) -definitions['t3unitexplosionxxxxl'].groundflash_large.properties.ttl = math.floor(definitions['t3unitexplosionxxxxl'].groundflash_large.properties.ttl * size * 0.8) -definitions['t3unitexplosionxxxxl'].groundflash_white.properties.size = math.floor(definitions['t3unitexplosionxxxxl'].groundflash_white.properties.size * size) -definitions['t3unitexplosionxxxxl'].grounddust.properties.particlesize = math.floor(definitions['t3unitexplosionxxxxl'].grounddust.properties.particlesize * size) -definitions['t3unitexplosionxxxxl'].grounddust.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxl'].grounddust.properties.particlespeed * size) -definitions['t3unitexplosionxxxxl'].grounddust.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxl'].grounddust.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxxl'].grounddust.properties.particlelife = math.floor(definitions['t3unitexplosionxxxxl'].grounddust.properties.particlelife * size * 0.8) -definitions['t3unitexplosionxxxxl'].clouddust.properties.particlesize = math.floor(definitions['t3unitexplosionxxxxl'].clouddust.properties.particlesize * size * 1.2) -definitions['t3unitexplosionxxxxl'].clouddust.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxl'].clouddust.properties.particlespeed * size * 1.4) -definitions['t3unitexplosionxxxxl'].clouddust.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxl'].clouddust.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxxl'].clouddust.properties.particlelife = math.floor(definitions['t3unitexplosionxxxxl'].clouddust.properties.particlelife * size * 0.9) -definitions['t3unitexplosionxxxxl'].innersmoke.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxl'].innersmoke.properties.numparticles * size * 1.2) -definitions['t3unitexplosionxxxxl'].innersmoke.properties.particlesize = math.floor(definitions['t3unitexplosionxxxxl'].innersmoke.properties.particlesize * size * 1.2) -definitions['t3unitexplosionxxxxl'].innersmoke.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxl'].innersmoke.properties.particlespeed * size * 1.4) -definitions['t3unitexplosionxxxxl'].innersmoke.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxl'].innersmoke.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxxl'].innersmoke.properties.particlelife = math.floor(definitions['t3unitexplosionxxxxl'].innersmoke.properties.particlelife * size * 0.9) -definitions['t3unitexplosionxxxxl'].outersmoke.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxl'].outersmoke.properties.numparticles * size * 1.2) -definitions['t3unitexplosionxxxxl'].outersmoke.properties.particlesize = math.floor(definitions['t3unitexplosionxxxxl'].outersmoke.properties.particlesize * size * 1.2) -definitions['t3unitexplosionxxxxl'].outersmoke.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxl'].outersmoke.properties.particlespeed * size * 1.4) -definitions['t3unitexplosionxxxxl'].outersmoke.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxl'].outersmoke.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxxl'].outersmoke.properties.particlelife = math.floor(definitions['t3unitexplosionxxxxl'].outersmoke.properties.particlelife * size * 0.9) -definitions['t3unitexplosionxxxxl'].bigsmoketrails.properties.length = [[160 r40]] -definitions['t3unitexplosionxxxxl'].bigsmoketrails.properties.ttl = [[52 r10]] +definitions.t3unitexplosionxxxxl = table.copy(definitions.t3unitexplosion ) +definitions.t3unitexplosionxxxxl .sparks.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxl .sparks.properties.numparticles * size) +definitions.t3unitexplosionxxxxl .sparks.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxl .sparks.properties.particlespeed * size * 0.6) +definitions.t3unitexplosionxxxxl .sparks.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxl .sparks.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxxl .explosion.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxl .explosion.properties.numparticles * size * 0.5) +definitions.t3unitexplosionxxxxl .explosion.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxl .explosion.properties.particlespeed * size * 1.8) +definitions.t3unitexplosionxxxxl .explosion.properties.particlesize = math.floor(definitions.t3unitexplosionxxxxl .explosion.properties.particlesize * size * 0.7) +definitions.t3unitexplosionxxxxl .explosion.properties.particlelife = math.floor(definitions.t3unitexplosionxxxxl .explosion.properties.particlelife * size * 0.8) +definitions.t3unitexplosionxxxxl .dustparticles.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxl .dustparticles.properties.numparticles * size) +definitions.t3unitexplosionxxxxl .dustparticles.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxl .dustparticles.properties.particlespeed * size * 0.8) +definitions.t3unitexplosionxxxxl .dustparticles.properties.particlesize = math.floor(definitions.t3unitexplosionxxxxl .dustparticles.properties.particlesize * size * 0.7) +definitions.t3unitexplosionxxxxl .dustparticles.properties.particlelife = math.floor(definitions.t3unitexplosionxxxxl .dustparticles.properties.particlelife * size) +definitions.t3unitexplosionxxxxl .dirt.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxl .dirt.properties.particlespeed * size * 0.8) +definitions.t3unitexplosionxxxxl .dirt.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxl .dirt.properties.particlespeedspread * size * 0.8) +definitions.t3unitexplosionxxxxl .dirt.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxl .dirt.properties.numparticles * size) +definitions.t3unitexplosionxxxxl .dirt2.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxl .dirt2.properties.particlespeed * size * 0.8) +definitions.t3unitexplosionxxxxl .dirt2.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxl .dirt2.properties.particlespeedspread * size * 08) +definitions.t3unitexplosionxxxxl .dirt2.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxl .dirt2.properties.numparticles * size) +definitions.t3unitexplosionxxxxl .shockwave.properties.ttl = math.floor(definitions.t3unitexplosionxxxxl .shockwave.properties.ttl * size * 0.93) +definitions.t3unitexplosionxxxxl .shockwave.properties.size = math.floor(definitions.t3unitexplosionxxxxl .shockwave.properties.size * size * 0.85) +definitions.t3unitexplosionxxxxl .centerflare.properties.size = math.floor(definitions.t3unitexplosionxxxxl .centerflare.properties.size * size * 0.7) +definitions.t3unitexplosionxxxxl .centerflare.properties.heat = math.floor(definitions.t3unitexplosionxxxxl .centerflare.properties.heat * size * 0.7) +definitions.t3unitexplosionxxxxl .centerflare.properties.maxheat = math.floor(definitions.t3unitexplosionxxxxl .centerflare.properties.maxheat * size * 0.7) +definitions.t3unitexplosionxxxxl .pop1.properties.size = math.floor(definitions.t3unitexplosionxxxxl .pop1.properties.size * size * 0.8) +definitions.t3unitexplosionxxxxl .pop1.properties.heat = math.floor(definitions.t3unitexplosionxxxxl .pop1.properties.heat * size * 0.5) +definitions.t3unitexplosionxxxxl .pop1.properties.maxheat = math.floor(definitions.t3unitexplosionxxxxl .pop1.properties.maxheat * size * 0.6) +definitions.t3unitexplosionxxxxl .groundflash_large.properties.size = math.floor(definitions.t3unitexplosionxxxxl .groundflash_large.properties.size * size * 0.9) +definitions.t3unitexplosionxxxxl .groundflash_large.properties.ttl = math.floor(definitions.t3unitexplosionxxxxl .groundflash_large.properties.ttl * size * 0.8) +definitions.t3unitexplosionxxxxl .groundflash_white.properties.size = math.floor(definitions.t3unitexplosionxxxxl .groundflash_white.properties.size * size) +definitions.t3unitexplosionxxxxl .grounddust.properties.particlesize = math.floor(definitions.t3unitexplosionxxxxl .grounddust.properties.particlesize * size) +definitions.t3unitexplosionxxxxl .grounddust.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxl .grounddust.properties.particlespeed * size) +definitions.t3unitexplosionxxxxl .grounddust.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxl .grounddust.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxxl .grounddust.properties.particlelife = math.floor(definitions.t3unitexplosionxxxxl .grounddust.properties.particlelife * size * 0.8) +definitions.t3unitexplosionxxxxl .clouddust.properties.particlesize = math.floor(definitions.t3unitexplosionxxxxl .clouddust.properties.particlesize * size * 1.2) +definitions.t3unitexplosionxxxxl .clouddust.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxl .clouddust.properties.particlespeed * size * 1.4) +definitions.t3unitexplosionxxxxl .clouddust.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxl .clouddust.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxxl .clouddust.properties.particlelife = math.floor(definitions.t3unitexplosionxxxxl .clouddust.properties.particlelife * size * 0.9) +definitions.t3unitexplosionxxxxl .innersmoke.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxl .innersmoke.properties.numparticles * size * 1.2) +definitions.t3unitexplosionxxxxl .innersmoke.properties.particlesize = math.floor(definitions.t3unitexplosionxxxxl .innersmoke.properties.particlesize * size * 1.2) +definitions.t3unitexplosionxxxxl .innersmoke.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxl .innersmoke.properties.particlespeed * size * 1.4) +definitions.t3unitexplosionxxxxl .innersmoke.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxl .innersmoke.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxxl .innersmoke.properties.particlelife = math.floor(definitions.t3unitexplosionxxxxl .innersmoke.properties.particlelife * size * 0.9) +definitions.t3unitexplosionxxxxl .outersmoke.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxl .outersmoke.properties.numparticles * size * 1.2) +definitions.t3unitexplosionxxxxl .outersmoke.properties.particlesize = math.floor(definitions.t3unitexplosionxxxxl .outersmoke.properties.particlesize * size * 1.2) +definitions.t3unitexplosionxxxxl .outersmoke.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxl .outersmoke.properties.particlespeed * size * 1.4) +definitions.t3unitexplosionxxxxl .outersmoke.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxl .outersmoke.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxxl .outersmoke.properties.particlelife = math.floor(definitions.t3unitexplosionxxxxl .outersmoke.properties.particlelife * size * 0.9) +definitions.t3unitexplosionxxxxl .bigsmoketrails.properties.length = [[160 r40]] +definitions.t3unitexplosionxxxxl .bigsmoketrails.properties.ttl = [[52 r10]] local size = 3.2 -definitions['t3unitexplosionxxxxxl'] = table.copy(definitions['t3unitexplosion']) -definitions['t3unitexplosionxxxxxl'].sparks.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxxl'].sparks.properties.numparticles * size) -definitions['t3unitexplosionxxxxxl'].sparks.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxxl'].sparks.properties.particlespeed * size* 0.5) -definitions['t3unitexplosionxxxxxl'].sparks.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxxl'].sparks.properties.particlespeedspread * size * 1.5) -definitions['t3unitexplosionxxxxxl'].explosion.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxxl'].explosion.properties.numparticles * size * 0.2) -definitions['t3unitexplosionxxxxxl'].explosion.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxxl'].explosion.properties.particlespeed * size * 1.5) -definitions['t3unitexplosionxxxxxl'].explosion.properties.particlesize = math.floor(definitions['t3unitexplosionxxxxxl'].explosion.properties.particlesize * size * 0.85) -definitions['t3unitexplosionxxxxxl'].explosion.properties.particlelife = math.floor(definitions['t3unitexplosionxxxxxl'].explosion.properties.particlelife * size * 0.8) -definitions['t3unitexplosionxxxxxl'].dustparticles.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxxl'].dustparticles.properties.numparticles * size) -definitions['t3unitexplosionxxxxxl'].dustparticles.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxxl'].dustparticles.properties.particlespeed * size * 0.9) -definitions['t3unitexplosionxxxxxl'].dustparticles.properties.particlesize = math.floor(definitions['t3unitexplosionxxxxxl'].dustparticles.properties.particlesize * size * 0.8) -definitions['t3unitexplosionxxxxxl'].dustparticles.properties.particlelife = math.floor(definitions['t3unitexplosionxxxxxl'].dustparticles.properties.particlelife * size) -definitions['t3unitexplosionxxxxxl'].dirt.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxxl'].dirt.properties.particlespeed * size * 0.9) -definitions['t3unitexplosionxxxxxl'].dirt.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxxl'].dirt.properties.particlespeedspread * size * 0.9) -definitions['t3unitexplosionxxxxxl'].dirt.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxxl'].dirt.properties.numparticles * size) -definitions['t3unitexplosionxxxxxl'].dirt2.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxxl'].dirt2.properties.particlespeed * size * 0.9) -definitions['t3unitexplosionxxxxxl'].dirt2.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxxl'].dirt2.properties.particlespeedspread * size * 0.9) -definitions['t3unitexplosionxxxxxl'].dirt2.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxxl'].dirt2.properties.numparticles * size) -definitions['t3unitexplosionxxxxxl'].shockwave.properties.ttl = math.floor(definitions['t3unitexplosionxxxxxl'].shockwave.properties.ttl * size * 0.75) -definitions['t3unitexplosionxxxxxl'].shockwave.properties.size = math.floor(definitions['t3unitexplosionxxxxxl'].shockwave.properties.size * size * 0.85) -definitions['t3unitexplosionxxxxxl'].centerflare.properties.size = math.floor(definitions['t3unitexplosionxxxxxl'].centerflare.properties.size * size * 0.8) -definitions['t3unitexplosionxxxxxl'].centerflare.properties.heat = math.floor(definitions['t3unitexplosionxxxxxl'].centerflare.properties.heat * size * 0.8) -definitions['t3unitexplosionxxxxxl'].centerflare.properties.maxheat = math.floor(definitions['t3unitexplosionxxxxxl'].centerflare.properties.maxheat * size * 0.8) -definitions['t3unitexplosionxxxxxl'].groundflash_large.properties.size = math.floor(definitions['t3unitexplosionxxxxxl'].groundflash_large.properties.size * size * 0.9) -definitions['t3unitexplosionxxxxxl'].groundflash_large.properties.ttl = math.floor(definitions['t3unitexplosionxxxxxl'].groundflash_large.properties.ttl * size * 0.8) -definitions['t3unitexplosionxxxxxl'].groundflash_white.properties.size = math.floor(definitions['t3unitexplosionxxxxxl'].groundflash_white.properties.size * size) -definitions['t3unitexplosionxxxxxl'].grounddust.properties.particlesize = math.floor(definitions['t3unitexplosionxxxxxl'].grounddust.properties.particlesize * size) -definitions['t3unitexplosionxxxxxl'].grounddust.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxxl'].grounddust.properties.particlespeed * size) -definitions['t3unitexplosionxxxxxl'].grounddust.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxxl'].grounddust.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxxxl'].grounddust.properties.particlelife = math.floor(definitions['t3unitexplosionxxxxxl'].grounddust.properties.particlelife * size * 0.9) -definitions['t3unitexplosionxxxxxl'].clouddust.properties.particlesize = math.floor(definitions['t3unitexplosionxxxxxl'].clouddust.properties.particlesize * size * 1.2) -definitions['t3unitexplosionxxxxxl'].clouddust.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxxl'].clouddust.properties.particlespeed * size * 1.4) -definitions['t3unitexplosionxxxxxl'].clouddust.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxxl'].clouddust.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxxxl'].clouddust.properties.particlelife = math.floor(definitions['t3unitexplosionxxxxxl'].clouddust.properties.particlelife * size * 1.2) -definitions['t3unitexplosionxxxxxl'].innersmoke.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxxl'].innersmoke.properties.numparticles * size * 1.2) -definitions['t3unitexplosionxxxxxl'].innersmoke.properties.particlesize = math.floor(definitions['t3unitexplosionxxxxxl'].innersmoke.properties.particlesize * size * 1.2) -definitions['t3unitexplosionxxxxxl'].innersmoke.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxxl'].innersmoke.properties.particlespeed * size * 1.4) -definitions['t3unitexplosionxxxxxl'].innersmoke.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxxl'].innersmoke.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxxxl'].innersmoke.properties.particlelife = math.floor(definitions['t3unitexplosionxxxxxl'].innersmoke.properties.particlelife * size * 0.9) -definitions['t3unitexplosionxxxxxl'].outersmoke.properties.numparticles = math.floor(definitions['t3unitexplosionxxxxxl'].outersmoke.properties.numparticles * size * 1.2) -definitions['t3unitexplosionxxxxxl'].outersmoke.properties.particlesize = math.floor(definitions['t3unitexplosionxxxxxl'].outersmoke.properties.particlesize * size * 1.2) -definitions['t3unitexplosionxxxxxl'].outersmoke.properties.particlespeed = math.floor(definitions['t3unitexplosionxxxxxl'].outersmoke.properties.particlespeed * size * 1.4) -definitions['t3unitexplosionxxxxxl'].outersmoke.properties.particlespeedspread = math.floor(definitions['t3unitexplosionxxxxxl'].outersmoke.properties.particlespeedspread * size) -definitions['t3unitexplosionxxxxxl'].outersmoke.properties.particlelife = math.floor(definitions['t3unitexplosionxxxxxl'].outersmoke.properties.particlelife * size * 0.9) -definitions['t3unitexplosionxxxxxl'].bigsmoketrails.properties.length = [[195 r60]] -definitions['t3unitexplosionxxxxxl'].bigsmoketrails.properties.ttl = [[55 r12]] +definitions.t3unitexplosionxxxxxl = table.copy(definitions.t3unitexplosion ) +definitions.t3unitexplosionxxxxxl .sparks.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxxl .sparks.properties.numparticles * size) +definitions.t3unitexplosionxxxxxl .sparks.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxxl .sparks.properties.particlespeed * size* 0.5) +definitions.t3unitexplosionxxxxxl .sparks.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxxl .sparks.properties.particlespeedspread * size * 1.5) +definitions.t3unitexplosionxxxxxl .explosion.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxxl .explosion.properties.numparticles * size * 0.2) +definitions.t3unitexplosionxxxxxl .explosion.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxxl .explosion.properties.particlespeed * size * 1.5) +definitions.t3unitexplosionxxxxxl .explosion.properties.particlesize = math.floor(definitions.t3unitexplosionxxxxxl .explosion.properties.particlesize * size * 0.85) +definitions.t3unitexplosionxxxxxl .explosion.properties.particlelife = math.floor(definitions.t3unitexplosionxxxxxl .explosion.properties.particlelife * size * 0.8) +definitions.t3unitexplosionxxxxxl .dustparticles.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxxl .dustparticles.properties.numparticles * size) +definitions.t3unitexplosionxxxxxl .dustparticles.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxxl .dustparticles.properties.particlespeed * size * 0.9) +definitions.t3unitexplosionxxxxxl .dustparticles.properties.particlesize = math.floor(definitions.t3unitexplosionxxxxxl .dustparticles.properties.particlesize * size * 0.8) +definitions.t3unitexplosionxxxxxl .dustparticles.properties.particlelife = math.floor(definitions.t3unitexplosionxxxxxl .dustparticles.properties.particlelife * size) +definitions.t3unitexplosionxxxxxl .dirt.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxxl .dirt.properties.particlespeed * size * 0.9) +definitions.t3unitexplosionxxxxxl .dirt.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxxl .dirt.properties.particlespeedspread * size * 0.9) +definitions.t3unitexplosionxxxxxl .dirt.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxxl .dirt.properties.numparticles * size) +definitions.t3unitexplosionxxxxxl .dirt2.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxxl .dirt2.properties.particlespeed * size * 0.9) +definitions.t3unitexplosionxxxxxl .dirt2.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxxl .dirt2.properties.particlespeedspread * size * 0.9) +definitions.t3unitexplosionxxxxxl .dirt2.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxxl .dirt2.properties.numparticles * size) +definitions.t3unitexplosionxxxxxl .shockwave.properties.ttl = math.floor(definitions.t3unitexplosionxxxxxl .shockwave.properties.ttl * size * 0.75) +definitions.t3unitexplosionxxxxxl .shockwave.properties.size = math.floor(definitions.t3unitexplosionxxxxxl .shockwave.properties.size * size * 0.85) +definitions.t3unitexplosionxxxxxl .centerflare.properties.size = math.floor(definitions.t3unitexplosionxxxxxl .centerflare.properties.size * size * 0.8) +definitions.t3unitexplosionxxxxxl .centerflare.properties.heat = math.floor(definitions.t3unitexplosionxxxxxl .centerflare.properties.heat * size * 0.8) +definitions.t3unitexplosionxxxxxl .centerflare.properties.maxheat = math.floor(definitions.t3unitexplosionxxxxxl .centerflare.properties.maxheat * size * 0.8) +definitions.t3unitexplosionxxxxxl .groundflash_large.properties.size = math.floor(definitions.t3unitexplosionxxxxxl .groundflash_large.properties.size * size * 0.9) +definitions.t3unitexplosionxxxxxl .groundflash_large.properties.ttl = math.floor(definitions.t3unitexplosionxxxxxl .groundflash_large.properties.ttl * size * 0.8) +definitions.t3unitexplosionxxxxxl .groundflash_white.properties.size = math.floor(definitions.t3unitexplosionxxxxxl .groundflash_white.properties.size * size) +definitions.t3unitexplosionxxxxxl .grounddust.properties.particlesize = math.floor(definitions.t3unitexplosionxxxxxl .grounddust.properties.particlesize * size) +definitions.t3unitexplosionxxxxxl .grounddust.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxxl .grounddust.properties.particlespeed * size) +definitions.t3unitexplosionxxxxxl .grounddust.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxxl .grounddust.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxxxl .grounddust.properties.particlelife = math.floor(definitions.t3unitexplosionxxxxxl .grounddust.properties.particlelife * size * 0.9) +definitions.t3unitexplosionxxxxxl .clouddust.properties.particlesize = math.floor(definitions.t3unitexplosionxxxxxl .clouddust.properties.particlesize * size * 1.2) +definitions.t3unitexplosionxxxxxl .clouddust.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxxl .clouddust.properties.particlespeed * size * 1.4) +definitions.t3unitexplosionxxxxxl .clouddust.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxxl .clouddust.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxxxl .clouddust.properties.particlelife = math.floor(definitions.t3unitexplosionxxxxxl .clouddust.properties.particlelife * size * 1.2) +definitions.t3unitexplosionxxxxxl .innersmoke.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxxl .innersmoke.properties.numparticles * size * 1.2) +definitions.t3unitexplosionxxxxxl .innersmoke.properties.particlesize = math.floor(definitions.t3unitexplosionxxxxxl .innersmoke.properties.particlesize * size * 1.2) +definitions.t3unitexplosionxxxxxl .innersmoke.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxxl .innersmoke.properties.particlespeed * size * 1.4) +definitions.t3unitexplosionxxxxxl .innersmoke.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxxl .innersmoke.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxxxl .innersmoke.properties.particlelife = math.floor(definitions.t3unitexplosionxxxxxl .innersmoke.properties.particlelife * size * 0.9) +definitions.t3unitexplosionxxxxxl .outersmoke.properties.numparticles = math.floor(definitions.t3unitexplosionxxxxxl .outersmoke.properties.numparticles * size * 1.2) +definitions.t3unitexplosionxxxxxl .outersmoke.properties.particlesize = math.floor(definitions.t3unitexplosionxxxxxl .outersmoke.properties.particlesize * size * 1.2) +definitions.t3unitexplosionxxxxxl .outersmoke.properties.particlespeed = math.floor(definitions.t3unitexplosionxxxxxl .outersmoke.properties.particlespeed * size * 1.4) +definitions.t3unitexplosionxxxxxl .outersmoke.properties.particlespeedspread = math.floor(definitions.t3unitexplosionxxxxxl .outersmoke.properties.particlespeedspread * size) +definitions.t3unitexplosionxxxxxl .outersmoke.properties.particlelife = math.floor(definitions.t3unitexplosionxxxxxl .outersmoke.properties.particlelife * size * 0.9) +definitions.t3unitexplosionxxxxxl .bigsmoketrails.properties.length = [[195 r60]] +definitions.t3unitexplosionxxxxxl .bigsmoketrails.properties.ttl = [[55 r12]] -- add purple scavenger variants local scavengerDefs = {} diff --git a/effects/death_wave_sparks.lua b/effects/death_wave_sparks.lua index c17f67e663a..d778a28072d 100644 --- a/effects/death_wave_sparks.lua +++ b/effects/death_wave_sparks.lua @@ -1,6 +1,6 @@ return { - ["death_wave_sparks"] = { - ["unit_sparkles"] = { + death_wave_sparks = { + unit_sparkles = { class = [[CSimpleParticleSystem]], air = true, water = true, diff --git a/effects/deathceg.lua b/effects/deathceg.lua index b693473f0f7..30917198f7d 100644 --- a/effects/deathceg.lua +++ b/effects/deathceg.lua @@ -1,6 +1,6 @@ local defs = { - ["deathceg2"] = { + deathceg2 = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -36,7 +36,7 @@ local defs = { - ["deathceg3"] = { + deathceg3 = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -72,7 +72,7 @@ local defs = { - ["deathceg4"] = { + deathceg4 = { flame = { air = true, class = [[CSimpleParticleSystem]], @@ -149,15 +149,15 @@ local effects = { --}, } -defs["deathceg2-lightning"] = table.merge(defs["deathceg2"], effects) +defs["deathceg2-lightning"] = table.merge(defs.deathceg2 , effects) --defs["deathceg2-lightning"].fire.properties.numparticles = defs["deathceg2-lightning"].fire.properties.numparticles/2.5 --defs["deathceg2-lightning"].electricity.properties.numparticles = defs["deathceg2-lightning"].electricity.properties.numparticles/1.6 defs["deathceg2-lightning"].electricity.properties.particlelife = defs["deathceg2-lightning"].electricity.properties.particlelife/1.6 -defs["deathceg3-lightning"] = table.merge(defs["deathceg3"], effects) +defs["deathceg3-lightning"] = table.merge(defs.deathceg3 , effects) --defs["deathceg3-lightning"].fire.properties.numparticles = defs["deathceg3-lightning"].fire.properties.numparticles/2.5 --defs["deathceg3-lightning"].electricity.properties.numparticles = defs["deathceg3-lightning"].electricity.properties.numparticles/1.2 --defs["deathceg3-lightning"].electricity.properties.particlelife = defs["deathceg3-lightning"].electricity.properties.particlelife/1.2 -defs["deathceg4-lightning"] = table.merge(defs["deathceg4"], effects) +defs["deathceg4-lightning"] = table.merge(defs.deathceg4 , effects) --defs["deathceg4-lightning"].fire.properties.numparticles = defs["deathceg4-lightning"].fire.properties.numparticles/2.5 effects = { @@ -172,19 +172,19 @@ effects = { -- }, --}, } -defs["deathceg2-fire"] = table.merge(defs["deathceg2"], effects) +defs["deathceg2-fire"] = table.merge(defs.deathceg2 , effects) --defs["deathceg2-fire"].fireglow.properties.particlesize = defs["deathceg2-fire"].fireglow.properties.particlesize*1.7 --defs["deathceg2-fire"].fireandsmoke.properties.particlesize = defs["deathceg2-fire"].fireandsmoke.properties.particlesize*1.4 --defs["deathceg2-fire"].fireandsmoke.properties.particlelife = defs["deathceg2-fire"].fireandsmoke.properties.particlelife*1.8 --defs["deathceg2-fire"].fire.properties.particlesize = defs["deathceg2-fire"].fire.properties.particlesize*1.7 --defs["deathceg2-fire"].fire.properties.particlelife = defs["deathceg2-fire"].fire.properties.particlelife*1.7 -defs["deathceg3-fire"] = table.merge(defs["deathceg3"], effects) +defs["deathceg3-fire"] = table.merge(defs.deathceg3 , effects) --defs["deathceg3-fire"].fireglow.properties.particlesize = defs["deathceg3-fire"].fireglow.properties.particlesize*1.7 --defs["deathceg3-fire"].fireandsmoke.properties.particlesize = defs["deathceg3-fire"].fireandsmoke.properties.particlesize*1.4 --defs["deathceg3-fire"].fireandsmoke.properties.particlelife = defs["deathceg3-fire"].fireandsmoke.properties.particlelife*1.8 --defs["deathceg3-fire"].fire.properties.particlesize = defs["deathceg3-fire"].fire.properties.particlesize*1.7 --defs["deathceg3-fire"].fire.properties.particlelife = defs["deathceg3-fire"].fire.properties.particlelife*1.7 -defs["deathceg4-fire"] = table.merge(defs["deathceg4"], effects) +defs["deathceg4-fire"] = table.merge(defs.deathceg4 , effects) --defs["deathceg4-fire"].fireglow.properties.particlesize = defs["deathceg4-fire"].fireglow.properties.particlesize*1.7 @@ -200,9 +200,9 @@ effects = { -- }, --}, } -defs["deathceg2-builder"] = table.merge(defs["deathceg2"], effects) -defs["deathceg3-builder"] = table.merge(defs["deathceg3"], effects) -defs["deathceg4-builder"] = table.merge(defs["deathceg4"], effects) +defs["deathceg2-builder"] = table.merge(defs.deathceg2 , effects) +defs["deathceg3-builder"] = table.merge(defs.deathceg3 , effects) +defs["deathceg4-builder"] = table.merge(defs.deathceg4 , effects) -- --defs["deathceg2-builder"].fire.properties.colormap = [[0.9 0.8 0.2 0.04 0.8 0.6 0.150 0.022 0.6 0.5 0.10 0.03 0.25 0.2 0.05 0.016 0.15 0.15 0.05 0.012 0 0 0 0.01]] --defs["deathceg3-builder"].fire.properties.colormap = defs["deathceg2-builder"].fire.properties.colormap @@ -246,8 +246,8 @@ defs["deathceg4-builder"] = table.merge(defs["deathceg4"], effects) -- }, -- }, --} -defs["deathceg2-air"] = table.merge(defs["deathceg2"], effects) -defs["deathceg3-air"] = table.merge(defs["deathceg3"], effects) +defs["deathceg2-air"] = table.merge(defs.deathceg2 , effects) +defs["deathceg3-air"] = table.merge(defs.deathceg3 , effects) local airDefs = {} diff --git a/effects/dgunprojectile.lua b/effects/dgunprojectile.lua index ceaa7a02250..d2d6ec9e68c 100644 --- a/effects/dgunprojectile.lua +++ b/effects/dgunprojectile.lua @@ -1,6 +1,6 @@ return { - ["dgunprojectile"] = { + dgunprojectile = { groundflash_large = { class = [[CSimpleGroundFlash]], count = 1, @@ -99,7 +99,7 @@ return { }, }, }, - ["expldgun"] = { + expldgun = { groundflash_small = { class = [[CSimpleGroundFlash]], count = 0, @@ -1240,7 +1240,7 @@ brightflare = { -- }, -- }, }, - ["deflectshield"] = { + deflectshield = { shockwaveslow2= { air = true, class = [[CBitmapMuzzleFlame]], diff --git a/effects/dirt.lua b/effects/dirt.lua index b859357f54c..978ab2fded3 100644 --- a/effects/dirt.lua +++ b/effects/dirt.lua @@ -1,7 +1,7 @@ -- dirt return { - ["dirt"] = { + dirt = { dirtg = { air = true, class = [[CSimpleParticleSystem]], @@ -87,7 +87,7 @@ return { }, }, -["dirtpopup"] = { +dirtpopup = { dirtg = { air = true, class = [[CSimpleParticleSystem]], @@ -229,7 +229,7 @@ return { }, }, - ["dirtpoof"] = { + dirtpoof = { dirtg = { air = true, class = [[CSimpleParticleSystem]], @@ -491,7 +491,7 @@ return { }, }, - ["dirtsmall"] = { + dirtsmall = { dirtg = { air = true, class = [[CSimpleParticleSystem]], diff --git a/effects/dust_cloud.lua b/effects/dust_cloud.lua index 296487e744b..889ed0fba43 100644 --- a/effects/dust_cloud.lua +++ b/effects/dust_cloud.lua @@ -1,5 +1,5 @@ return { - ["dust_cloud"] = { + dust_cloud = { poof01 = { air = false, class = [[CSimpleParticleSystem]], @@ -61,7 +61,7 @@ }, }, }, - ["dust_cloud_dirt_light"] = { + dust_cloud_dirt_light = { poof01 = { air = false, class = [[CSimpleParticleSystem]], @@ -126,7 +126,7 @@ }, }, }, - ["dust_cloud_dirt"] = { + dust_cloud_dirt = { poof01 = { air = false, class = [[CSimpleParticleSystem]], @@ -190,7 +190,7 @@ }, }, }, - ["dust_cloud_fast"] = { + dust_cloud_fast = { poof01 = { air = false, class = [[CSimpleParticleSystem]], @@ -221,7 +221,7 @@ }, }, }, - ["dust_cloud_huge"] = { + dust_cloud_huge = { poof01 = { air = false, class = [[CSimpleParticleSystem]], diff --git a/effects/flak.lua b/effects/flak.lua index 2325c0b1e98..93ceb4656a7 100644 --- a/effects/flak.lua +++ b/effects/flak.lua @@ -1,6 +1,6 @@ local definitions = { - ["flak"] = { + flak = { shardcloud = { air = true, class = [[CExpGenSpawner]], @@ -122,7 +122,7 @@ local definitions = { }, }, }, - ["flakshard"] = { + flakshard = { explosion = { air = true, class = [[CSimpleParticleSystem]], diff --git a/effects/gausscannon.lua b/effects/gausscannon.lua index 7b13a07d615..0329830dd47 100644 --- a/effects/gausscannon.lua +++ b/effects/gausscannon.lua @@ -1,7 +1,7 @@ -- Gauss Cannon Effects return { - ["gausscannonprojectile"] = { + gausscannonprojectile = { groundflash_small = { class = [[CSimpleGroundFlash]], count = 1, @@ -479,7 +479,7 @@ return { }, }, - ["gausscannonprojectilexl"] = { + gausscannonprojectilexl = { groundflash_small = { class = [[CSimpleGroundFlash]], count = 1, diff --git a/effects/genericshellexplosion-lightning.lua b/effects/genericshellexplosion-lightning.lua index e555e2a4624..8ab65fae012 100644 --- a/effects/genericshellexplosion-lightning.lua +++ b/effects/genericshellexplosion-lightning.lua @@ -1548,7 +1548,7 @@ local definitions = { - ["juno_stormbolt"] = { + juno_stormbolt = { groundflash = { circlealpha = 1, circlegrowth = 0, diff --git a/effects/genericshellexplosion.lua b/effects/genericshellexplosion.lua index 3c232bfd737..8560359a2e3 100644 --- a/effects/genericshellexplosion.lua +++ b/effects/genericshellexplosion.lua @@ -4794,7 +4794,7 @@ definitions['genericshellexplosion-medium-aoe'].explosion2.properties.colormap = definitions['genericshellexplosion-small-t2'] = table.copy(definitions[root.."-small"]) definitions['genericshellexplosion-small-t2'].explosion.properties.particlesize = 8 -definitions['antinukeexplosion'] = table.copy(definitions[root.."-large"]) +definitions.antinukeexplosion = table.copy(definitions[root.."-large"]) definitions['genericshellexplosion-debris'] = table.copy(definitions[root.."-tiny"]) definitions['genericshellexplosion-debris'].explosion.properties.colormap = [[0 0 0 0 1 0.77 0.44 0.06 0.75 0.38 0.14 0.045 0.55 0.22 0.04 0.02 0 0 0 0]] diff --git a/effects/genericunitexplosion.lua b/effects/genericunitexplosion.lua index 50bb62d2bf7..bc7623f12bb 100644 --- a/effects/genericunitexplosion.lua +++ b/effects/genericunitexplosion.lua @@ -3050,8 +3050,8 @@ for t, effects in pairs(types) do end end -definitions['decoycommander'] = table.copy(definitions[root.."-small"]) -definitions['decoycommander'].confetti = { +definitions.decoycommander = table.copy(definitions[root.."-small"]) +definitions.decoycommander .confetti = { class = [[CSimpleParticleSystem]], count = 1, ground = true, @@ -3078,7 +3078,7 @@ definitions['decoycommander'].confetti = { useairlos = false, }, } -definitions['decoycommander'].glitter = { +definitions.decoycommander .glitter = { class = [[CSimpleParticleSystem]], count = 1, ground = true, @@ -3105,7 +3105,7 @@ definitions['decoycommander'].glitter = { useairlos = false, }, } -definitions['decoycommander'].sparks = { +definitions.decoycommander .sparks = { air = true, class = [[CSimpleParticleSystem]], count = 1, diff --git a/effects/heal.lua b/effects/heal.lua index ace8c0262d3..5f0d54ebdc0 100644 --- a/effects/heal.lua +++ b/effects/heal.lua @@ -1,7 +1,7 @@ -- heal return { - ["heal"] = { + heal = { healg = { air = true, class = [[CSimpleParticleSystem]], diff --git a/effects/juno_sphere_emit.lua b/effects/juno_sphere_emit.lua index 1dcb8179588..32837f15cb8 100644 --- a/effects/juno_sphere_emit.lua +++ b/effects/juno_sphere_emit.lua @@ -1,5 +1,5 @@ return { - ["juno_sphere_emit"] = { + juno_sphere_emit = { nonodecay = { class = [[CSimpleParticleSystem]], air = true, diff --git a/effects/lava.lua b/effects/lava.lua index 2bf0de78654..0a4d110052c 100644 --- a/effects/lava.lua +++ b/effects/lava.lua @@ -1,7 +1,7 @@ -- lava-splash return { - ["lavasplash"] = { + lavasplash = { waterring = { air = true, class = [[CBitmapMuzzleFlame]], @@ -173,7 +173,7 @@ return { }, }, - ["lavadamage"] = { + lavadamage = { waterring = { air = true, class = [[CBitmapMuzzleFlame]], diff --git a/effects/light.lua b/effects/light.lua index 8633de8cf3a..afcf9305e8e 100644 --- a/effects/light.lua +++ b/effects/light.lua @@ -1,5 +1,5 @@ return { - ["WhiteLight"] = { + WhiteLight = { light = { useAirLos = false, usedefaultexplosions = false, @@ -25,7 +25,7 @@ return { }, }, - ["IntelLight"] = { + IntelLight = { light = { useAirLos = false, usedefaultexplosions = false, @@ -51,7 +51,7 @@ return { }, }, - ["YellowLight"] = { + YellowLight = { light = { useAirLos = false, usedefaultexplosions = false, @@ -77,7 +77,7 @@ return { }, }, - ["PurpleLight"] = { + PurpleLight = { light = { useAirLos = false, usedefaultexplosions = false, @@ -104,7 +104,7 @@ return { }, }, - ["GantWhiteLight"] = { + GantWhiteLight = { light = { useAirLos = false, usedefaultexplosions = false, @@ -129,7 +129,7 @@ return { }, }, }, - ["LootboxLightGold"] = { + LootboxLightGold = { light = { useAirLos = false, usedefaultexplosions = false, diff --git a/effects/lightning_stormbolt.lua b/effects/lightning_stormbolt.lua index cc1cbf767ca..72b695e62bf 100644 --- a/effects/lightning_stormbolt.lua +++ b/effects/lightning_stormbolt.lua @@ -1,7 +1,7 @@ -- lightning_stormbolt return { - ["lightning_stormbolt"] = { + lightning_stormbolt = { groundflash = { circlealpha = 1, circlegrowth = 0, @@ -43,7 +43,7 @@ return { }, }, }, - ["lightning_stormbolt_small"] = { + lightning_stormbolt_small = { groundflash = { circlealpha = 1, circlegrowth = 0, @@ -85,7 +85,7 @@ return { }, }, }, - ["lightning_storm_emp"] = { + lightning_storm_emp = { -- groundflash = { -- circlealpha = 1, -- circlegrowth = 0, @@ -127,7 +127,7 @@ return { }, }, }, - ["lightning_storm_emp2"] = { + lightning_storm_emp2 = { lightningballs = { air = true, class = [[CSimpleParticleSystem]], @@ -157,7 +157,7 @@ return { }, }, }, - ["lightning_stormbig"] = { + lightning_stormbig = { -- groundflash = { -- circlealpha = 1, -- circlegrowth = 0, @@ -199,7 +199,7 @@ return { }, }, }, - ["lightning_stormbigalt"] = { + lightning_stormbigalt = { -- groundflash = { -- circlealpha = 1, -- circlegrowth = 0, @@ -241,7 +241,7 @@ return { }, }, }, - ["lightning_storm_juno"] = { + lightning_storm_juno = { groundflash = { circlealpha = 1, circlegrowth = 0, @@ -342,7 +342,7 @@ return { }, }, }, - ["lightning_storm_juno_scav"] = { + lightning_storm_juno_scav = { groundflash = { circlealpha = 1, circlegrowth = 0, @@ -440,7 +440,7 @@ return { }, }, }, - ["lightning_stormflares"] = { + lightning_stormflares = { -- groundflash = { -- circlealpha = 0.9, -- circlegrowth = -0.05, diff --git a/effects/lootboxes.lua b/effects/lootboxes.lua index 450a70e650b..baed22b40d7 100644 --- a/effects/lootboxes.lua +++ b/effects/lootboxes.lua @@ -1,7 +1,7 @@ -- lootbox beacons return { - ["LootboxBeaconBronze"] = { + LootboxBeaconBronze = { groundflash_large = { class = [[CSimpleGroundFlash]], count = 1, @@ -19,7 +19,7 @@ return { }, }, }, - ["LootboxBeaconSilver"] = { + LootboxBeaconSilver = { groundflash_large = { class = [[CSimpleGroundFlash]], count = 1, @@ -37,7 +37,7 @@ return { }, }, }, - ["LootboxBeaconGold"] = { + LootboxBeaconGold = { groundflash_large = { class = [[CSimpleGroundFlash]], count = 1, @@ -55,7 +55,7 @@ return { }, }, }, - ["LootboxBeaconPlatinum"] = { + LootboxBeaconPlatinum = { groundflash_large = { class = [[CSimpleGroundFlash]], count = 1, diff --git a/effects/meteortrail.lua b/effects/meteortrail.lua index 4ed6acb2cdd..153f6258702 100644 --- a/effects/meteortrail.lua +++ b/effects/meteortrail.lua @@ -1,7 +1,7 @@ return { - ["meteortrail"] = { + meteortrail = { fireglow = { air = true, diff --git a/effects/minesweep.lua b/effects/minesweep.lua index 3e4eb6f88c5..fd7c46b497e 100644 --- a/effects/minesweep.lua +++ b/effects/minesweep.lua @@ -1,7 +1,7 @@ return { - ["MINESWEEP"] = { + MINESWEEP = { usedefaultexplosions = false; - ["GROUNDFLASH"] = { + GROUNDFLASH = { flashsize = 50, flashalpha = 0.4, circlegrowth = 2, diff --git a/effects/missiletrail.lua b/effects/missiletrail.lua index 5703cc0f9d4..a8b587d08f6 100644 --- a/effects/missiletrail.lua +++ b/effects/missiletrail.lua @@ -514,7 +514,7 @@ local definitions = { }, }, - ["missiletrailfighter"] = { + missiletrailfighter = { engine = { air = true, class = [[CBitmapMuzzleFlame]], @@ -617,7 +617,7 @@ local definitions = { }, - ["missiletrailtiny"] = { + missiletrailtiny = { --groundflash = { -- circlealpha = 0, -- circlegrowth = 0, @@ -798,7 +798,7 @@ local definitions = { --}, }, - ["missiletrailsmall"] = { + missiletrailsmall = { engine = { air = true, class = [[CBitmapMuzzleFlame]], @@ -1154,7 +1154,7 @@ local definitions = { -- }, --}, }, - ["missiletrailviper"] = { + missiletrailviper = { --groundflash = { -- circlealpha = 0, -- circlegrowth = 0, @@ -1330,7 +1330,7 @@ local definitions = { }, }, - ["missiletrailmedium"] = { + missiletrailmedium = { engine = { air = true, class = [[CBitmapMuzzleFlame]], @@ -1580,7 +1580,7 @@ local definitions = { --}, }, - ["missiletraillarge"] = { + missiletraillarge = { fire = { air = true, class = [[CSimpleParticleSystem]], @@ -1832,7 +1832,7 @@ local definitions = { --}, }, - ["missiletrailbomber"] = { + missiletrailbomber = { coreflame = { air = true, class = [[CSimpleParticleSystem]], @@ -1889,7 +1889,7 @@ local definitions = { }, }, - ["missiletrailaa"] = { + missiletrailaa = { --groundflash = { -- circlealpha = 0, -- circlegrowth = 0, @@ -1985,7 +1985,7 @@ local definitions = { }, }, - ["flaktrailaa"] = { + flaktrailaa = { --groundflash = { -- circlealpha = 0, -- circlegrowth = 0, @@ -2083,7 +2083,7 @@ local definitions = { --}, }, - ["flaktrailaamg"] = { + flaktrailaamg = { engineglow = { @@ -2471,7 +2471,7 @@ local definitions = { }, - ["nuketrail"] = { + nuketrail = { groundflash = { circlealpha = 0, circlegrowth = 0, @@ -2778,7 +2778,7 @@ local definitions = { }, }, - ["missiletrailgunship"] = { -- unused + missiletrailgunship = { -- unused coreflame = { air = true, class = [[CSimpleParticleSystem]], @@ -2890,7 +2890,7 @@ local definitions = { }, }, }, - ["cruisemissiletrail"] = { + cruisemissiletrail = { groundflash = { circlealpha = 0, circlegrowth = 0, @@ -3414,12 +3414,12 @@ local definitions = { } -definitions["antimissiletrail"] = table.copy(definitions["cruisemissiletrail"]) -definitions["antimissiletrail"].smokeandfire.properties.colormap = [[0.7 0.45 0.45 0.2 0.44 0.25 0.25 0.2 0.34 0.12 0.12 0.15 0.09 0.023 0.023 0.11 0.05 0.008 0.008 0.09 0.02 0.006 0.01 0.06 0 0 0 0.01]] -definitions["antimissiletrail"].sparks.properties.colormap = [[0.9 0.4 0.4 0.01 0.9 0.3 0.3 0.007 0.5 0.07 0.07 0]] -definitions["antimissiletrail"].fireglow.properties.colormap = [[0.4 0.4 0.9 0.01 0.3 0.3 0.8 0.007 0.3 0.3 0.6 0]] -definitions["antimissiletrail"].fireglowbright.count = 1 -definitions["antimissiletrail"].exhale.count = 0 +definitions.antimissiletrail = table.copy(definitions.cruisemissiletrail ) +definitions.antimissiletrail .smokeandfire.properties.colormap = [[0.7 0.45 0.45 0.2 0.44 0.25 0.25 0.2 0.34 0.12 0.12 0.15 0.09 0.023 0.023 0.11 0.05 0.008 0.008 0.09 0.02 0.006 0.01 0.06 0 0 0 0.01]] +definitions.antimissiletrail .sparks.properties.colormap = [[0.9 0.4 0.4 0.01 0.9 0.3 0.3 0.007 0.5 0.07 0.07 0]] +definitions.antimissiletrail .fireglow.properties.colormap = [[0.4 0.4 0.9 0.01 0.3 0.3 0.8 0.007 0.3 0.3 0.6 0]] +definitions.antimissiletrail .fireglowbright.count = 1 +definitions.antimissiletrail .exhale.count = 0 definitions["antimissiletrail-starburst"] = table.copy(definitions["cruisemissiletrail-starburst"]) definitions["antimissiletrail-starburst"].smokeandfire.properties.colormap = [[0.7 0.45 0.45 0.2 0.44 0.25 0.25 0.2 0.34 0.12 0.12 0.15 0.09 0.023 0.023 0.11 0.05 0.008 0.008 0.09 0.02 0.006 0.01 0.06 0 0 0 0.01]] definitions["antimissiletrail-starburst"].sparks.properties.colormap = [[0.9 0.4 0.4 0.01 0.9 0.3 0.3 0.007 0.5 0.07 0.07 0]] @@ -3437,12 +3437,12 @@ definitions["missiletrailsmall-red-smoke"] = table.copy(definitions["missiletrai definitions["missiletrailsmall-red-smoke"].engine.properties.length = [[-11 r1.5]] definitions["missiletrailsmall-red-smoke"].engine.properties.size = 2.5 --definitions["missiletrailsmall-red-smoke"].trail.properties.size = 2.75 -definitions["missiletrailmedium-red"] = table.copy(definitions["missiletrailmedium"]) +definitions["missiletrailmedium-red"] = table.copy(definitions.missiletrailmedium ) definitions["missiletrailmedium-red"].engine.properties.colormap = [[1 0.33 0.17 0.01 1.0 0.25 0.1 0.01 1.0 0.22 0.05 0.01 0 0 0 0.01]] --definitions["missiletrailmedium-red"].fire.propertiescolormap = [[0.9 0.5 0.16 0.15 0.44 0.2 0.05 0.2 0.14 0.03 0.005 0.17 0.02 0.007 0.003 0.1 0 0 0 0.01]] definitions["missiletrailmedium-red"].fireglow.properties.colormap = [[0.25 0.1 0.01 0.01 0 0 0 0.01]] definitions["missiletrailmedium-red"].sparks.properties.colormap = [[0.9 0.44 0.4 0.01 0.9 0.36 0.1 0.007 0.4 0.13 0.05 0.007 0 0 0 0.01]] -definitions["missiletraillarge-red"] = table.copy(definitions["missiletraillarge"]) +definitions["missiletraillarge-red"] = table.copy(definitions.missiletraillarge ) definitions["missiletraillarge-red"].fire.properties.colormap = [[0.9 0.45 0.16 0.01 0.44 0.22 0.05 0.01 0.14 0.03 0.005 0.01 0.02 0.007 0.003 0.01 0 0 0 0.01]] definitions["missiletraillarge-red"].fireglow.properties.colormap = [[0.25 0.09 0.018 0.01 0 0 0 0.01]] definitions["missiletraillarge-red"].sparks.properties.colormap = [[1 0.85 0.7 0.01 0.9 0.4 0.14 0.007 0.4 0.13 0.05 0.007 0 0 0 0.01]] @@ -3452,7 +3452,7 @@ definitions["missiletraillarge-red"].sparks.properties.colormap = [[1 0.85 0.7 0 --definitions["missiletrailsmall-trail"].smoke.properties.particlelife = 2 --definitions["missiletrailsmall-trail"].smoke.properties.particleLifeSpread = 4 -definitions["missiletrailsmall-starburst"] = table.copy(definitions["missiletrailsmall"]) +definitions["missiletrailsmall-starburst"] = table.copy(definitions.missiletrailsmall ) --definitions["missiletrailsmall-starburst"].engine.properties.colormap = [[1 0.15 0.1 0.01 1.0 0.09 0 0.01 1.0 0.06 0 0.01 0 0 0 0.01]] --definitions["missiletrailsmall-starburst"].sparks.properties.colormap = [[1 0.2 0.1 0.01 1 0.15 0.05 0.007 0.55 0.05 0 0.007 0 0 0 0.01]] @@ -3464,7 +3464,7 @@ definitions["missiletrailsmall-starburst-vertical"].smoke.properties.particlespe definitions["missiletrailsmall-starburst-vertical"].smoke.properties.particlespeedspread = definitions["missiletrailsmall-starburst-vertical"].smoke.properties.particlespeedspread * 1.25 -definitions["missiletrailmedium-starburst"] = table.copy(definitions["missiletrailmedium"]) +definitions["missiletrailmedium-starburst"] = table.copy(definitions.missiletrailmedium ) --definitions["missiletrailmedium-starburst"].smoke.properties.emitrotspread = 4 --definitions["missiletrailmedium-starburst"].smoke.properties.particlespeed = definitions["missiletrailmedium-starburst"].smoke.properties.particlespeed * 1.3 --definitions["missiletrailmedium-starburst"].smoke.properties.particlespeedspread = definitions["missiletrailmedium-starburst"].smoke.properties.particlespeedspread * 1.3 @@ -3480,7 +3480,7 @@ definitions["missiletrailmedium-starburst-vertical"].sparks.properties.particles definitions["missiletrailmedium-starburst-vertical"].sparks.properties.particlesizespread = definitions["missiletrailmedium-starburst-vertical"].sparks.properties.particlesizespread * 1.5 -definitions["missiletraillarge-starburst"] = table.copy(definitions["missiletraillarge"]) +definitions["missiletraillarge-starburst"] = table.copy(definitions.missiletraillarge ) definitions["missiletraillarge-starburst"].smoke.properties.emitrotspread = 4 definitions["missiletraillarge-starburst"].smoke.properties.particlespeed = definitions["missiletraillarge-starburst"].smoke.properties.particlespeed * 2 definitions["missiletraillarge-starburst"].smoke.properties.particlespeedspread = definitions["missiletraillarge-starburst"].smoke.properties.particlespeedspread * 2 @@ -3490,7 +3490,7 @@ definitions["missiletraillarge-starburst"].dustparticles.properties.colormap = [ definitions["missiletraillarge-starburst"].fireglow.properties.colormap = [[0.25 0.05 0.02 0.01 0 0 0 0.01]] -definitions["missiletrail-juno"] = table.copy(definitions["missiletrailmedium"]) +definitions["missiletrail-juno"] = table.copy(definitions.missiletrailmedium ) definitions["missiletrail-juno"].fireglow.properties.colormap = [[0.3 0.24 0.03 0.01 0 0 0 0.01]] definitions["missiletrail-juno"].engine.properties.colormap = [[0.66 1 0.4 0.01 0.6 1 0.2 0.01 0.44 1 0.1 0.01 0 0 0 0.01]] definitions["missiletrail-juno"].sparks.properties.colormap = [[0.6 0.9 0.4 0.01 0.5 0.9 0.1 0.007 0.2 0.4 0.05 0.007 0 0 0 0.01]] @@ -3509,12 +3509,12 @@ definitions["missiletrail-juno-starburst"].sparks.properties.colormap = [[1 0.8 definitions["missiletrail-juno-starburst"].dustparticles.properties.particlesize = definitions["missiletrail-juno"].dustparticles.properties.particlesize * 1.5 definitions["missiletrail-juno-starburst"].fireglow.properties.particlesize = definitions["missiletrail-juno"].fireglow.properties.particlesize * 1.5 -definitions["cruisemissiletrail-emp"] = table.copy(definitions["cruisemissiletrail"]) +definitions["cruisemissiletrail-emp"] = table.copy(definitions.cruisemissiletrail ) definitions["cruisemissiletrail-emp"].smokeandfire.properties.colormap = [[0.65 0.6 0.7 0.01 0.4 0.36 0.5 0.01 0.24 0.22 0.4 0.01 0.064 0.06 0.11 0.01 0.032 0.03 0.065 0.01 0.053 0.05 0.2 0.01 0 0 0 0.01]] definitions["cruisemissiletrail-emp"].fireglow.properties.colormap = [[0.17 0.15 0.25 0.01 0 0 0 0.01]] definitions["cruisemissiletrail-emp"].sparks.properties.colormap = [[0.66 0.6 0.9 0.01 0.5 0.45 0.9 0.01 0.27 0.25 0.65 0]] -definitions["cruisemissiletrail-tacnuke"] = table.copy(definitions["cruisemissiletrail"]) +definitions["cruisemissiletrail-tacnuke"] = table.copy(definitions.cruisemissiletrail ) definitions["cruisemissiletrail-tacnuke"].smokeandfire.properties.colormap = [[0.7 0.6 0.45 0.01 0.44 0.33 0.06 0.01 0.34 0.15 0 0.01 0.09 0.025 0 0.01 0.05 0.01 0 0.01 0.024 0.01 0 0.01 0.014 0.002 0 0.01 0 0 0 0.01]] diff --git a/effects/missiletrailcorroyspecial.lua b/effects/missiletrailcorroyspecial.lua index e80756adbc0..8c1d50a1e96 100644 --- a/effects/missiletrailcorroyspecial.lua +++ b/effects/missiletrailcorroyspecial.lua @@ -1,7 +1,7 @@ -- "missiletrailcorroyspecial" return { - ["missiletrailmship"] = { + missiletrailmship = { engine = { air = true, class = [[CBitmapMuzzleFlame]], @@ -138,7 +138,7 @@ return { }, - ["missiletrailcorroyspecial"] = { + missiletrailcorroyspecial = { fire = { air = true, class = [[CSimpleParticleSystem]], diff --git a/effects/newshockwave.lua b/effects/newshockwave.lua index 6228bc20925..121c262088b 100644 --- a/effects/newshockwave.lua +++ b/effects/newshockwave.lua @@ -1,5 +1,5 @@ return { - ["shockwaveceg"] = { + shockwaveceg = { centerflare = { air = true, class = [[CHeatCloudProjectile]], @@ -803,7 +803,7 @@ return { }, -["newshockwaveblast"] = { +newshockwaveblast = { groundflash_anim = { class = [[CSimpleGroundFlash]], count = 1, @@ -827,7 +827,7 @@ return { }, }, -["newshockwaveblast2"] = { +newshockwaveblast2 = { muzzleparticle = { air = true, class = [[CBitmapMuzzleFlame]], @@ -858,7 +858,7 @@ return { }, }, -["newshockwavetest"] = { +newshockwavetest = { shockwave = { air = true, class = [[CBitmapMuzzleFlame]], diff --git a/effects/nukedatbewm.lua b/effects/nukedatbewm.lua index 8f80cbe453a..bd7125f850d 100644 --- a/effects/nukedatbewm.lua +++ b/effects/nukedatbewm.lua @@ -1,7 +1,7 @@ -- nukedatbewm return { - ["nukedatbewm"] = { + nukedatbewm = { groundflash = { air = true, ground = true, diff --git a/effects/nukedatbewmsmall.lua b/effects/nukedatbewmsmall.lua index 6229cd42edd..f3599a3d408 100644 --- a/effects/nukedatbewmsmall.lua +++ b/effects/nukedatbewmsmall.lua @@ -1,7 +1,7 @@ -- nukedatbewmsmall return { - ["nukedatbewmsmall"] = { + nukedatbewmsmall = { centerflare = { air = true, class = [[CHeatCloudProjectile]], diff --git a/effects/nukes.lua b/effects/nukes.lua index 5dd2f52a791..f3d9292cc97 100644 --- a/effects/nukes.lua +++ b/effects/nukes.lua @@ -1,6 +1,6 @@ -- nukedatbewm local definitions = { - ["newnuke"] = { + newnuke = { centerflare = { air = true, class = [[CHeatCloudProjectile]], @@ -918,7 +918,7 @@ local definitions = { }, }, - ["armnuke"] = { + armnuke = { centerflare = { air = true, class = [[CHeatCloudProjectile]], @@ -1441,47 +1441,47 @@ definitions['newnukecor-floor'].smoke1.properties.particlespeed = math.floor(def definitions['newnukecor-floor'].smoke1.properties.particlespeedspread = math.floor(definitions['newnukecor-floor'].smoke1.properties.particlespeedspread * size) definitions['newnukecor-floor'].smoke3.properties.particlesize = math.floor(definitions['newnukecor-floor'].smoke3.properties.particlesize * size * 1.3) -- -definitions['newnukecor'] = table.copy(definitions['newnuke']) -definitions['newnukecor'].nukefloor.properties.explosiongenerator = [[custom:newnukecor-floor]] +definitions.newnukecor = table.copy(definitions.newnuke ) +definitions.newnukecor .nukefloor.properties.explosiongenerator = [[custom:newnukecor-floor]] -definitions['newnukecor'].sparks.properties.particlespeed = math.floor(definitions['newnukecor'].sparks.properties.particlespeed * size) -definitions['newnukecor'].sparks.properties.particlespeedspread = math.floor(definitions['newnukecor'].sparks.properties.particlespeedspread * size) -definitions['newnukecor'].explosion_flames.properties.particlespeed = math.floor(definitions['newnukecor'].explosion_flames.properties.particlespeed * size) -definitions['newnukecor'].explosion_flames.properties.particlesize = math.floor(definitions['newnukecor'].explosion_flames.properties.particlesize * size) -definitions['newnukecor'].explosion.properties.particlespeed = math.floor(definitions['newnukecor'].explosion.properties.particlespeed * size) -definitions['newnukecor'].explosion.properties.particlesize = math.floor(definitions['newnukecor'].explosion.properties.particlesize * size) -definitions['newnukecor'].dustparticles.properties.particlespeed = math.floor(definitions['newnukecor'].dustparticles.properties.particlespeed * size) -definitions['newnukecor'].dustparticles.properties.particlesize = math.floor(definitions['newnukecor'].dustparticles.properties.particlesize * size) -definitions['newnukecor'].clouddust.properties.particlespeed = math.floor(definitions['newnukecor'].clouddust.properties.particlespeed * size) -definitions['newnukecor'].clouddust.properties.particlesize = math.floor(definitions['newnukecor'].clouddust.properties.particlesize * size) -definitions['newnukecor'].dirt.properties.particlespeed = math.floor(definitions['newnukecor'].dirt.properties.particlespeed * size * 0.7) -definitions['newnukecor'].dirt.properties.particlespeedspread = math.floor(definitions['newnukecor'].dirt.properties.particlespeedspread * size * 0.7) -definitions['newnukecor'].dirt.properties.numparticles = math.floor(definitions['newnukecor'].dirt.properties.numparticles * size) -definitions['newnukecor'].dirt2.properties.particlespeed = math.floor(definitions['newnukecor'].dirt2.properties.particlespeed * size * 0.7) -definitions['newnukecor'].dirt2.properties.particlespeedspread = math.floor(definitions['newnukecor'].dirt2.properties.particlespeedspread * size * 0.7) -definitions['newnukecor'].dirt2.properties.numparticles = math.floor(definitions['newnukecor'].dirt2.properties.numparticles * size) -definitions['newnukecor'].brightflare.properties.ttl = math.floor(definitions['newnukecor'].brightflare.properties.ttl * size * 0.7) -definitions['newnukecor'].shockwave.properties.ttl = math.floor(definitions['newnukecor'].shockwave.properties.ttl * size) -definitions['newnukecor'].shockwave_fast.properties.size = math.floor(definitions['newnukecor'].shockwave_fast.properties.size * size * 0.95) -definitions['newnukecor'].shockwave_fast.properties.ttl = math.floor(definitions['newnukecor'].shockwave_fast.properties.ttl * size * 0.85) -definitions['newnukecor'].shockwave_slow.properties.ttl = math.floor(definitions['newnukecor'].shockwave_slow.properties.ttl * size) -definitions['newnukecor'].shockwave_inner.properties.ttl = math.floor(definitions['newnukecor'].shockwave_inner.properties.ttl * size) +definitions.newnukecor .sparks.properties.particlespeed = math.floor(definitions.newnukecor .sparks.properties.particlespeed * size) +definitions.newnukecor .sparks.properties.particlespeedspread = math.floor(definitions.newnukecor .sparks.properties.particlespeedspread * size) +definitions.newnukecor .explosion_flames.properties.particlespeed = math.floor(definitions.newnukecor .explosion_flames.properties.particlespeed * size) +definitions.newnukecor .explosion_flames.properties.particlesize = math.floor(definitions.newnukecor .explosion_flames.properties.particlesize * size) +definitions.newnukecor .explosion.properties.particlespeed = math.floor(definitions.newnukecor .explosion.properties.particlespeed * size) +definitions.newnukecor .explosion.properties.particlesize = math.floor(definitions.newnukecor .explosion.properties.particlesize * size) +definitions.newnukecor .dustparticles.properties.particlespeed = math.floor(definitions.newnukecor .dustparticles.properties.particlespeed * size) +definitions.newnukecor .dustparticles.properties.particlesize = math.floor(definitions.newnukecor .dustparticles.properties.particlesize * size) +definitions.newnukecor .clouddust.properties.particlespeed = math.floor(definitions.newnukecor .clouddust.properties.particlespeed * size) +definitions.newnukecor .clouddust.properties.particlesize = math.floor(definitions.newnukecor .clouddust.properties.particlesize * size) +definitions.newnukecor .dirt.properties.particlespeed = math.floor(definitions.newnukecor .dirt.properties.particlespeed * size * 0.7) +definitions.newnukecor .dirt.properties.particlespeedspread = math.floor(definitions.newnukecor .dirt.properties.particlespeedspread * size * 0.7) +definitions.newnukecor .dirt.properties.numparticles = math.floor(definitions.newnukecor .dirt.properties.numparticles * size) +definitions.newnukecor .dirt2.properties.particlespeed = math.floor(definitions.newnukecor .dirt2.properties.particlespeed * size * 0.7) +definitions.newnukecor .dirt2.properties.particlespeedspread = math.floor(definitions.newnukecor .dirt2.properties.particlespeedspread * size * 0.7) +definitions.newnukecor .dirt2.properties.numparticles = math.floor(definitions.newnukecor .dirt2.properties.numparticles * size) +definitions.newnukecor .brightflare.properties.ttl = math.floor(definitions.newnukecor .brightflare.properties.ttl * size * 0.7) +definitions.newnukecor .shockwave.properties.ttl = math.floor(definitions.newnukecor .shockwave.properties.ttl * size) +definitions.newnukecor .shockwave_fast.properties.size = math.floor(definitions.newnukecor .shockwave_fast.properties.size * size * 0.95) +definitions.newnukecor .shockwave_fast.properties.ttl = math.floor(definitions.newnukecor .shockwave_fast.properties.ttl * size * 0.85) +definitions.newnukecor .shockwave_slow.properties.ttl = math.floor(definitions.newnukecor .shockwave_slow.properties.ttl * size) +definitions.newnukecor .shockwave_inner.properties.ttl = math.floor(definitions.newnukecor .shockwave_inner.properties.ttl * size) -- definitions['newnukecor'].centerflare.properties.size = math.floor(definitions['newnukecor'].centerflare.properties.size * size * 1.2) -- definitions['newnukecor'].centerflare.properties.heat = math.floor(definitions['newnukecor'].centerflare.properties.heat * size * 0.85) -- definitions['newnukecor'].centerflare.properties.maxheat = math.floor(definitions['newnukecor'].centerflare.properties.maxheat * size) -definitions['newnukecor'].centerflare.properties.size = [[48 r7]] -definitions['newnukecor'].centerflare.properties.heat = math.floor(definitions['newnukecor'].centerflare.properties.heat * size * 0.85) -definitions['newnukecor'].centerflare.properties.maxheat = math.floor(definitions['newnukecor'].centerflare.properties.maxheat * size) -definitions['newnukecor'].groundflash_large.properties.size = math.floor(definitions['newnukecor'].groundflash_large.properties.size * size) -definitions['newnukecor'].groundflash_white.properties.size = math.floor(definitions['newnukecor'].groundflash_white.properties.size * size) -definitions['newnukecor'].groundflash_quick.properties.size = math.floor(definitions['newnukecor'].groundflash_quick.properties.size * size) +definitions.newnukecor .centerflare.properties.size = [[48 r7]] +definitions.newnukecor .centerflare.properties.heat = math.floor(definitions.newnukecor .centerflare.properties.heat * size * 0.85) +definitions.newnukecor .centerflare.properties.maxheat = math.floor(definitions.newnukecor .centerflare.properties.maxheat * size) +definitions.newnukecor .groundflash_large.properties.size = math.floor(definitions.newnukecor .groundflash_large.properties.size * size) +definitions.newnukecor .groundflash_white.properties.size = math.floor(definitions.newnukecor .groundflash_white.properties.size * size) +definitions.newnukecor .groundflash_quick.properties.size = math.floor(definitions.newnukecor .groundflash_quick.properties.size * size) -definitions['newnukecor'].groundflash_anim.properties.size = math.floor(definitions['newnukecor'].groundflash_anim.properties.size * size) -definitions['newnukecor'].airflash_anim.properties.size = math.floor(definitions['newnukecor'].airflash_anim.properties.size * size) +definitions.newnukecor .groundflash_anim.properties.size = math.floor(definitions.newnukecor .groundflash_anim.properties.size * size) +definitions.newnukecor .airflash_anim.properties.size = math.floor(definitions.newnukecor .airflash_anim.properties.size * size) -definitions['newnukecor'].bigsmoketrails.properties.size = [[226 r45]] -definitions['newnukecor'].bigsmoketrails.properties.length = [[310 r45]] -definitions['newnukecor'].bigsmoketrails.count = 7 +definitions.newnukecor .bigsmoketrails.properties.size = [[226 r45]] +definitions.newnukecor .bigsmoketrails.properties.length = [[310 r45]] +definitions.newnukecor .bigsmoketrails.count = 7 local size = 2.2 @@ -1495,41 +1495,41 @@ definitions['newnukehuge-floor'].smoke1.properties.particlespeedspread = math.fl definitions['newnukehuge-floor'].smoke3.properties.particlesize = math.floor(definitions['newnukehuge-floor'].smoke3.properties.particlesize * size * 1.3) -- -- -definitions['newnukehuge'] = table.copy(definitions['newnuke']) -definitions['newnukehuge'].nukefloor.properties.explosiongenerator = [[custom:newnukehuge-floor]] +definitions.newnukehuge = table.copy(definitions.newnuke ) +definitions.newnukehuge .nukefloor.properties.explosiongenerator = [[custom:newnukehuge-floor]] -definitions['newnukehuge'].sparks.properties.particlespeed = math.floor(definitions['newnukehuge'].sparks.properties.particlespeed * size) -definitions['newnukehuge'].sparks.properties.particlespeedspread = math.floor(definitions['newnukehuge'].sparks.properties.particlespeedspread * size) -definitions['newnukehuge'].explosion_flames.properties.particlespeed = math.floor(definitions['newnukehuge'].explosion_flames.properties.particlespeed * size) -definitions['newnukehuge'].explosion_flames.properties.particlesize = math.floor(definitions['newnukehuge'].explosion_flames.properties.particlesize * size) -definitions['newnukehuge'].explosion.properties.particlespeed = math.floor(definitions['newnukehuge'].explosion.properties.particlespeed * size) -definitions['newnukehuge'].explosion.properties.particlesize = math.floor(definitions['newnukehuge'].explosion.properties.particlesize * size) -definitions['newnukehuge'].dustparticles.properties.particlespeed = math.floor(definitions['newnukehuge'].dustparticles.properties.particlespeed * size) -definitions['newnukehuge'].dustparticles.properties.particlesize = math.floor(definitions['newnukehuge'].dustparticles.properties.particlesize * size) -definitions['newnukehuge'].clouddust.properties.particlespeed = math.floor(definitions['newnukehuge'].clouddust.properties.particlespeed * size) -definitions['newnukehuge'].clouddust.properties.particlesize = math.floor(definitions['newnukehuge'].clouddust.properties.particlesize * size) -definitions['newnukehuge'].dirt.properties.particlespeed = math.floor(definitions['newnukehuge'].dirt.properties.particlespeed * size * 0.7) -definitions['newnukehuge'].dirt.properties.particlespeedspread = math.floor(definitions['newnukehuge'].dirt.properties.particlespeedspread * size * 0.7) -definitions['newnukehuge'].dirt.properties.numparticles = math.floor(definitions['newnukehuge'].dirt.properties.numparticles * size) -definitions['newnukehuge'].dirt2.properties.particlespeed = math.floor(definitions['newnukehuge'].dirt2.properties.particlespeed * size * 0.7) -definitions['newnukehuge'].dirt2.properties.particlespeedspread = math.floor(definitions['newnukehuge'].dirt2.properties.particlespeedspread * size * 0.7) -definitions['newnukehuge'].dirt2.properties.numparticles = math.floor(definitions['newnukehuge'].dirt2.properties.numparticles * size) -definitions['newnukehuge'].brightflare.properties.ttl = math.floor(definitions['newnukehuge'].brightflare.properties.ttl * size) -definitions['newnukehuge'].shockwave.properties.ttl = math.floor(definitions['newnukehuge'].shockwave.properties.ttl * size) * 0.7 -definitions['newnukehuge'].shockwave_fast.properties.size = math.floor(definitions['newnukehuge'].shockwave_fast.properties.size * size) -definitions['newnukehuge'].shockwave_fast.properties.ttl = math.floor(definitions['newnukehuge'].shockwave_fast.properties.ttl * size) -definitions['newnukehuge'].shockwave_slow.properties.ttl = math.floor(definitions['newnukehuge'].shockwave_slow.properties.ttl * size) -definitions['newnukehuge'].shockwave_inner.properties.ttl = math.floor(definitions['newnukehuge'].shockwave_inner.properties.ttl * size) -definitions['newnukehuge'].centerflare.properties.size = [[64 r9]] -definitions['newnukehuge'].centerflare.properties.heat = math.floor(definitions['newnukehuge'].centerflare.properties.heat * size * 0.7) -definitions['newnukehuge'].centerflare.properties.maxheat = math.floor(definitions['newnukehuge'].centerflare.properties.maxheat * size * 0.7) -definitions['newnukehuge'].groundflash_large.properties.size = math.floor(definitions['newnukehuge'].groundflash_large.properties.size * size) -definitions['newnukehuge'].groundflash_white.properties.size = math.floor(definitions['newnukehuge'].groundflash_white.properties.size * size) -definitions['newnukehuge'].groundflash_anim.properties.size = math.floor(definitions['newnukehuge'].groundflash_anim.properties.size * size * 0.8) -definitions['newnukehuge'].groundflash_anim.properties.ttl = math.floor(definitions['newnukehuge'].groundflash_anim.properties.ttl * size * 0.7) -definitions['newnukehuge'].groundflash_anim.properties.animParams = [[8,12,170]] -definitions['newnukehuge'].groundflash_anim.properties.sizegrowth = math.floor(definitions['newnukehuge'].groundflash_anim.properties.sizegrowth * size * 0.3) -definitions['newnukehuge'].airflash_anim.properties.size = math.floor(definitions['newnukehuge'].airflash_anim.properties.size * size) +definitions.newnukehuge .sparks.properties.particlespeed = math.floor(definitions.newnukehuge .sparks.properties.particlespeed * size) +definitions.newnukehuge .sparks.properties.particlespeedspread = math.floor(definitions.newnukehuge .sparks.properties.particlespeedspread * size) +definitions.newnukehuge .explosion_flames.properties.particlespeed = math.floor(definitions.newnukehuge .explosion_flames.properties.particlespeed * size) +definitions.newnukehuge .explosion_flames.properties.particlesize = math.floor(definitions.newnukehuge .explosion_flames.properties.particlesize * size) +definitions.newnukehuge .explosion.properties.particlespeed = math.floor(definitions.newnukehuge .explosion.properties.particlespeed * size) +definitions.newnukehuge .explosion.properties.particlesize = math.floor(definitions.newnukehuge .explosion.properties.particlesize * size) +definitions.newnukehuge .dustparticles.properties.particlespeed = math.floor(definitions.newnukehuge .dustparticles.properties.particlespeed * size) +definitions.newnukehuge .dustparticles.properties.particlesize = math.floor(definitions.newnukehuge .dustparticles.properties.particlesize * size) +definitions.newnukehuge .clouddust.properties.particlespeed = math.floor(definitions.newnukehuge .clouddust.properties.particlespeed * size) +definitions.newnukehuge .clouddust.properties.particlesize = math.floor(definitions.newnukehuge .clouddust.properties.particlesize * size) +definitions.newnukehuge .dirt.properties.particlespeed = math.floor(definitions.newnukehuge .dirt.properties.particlespeed * size * 0.7) +definitions.newnukehuge .dirt.properties.particlespeedspread = math.floor(definitions.newnukehuge .dirt.properties.particlespeedspread * size * 0.7) +definitions.newnukehuge .dirt.properties.numparticles = math.floor(definitions.newnukehuge .dirt.properties.numparticles * size) +definitions.newnukehuge .dirt2.properties.particlespeed = math.floor(definitions.newnukehuge .dirt2.properties.particlespeed * size * 0.7) +definitions.newnukehuge .dirt2.properties.particlespeedspread = math.floor(definitions.newnukehuge .dirt2.properties.particlespeedspread * size * 0.7) +definitions.newnukehuge .dirt2.properties.numparticles = math.floor(definitions.newnukehuge .dirt2.properties.numparticles * size) +definitions.newnukehuge .brightflare.properties.ttl = math.floor(definitions.newnukehuge .brightflare.properties.ttl * size) +definitions.newnukehuge .shockwave.properties.ttl = math.floor(definitions.newnukehuge .shockwave.properties.ttl * size) * 0.7 +definitions.newnukehuge .shockwave_fast.properties.size = math.floor(definitions.newnukehuge .shockwave_fast.properties.size * size) +definitions.newnukehuge .shockwave_fast.properties.ttl = math.floor(definitions.newnukehuge .shockwave_fast.properties.ttl * size) +definitions.newnukehuge .shockwave_slow.properties.ttl = math.floor(definitions.newnukehuge .shockwave_slow.properties.ttl * size) +definitions.newnukehuge .shockwave_inner.properties.ttl = math.floor(definitions.newnukehuge .shockwave_inner.properties.ttl * size) +definitions.newnukehuge .centerflare.properties.size = [[64 r9]] +definitions.newnukehuge .centerflare.properties.heat = math.floor(definitions.newnukehuge .centerflare.properties.heat * size * 0.7) +definitions.newnukehuge .centerflare.properties.maxheat = math.floor(definitions.newnukehuge .centerflare.properties.maxheat * size * 0.7) +definitions.newnukehuge .groundflash_large.properties.size = math.floor(definitions.newnukehuge .groundflash_large.properties.size * size) +definitions.newnukehuge .groundflash_white.properties.size = math.floor(definitions.newnukehuge .groundflash_white.properties.size * size) +definitions.newnukehuge .groundflash_anim.properties.size = math.floor(definitions.newnukehuge .groundflash_anim.properties.size * size * 0.8) +definitions.newnukehuge .groundflash_anim.properties.ttl = math.floor(definitions.newnukehuge .groundflash_anim.properties.ttl * size * 0.7) +definitions.newnukehuge .groundflash_anim.properties.animParams = [[8,12,170]] +definitions.newnukehuge .groundflash_anim.properties.sizegrowth = math.floor(definitions.newnukehuge .groundflash_anim.properties.sizegrowth * size * 0.3) +definitions.newnukehuge .airflash_anim.properties.size = math.floor(definitions.newnukehuge .airflash_anim.properties.size * size) local size = 0.48 @@ -1550,74 +1550,74 @@ definitions['newnuketac-floor'].smoke3.properties.particlespeed = math.floor(def definitions['newnuketac-floor'].smoke3.properties.particlesize = math.floor(definitions['newnuketac-floor'].smoke3.properties.particlesize * size * 0.4) definitions['newnuketac-floor'].smoke3.properties.particlelife = math.floor(definitions['newnuketac-floor'].smoke3.properties.particlelife * size * 0.6) -- -definitions['newnuketac'] = table.copy(definitions['newnuke']) -definitions['newnuketac'].nukefloor.properties.explosiongenerator = [[custom:newnuketac-floor]] -definitions['newnuketac'].nukefloor.properties.delay = [[10 i0.5]] +definitions.newnuketac = table.copy(definitions.newnuke ) +definitions.newnuketac .nukefloor.properties.explosiongenerator = [[custom:newnuketac-floor]] +definitions.newnuketac .nukefloor.properties.delay = [[10 i0.5]] -definitions['newnuketac'].sparks.properties.particlespeed = math.floor(definitions['newnuketac'].sparks.properties.particlespeed * size * 1.2) -definitions['newnuketac'].sparks.properties.particlespeedspread = math.floor(definitions['newnuketac'].sparks.properties.particlespeedspread * size) -definitions['newnuketac'].sparks.properties.particlelife = math.floor(definitions['newnuketac'].sparks.properties.particlelife * size * 0.6) -definitions['newnuketac'].explosion_flames.properties.particlespeed = math.floor(definitions['newnuketac'].explosion_flames.properties.particlespeed * 0.6) -definitions['newnuketac'].explosion_flames.properties.particlesize = math.floor(definitions['newnuketac'].explosion_flames.properties.particlesize * size * 0.7) +definitions.newnuketac .sparks.properties.particlespeed = math.floor(definitions.newnuketac .sparks.properties.particlespeed * size * 1.2) +definitions.newnuketac .sparks.properties.particlespeedspread = math.floor(definitions.newnuketac .sparks.properties.particlespeedspread * size) +definitions.newnuketac .sparks.properties.particlelife = math.floor(definitions.newnuketac .sparks.properties.particlelife * size * 0.6) +definitions.newnuketac .explosion_flames.properties.particlespeed = math.floor(definitions.newnuketac .explosion_flames.properties.particlespeed * 0.6) +definitions.newnuketac .explosion_flames.properties.particlesize = math.floor(definitions.newnuketac .explosion_flames.properties.particlesize * size * 0.7) --definitions['newnuketac'].explosion_flames.properties.numparticles = math.floor(definitions['newnuketac'].explosion_flames.properties.numparticles * size) -definitions['newnuketac'].explosion_flames.properties.particlelife = math.floor(definitions['newnuketac'].explosion_flames.properties.particlelife * size) -definitions['newnuketac'].explosion.properties.particlespeed = math.floor(definitions['newnuketac'].explosion.properties.particlespeed * size * 0.7) -definitions['newnuketac'].explosion.properties.particlesize = math.floor(definitions['newnuketac'].explosion.properties.particlesize * size * 0.7) -definitions['newnuketac'].explosion.properties.particlelife = math.floor(definitions['newnuketac'].explosion.properties.particlelife * size) -definitions['newnuketac'].dustparticles.properties.particlespeed = math.floor(definitions['newnuketac'].dustparticles.properties.particlespeed * size * 0.6) -definitions['newnuketac'].dustparticles.properties.particlesize = math.floor(definitions['newnuketac'].dustparticles.properties.particlesize * size * 0.5) -definitions['newnuketac'].dustparticles.properties.particlelife = math.floor(definitions['newnuketac'].dustparticles.properties.particlelife * size * 0.5) -definitions['newnuketac'].clouddust.properties.particlespeed = math.floor(definitions['newnuketac'].clouddust.properties.particlespeed * size) -definitions['newnuketac'].clouddust.properties.particlesize = math.floor(definitions['newnuketac'].clouddust.properties.particlesize * size) -definitions['newnuketac'].clouddust.properties.particlelife = math.floor(definitions['newnuketac'].clouddust.properties.particlelife * size * 0.5) +definitions.newnuketac .explosion_flames.properties.particlelife = math.floor(definitions.newnuketac .explosion_flames.properties.particlelife * size) +definitions.newnuketac .explosion.properties.particlespeed = math.floor(definitions.newnuketac .explosion.properties.particlespeed * size * 0.7) +definitions.newnuketac .explosion.properties.particlesize = math.floor(definitions.newnuketac .explosion.properties.particlesize * size * 0.7) +definitions.newnuketac .explosion.properties.particlelife = math.floor(definitions.newnuketac .explosion.properties.particlelife * size) +definitions.newnuketac .dustparticles.properties.particlespeed = math.floor(definitions.newnuketac .dustparticles.properties.particlespeed * size * 0.6) +definitions.newnuketac .dustparticles.properties.particlesize = math.floor(definitions.newnuketac .dustparticles.properties.particlesize * size * 0.5) +definitions.newnuketac .dustparticles.properties.particlelife = math.floor(definitions.newnuketac .dustparticles.properties.particlelife * size * 0.5) +definitions.newnuketac .clouddust.properties.particlespeed = math.floor(definitions.newnuketac .clouddust.properties.particlespeed * size) +definitions.newnuketac .clouddust.properties.particlesize = math.floor(definitions.newnuketac .clouddust.properties.particlesize * size) +definitions.newnuketac .clouddust.properties.particlelife = math.floor(definitions.newnuketac .clouddust.properties.particlelife * size * 0.5) -definitions['newnuketac'].dirt.properties.particlespeed = math.floor(definitions['newnuketac'].dirt.properties.particlespeed * size * 0.8) -definitions['newnuketac'].dirt.properties.particlespeedspread = math.floor(definitions['newnuketac'].dirt.properties.particlespeedspread * size * 0.9) -definitions['newnuketac'].dirt.properties.numparticles = math.floor(definitions['newnuketac'].dirt.properties.numparticles * size) -definitions['newnuketac'].dirt2.properties.particlelife = math.floor(definitions['newnuketac'].dirt2.properties.particlelife * size * 0.8) -definitions['newnuketac'].dirt2.properties.particlespeed = math.floor(definitions['newnuketac'].dirt2.properties.particlespeed * size * 0.9) -definitions['newnuketac'].dirt2.properties.particlespeedspread = math.floor(definitions['newnuketac'].dirt2.properties.particlespeedspread * size * 0.9) -definitions['newnuketac'].dirt2.properties.numparticles = math.floor(definitions['newnuketac'].dirt2.properties.numparticles * size) -definitions['newnuketac'].dirt3.properties.particlespeed = math.floor(definitions['newnuketac'].dirt3.properties.particlespeed * size * 0.9) -definitions['newnuketac'].dirt3.properties.particlespeedspread = math.floor(definitions['newnuketac'].dirt3.properties.particlespeedspread * size * 0.9) -definitions['newnuketac'].dirt3.properties.numparticles = math.floor(definitions['newnuketac'].dirt3.properties.numparticles * size) -definitions['newnuketac'].brightflare.properties.ttl = math.floor(definitions['newnuketac'].brightflare.properties.ttl * size * 0.5) -definitions['newnuketac'].brightflare.properties.size = math.floor(definitions['newnuketac'].brightflare.properties.size * size * 0.2) -definitions['newnuketac'].brightflare.properties.pos = [[0, 40, 0]] -definitions['newnuketac'].brightflareslow.properties.ttl = math.floor(definitions['newnuketac'].brightflareslow.properties.ttl * size * 0.5) -definitions['newnuketac'].brightflareslow.properties.size = math.floor(definitions['newnuketac'].brightflareslow.properties.size * size * 0.2) -definitions['newnuketac'].brightflaresingularity.properties.sizegrowth = [[0.4 r0.3]] -definitions['newnuketac'].brightflareslow.properties.sizegrowth = [[0.2 r0.1]] -definitions['newnuketac'].shockwave.properties.ttl = math.floor(definitions['newnuketac'].shockwave.properties.ttl * size * 0.7) -definitions['newnuketac'].shockwave.properties.size = math.floor(definitions['newnuketac'].shockwave.properties.size * size * 1.2) -definitions['newnuketac'].shockwave_fast.properties.size = math.floor(definitions['newnuketac'].shockwave_fast.properties.size * size * 0.6) -definitions['newnuketac'].shockwave_fast.properties.ttl = math.floor(definitions['newnuketac'].shockwave_fast.properties.ttl * size * 1.8) -definitions['newnuketac'].shockwave_slow.properties.ttl = math.floor(definitions['newnuketac'].shockwave_slow.properties.ttl * size * 0.8) -definitions['newnuketac'].shockwave_slow.properties.size = math.floor(definitions['newnuketac'].shockwave_slow.properties.size * size * 1.3) -definitions['newnuketac'].shockwave_inner.properties.ttl = math.floor(definitions['newnuketac'].shockwave_inner.properties.ttl * size * 0.8) -definitions['newnuketac'].shockwave_inner.properties.size = math.floor(definitions['newnuketac'].shockwave_inner.properties.size * size * 0.4) -definitions['newnuketac'].centerflare.properties.size = [[24 r4]] -definitions['newnuketac'].centerflare.properties.heat = math.floor(definitions['newnuketac'].centerflare.properties.heat * size * 1.05) -definitions['newnuketac'].centerflare.properties.maxheat = math.floor(definitions['newnuketac'].centerflare.properties.maxheat * size * 1.05) -definitions['newnuketac'].groundflash_large.properties.size = math.floor(definitions['newnuketac'].groundflash_large.properties.size * size * 0.8) -definitions['newnuketac'].groundflash_large.properties.ttl = math.floor(definitions['newnuketac'].groundflash_large.properties.ttl * size * 0.6) -definitions['newnuketac'].groundflash_white.properties.size = math.floor(definitions['newnuketac'].groundflash_white.properties.size * size * 0.8) -definitions['newnuketac'].groundflash_white.properties.ttl = math.floor(definitions['newnuketac'].groundflash_white.properties.ttl * size * 0.4) -definitions['newnuketac'].groundflash_quick.properties.size = math.floor(definitions['newnuketac'].groundflash_quick.properties.size * size * 0.8) -definitions['newnuketac'].groundflash_quick.properties.ttl = math.floor(definitions['newnuketac'].groundflash_quick.properties.ttl * size * 0.4) -definitions['newnuketac'].groundflash_quick.properties.sizegrowth = math.floor(definitions['newnuketac'].groundflash_quick.properties.sizegrowth * size * 0.8) -definitions['newnuketac'].grounddust.properties.particlesize = math.floor(definitions['newnuketac'].grounddust.properties.particlesize * size) -definitions['newnuketac'].grounddust.properties.particlespeed = math.floor(definitions['newnuketac'].grounddust.properties.particlespeed * size) -definitions['newnuketac'].grounddust.properties.particlespeedspread = math.floor(definitions['newnuketac'].grounddust.properties.particlespeedspread * size) -definitions['newnuketac'].grounddust.properties.particlelife = math.floor(definitions['newnuketac'].grounddust.properties.particlelife * size * 0.5) -definitions['newnuketac'].bigsmoketrails.properties.size = [[130 r25]] -definitions['newnuketac'].bigsmoketrails.properties.length = [[170 r25]] -definitions['newnuketac'].bigsmoketrails.count = 3 +definitions.newnuketac .dirt.properties.particlespeed = math.floor(definitions.newnuketac .dirt.properties.particlespeed * size * 0.8) +definitions.newnuketac .dirt.properties.particlespeedspread = math.floor(definitions.newnuketac .dirt.properties.particlespeedspread * size * 0.9) +definitions.newnuketac .dirt.properties.numparticles = math.floor(definitions.newnuketac .dirt.properties.numparticles * size) +definitions.newnuketac .dirt2.properties.particlelife = math.floor(definitions.newnuketac .dirt2.properties.particlelife * size * 0.8) +definitions.newnuketac .dirt2.properties.particlespeed = math.floor(definitions.newnuketac .dirt2.properties.particlespeed * size * 0.9) +definitions.newnuketac .dirt2.properties.particlespeedspread = math.floor(definitions.newnuketac .dirt2.properties.particlespeedspread * size * 0.9) +definitions.newnuketac .dirt2.properties.numparticles = math.floor(definitions.newnuketac .dirt2.properties.numparticles * size) +definitions.newnuketac .dirt3.properties.particlespeed = math.floor(definitions.newnuketac .dirt3.properties.particlespeed * size * 0.9) +definitions.newnuketac .dirt3.properties.particlespeedspread = math.floor(definitions.newnuketac .dirt3.properties.particlespeedspread * size * 0.9) +definitions.newnuketac .dirt3.properties.numparticles = math.floor(definitions.newnuketac .dirt3.properties.numparticles * size) +definitions.newnuketac .brightflare.properties.ttl = math.floor(definitions.newnuketac .brightflare.properties.ttl * size * 0.5) +definitions.newnuketac .brightflare.properties.size = math.floor(definitions.newnuketac .brightflare.properties.size * size * 0.2) +definitions.newnuketac .brightflare.properties.pos = [[0, 40, 0]] +definitions.newnuketac .brightflareslow.properties.ttl = math.floor(definitions.newnuketac .brightflareslow.properties.ttl * size * 0.5) +definitions.newnuketac .brightflareslow.properties.size = math.floor(definitions.newnuketac .brightflareslow.properties.size * size * 0.2) +definitions.newnuketac .brightflaresingularity.properties.sizegrowth = [[0.4 r0.3]] +definitions.newnuketac .brightflareslow.properties.sizegrowth = [[0.2 r0.1]] +definitions.newnuketac .shockwave.properties.ttl = math.floor(definitions.newnuketac .shockwave.properties.ttl * size * 0.7) +definitions.newnuketac .shockwave.properties.size = math.floor(definitions.newnuketac .shockwave.properties.size * size * 1.2) +definitions.newnuketac .shockwave_fast.properties.size = math.floor(definitions.newnuketac .shockwave_fast.properties.size * size * 0.6) +definitions.newnuketac .shockwave_fast.properties.ttl = math.floor(definitions.newnuketac .shockwave_fast.properties.ttl * size * 1.8) +definitions.newnuketac .shockwave_slow.properties.ttl = math.floor(definitions.newnuketac .shockwave_slow.properties.ttl * size * 0.8) +definitions.newnuketac .shockwave_slow.properties.size = math.floor(definitions.newnuketac .shockwave_slow.properties.size * size * 1.3) +definitions.newnuketac .shockwave_inner.properties.ttl = math.floor(definitions.newnuketac .shockwave_inner.properties.ttl * size * 0.8) +definitions.newnuketac .shockwave_inner.properties.size = math.floor(definitions.newnuketac .shockwave_inner.properties.size * size * 0.4) +definitions.newnuketac .centerflare.properties.size = [[24 r4]] +definitions.newnuketac .centerflare.properties.heat = math.floor(definitions.newnuketac .centerflare.properties.heat * size * 1.05) +definitions.newnuketac .centerflare.properties.maxheat = math.floor(definitions.newnuketac .centerflare.properties.maxheat * size * 1.05) +definitions.newnuketac .groundflash_large.properties.size = math.floor(definitions.newnuketac .groundflash_large.properties.size * size * 0.8) +definitions.newnuketac .groundflash_large.properties.ttl = math.floor(definitions.newnuketac .groundflash_large.properties.ttl * size * 0.6) +definitions.newnuketac .groundflash_white.properties.size = math.floor(definitions.newnuketac .groundflash_white.properties.size * size * 0.8) +definitions.newnuketac .groundflash_white.properties.ttl = math.floor(definitions.newnuketac .groundflash_white.properties.ttl * size * 0.4) +definitions.newnuketac .groundflash_quick.properties.size = math.floor(definitions.newnuketac .groundflash_quick.properties.size * size * 0.8) +definitions.newnuketac .groundflash_quick.properties.ttl = math.floor(definitions.newnuketac .groundflash_quick.properties.ttl * size * 0.4) +definitions.newnuketac .groundflash_quick.properties.sizegrowth = math.floor(definitions.newnuketac .groundflash_quick.properties.sizegrowth * size * 0.8) +definitions.newnuketac .grounddust.properties.particlesize = math.floor(definitions.newnuketac .grounddust.properties.particlesize * size) +definitions.newnuketac .grounddust.properties.particlespeed = math.floor(definitions.newnuketac .grounddust.properties.particlespeed * size) +definitions.newnuketac .grounddust.properties.particlespeedspread = math.floor(definitions.newnuketac .grounddust.properties.particlespeedspread * size) +definitions.newnuketac .grounddust.properties.particlelife = math.floor(definitions.newnuketac .grounddust.properties.particlelife * size * 0.5) +definitions.newnuketac .bigsmoketrails.properties.size = [[130 r25]] +definitions.newnuketac .bigsmoketrails.properties.length = [[170 r25]] +definitions.newnuketac .bigsmoketrails.count = 3 -definitions['newnuketac'].groundflash_anim.properties.size = math.floor(definitions['newnuketac'].groundflash_anim.properties.size * size * 0.66) -definitions['newnuketac'].groundflash_anim.properties.sizegrowth = math.floor(definitions['newnuketac'].groundflash_anim.properties.sizegrowth * size * 5.5) -definitions['newnuketac'].groundflash_anim.properties.ttl = math.floor(definitions['newnuketac'].groundflash_anim.properties.ttl * size * 0.75) -definitions['newnuketac'].airflash_anim.properties.size = math.floor(definitions['newnuketac'].airflash_anim.properties.size * size * 0.8) +definitions.newnuketac .groundflash_anim.properties.size = math.floor(definitions.newnuketac .groundflash_anim.properties.size * size * 0.66) +definitions.newnuketac .groundflash_anim.properties.sizegrowth = math.floor(definitions.newnuketac .groundflash_anim.properties.sizegrowth * size * 5.5) +definitions.newnuketac .groundflash_anim.properties.ttl = math.floor(definitions.newnuketac .groundflash_anim.properties.ttl * size * 0.75) +definitions.newnuketac .airflash_anim.properties.size = math.floor(definitions.newnuketac .airflash_anim.properties.size * size * 0.8) local size = 0.6 @@ -1637,22 +1637,22 @@ definitions['raptornuke-head'].smoke.properties.numparticles = math.floor(defini definitions['raptornuke-head'].smoke.properties.particlespeedspread = math.floor(definitions['raptornuke-head'].smoke.properties.particlespeedspread * size) definitions['raptornuke-head'].smoke.properties.particlesize = math.floor(definitions['raptornuke-head'].smoke.properties.particlesize * size) -- -definitions['raptornuke'] = table.copy(definitions['armnuke']) -definitions['raptornuke'].nukefloor.properties.explosiongenerator = [[custom:raptornuke-floor]] -definitions['raptornuke'].nukestem.properties.explosiongenerator = [[custom:raptornuke-stem]] -definitions['raptornuke'].nukestem2.properties.explosiongenerator = [[custom:raptornuke-stem2]] -definitions['raptornuke'].nukeheadring.properties.explosiongenerator = [[custom:raptornuke-headring]] -definitions['raptornuke'].nukehead.properties.explosiongenerator = [[custom:raptornuke-head]] +definitions.raptornuke = table.copy(definitions.armnuke ) +definitions.raptornuke .nukefloor.properties.explosiongenerator = [[custom:raptornuke-floor]] +definitions.raptornuke .nukestem.properties.explosiongenerator = [[custom:raptornuke-stem]] +definitions.raptornuke .nukestem2.properties.explosiongenerator = [[custom:raptornuke-stem2]] +definitions.raptornuke .nukeheadring.properties.explosiongenerator = [[custom:raptornuke-headring]] +definitions.raptornuke .nukehead.properties.explosiongenerator = [[custom:raptornuke-head]] -definitions['raptornuke'].sparks.properties.particlespeed = math.floor(definitions['raptornuke'].sparks.properties.particlespeed * size) -definitions['raptornuke'].sparks.properties.particlespeedspread = math.floor(definitions['raptornuke'].sparks.properties.particlespeedspread * size) -definitions['raptornuke'].dirt.properties.particlespeed = math.floor(definitions['raptornuke'].dirt.properties.particlespeed * size) -definitions['raptornuke'].dirt.properties.particlespeedspread = math.floor(definitions['raptornuke'].dirt.properties.particlespeedspread * size) -definitions['raptornuke'].dirt2.properties.particlespeed = math.floor(definitions['raptornuke'].dirt2.properties.particlespeed * size) -definitions['raptornuke'].dirt2.properties.particlespeedspread = math.floor(definitions['raptornuke'].dirt2.properties.particlespeedspread * size) -definitions['raptornuke'].centerflare.properties.size = [[15 r4]] -definitions['raptornuke'].groundflash_large.properties.size = math.floor(definitions['raptornuke'].groundflash_large.properties.size * size) -definitions['raptornuke'].groundflash_white.properties.size = math.floor(definitions['raptornuke'].groundflash_white.properties.size * size) +definitions.raptornuke .sparks.properties.particlespeed = math.floor(definitions.raptornuke .sparks.properties.particlespeed * size) +definitions.raptornuke .sparks.properties.particlespeedspread = math.floor(definitions.raptornuke .sparks.properties.particlespeedspread * size) +definitions.raptornuke .dirt.properties.particlespeed = math.floor(definitions.raptornuke .dirt.properties.particlespeed * size) +definitions.raptornuke .dirt.properties.particlespeedspread = math.floor(definitions.raptornuke .dirt.properties.particlespeedspread * size) +definitions.raptornuke .dirt2.properties.particlespeed = math.floor(definitions.raptornuke .dirt2.properties.particlespeed * size) +definitions.raptornuke .dirt2.properties.particlespeedspread = math.floor(definitions.raptornuke .dirt2.properties.particlespeedspread * size) +definitions.raptornuke .centerflare.properties.size = [[15 r4]] +definitions.raptornuke .groundflash_large.properties.size = math.floor(definitions.raptornuke .groundflash_large.properties.size * size) +definitions.raptornuke .groundflash_white.properties.size = math.floor(definitions.raptornuke .groundflash_white.properties.size * size) -- definitions['afusexpl'] = table.copy(definitions['newnuke']) -- definitions['afusexpl'].electricstorm.count = 8 diff --git a/effects/raptors/raptor-effects.lua b/effects/raptors/raptor-effects.lua index 2819ca4b7c2..0edbaa789c3 100644 --- a/effects/raptors/raptor-effects.lua +++ b/effects/raptors/raptor-effects.lua @@ -1,6 +1,6 @@ -- Effects for Raptors (before known as Raptors) local definitions = { - ["blob_trail_blue"] = { + blob_trail_blue = { usedefaultexplosions = false, splashes = { @@ -139,7 +139,7 @@ local definitions = { }, }, - ["blob_trail_red"] = { + blob_trail_red = { usedefaultexplosions = false, splashes = { @@ -278,7 +278,7 @@ local definitions = { }, }, -["blob_trail_green"] = { +blob_trail_green = { usedefaultexplosions = false, splashes = { @@ -1434,7 +1434,7 @@ local definitions = { }, }, - ["blood_explode_xl"] = { + blood_explode_xl = { usedefaultexplosions = false, centersplatsh = { air = true, @@ -1664,7 +1664,7 @@ local definitions = { }, }, - ["blood_explode"] = { + blood_explode = { usedefaultexplosions = false, centersplatsh = { air = true, @@ -1797,7 +1797,7 @@ local definitions = { }, }, - ["blood_explode_small"] = { + blood_explode_small = { usedefaultexplosions = false, centersplatsh = { air = true, @@ -1929,7 +1929,7 @@ local definitions = { }, }, - ["blood_explode_blue"] = { + blood_explode_blue = { usedefaultexplosions = false, centersplatsh = { air = true, @@ -2060,7 +2060,7 @@ local definitions = { }, }, - ["blood_trail_xl"] = { + blood_trail_xl = { usedefaultexplosions = false, splash = { air = true, @@ -2117,7 +2117,7 @@ local definitions = { }, }, - ["blood_spray"] = { + blood_spray = { usedefaultexplosions = false, splash = { air = true, @@ -2173,7 +2173,7 @@ local definitions = { }, }, - ["blood_spray_small"] = { + blood_spray_small = { usedefaultexplosions = false, splash = { air = true, @@ -2229,7 +2229,7 @@ local definitions = { }, }, - ["blood_hit"] = { + blood_hit = { usedefaultexplosions = false, splash = { air = true, @@ -2285,7 +2285,7 @@ local definitions = { }, }, }, - ["blood_hit_small"] = { + blood_hit_small = { usedefaultexplosions = false, splash = { air = true, diff --git a/effects/reclaimshards.lua b/effects/reclaimshards.lua index 886098346b2..bd6dfd0af24 100644 --- a/effects/reclaimshards.lua +++ b/effects/reclaimshards.lua @@ -1,6 +1,6 @@ local definitions = { - ["reclaimshards1"] = { + reclaimshards1 = { groundflash = { flashalpha = 0.015, flashsize = 40, @@ -149,20 +149,20 @@ local definitions = { }, } -definitions["reclaimshards2"] = table.copy(definitions["reclaimshards1"]) -definitions["reclaimshards2"].shards.properties.texture = [[shard2]] -definitions["reclaimshards3"] = table.copy(definitions["reclaimshards1"]) -definitions["reclaimshards3"].shards.properties.texture = [[shard3]] +definitions.reclaimshards2 = table.copy(definitions.reclaimshards1 ) +definitions.reclaimshards2 .shards.properties.texture = [[shard2]] +definitions.reclaimshards3 = table.copy(definitions.reclaimshards1 ) +definitions.reclaimshards3 .shards.properties.texture = [[shard3]] -definitions["metalshards1"] = table.copy(definitions["reclaimshards1"]) -definitions["metalshards2"] = table.copy(definitions["reclaimshards2"]) -definitions["metalshards3"] = table.copy(definitions["reclaimshards3"]) +definitions.metalshards1 = table.copy(definitions.reclaimshards1 ) +definitions.metalshards2 = table.copy(definitions.reclaimshards2 ) +definitions.metalshards3 = table.copy(definitions.reclaimshards3 ) -definitions["energyshards1"] = table.copy(definitions["reclaimshards1"]) -definitions["energyshards2"] = table.copy(definitions["reclaimshards2"]) -definitions["energyshards3"] = table.copy(definitions["reclaimshards3"]) -definitions["energyshards1"].shards.properties.colorMap = [[0.2 1 0.2 1 0.1 0.5 0.1 0.5]] -definitions["energyshards2"].shards.properties.colorMap = [[0.2 1 0.2 1 0.1 0.5 0.1 0.5]] -definitions["energyshards3"].shards.properties.colorMap = [[0.2 1 0.2 1 0.1 0.5 0.1 0.5]] +definitions.energyshards1 = table.copy(definitions.reclaimshards1 ) +definitions.energyshards2 = table.copy(definitions.reclaimshards2 ) +definitions.energyshards3 = table.copy(definitions.reclaimshards3 ) +definitions.energyshards1 .shards.properties.colorMap = [[0.2 1 0.2 1 0.1 0.5 0.1 0.5]] +definitions.energyshards2 .shards.properties.colorMap = [[0.2 1 0.2 1 0.1 0.5 0.1 0.5]] +definitions.energyshards3 .shards.properties.colorMap = [[0.2 1 0.2 1 0.1 0.5 0.1 0.5]] return definitions diff --git a/effects/rocketflare.lua b/effects/rocketflare.lua index 9c72c6d8516..742d175cc32 100644 --- a/effects/rocketflare.lua +++ b/effects/rocketflare.lua @@ -1,6 +1,6 @@ local definitions = { - ["RocketFlare"] = { + RocketFlare = { fire = { class = [[CBitmapMuzzleFlame]], water=1, diff --git a/effects/scavengers/scav-effects.lua b/effects/scavengers/scav-effects.lua index 963c59583aa..ab6719219a2 100644 --- a/effects/scavengers/scav-effects.lua +++ b/effects/scavengers/scav-effects.lua @@ -1,7 +1,7 @@ -- Effects for Scavengers return { - ["scavradiation"] = { + scavradiation = { usedefaultexplosions = false, topclouds = { air = true, @@ -132,7 +132,7 @@ return { }, }, }, - ["scavmist"] = { + scavmist = { usedefaultexplosions = false, grounddust = { air = true, @@ -194,7 +194,7 @@ return { }, }, }, - ["scavmistxl"] = { + scavmistxl = { usedefaultexplosions = false, grounddust = { air = true, @@ -260,7 +260,7 @@ return { -- }, -- }, }, - ["scav_mist_explosion"] = { + scav_mist_explosion = { electricstorm = { air = true, class = [[CExpGenSpawner]], @@ -710,7 +710,7 @@ return { }, }, }, - ["scav_commander_explosion"] = { + scav_commander_explosion = { centerflare = { air = true, class = [[CHeatCloudProjectile]], @@ -1262,7 +1262,7 @@ return { -- }, -- }, }, - ["lightning_storm_scav"] = { + lightning_storm_scav = { -- groundflash = { -- circlealpha = 1, -- circlegrowth = 0, @@ -1306,7 +1306,7 @@ return { }, }, }, - ["lightning_storm_scavmist"] = { + lightning_storm_scavmist = { groundflash = { circlealpha = 1, circlegrowth = 0, @@ -1350,7 +1350,7 @@ return { }, }, }, - ["lightning_stormflares_scav"] = { + lightning_stormflares_scav = { -- groundflash = { -- circlealpha = 0.9, -- circlegrowth = -0.05, diff --git a/effects/sparklegreen.lua b/effects/sparklegreen.lua index 9dad8512ca1..dfdd6f6b310 100644 --- a/effects/sparklegreen.lua +++ b/effects/sparklegreen.lua @@ -1,7 +1,7 @@ -- sparklegreen return { - ["sparklegreen"] = { + sparklegreen = { explosionspikes = { air = true, class = [[CExploSpikeProjectile]], diff --git a/effects/storage_leak.lua b/effects/storage_leak.lua index 80614f297b7..78d928735b7 100644 --- a/effects/storage_leak.lua +++ b/effects/storage_leak.lua @@ -1,5 +1,5 @@ return { - ["energy_storage_leak"] = { + energy_storage_leak = { Spawner = { air = true, class = [[CExpGenSpawner]], @@ -14,7 +14,7 @@ return { }, }, }, - ["energy_leak"] = { + energy_leak = { unit_sparkles = { air = true, class = [[CSimpleParticleSystem]], @@ -44,7 +44,7 @@ return { }, }, }, - ["metal_storage_leak"] = { + metal_storage_leak = { Spawner = { air = true, class = [[CExpGenSpawner]], @@ -60,7 +60,7 @@ return { }, }, }, - ["metal_storage"] = { + metal_storage = { smokecloud = { air = true, class = [[CSimpleParticleSystem]], @@ -132,7 +132,7 @@ return { }, }, }, - ["metal_leak"] = { + metal_leak = { spark = { air = true, class = [[CSimpleParticleSystem]], diff --git a/effects/tachyoneffects.lua b/effects/tachyoneffects.lua index cdf102c329c..63059f62b27 100644 --- a/effects/tachyoneffects.lua +++ b/effects/tachyoneffects.lua @@ -1,7 +1,7 @@ -- Tachyon Effects return { - ["tachyonshot"] = { + tachyonshot = { -- fire = { -- air = true, -- class = [[CBitmapMuzzleFlame]], diff --git a/effects/treeburn.lua b/effects/treeburn.lua index a1f40649b4c..24de0535dcb 100644 --- a/effects/treeburn.lua +++ b/effects/treeburn.lua @@ -2,7 +2,7 @@ -- treeburn local definitions = { - ["treeburnexplode"] = { + treeburnexplode = { -- groundflash = { -- air = true, -- circlealpha = 0.0, @@ -50,7 +50,7 @@ local definitions = { }, - ["treeburn"] = { + treeburn = { flame = { air = true, class = [[CSimpleParticleSystem]], diff --git a/effects/tship_dirt.lua b/effects/tship_dirt.lua index 8866263e2ba..91e31000b67 100644 --- a/effects/tship_dirt.lua +++ b/effects/tship_dirt.lua @@ -1,6 +1,6 @@ return { - ["shallow_water_dirt"] = { - ["POOF01"] = { + shallow_water_dirt = { + POOF01 = { class = [[CSimpleParticleSystem]], air = true, water = true, @@ -28,7 +28,7 @@ return { useAirLos = true, }, }, - ["POOF02"] = { + POOF02 = { class = [[CSimpleParticleSystem]], air = true, water = true, diff --git a/effects/uieffects.lua b/effects/uieffects.lua index 6df89bfd643..69c373a542e 100644 --- a/effects/uieffects.lua +++ b/effects/uieffects.lua @@ -1,7 +1,7 @@ -- UI Effects return { - ["radarpulse_t1_slow"] = { + radarpulse_t1_slow = { radarpulse = { class = [[CBitmapMuzzleFlame]], @@ -28,7 +28,7 @@ return { }, }, - ["radarpulse_t1"] = { + radarpulse_t1 = { radarpulse = { class = [[CBitmapMuzzleFlame]], @@ -55,7 +55,7 @@ return { }, }, - ["radarpulse_t1_short"] = { + radarpulse_t1_short = { radarpulse = { class = [[CBitmapMuzzleFlame]], @@ -125,7 +125,7 @@ return { -- }, -- }, - ["radarpulse_t2"] = { + radarpulse_t2 = { radarpulse = { class = [[CBitmapMuzzleFlame]], @@ -152,7 +152,7 @@ return { }, }, - ["radarpulse_t2_slow"] = { + radarpulse_t2_slow = { radarpulse = { class = [[CBitmapMuzzleFlame]], diff --git a/effects/unitsmokes.lua b/effects/unitsmokes.lua index e543489b3de..1bc2694380d 100644 --- a/effects/unitsmokes.lua +++ b/effects/unitsmokes.lua @@ -1,5 +1,5 @@ return { - ["unitsmokegen"] = { + unitsmokegen = { smoke = { air = true, class = [[CExpGenSpawner]], @@ -49,7 +49,7 @@ return { }, }, - ["unitsmokegen2"] = { + unitsmokegen2 = { smoke = { air = true, class = [[CExpGenSpawner]], @@ -151,7 +151,7 @@ return { --- old effects below - ["unitsmoke"] = { + unitsmoke = { smoke = { air = true, class = [[CSimpleParticleSystem]], @@ -181,7 +181,7 @@ return { }, }, }, - ["unitsmokefire"] = { + unitsmokefire = { smoke = { air = true, class = [[CSimpleParticleSystem]], @@ -267,7 +267,7 @@ return { }, }, }, - ["unitfire"] = { + unitfire = { fire = { air = true, class = [[CSimpleParticleSystem]], @@ -325,7 +325,7 @@ return { }, }, }, - ["unitsparkles"] = { + unitsparkles = { lightningballs = { air = true, class = [[CSimpleParticleSystem]], diff --git a/effects/volcano.lua b/effects/volcano.lua index a915ea17023..41a64ee725c 100644 --- a/effects/volcano.lua +++ b/effects/volcano.lua @@ -15,7 +15,7 @@ local function SmokeCount(base) end return { - ["volcano_smoke_turbulence"] = { + volcano_smoke_turbulence = { turbulence = { air = true, ground = true, @@ -59,7 +59,7 @@ return { }, }, }, - ["volcano_ash_build"] = { + volcano_ash_build = { -- main wide low ash ash = { air = true, @@ -146,7 +146,7 @@ return { }, }, }, - ["volcano_ash_big"] = { + volcano_ash_big = { column_core = { air = true, ground = true, @@ -314,7 +314,7 @@ return { }, }, }, - ["volcano_ash_small"] = { + volcano_ash_small = { puff = { air = true, ground = true, @@ -399,7 +399,7 @@ return { }, }, }, - ["volcano_eject"] = { + volcano_eject = { flame_core = { air = true, ground = true, @@ -477,7 +477,7 @@ return { }, }, }, - ["volcano_rock_impact"] = { + volcano_rock_impact = { smoke = { air = true, ground = true, @@ -585,7 +585,7 @@ return { }, }, }, - ["volcano_lava_splash_nukexl"] = { + volcano_lava_splash_nukexl = { waterring = { air = true, class = [[CBitmapMuzzleFlame]], @@ -925,7 +925,7 @@ return { }, }, }, - ["volcano1_flames"] = { + volcano1_flames = { rocks = { air = true, class = [[CSimpleParticleSystem]], @@ -968,7 +968,7 @@ return { }, }, }, - ["volcano_rising_fireball_spawner"] = { + volcano_rising_fireball_spawner = { nw = { air = true, class = [[CExpGenSpawner]], @@ -984,7 +984,7 @@ return { }, }, }, - ["volcano_rising_fireball_sub"] = { + volcano_rising_fireball_sub = { rocks = { air = true, class = [[CSimpleParticleSystem]], @@ -1027,7 +1027,7 @@ return { ---------------------------------------------------------------------- -- LAVA ROCK TRAIL – EXTREME STREAKING FIREBALL ---------------------------------------------------------------------- - ["volcano_rock_trail"] = { + volcano_rock_trail = { trail_flame = { air = true, ground = true, @@ -1139,7 +1139,7 @@ return { ---------------------------------------------------------------------- -- FIREBALL IMPACT EFFECT (EXTREME COMET IMPACT) ---------------------------------------------------------------------- - ["volcano_fireball_impact"] = { + volcano_fireball_impact = { impact_smoke = { class = [[CSimpleParticleSystem]], count = 1, diff --git a/effects/watersplash_emerge.lua b/effects/watersplash_emerge.lua index b80b71d45b4..b75f9105829 100644 --- a/effects/watersplash_emerge.lua +++ b/effects/watersplash_emerge.lua @@ -1,7 +1,7 @@ -- watersplash_extrasmall return { - ["watersplash_emerge"] = { + watersplash_emerge = { waterball = { air = false, class = [[CSimpleParticleSystem]], diff --git a/effects/watersplash_extralarge.lua b/effects/watersplash_extralarge.lua index 84ee2be5310..9dc7a0514b1 100644 --- a/effects/watersplash_extralarge.lua +++ b/effects/watersplash_extralarge.lua @@ -1,7 +1,7 @@ -- watersplash_extralarge return { - ["watersplash_extralarge"] = { + watersplash_extralarge = { waterball = { air = false, class = [[CSimpleParticleSystem]], diff --git a/effects/watersplash_extrasmall.lua b/effects/watersplash_extrasmall.lua index a4309654993..8af11115736 100644 --- a/effects/watersplash_extrasmall.lua +++ b/effects/watersplash_extrasmall.lua @@ -1,7 +1,7 @@ -- watersplash_extrasmall return { - ["watersplash_extrasmall"] = { + watersplash_extrasmall = { waterball = { air = false, class = [[CSimpleParticleSystem]], diff --git a/effects/watersplash_large.lua b/effects/watersplash_large.lua index 550b08823f7..625c4d5f39d 100644 --- a/effects/watersplash_large.lua +++ b/effects/watersplash_large.lua @@ -1,7 +1,7 @@ -- watersplash_large return { - ["watersplash_large"] = { + watersplash_large = { waterring = { air = true, class = [[CBitmapMuzzleFlame]], diff --git a/effects/watersplash_small.lua b/effects/watersplash_small.lua index d4f88a6fe39..d1e7a4c17e3 100644 --- a/effects/watersplash_small.lua +++ b/effects/watersplash_small.lua @@ -1,7 +1,7 @@ -- watersplash_small return { - ["com_sea_laser_bubbles"] = { + com_sea_laser_bubbles = { waterball = { air = false, class = [[CSimpleParticleSystem]], @@ -33,7 +33,7 @@ return { }, }, - ["small_water_bubbles"] = { + small_water_bubbles = { waterball = { air = false, class = [[CSimpleParticleSystem]], @@ -65,7 +65,7 @@ return { }, }, - ["watersplash_small"] = { + watersplash_small = { waterball = { air = false, class = [[CSimpleParticleSystem]], diff --git a/effects/watersplash_small_light.lua b/effects/watersplash_small_light.lua index e212de6722b..358775b3e0b 100644 --- a/effects/watersplash_small_light.lua +++ b/effects/watersplash_small_light.lua @@ -1,7 +1,7 @@ -- watersplash_small return { - ["watersplash_small_light"] = { + watersplash_small_light = { waterball = { air = false, class = [[CSimpleParticleSystem]], diff --git a/effects/waterwake.lua b/effects/waterwake.lua index 8bd67c78c02..2ddaf002e66 100644 --- a/effects/waterwake.lua +++ b/effects/waterwake.lua @@ -1,7 +1,7 @@ -- waterwake return { - ["waterwake"] = { + waterwake = { wake = { air = true, class = [[CWakeProjectile]], diff --git a/effects/xpeffects_arm.lua b/effects/xpeffects_arm.lua index 22146bdccdc..b92d90d977c 100644 --- a/effects/xpeffects_arm.lua +++ b/effects/xpeffects_arm.lua @@ -1,7 +1,7 @@ -- XP Effects return { - ["levelup_fp_arm1"] = { + levelup_fp_arm1 = { levelup_rings = { air = true, class = [[CExpGenSpawner]], @@ -112,7 +112,7 @@ return { }, }, - ["levelup_fp_arm2"] = { + levelup_fp_arm2 = { levelup_rings = { air = true, class = [[CExpGenSpawner]], @@ -223,7 +223,7 @@ return { }, }, - ["levelup_fp_arm3"] = { + levelup_fp_arm3 = { levelup_rings = { air = true, class = [[CExpGenSpawner]], @@ -334,7 +334,7 @@ return { }, }, - ["levelup_fp_arm4"] = { + levelup_fp_arm4 = { levelup_rings = { air = true, class = [[CExpGenSpawner]], @@ -445,7 +445,7 @@ return { }, }, - ["levelup_fp_arm5"] = { + levelup_fp_arm5 = { levelup_rings = { air = true, class = [[CExpGenSpawner]], @@ -574,7 +574,7 @@ return { }, }, - ["levelup_ring_fp_arm1"] = { + levelup_ring_fp_arm1 = { levelupring = { air = true, class = [[CBitmapMuzzleFlame]], @@ -599,7 +599,7 @@ return { }, - ["levelup_ring_fp_arm2"] = { + levelup_ring_fp_arm2 = { levelupring = { air = true, class = [[CBitmapMuzzleFlame]], @@ -623,7 +623,7 @@ return { }, }, - ["levelup_ring_fp_arm3"] = { + levelup_ring_fp_arm3 = { levelupring = { air = true, class = [[CBitmapMuzzleFlame]], @@ -647,7 +647,7 @@ return { }, }, - ["levelup_ring_fp_arm4"] = { + levelup_ring_fp_arm4 = { levelupring = { air = true, class = [[CBitmapMuzzleFlame]], @@ -671,7 +671,7 @@ return { }, }, - ["levelup_ring_fp_arm5"] = { + levelup_ring_fp_arm5 = { levelupring = { air = true, class = [[CBitmapMuzzleFlame]], diff --git a/effects/xpeffects_cor.lua b/effects/xpeffects_cor.lua index 924da2615c6..f11f0085b97 100644 --- a/effects/xpeffects_cor.lua +++ b/effects/xpeffects_cor.lua @@ -1,7 +1,7 @@ -- XP Effects return { - ["levelup_fp1"] = { + levelup_fp1 = { levelup_rings = { air = true, class = [[CExpGenSpawner]], @@ -112,7 +112,7 @@ return { }, }, - ["levelup_fp2"] = { + levelup_fp2 = { levelup_rings = { air = true, class = [[CExpGenSpawner]], @@ -223,7 +223,7 @@ return { }, }, - ["levelup_fp3"] = { + levelup_fp3 = { levelup_rings = { air = true, class = [[CExpGenSpawner]], @@ -334,7 +334,7 @@ return { }, }, - ["levelup_fp4"] = { + levelup_fp4 = { levelup_rings = { air = true, class = [[CExpGenSpawner]], @@ -445,7 +445,7 @@ return { }, }, - ["levelup_fp5"] = { + levelup_fp5 = { levelup_rings = { air = true, class = [[CExpGenSpawner]], @@ -574,7 +574,7 @@ return { }, }, - ["levelup_ring_fp1"] = { + levelup_ring_fp1 = { levelupring = { air = true, class = [[CBitmapMuzzleFlame]], @@ -599,7 +599,7 @@ return { }, - ["levelup_ring_fp2"] = { + levelup_ring_fp2 = { levelupring = { air = true, class = [[CBitmapMuzzleFlame]], @@ -623,7 +623,7 @@ return { }, }, - ["levelup_ring_fp3"] = { + levelup_ring_fp3 = { levelupring = { air = true, class = [[CBitmapMuzzleFlame]], @@ -647,7 +647,7 @@ return { }, }, - ["levelup_ring_fp4"] = { + levelup_ring_fp4 = { levelupring = { air = true, class = [[CBitmapMuzzleFlame]], @@ -671,7 +671,7 @@ return { }, }, - ["levelup_ring_fp5"] = { + levelup_ring_fp5 = { levelupring = { air = true, class = [[CBitmapMuzzleFlame]], diff --git a/gamedata/alldefs_post.lua b/gamedata/alldefs_post.lua index 971e9ef78dc..f78e174f0d6 100644 --- a/gamedata/alldefs_post.lua +++ b/gamedata/alldefs_post.lua @@ -80,9 +80,9 @@ function UnitDef_Post(name, uDef) -- Cache holiday checks for performance if not holidays then holidays = Spring.Utilities.Gametype.GetCurrentHolidays() - isAprilFools = holidays["aprilfools"] - isHalloween = holidays["halloween"] - isXmas = holidays["xmas"] + isAprilFools = holidays.aprilfools + isHalloween = holidays.halloween + isXmas = holidays.xmas end local isScav = string.sub(name, -5, -1) == "_scav" @@ -931,24 +931,24 @@ function UnitDef_Post(name, uDef) -- Manual categories: OBJECT T4AIR LIGHTAIRSCOUT GROUNDSCOUT RAPTOR -- Deprecated caregories: BOT TANK PHIB NOTLAND SPACE - categories["ALL"] = function() return true end - categories["MOBILE"] = function(uDef) return uDef.speed and uDef.speed > 0 end - categories["NOTMOBILE"] = function(uDef) return not categories.MOBILE(uDef) end - categories["WEAPON"] = function(uDef) return next(uDef.weapondefs) ~= nil end - categories["NOWEAPON"] = function(uDef) return next(uDef.weapondefs) == nil end - categories["VTOL"] = function(uDef) return uDef.canfly == true end - categories["NOTAIR"] = function(uDef) return not categories.VTOL(uDef) end - categories["HOVER"] = function(uDef) return hoverList[uDef.movementclass] and (uDef.maxwaterdepth == nil or uDef.maxwaterdepth < 1) end -- convertible tank/boats have maxwaterdepth - categories["NOTHOVER"] = function(uDef) return not categories.HOVER(uDef) end - categories["SHIP"] = function(uDef) return shipList[uDef.movementclass] or (hoverList[uDef.movementclass] and uDef.maxwaterdepth and uDef.maxwaterdepth >=1) end - categories["NOTSHIP"] = function(uDef) return not categories.SHIP(uDef) end - categories["NOTSUB"] = function(uDef) return not subList[uDef.movementclass] end - categories["CANBEUW"] = function(uDef) return amphibList[uDef.movementclass] or uDef.cansubmerge == true end - categories["UNDERWATER"] = function(uDef) return (uDef.minwaterdepth and uDef.waterline == nil) or (uDef.minwaterdepth and uDef.waterline > uDef.minwaterdepth and uDef.speed and uDef.speed > 0) end - categories["SURFACE"] = function(uDef) return not (categories.UNDERWATER(uDef) and categories.MOBILE(uDef)) and not categories.VTOL(uDef) end - categories["MINE"] = function(uDef) return uDef.weapondefs.minerange end - categories["COMMANDER"] = function(uDef) return commanderList[uDef.movementclass] end - categories["EMPABLE"] = function(uDef) return categories.SURFACE(uDef) and uDef.customparams.paralyzemultiplier ~= 0 end + categories.ALL = function() return true end + categories.MOBILE = function(uDef) return uDef.speed and uDef.speed > 0 end + categories.NOTMOBILE = function(uDef) return not categories.MOBILE(uDef) end + categories.WEAPON = function(uDef) return next(uDef.weapondefs) ~= nil end + categories.NOWEAPON = function(uDef) return next(uDef.weapondefs) == nil end + categories.VTOL = function(uDef) return uDef.canfly == true end + categories.NOTAIR = function(uDef) return not categories.VTOL(uDef) end + categories.HOVER = function(uDef) return hoverList[uDef.movementclass] and (uDef.maxwaterdepth == nil or uDef.maxwaterdepth < 1) end -- convertible tank/boats have maxwaterdepth + categories.NOTHOVER = function(uDef) return not categories.HOVER(uDef) end + categories.SHIP = function(uDef) return shipList[uDef.movementclass] or (hoverList[uDef.movementclass] and uDef.maxwaterdepth and uDef.maxwaterdepth >=1) end + categories.NOTSHIP = function(uDef) return not categories.SHIP(uDef) end + categories.NOTSUB = function(uDef) return not subList[uDef.movementclass] end + categories.CANBEUW = function(uDef) return amphibList[uDef.movementclass] or uDef.cansubmerge == true end + categories.UNDERWATER = function(uDef) return (uDef.minwaterdepth and uDef.waterline == nil) or (uDef.minwaterdepth and uDef.waterline > uDef.minwaterdepth and uDef.speed and uDef.speed > 0) end + categories.SURFACE = function(uDef) return not (categories.UNDERWATER(uDef) and categories.MOBILE(uDef)) and not categories.VTOL(uDef) end + categories.MINE = function(uDef) return uDef.weapondefs.minerange end + categories.COMMANDER = function(uDef) return commanderList[uDef.movementclass] end + categories.EMPABLE = function(uDef) return categories.SURFACE(uDef) and uDef.customparams.paralyzemultiplier ~= 0 end local category = uDef.category or "" if not string.find(category, "OBJECT", 1, true) then -- objects should not be targetable and therefore are not assigned any other category @@ -1265,40 +1265,40 @@ function UnitDef_Post(name, uDef) if modOptions.naval_balance_tweaks == true then local buildOptionReplacements = { -- t1 arm cons - armcs = { ["armfhlt"] = "armnavaldefturret" }, - armch = { ["armfhlt"] = "armnavaldefturret" }, - armbeaver = { ["armfhlt"] = "armnavaldefturret" }, - armcsa = { ["armfhlt"] = "armnavaldefturret" }, + armcs = { armfhlt = "armnavaldefturret" }, + armch = { armfhlt = "armnavaldefturret" }, + armbeaver = { armfhlt = "armnavaldefturret" }, + armcsa = { armfhlt = "armnavaldefturret" }, -- t1 cor cons - corcs = { ["corfhlt"] = "cornavaldefturret" }, - corch = { ["corfhlt"] = "cornavaldefturret" }, - cormuskrat = { ["corfhlt"] = "cornavaldefturret" }, - corcsa = { ["corfhlt"] = "cornavaldefturret" }, + corcs = { corfhlt = "cornavaldefturret" }, + corch = { corfhlt = "cornavaldefturret" }, + cormuskrat = { corfhlt = "cornavaldefturret" }, + corcsa = { corfhlt = "cornavaldefturret" }, -- t1 leg cons - legnavyconship = { ["legfmg"] = "legnavaldefturret" }, - legch = { ["legfmg"] = "legnavaldefturret" }, - legotter = { ["legfmg"] = "legnavaldefturret" }, - legspcon = { ["legfmg"] = "legnavaldefturret" }, + legnavyconship = { legfmg = "legnavaldefturret" }, + legch = { legfmg = "legnavaldefturret" }, + legotter = { legfmg = "legnavaldefturret" }, + legspcon = { legfmg = "legnavaldefturret" }, -- t2 arm cons - armacsub = { ["armkraken"] = "armanavaldefturret" }, + armacsub = { armkraken = "armanavaldefturret" }, armmls = { - ["armfhlt"] = "armnavaldefturret", - ["armkraken"] = "armanavaldefturret", + armfhlt = "armnavaldefturret", + armkraken = "armanavaldefturret", }, -- t2 cor cons - coracsub = { ["corfdoom"] = "coranavaldefturret" }, + coracsub = { corfdoom = "coranavaldefturret" }, cormls = { - ["corfhlt"] = "cornavaldefturret", - ["corfdoom"] = "coranavaldefturret", + corfhlt = "cornavaldefturret", + corfdoom = "coranavaldefturret", }, -- t2 leg cons leganavyengineer = { - ["legfmg"] = "legnavaldefturret", + legfmg = "legnavaldefturret", }, } @@ -1773,7 +1773,7 @@ function WeaponDef_Post(name, wDef) modOptions = Spring.GetModOptions() end if isXmas == nil then - isXmas = Spring.Utilities.Gametype.GetCurrentHolidays()["xmas"] + isXmas = Spring.Utilities.Gametype.GetCurrentHolidays().xmas end local customparams = wDef.customparams diff --git a/gamedata/map_feature_i18n_proxies.lua b/gamedata/map_feature_i18n_proxies.lua index bca30dd5094..fe128e9d9ab 100644 --- a/gamedata/map_feature_i18n_proxies.lua +++ b/gamedata/map_feature_i18n_proxies.lua @@ -98,15 +98,15 @@ return { ad0_bush_2_l = 'bush', ad0_bush_2_m = 'bush', ad0_bush_2_s = 'bush', - ['ad0_bushes_l_1'] = 'bushLarge', - ['ad0_bushes_l_2'] = 'bushLarge', - ['ad0_bushes_l_3'] = 'bushLarge', - ['ad0_bushes_l_4'] = 'bushLarge', - ['ad0_bushes_l_5'] = 'bushLarge', - ['ad0_bushes_l_6'] = 'bushLarge', - ['ad0_bushes_l_7'] = 'bushLarge', - ['ad0_bushes_l_8'] = 'bushLarge', - ['ad0_bushes_xl_1'] = 'bushLarger', + ad0_bushes_l_1 = 'bushLarge', + ad0_bushes_l_2 = 'bushLarge', + ad0_bushes_l_3 = 'bushLarge', + ad0_bushes_l_4 = 'bushLarge', + ad0_bushes_l_5 = 'bushLarge', + ad0_bushes_l_6 = 'bushLarge', + ad0_bushes_l_7 = 'bushLarge', + ad0_bushes_l_8 = 'bushLarge', + ad0_bushes_xl_1 = 'bushLarger', ad0_bushes_xl_2 = 'bushLarger', ad0_bushes_xl_3 = 'bushLarger', ad0_bushes_xl_4 = 'bushLarger', diff --git a/gamedata/resources.lua b/gamedata/resources.lua index 86c96a061ad..4676c80d116 100644 --- a/gamedata/resources.lua +++ b/gamedata/resources.lua @@ -107,8 +107,8 @@ local function AutoAdd(subDir, map, filter) for _, fullPath in ipairs(dirList) do local path, key, ext = fullPath:match("bitmaps/(.*/(.*)%.(.*))") if not fullPath:match("/%.svn") then - local subTable = resources["graphics"][subDir] or {} - resources["graphics"][subDir] = subTable + local subTable = resources.graphics [subDir] or {} + resources.graphics [subDir] = subTable if not filter or filter == ext then if not map then table.insert(subTable, path) diff --git a/gamedata/sounds.lua b/gamedata/sounds.lua index d8788113348..70f53d49b80 100644 --- a/gamedata/sounds.lua +++ b/gamedata/sounds.lua @@ -45,7 +45,7 @@ local Sounds = { ]] local soundData = { -- UI SOUNDS - ['ui'] = { + ui = { gain = 0.8, pitchmod = 0, gainmod = 0, @@ -55,7 +55,7 @@ local soundData = { rolloff = 0, }, - ['uw'] = { + uw = { gain = 1.2 * 0.3, pitchmod = 0.17, gainmod = 0.2 * 0.3, @@ -99,7 +99,7 @@ local soundData = { ]] -- WEAPON SOUNDS - ['weapons'] = { + weapons = { gain = { default = 1.2 * 0.3, custom = { @@ -163,7 +163,7 @@ local soundData = { }, -- RAPTOR SOUNDS - ['raptors'] = { + raptors = { gain = 1.2 * 0.5, pitchmod = { default = 0.23, @@ -188,7 +188,7 @@ local soundData = { }, -- BOMB SOUNDS / More maxconcurrent - ['bombs'] = { + bombs = { gain = 1.2 * 0.3, pitchmod = 0.27, gainmod = 0.2 * 0.3, @@ -198,7 +198,7 @@ local soundData = { }, -- REPLY SOUNDS - ['replies'] = { + replies = { gain = 1.2 * 0.3, pitchmod = 0.02, gainmod = 0.2 * 0.3, @@ -210,7 +210,7 @@ local soundData = { }, -- LAND UNIT MOVEMENT SOUNDS - ['movement'] = { + movement = { gain = 1.2 * 0.3, pitchmod = 0.062, gainmod = 0.2 * 0.3, @@ -234,7 +234,7 @@ local soundData = { }, -- UNIT FOOTSTEPS SOUNDS // high pitch-mod - ['unit'] = { + unit = { gain = 1.2 * 0.3, pitchmod = 0.33, gainmod = 0.2 * 0.3, @@ -270,7 +270,7 @@ local soundData = { }, -- BUILDING FUNCTION/WEAPON SOUNDS - ['buildings'] = { + buildings = { gain = 1.2 * 0.3, pitchmod = 0.03, gainmod = 0.2 * 0.3, @@ -282,7 +282,7 @@ local soundData = { }, -- UI COMMANDS SOUNDS - ['commands'] = { + commands = { gain = 1.2 * 0.3, pitchmod = 0.02, gainmod = 0.2 * 0.3, @@ -294,7 +294,7 @@ local soundData = { }, -- CRITTER SOUNDS - ['critters'] = { + critters = { gain = 1.1 * 0.3, pitchmod = 0.01, gainmod = 0.15 * 0.3, @@ -316,7 +316,7 @@ local soundData = { ]] -- AMBIENCE - ['atmos'] = { + atmos = { gain = 1.2 * 0.3, priority = -10, pitchmod = 0.22, diff --git a/language/test_unicode.lua b/language/test_unicode.lua index ce9448d7423..fb6851fa198 100644 --- a/language/test_unicode.lua +++ b/language/test_unicode.lua @@ -167,27 +167,27 @@ return { ['Return fire'] = "Return fire", firestate_tooltip = "Set under what conditions a unit should start firing at enemies (without explicit attack order)", ['Hold pos'] = "Hold pos", - ['Maneuver'] = "Maneuver", + Maneuver = "Maneuver", movestate_tooltip = "Set how far out of its way a unit should move to attack enemies", - ['Roam'] = "Roam", + Roam = "Roam", ['Repeat on'] = "Repeat", ['Repeat off'] = "Repeat", repeat_tooltip = "Repeat unit command queue", ['Low Prio'] = "Priority", ['High Prio'] = "Priority", priority_tooltip = "Assigns resources to use for this builder when not having enough for all", - ['Decloaked'] = "Cloaked", - ['Cloaked'] = "Cloaked", + Decloaked = "Cloaked", + Cloaked = "Cloaked", wantcloak_tooltip = "Invisibility state", [' On '] = "On", [' Off '] = "On", onoff_tooltip = "Active state: turn a unit on/off", - ['Fighters'] = "Fighters", - ['Bombers'] = "Bombers", + Fighters = "Fighters", + Bombers = "Bombers", ['No priority'] = "No priority", setpriority_tooltip = "Set target priority Fighters/Bombers/no priority", [' Fly '] = "Land", - ['Land'] = "Land", + Land = "Land", idlemode_tooltip = "Sets what aircraft do when idle", csSpawning_tooltip = "Sets the spawning state of the carrier", ['Low traj'] = "High Traj", @@ -1911,7 +1911,7 @@ return { ferns = "Ferns", fernStone = "Ferns and Stone", fernStones = "Ferns and Stones", - ['streetlamp_1'] = "Large Streetlamp", + streetlamp_1 = "Large Streetlamp", obelisk = "Obelisk of Seth", peyote = "Peyote", ['pipe1.0'] = "Pipe 1.0", diff --git a/luaintro/Addons/main.lua b/luaintro/Addons/main.lua index 9bec09a3f78..db635a59275 100644 --- a/luaintro/Addons/main.lua +++ b/luaintro/Addons/main.lua @@ -410,12 +410,12 @@ local progressByLastLine = { ["Loading Square Textures"] = {43, 55}, ["Creating Projectile Textures"] = {48, 60}, ["Creating Water"] = {54, 65}, - ["PathCosts"] = {58, 65}, + PathCosts = {58, 65}, ["[LoadFinalize] finalizing PFS"] = {62, 65}, ["Loading LuaRules"] = {69, 75}, ["Loading LuaUI"] = {82, 85}, ["Loading Skirmish AIs"] = {90, 95}, - ["Finalizing"] = {100, 100} + Finalizing = {100, 100} } for name,val in pairs(progressByLastLine) do progressByLastLine[name] = {val[1]*0.01, val[2]*0.01} @@ -522,12 +522,12 @@ function addon.DrawLoadScreen() if guishader then if not blurShader then CreateShaders() - guishaderRects['loadprocess1'] = {(posX*vsx)-borderSize, (posY*vsy)-borderSize, (vsx-(posX*vsx))+borderSize, ((posY*vsy)+height+borderSize)} + guishaderRects.loadprocess1 = {(posX*vsx)-borderSize, (posY*vsy)-borderSize, (vsx-(posX*vsx))+borderSize, ((posY*vsy)+height+borderSize)} if showTips and showTipAboveBar and showTipBackground then - guishaderRects['loadprocess2'] = {(posX*vsx)-borderSize, ((posY*vsy)+height+borderSize), (vsx-(posX*vsx))+borderSize, tipPosYtop*vsy} + guishaderRects.loadprocess2 = {(posX*vsx)-borderSize, ((posY*vsy)+height+borderSize), (vsx-(posX*vsx))+borderSize, tipPosYtop*vsy} end if usingIntelPotato or hasLowRam then - guishaderRects['loadprocess3'] = {0, ((usingIntelPotato and hasLowRam) and 0.9 or 0.95)*vsy, vsx,vsy} + guishaderRects.loadprocess3 = {0, ((usingIntelPotato and hasLowRam) and 0.9 or 0.95)*vsy, vsx,vsy} end DrawStencilTexture() end diff --git a/luaintro/Addons/music.lua b/luaintro/Addons/music.lua index 866887d6029..80ae6dc37be 100644 --- a/luaintro/Addons/music.lua +++ b/luaintro/Addons/music.lua @@ -57,37 +57,37 @@ function addon.Initialize() -- April Fools ---- Day 1 - 100% chance - if Spring.GetConfigInt('UseSoundtrackAprilFools', 1) == 1 and Spring.Utilities.Gametype.GetCurrentHolidays()["aprilfools_specialDay"] then + if Spring.GetConfigInt('UseSoundtrackAprilFools', 1) == 1 and Spring.Utilities.Gametype.GetCurrentHolidays().aprilfools_specialDay then table.append(musicPlaylistEvent, VFS.DirList(musicDirOriginal..'/events/aprilfools/loading', allowedExtensions)) ---- Day 2-7 - 50% chance - elseif Spring.GetConfigInt('UseSoundtrackAprilFools', 1) == 1 and Spring.Utilities.Gametype.GetCurrentHolidays()["aprilfools"] and math.random() <= 0.5 then + elseif Spring.GetConfigInt('UseSoundtrackAprilFools', 1) == 1 and Spring.Utilities.Gametype.GetCurrentHolidays().aprilfools and math.random() <= 0.5 then table.append(musicPlaylistEvent, VFS.DirList(musicDirOriginal..'/events/aprilfools/loading', allowedExtensions)) ---- Post Event - Add to regular playlist - elseif Spring.GetConfigInt('UseSoundtrackAprilFoolsPostEvent', 0) == 1 and (not Spring.Utilities.Gametype.GetCurrentHolidays()["aprilfools"]) then + elseif Spring.GetConfigInt('UseSoundtrackAprilFoolsPostEvent', 0) == 1 and (not Spring.Utilities.Gametype.GetCurrentHolidays().aprilfools ) then table.append(musicPlaylist, VFS.DirList(musicDirOriginal..'/events/aprilfools/loading', allowedExtensions)) end -- Halloween ---- Halloween Day - 100% chance - if Spring.GetConfigInt('UseSoundtrackHalloween', 1) == 1 and Spring.Utilities.Gametype.GetCurrentHolidays()["halloween_specialDay"] then + if Spring.GetConfigInt('UseSoundtrackHalloween', 1) == 1 and Spring.Utilities.Gametype.GetCurrentHolidays().halloween_specialDay then table.append(musicPlaylistEvent, VFS.DirList(musicDirOriginal..'/events/halloween/loading', allowedExtensions)) ---- 2 Weeks Before Halloween - 50% chance - elseif Spring.GetConfigInt('UseSoundtrackHalloween', 1) == 1 and Spring.Utilities.Gametype.GetCurrentHolidays()["halloween"] and math.random() <= 0.5 then + elseif Spring.GetConfigInt('UseSoundtrackHalloween', 1) == 1 and Spring.Utilities.Gametype.GetCurrentHolidays().halloween and math.random() <= 0.5 then table.append(musicPlaylistEvent, VFS.DirList(musicDirOriginal..'/events/halloween/loading', allowedExtensions)) ---- Post Event - Add to regular playlist - elseif Spring.GetConfigInt('UseSoundtrackHalloweenPostEvent', 0) == 1 and (not Spring.Utilities.Gametype.GetCurrentHolidays()["halloween_specialDay"]) then + elseif Spring.GetConfigInt('UseSoundtrackHalloweenPostEvent', 0) == 1 and (not Spring.Utilities.Gametype.GetCurrentHolidays().halloween_specialDay ) then table.append(musicPlaylist, VFS.DirList(musicDirOriginal..'/events/halloween/loading', allowedExtensions)) end -- Xmas ---- Christmas Days - 100% chance - if Spring.GetConfigInt('UseSoundtrackXmas', 1) == 1 and Spring.Utilities.Gametype.GetCurrentHolidays()["xmas_specialDay"] then + if Spring.GetConfigInt('UseSoundtrackXmas', 1) == 1 and Spring.Utilities.Gametype.GetCurrentHolidays().xmas_specialDay then table.append(musicPlaylistEvent, VFS.DirList(musicDirOriginal..'/events/xmas/loading', allowedExtensions)) ---- The Rest of the event - 50% chance - elseif Spring.GetConfigInt('UseSoundtrackXmas', 1) == 1 and Spring.Utilities.Gametype.GetCurrentHolidays()["xmas"] and math.random() <= 0.5 then + elseif Spring.GetConfigInt('UseSoundtrackXmas', 1) == 1 and Spring.Utilities.Gametype.GetCurrentHolidays().xmas and math.random() <= 0.5 then table.append(musicPlaylistEvent, VFS.DirList(musicDirOriginal..'/events/xmas/loading', allowedExtensions)) ---- Post Event - Add to regular playlist - elseif Spring.GetConfigInt('UseSoundtrackXmasPostEvent', 0) == 1 and (not Spring.Utilities.Gametype.GetCurrentHolidays()["xmas"]) then + elseif Spring.GetConfigInt('UseSoundtrackXmasPostEvent', 0) == 1 and (not Spring.Utilities.Gametype.GetCurrentHolidays().xmas ) then table.append(musicPlaylist, VFS.DirList(musicDirOriginal..'/events/xmas/loading', allowedExtensions)) end diff --git a/luarules/Utilities/damgam_lib/position_checks.lua b/luarules/Utilities/damgam_lib/position_checks.lua index 5c7637220fd..ea72891e4fa 100644 --- a/luarules/Utilities/damgam_lib/position_checks.lua +++ b/luarules/Utilities/damgam_lib/position_checks.lua @@ -140,7 +140,7 @@ end local function ResourceCheck(posx, posz, posradius) -- Returns true if there are no resources in the spawn area local posradiusSquared = posradius * posradius - local metalSpots = GG["resource_spot_finder"].metalSpotsList + local metalSpots = GG.resource_spot_finder .metalSpotsList if metalSpots then for _,spot in ipairs(metalSpots) do if math.distance2dSquared(spot.x, spot.z, posx, posz) < posradiusSquared then @@ -149,7 +149,7 @@ local function ResourceCheck(posx, posz, posradius) -- Returns true if there are end end - local geoSpots = GG["resource_spot_finder"].geoSpotsList + local geoSpots = GG.resource_spot_finder .geoSpotsList if geoSpots then for _,spot in ipairs(geoSpots) do if math.distance2dSquared(spot.x, spot.z, posx, posz) < posradiusSquared then diff --git a/luarules/configs/collisionvolumes.lua b/luarules/configs/collisionvolumes.lua index e5e5d8a44da..86113c2a18a 100644 --- a/luarules/configs/collisionvolumes.lua +++ b/luarules/configs/collisionvolumes.lua @@ -85,37 +85,37 @@ local dynamicPieceCollisionVolume = {} --dynamic per piece collision volume defi -- number of times this table had to be touched since 2022 ~45 -- increase this number eachtime this table gets touched -dynamicPieceCollisionVolume['cormaw'] = { +dynamicPieceCollisionVolume.cormaw = { on={ ['0']={32,70,32,0,5,0,1,1,1}, - ['offsets']={0,27,0}, + offsets={0,27,0}, }, off={ ['0']={32,22,32,0,10,0,1,1,1}, - ['offsets']={0,0,0}, + offsets={0,0,0}, } } -dynamicPieceCollisionVolume['armclaw'] = { +dynamicPieceCollisionVolume.armclaw = { on={ ['0']={32,85,32,0,5,0,1,1,1}, - ['offsets']={0,30,0}, + offsets={0,30,0}, }, off={ ['0']={32,22,32,0,10,0,1,1,1}, - ['offsets']={0,0,0}, + offsets={0,0,0}, } } -dynamicPieceCollisionVolume['legdtr'] = { +dynamicPieceCollisionVolume.legdtr = { on={ ['0']={32,90,32,0,5,0,1,1,1}, - ['offsets']={0,45,0}, + offsets={0,45,0}, }, off={ ['0']={32,22,32,0,11,0,1,1,1}, - ['offsets']={0,0,0}, + offsets={0,0,0}, } } -dynamicPieceCollisionVolume['armannit3'] = { +dynamicPieceCollisionVolume.armannit3 = { on={ ['1']={96,140,96,0,5,0,2,1,0}, }, @@ -123,7 +123,7 @@ dynamicPieceCollisionVolume['armannit3'] = { ['0']={96,80,96,0,10,0,2,1,0}, } } -dynamicPieceCollisionVolume['cordoomt3'] = { +dynamicPieceCollisionVolume.cordoomt3 = { on={ ['1']={112,180,112,0,5,0,1,1,0}, }, @@ -131,7 +131,7 @@ dynamicPieceCollisionVolume['cordoomt3'] = { ['0']={96,80,96,0,10,0,2,1,0}, } } -dynamicPieceCollisionVolume['leganavybattleship'] = { +dynamicPieceCollisionVolume.leganavybattleship = { on = { ['1'] = { 48, 48, 120, 0, 8, -58, 1, 2 }, offsets = { 0, 30, 0 }, @@ -142,40 +142,40 @@ dynamicPieceCollisionVolume['leganavybattleship'] = { }, } -unitCollisionVolume['armanni'] = { +unitCollisionVolume.armanni = { on={54,81,54,0,-2,0,2,1,0}, off={54,56,54,0,-15,0,2,1,0}, } -unitCollisionVolume['armlab'] = { +unitCollisionVolume.armlab = { on={95,28,95,0,2,0,2,1,0}, off={95,22,95,0,-1,0,1,1,1}, } -unitCollisionVolume['armpb'] = { +unitCollisionVolume.armpb = { on={32,88,32,0,-8,0,1,1,1}, off={40,40,40,0,-8,0,3,1,1}, } -unitCollisionVolume['armplat'] = { +unitCollisionVolume.armplat = { on={96,66,96,0,33,0,1,1,1}, off={96,44,96,0,0,0,1,1,1}, } -unitCollisionVolume['armsolar'] = { +unitCollisionVolume.armsolar = { on={73,76,73,0,-18,1,0,1,0}, off={50,76,50,0,-18,1,0,1,0}, } -unitCollisionVolume['armvp'] = { +unitCollisionVolume.armvp = { on={96,34,96,0,0,0,2,1,0}, off={96,34,96,0,0,0,2,1,0}, } -unitCollisionVolume['cordoom'] = { +unitCollisionVolume.cordoom = { on={63,112,63,0,0,0,1,1,1}, off={45,87,45,0,-12,0,2,1,0}, } -unitCollisionVolume['corplat'] = { +unitCollisionVolume.corplat = { on={96,60,96,0,28,0,1,1,1}, off={96,42,96,0,-20,0,1,1,1}, } -unitCollisionVolume['legsolar'] = { +unitCollisionVolume.legsolar = { on={70,70,70,0,-12,1,0,1,0}, @@ -194,28 +194,28 @@ for name, v in pairs(unitCollisionVolume) do end end end -pieceCollisionVolume['corhrk'] = { +pieceCollisionVolume.corhrk = { ['2']={35,40,30,0,-8,0,2,1}, } -pieceCollisionVolume['legpede'] = { +pieceCollisionVolume.legpede = { ['0']={26,28,90,0,5,-23,2,1}, ['32']={26,28,86,0,0,7,2,1}, } -pieceCollisionVolume['legrail'] = { +pieceCollisionVolume.legrail = { ['2']={31,20,38,-0.5,-4,-4,2,1}, ['5']={10,10,36,0,0,9,1,2}, } -pieceCollisionVolume['legsrail'] = { +pieceCollisionVolume.legsrail = { ['0']={55,24,55,0,12,0,1,1}, ['7']={12,12,60,0,3,9,1,2}, } -pieceCollisionVolume['legerailtank'] = { +pieceCollisionVolume.legerailtank = { ['0']={65,20,75, 0,-4,0, 2,1}, ['4']={31,21,36, 0,0,0, 2,1}, --['10']={50,50,50,0,0,0,2,1}, } -pieceCollisionVolume['leginf'] = { +pieceCollisionVolume.leginf = { ['1']={38,49,88, 0,22.8,14.3, 2,1}, ['0']={35,37,88, 0,21,11, 2,1}, } @@ -223,181 +223,181 @@ pieceCollisionVolume['leginf'] = { --- ['0']={121,53,121,0,26,0,2,2}, --- ['7']={26,26,132,0,7,20,2,4}, ---} -pieceCollisionVolume['armrad'] = { +pieceCollisionVolume.armrad = { ['1']={22,58,22,0,0,0,1,1}, ['3']={60,13,13,11,0,0,1,0}, } -pieceCollisionVolume['armamb'] = { +pieceCollisionVolume.armamb = { ['3']={22,22,22,0,0,-10,1,1}, ['0']={60,30,15,0,0,0,1,1,0}, } -pieceCollisionVolume['cortoast'] = { +pieceCollisionVolume.cortoast = { ['3']={22,22,22,0,10,0,1,1}, ['0']={60,30,15,0,0,0,1,1,0}, } -pieceCollisionVolume['armbrtha'] = { +pieceCollisionVolume.armbrtha = { ['1']={32,84,32,0,-20,0,1,1}, ['3']={13,0,75,0,0,20,1,2}, } -pieceCollisionVolume['corint'] = { +pieceCollisionVolume.corint = { ['1']={72,84,72,0,28,0,1,1}, ['3']={13,13,34,0,1,28,1,2}, } -pieceCollisionVolume['armvulc'] = { +pieceCollisionVolume.armvulc = { ['0']={98,140,98,0,40,0,1,1}, ['5']={55,55,174,0,18,0,1,2}, } -pieceCollisionVolume['corgator'] = { +pieceCollisionVolume.corgator = { ['0']={23,14,33,0,0,0,2,1}, ['3']={15,5,25,0,0,2,2,1}, } -pieceCollisionVolume['corsala'] = { +pieceCollisionVolume.corsala = { ['0']={34,20,34,0,3.5,0,2,1}, ['1']={13.5,6.2,17,0,1.875,1.5,2,1}, } -pieceCollisionVolume['cortermite'] = { +pieceCollisionVolume.cortermite = { ['3']={22,10,22,0,2,0,1,1}, ['1']={48,25,48,0,0,0,1,1,0}, } -pieceCollisionVolume['correap'] = { +pieceCollisionVolume.correap = { ['1']={35,20,46,0,1,0,2,1}, ['9']={19,14,20,0,2,0,2,1}, } -pieceCollisionVolume['corlevlr'] = { +pieceCollisionVolume.corlevlr = { ['0']={31,17,31,0,3.5,0,2,1}, ['1']={16,10,15,0,1.875,1.5,2,1}, } -pieceCollisionVolume['corraid'] = { +pieceCollisionVolume.corraid = { ['0']={33,18,39,0,3.5,0,2,1}, ['4']={16,7,15,0,0,1,2,1}, } -pieceCollisionVolume['cormist'] = { +pieceCollisionVolume.cormist = { ['0']={34,18,43,0,3.5,0,2,1}, ['1']={20,28,24,0,0,1.5,2,1}, } -pieceCollisionVolume['corgarp'] = { +pieceCollisionVolume.corgarp = { ['0']={30,21,42,0,0,6,2,1}, ['6']={16,7,15,0,-2,1.5,2,1}, } -pieceCollisionVolume['armstump'] = { +pieceCollisionVolume.armstump = { ['0']={34,18,40,0,-5,0,2,1}, ['18']={17,16,16,1,0,0,2,1}, } -pieceCollisionVolume['armsam'] = { +pieceCollisionVolume.armsam = { ['0']={26,26,43,0,0,-2,2,1}, ['8']={16,16,20,0,0,0,2,1}, } -pieceCollisionVolume['armpincer'] = { +pieceCollisionVolume.armpincer = { ['0']={31,13,31,0,5,0,2,1}, ['1']={16,12,20,0,0,0,2,1}, } -pieceCollisionVolume['armjanus'] = { +pieceCollisionVolume.armjanus = { ['0']={26,12,35,0,0,0,2,1}, ['1']={20,10,20,0,0,0,2,1}, } -pieceCollisionVolume['armanac'] = { +pieceCollisionVolume.armanac = { ['0']={40,19,40,0,4,0,1,1}, ['3']={16,10,16,0,5,0,2,1}, } -pieceCollisionVolume['corah'] = { +pieceCollisionVolume.corah = { ['0']={28,16,35,0,5,0,2,1}, ['2']={10,20,10,0,0,0,2,1}, } -pieceCollisionVolume['corhal'] = { +pieceCollisionVolume.corhal = { ['0']={42,12,42,0,0,0,2,1}, ['1']={14,10,14,0,0,0,2,1}, } -pieceCollisionVolume['corsnap'] = { +pieceCollisionVolume.corsnap = { ['0']={32,16,38,0,4,0,2,1}, ['3']={12,10,12,0,0,0,2,1}, } -pieceCollisionVolume['corsumo'] = { +pieceCollisionVolume.corsumo = { ['0']={42,32,45,0,0,0,2,1}, ['2']={22,10,22,0,0,0,1,1}, } -pieceCollisionVolume['armfboy'] = { +pieceCollisionVolume.armfboy = { ['0']={34,40,42,0,-5,0,2,1}, ['8']={16,16,16,0,0,0,2,1}, } -pieceCollisionVolume['armfido'] = { +pieceCollisionVolume.armfido = { ['1']={26,32,34,0,-10,10,2,1}, ['15']={12,30,12,0,0,0,2,1}, } -pieceCollisionVolume['corgol'] = { +pieceCollisionVolume.corgol = { ['0']={48,44,56,0,0,0,2,1}, ['3']={24,24,24,0,0,0,2,1}, } -pieceCollisionVolume['cortrem'] = { +pieceCollisionVolume.cortrem = { ['0']={40,32,44,0,0,0,2,1}, ['1']={24,64,24,0,0,0,2,1}, } -pieceCollisionVolume['seal'] = { +pieceCollisionVolume.seal = { ['0']={28,25,34,0,0,0,2,1}, ['1']={12,16,12,0,0,0,2,1}, } -pieceCollisionVolume['corban'] = { +pieceCollisionVolume.corban = { ['0']={44,32,44,0,0,0,2,1}, ['3']={24,16,24,0,8,0,2,1}, } -pieceCollisionVolume['cormart'] = { +pieceCollisionVolume.cormart = { ['0']={30,28,34,0,0,0,2,1}, ['5']={12,25,12,0,2,0,2,1}, } -pieceCollisionVolume['armmart'] = { +pieceCollisionVolume.armmart = { ['0']={44,24,50,0,0,0,2,1}, ['1']={16,32,16,0,0,0,2,1}, } -pieceCollisionVolume['armbull'] = { +pieceCollisionVolume.armbull = { ['0']={44,23,52,0,5,0,2,1}, ['4']={24,18,24,0,0,0,2,1}, } -pieceCollisionVolume['armlatnk'] = { +pieceCollisionVolume.armlatnk = { ['0']={30,26,34,0,0,0,2,1}, ['5']={16,16,16,0,0,0,2,1}, } -pieceCollisionVolume['armmanni'] = { +pieceCollisionVolume.armmanni = { ['0']={48,34,38,0,10,0,2,1}, ['1']={24,52,24,0,0,0,2,1}, } -pieceCollisionVolume['armthor'] = { +pieceCollisionVolume.armthor = { ['0']={80,25,80,0,10,0,2,1}, ['15']={55,25,40,0,0,0,2,1}, } -pieceCollisionVolume['legfloat'] = { +pieceCollisionVolume.legfloat = { ['0']={40,18,50,0,-1.5,0,2,1}, ['8']={18,9,30,0,1,-5,2,1}, } -pieceCollisionVolume['legnavyfrigate'] = { +pieceCollisionVolume.legnavyfrigate = { ['0']={30,18,52,-1,-4,1,2,1}, ['3']={11,13,20,0,5,0,2,1}, } -pieceCollisionVolume['legcar'] = { +pieceCollisionVolume.legcar = { ['0']={34,16,46,0,-2.5,1,2,1}, ['4']={14,12,20,0,-2,-6,2,1}, } -pieceCollisionVolume['legmed'] = { +pieceCollisionVolume.legmed = { ['0']={48,31,69,0,0,0,2,1}, ['1']={7,35,15,0,40,-5,2,1}, } -pieceCollisionVolume['legehovertank'] = { +pieceCollisionVolume.legehovertank = { ['0']={63,32,63,0,-15,0,1,1}, ['20']={25,12,37,0,0,-6,2,1}, } -pieceCollisionVolume['corsiegebreaker'] = { +pieceCollisionVolume.corsiegebreaker = { ['0']={36,18,64,0,4,8,2,2}, ['1']={19,12,24,0,-2.5,-2.5,2,1}, } -pieceCollisionVolume['armshockwave'] = { +pieceCollisionVolume.armshockwave = { ['2']={22,22,22,0,10,0,1,1}, ['0']={60,65,60,0,20,0,1,1,0}, } -pieceCollisionVolume['legmohoconct'] = { +pieceCollisionVolume.legmohoconct = { ['0']={70,30,70,0,-3,0,1,1}, ['1']={21,16,30,0,-3,-1,2,1}, } @@ -410,15 +410,15 @@ for name, v in pairs(pieceCollisionVolume) do end end -dynamicPieceCollisionVolume['corvipe'] = { +dynamicPieceCollisionVolume.corvipe = { on = { ['0']={38,26,38,0,0,0,2,0}, ['5']={25,45,25,0,25,0,1,1}, -- changed to [1] so the cylinder collision is attached to the turret and not a door - ['offsets']={0,23,0}, + offsets={0,23,0}, }, off = { ['0']={38,26,38,0,0,0,2,0}, - ['offsets']={0, 8, 0}, --['offsets']={0,10,0}, TODO: revert back when issue fixed: https://springrts.com/mantis/view.php?id=5144 + offsets={0, 8, 0}, --['offsets']={0,10,0}, TODO: revert back when issue fixed: https://springrts.com/mantis/view.php?id=5144 } } for name, v in pairs(dynamicPieceCollisionVolume) do diff --git a/luarules/configs/critters.lua b/luarules/configs/critters.lua index be7b62b6108..736c8d248eb 100644 --- a/luarules/configs/critters.lua +++ b/luarules/configs/critters.lua @@ -3,361 +3,361 @@ local rnd = math.random -- USE LOWERCASE MAPNAMES (partial mapnames work too!) local critterConfig = { - ["avalanche"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 4000, z2 = 4000 }, unitNames = { ["critter_penguin"] = rnd(4, 7) } }, + avalanche = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 4000, z2 = 4000 }, unitNames = { critter_penguin = rnd(4, 7) } }, }, ["deeploria fields"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 10000, z2 = 10000 }, unitNames = { ["critter_goldfish"] = rnd(10, 25) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 10000, z2 = 10000 }, unitNames = { critter_goldfish = rnd(10, 25) } }, }, - ["calamity_v"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_goldfish"] = rnd(170, 240) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_gull"] = rnd(25, 45) } }, + calamity_v = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_goldfish = rnd(170, 240) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_gull = rnd(25, 45) } }, }, ["center command"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 8120, z2 = 8120 }, unitNames = { ["critter_gull"] = rnd(5, 15) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8120, z2 = 8120 }, unitNames = { critter_gull = rnd(5, 15) } }, }, - ["centerrock"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_goldfish"] = rnd(220, 440) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_gull"] = rnd(6, 11) } }, - { spawnCircle = { x = 1500, z = 7150, r = 1500 }, unitNames = { ["critter_gull"] = rnd(3, 5) } }, - { spawnCircle = { x = 7333, z = 380, r = 1500 }, unitNames = { ["critter_gull"] = rnd(2, 3) } }, - { spawnCircle = { x = 2950, z = 5500, r = 1600 }, unitNames = { ["critter_gull"] = rnd(2, 3) } }, - { spawnCircle = { x = 4333, z = 3777, r = 2400 }, unitNames = { ["critter_gull"] = rnd(4, 6) } }, + centerrock = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_goldfish = rnd(220, 440) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_gull = rnd(6, 11) } }, + { spawnCircle = { x = 1500, z = 7150, r = 1500 }, unitNames = { critter_gull = rnd(3, 5) } }, + { spawnCircle = { x = 7333, z = 380, r = 1500 }, unitNames = { critter_gull = rnd(2, 3) } }, + { spawnCircle = { x = 2950, z = 5500, r = 1600 }, unitNames = { critter_gull = rnd(2, 3) } }, + { spawnCircle = { x = 4333, z = 3777, r = 2400 }, unitNames = { critter_gull = rnd(4, 6) } }, }, - ["crescent_bay"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 12200, z2 = 12200 }, unitNames = { ["critter_goldfish"] = rnd(20, 30) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 12200, z2 = 12200 }, unitNames = { ["critter_gull"] = rnd(10, 15) } }, - { spawnCircle = { x = 1335, z = 6601, r = 100 }, unitNames = { ["critter_penguin"] = rnd(10, 15) } }, + crescent_bay = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 12200, z2 = 12200 }, unitNames = { critter_goldfish = rnd(20, 30) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 12200, z2 = 12200 }, unitNames = { critter_gull = rnd(10, 15) } }, + { spawnCircle = { x = 1335, z = 6601, r = 100 }, unitNames = { critter_penguin = rnd(10, 15) } }, }, - ["downs_of_destruction"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_goldfish"] = rnd(70, 110) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_crab"] = rnd(1, 2) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_gull"] = rnd(7, 11) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_duck"] = rnd(4, 6) } }, + downs_of_destruction = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_goldfish = rnd(70, 110) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_crab = rnd(1, 2) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_gull = rnd(7, 11) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_duck = rnd(4, 6) } }, }, - ["dworld"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 14300, z2 = 14300 }, unitNames = { ["critter_gull"] = rnd(16, 25) } }, + dworld = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 14300, z2 = 14300 }, unitNames = { critter_gull = rnd(16, 25) } }, }, - ["duck"] = { - { spawnCircle = { x = 800, z = 700, r = 200 }, unitNames = { ["critter_duck"] = rnd(2, 4) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 2000, z2 = 2000 }, unitNames = { ["critter_duck"] = rnd(2, 22) } }, + duck = { + { spawnCircle = { x = 800, z = 700, r = 200 }, unitNames = { critter_duck = rnd(2, 4) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 2000, z2 = 2000 }, unitNames = { critter_duck = rnd(2, 22) } }, }, ["emain macha"] = { - { spawnCircle = { x = 40, z = 4700, r = 800 }, unitNames = { ["critter_duck"] = rnd(1, 2) } }, - { spawnCircle = { x = 40, z = 4700, r = 1100 }, unitNames = { ["critter_gull"] = rnd(2, 3) } }, - { spawnCircle = { x = 40, z = 4700, r = 1100 }, unitNames = { ["critter_goldfish"] = rnd(6, 10) } }, - { spawnCircle = { x = 8100, z = 4700, r = 700 }, unitNames = { ["critter_duck"] = rnd(1, 2) } }, - { spawnCircle = { x = 8100, z = 4700, r = 1100 }, unitNames = { ["critter_gull"] = rnd(2, 3) } }, - { spawnCircle = { x = 8100, z = 4700, r = 1100 }, unitNames = { ["critter_goldfish"] = rnd(6, 10) } }, - { spawnCircle = { x = 8100, z = 4700, r = 1100 }, unitNames = { ["critter_crab"] = rnd(1, 2) } }, + { spawnCircle = { x = 40, z = 4700, r = 800 }, unitNames = { critter_duck = rnd(1, 2) } }, + { spawnCircle = { x = 40, z = 4700, r = 1100 }, unitNames = { critter_gull = rnd(2, 3) } }, + { spawnCircle = { x = 40, z = 4700, r = 1100 }, unitNames = { critter_goldfish = rnd(6, 10) } }, + { spawnCircle = { x = 8100, z = 4700, r = 700 }, unitNames = { critter_duck = rnd(1, 2) } }, + { spawnCircle = { x = 8100, z = 4700, r = 1100 }, unitNames = { critter_gull = rnd(2, 3) } }, + { spawnCircle = { x = 8100, z = 4700, r = 1100 }, unitNames = { critter_goldfish = rnd(6, 10) } }, + { spawnCircle = { x = 8100, z = 4700, r = 1100 }, unitNames = { critter_crab = rnd(1, 2) } }, }, - ["fallendell"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 5100, z2 = 5100 }, unitNames = { ["critter_gull"] = rnd(5, 10) } }, + fallendell = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 5100, z2 = 5100 }, unitNames = { critter_gull = rnd(5, 10) } }, }, ["flats and forests"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 12200, z2 = 12200 }, unitNames = { ["critter_gull"] = rnd(5, 15) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 12200, z2 = 12200 }, unitNames = { critter_gull = rnd(5, 15) } }, }, - ["folsomdam"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 7150 }, unitNames = { ["critter_gull"] = rnd(4, 7) } }, - { spawnBox = { x1 = 2200, z1 = 50, x2 = 8800, z2 = 7150 }, unitNames = { ["critter_gull"] = rnd(6, 10) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 7150 }, unitNames = { ["critter_goldfish"] = rnd(70, 140) } }, - { spawnCircle = { x = 6350, z = 6900, r = 260 }, unitNames = { ["critter_duck"] = rnd(0, 3) } }, - { spawnCircle = { x = 4100, z = 4500, r = 230 }, unitNames = { ["critter_duck"] = rnd(0, 2) } }, + folsomdam = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 7150 }, unitNames = { critter_gull = rnd(4, 7) } }, + { spawnBox = { x1 = 2200, z1 = 50, x2 = 8800, z2 = 7150 }, unitNames = { critter_gull = rnd(6, 10) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 7150 }, unitNames = { critter_goldfish = rnd(70, 140) } }, + { spawnCircle = { x = 6350, z = 6900, r = 260 }, unitNames = { critter_duck = rnd(0, 3) } }, + { spawnCircle = { x = 4100, z = 4500, r = 230 }, unitNames = { critter_duck = rnd(0, 2) } }, }, ["gecko isle"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 8100, z2 = 9000 }, unitNames = { ["critter_gull"] = rnd(5, 10) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8100, z2 = 9000 }, unitNames = { ["critter_goldfish"] = rnd(5, 10) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8100, z2 = 9000 }, unitNames = { critter_gull = rnd(5, 10) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8100, z2 = 9000 }, unitNames = { critter_goldfish = rnd(5, 10) } }, }, ["greenest fields"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 8100, z2 = 8100 }, unitNames = { ["critter_gull"] = rnd(3, 8) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8100, z2 = 8100 }, unitNames = { critter_gull = rnd(3, 8) } }, }, - ["hotlips"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 11200, z2 = 9150 }, unitNames = { ["critter_ant"] = rnd(20, 30) } }, + hotlips = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 11200, z2 = 9150 }, unitNames = { critter_ant = rnd(20, 30) } }, }, ["nuclear winter"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 10100, z2 = 6100 }, unitNames = { ["critter_penguin"] = rnd(9, 13) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 10100, z2 = 6100 }, unitNames = { critter_penguin = rnd(9, 13) } }, }, ["mariposa island"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 9000, z2 = 9000 }, unitNames = { ["critter_goldfish"] = rnd(10, 20) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 9000, z2 = 9000 }, unitNames = { ["critter_gull"] = rnd(10, 20) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 9000, z2 = 9000 }, unitNames = { critter_goldfish = rnd(10, 20) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 9000, z2 = 9000 }, unitNames = { critter_gull = rnd(10, 20) } }, }, ["melting glacier"] = { - { spawnCircle = { x = 5200, z = 4000, r = 2400 }, unitNames = { ["critter_penguin"] = rnd(3, 15) }}, + { spawnCircle = { x = 5200, z = 4000, r = 2400 }, unitNames = { critter_penguin = rnd(3, 15) }}, }, - ["mescaline"] = { - { spawnCircle = { x = 1933, z = 6080, r = 30 }, unitNames = { ["critter_goldfish"] = rnd(-5, 1) }, nowatercheck = true }, - { spawnCircle = { x = 1933, z = 6080, r = 500 }, unitNames = { ["critter_gull"] = rnd(-3, 1) } }, - { spawnCircle = { x = 7400, z = 970, r = 30 }, unitNames = { ["critter_goldfish"] = rnd(-5, 1) }, nowatercheck = true }, - { spawnCircle = { x = 7400, z = 970, r = 500 }, unitNames = { ["critter_gull"] = rnd(-3, 1) } }, - { spawnCircle = { x = 9450, z = 4200, r = 30 }, unitNames = { ["critter_goldfish"] = rnd(-5, 1) }, nowatercheck = true }, - { spawnCircle = { x = 9450, z = 4200, r = 500 }, unitNames = { ["critter_gull"] = rnd(-3, 1) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 6100 }, unitNames = { ["critter_gull"] = rnd(7, 12) } }, + mescaline = { + { spawnCircle = { x = 1933, z = 6080, r = 30 }, unitNames = { critter_goldfish = rnd(-5, 1) }, nowatercheck = true }, + { spawnCircle = { x = 1933, z = 6080, r = 500 }, unitNames = { critter_gull = rnd(-3, 1) } }, + { spawnCircle = { x = 7400, z = 970, r = 30 }, unitNames = { critter_goldfish = rnd(-5, 1) }, nowatercheck = true }, + { spawnCircle = { x = 7400, z = 970, r = 500 }, unitNames = { critter_gull = rnd(-3, 1) } }, + { spawnCircle = { x = 9450, z = 4200, r = 30 }, unitNames = { critter_goldfish = rnd(-5, 1) }, nowatercheck = true }, + { spawnCircle = { x = 9450, z = 4200, r = 500 }, unitNames = { critter_gull = rnd(-3, 1) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 6100 }, unitNames = { critter_gull = rnd(7, 12) } }, }, - ["neurope"] = { - { spawnBox = { x1 = 14400, z1 = 20, x2 = 16200, z2 = 1250 }, unitNames = { ["critter_penguin"] = rnd(5, 10) } }, - { spawnCircle = { x = 3950, z = 580, r = 600 }, unitNames = { ["critter_penguin"] = rnd(6, 14) } }, - { spawnCircle = { x = 3950, z = 580, r = 850 }, unitNames = { ["critter_gull"] = rnd(0, 2) } }, - { spawnCircle = { x = 1000, z = 650, r = 400 }, unitNames = { ["critter_penguin"] = rnd(0, 4) } }, - { spawnCircle = { x = 1350, z = 2850, r = 1500 }, unitNames = { ["critter_gull"] = rnd(0, 3) } }, - { spawnCircle = { x = 11650, z = 1100, r = 500 }, unitNames = { ["critter_penguin"] = rnd(0, 3) } }, - { spawnBox = { x1 = 7400, z1 = 500, x2 = 9150, z2 = 1200 }, unitNames = { ["critter_penguin"] = rnd(0, 4) } }, - { spawnBox = { x1 = 6150, z1 = 700, x2 = 8480, z2 = 1111 }, unitNames = { ["critter_penguin"] = rnd(0, 4) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 16200, z2 = 8150 }, unitNames = { ["critter_goldfish"] = rnd(100, 200) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 16200, z2 = 8150 }, unitNames = { ["critter_crab"] = rnd(0, 1) } }, - { spawnBox = { x1 = 100, z1 = 100, x2 = 16200, z2 = 8150 }, unitNames = { ["critter_gull"] = rnd(15, 20) } }, + neurope = { + { spawnBox = { x1 = 14400, z1 = 20, x2 = 16200, z2 = 1250 }, unitNames = { critter_penguin = rnd(5, 10) } }, + { spawnCircle = { x = 3950, z = 580, r = 600 }, unitNames = { critter_penguin = rnd(6, 14) } }, + { spawnCircle = { x = 3950, z = 580, r = 850 }, unitNames = { critter_gull = rnd(0, 2) } }, + { spawnCircle = { x = 1000, z = 650, r = 400 }, unitNames = { critter_penguin = rnd(0, 4) } }, + { spawnCircle = { x = 1350, z = 2850, r = 1500 }, unitNames = { critter_gull = rnd(0, 3) } }, + { spawnCircle = { x = 11650, z = 1100, r = 500 }, unitNames = { critter_penguin = rnd(0, 3) } }, + { spawnBox = { x1 = 7400, z1 = 500, x2 = 9150, z2 = 1200 }, unitNames = { critter_penguin = rnd(0, 4) } }, + { spawnBox = { x1 = 6150, z1 = 700, x2 = 8480, z2 = 1111 }, unitNames = { critter_penguin = rnd(0, 4) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 16200, z2 = 8150 }, unitNames = { critter_goldfish = rnd(100, 200) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 16200, z2 = 8150 }, unitNames = { critter_crab = rnd(0, 1) } }, + { spawnBox = { x1 = 100, z1 = 100, x2 = 16200, z2 = 8150 }, unitNames = { critter_gull = rnd(15, 20) } }, }, ["onyx cauldron"] = { --{ spawnBox = { x1 = 50, z1 = 50, x2 = 10000, z2 = 10000 }, unitNames = { ["critter_gull"] = rnd(5, 20) } }, - { spawnCircle = { x = 4493, z = 3775, r = 120 }, unitNames = { ["critter_goldfish"] = rnd(-4, 1) }, nowatercheck = true }, - { spawnCircle = { x = 3593, z = 775, r = 60 }, unitNames = { ["critter_goldfish"] = rnd(-4, 1) }, nowatercheck = true }, - { spawnCircle = { x = 1933, z = 6080, r = 500 }, unitNames = { ["critter_gull"] = rnd(-3, 1) } }, - { spawnCircle = { x = 6050, z = 2583, r = 30 }, unitNames = { ["critter_goldfish"] = rnd(-4, 1) }, nowatercheck = true }, - { spawnCircle = { x = 7400, z = 970, r = 500 }, unitNames = { ["critter_gull"] = rnd(-3, 1) } }, - { spawnCircle = { x = 7450, z = 4500, r = 60 }, unitNames = { ["critter_goldfish"] = rnd(-4, 1) }, nowatercheck = true }, - { spawnCircle = { x = 7450, z = 4200, r = 500 }, unitNames = { ["critter_gull"] = rnd(-3, 1) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 6100 }, unitNames = { ["critter_gull"] = rnd(3, 8) } }, - { spawnCircle = { x = 2833, z = 966, r = 450 }, unitNames = { ["critter_duck"] = rnd(0, 2) } }, - { spawnCircle = { x = 7033, z = 5695, r = 450 }, unitNames = { ["critter_duck"] = rnd(0, 2) } }, + { spawnCircle = { x = 4493, z = 3775, r = 120 }, unitNames = { critter_goldfish = rnd(-4, 1) }, nowatercheck = true }, + { spawnCircle = { x = 3593, z = 775, r = 60 }, unitNames = { critter_goldfish = rnd(-4, 1) }, nowatercheck = true }, + { spawnCircle = { x = 1933, z = 6080, r = 500 }, unitNames = { critter_gull = rnd(-3, 1) } }, + { spawnCircle = { x = 6050, z = 2583, r = 30 }, unitNames = { critter_goldfish = rnd(-4, 1) }, nowatercheck = true }, + { spawnCircle = { x = 7400, z = 970, r = 500 }, unitNames = { critter_gull = rnd(-3, 1) } }, + { spawnCircle = { x = 7450, z = 4500, r = 60 }, unitNames = { critter_goldfish = rnd(-4, 1) }, nowatercheck = true }, + { spawnCircle = { x = 7450, z = 4200, r = 500 }, unitNames = { critter_gull = rnd(-3, 1) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 6100 }, unitNames = { critter_gull = rnd(3, 8) } }, + { spawnCircle = { x = 2833, z = 966, r = 450 }, unitNames = { critter_duck = rnd(0, 2) } }, + { spawnCircle = { x = 7033, z = 5695, r = 450 }, unitNames = { critter_duck = rnd(0, 2) } }, }, ["pawn retreat"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 10000, z2 = 10000 }, unitNames = { ["critter_gull"] = rnd(5, 20) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 10000, z2 = 10000 }, unitNames = { critter_gull = rnd(5, 20) } }, }, - ["paradise_lost"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 5050 }, unitNames = { ["critter_gull"] = rnd(15, 25) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 5050 }, unitNames = { ["critter_goldfish"] = rnd(100, 150) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 5050 }, unitNames = { ["critter_goldfish"] = rnd(0, 1) } }, + paradise_lost = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 5050 }, unitNames = { critter_gull = rnd(15, 25) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 5050 }, unitNames = { critter_goldfish = rnd(100, 150) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 10200, z2 = 5050 }, unitNames = { critter_goldfish = rnd(0, 1) } }, }, ["real europe"] = { - { spawnBox = { x1 = 50, z1 = 4000, x2 = 12250, z2 = 12250 }, unitNames = { ["critter_goldfish"] = rnd(220, 300) } }, - { spawnCircle = { x = 2050, z = 2700, r = 2500 }, unitNames = { ["critter_gull"] = rnd(4, 7) } }, - { spawnCircle = { x = 3000, z = 6700, r = 3300 }, unitNames = { ["critter_gull"] = rnd(8, 11) } }, - { spawnCircle = { x = 7100, z = 6300, r = 4200 }, unitNames = { ["critter_gull"] = rnd(11, 18) } }, - { spawnCircle = { x = 5200, z = 3000, r = 2500 }, unitNames = { ["critter_gull"] = rnd(5, 8) } }, - { spawnCircle = { x = 7350, z = 8250, r = 2000 }, unitNames = { ["critter_gull"] = rnd(5, 8) } }, - { spawnCircle = { x = 8500, z = 3650, r = 1550 }, unitNames = { ["critter_gull"] = rnd(2, 4) } }, - { spawnCircle = { x = 11000, z = 1600, r = 2300 }, unitNames = { ["critter_penguin"] = rnd(8, 12) } }, - { spawnCircle = { x = 11500, z = 3650, r = 1500 }, unitNames = { ["critter_penguin"] = rnd(6, 10) } }, - { spawnCircle = { x = 6550, z = 100, r = 1600 }, unitNames = { ["critter_penguin"] = rnd(6, 10) } }, - { spawnCircle = { x = 5080, z = 200, r = 850 }, unitNames = { ["critter_penguin"] = rnd(2, 4) } }, - { spawnCircle = { x = 12222, z = 500, r = 1100 }, unitNames = { ["critter_penguin"] = rnd(2, 4) } }, - { spawnCircle = { x = 7800, z = 1400, r = 200 }, unitNames = { ["critter_penguin"] = rnd(1, 2) } }, - { spawnCircle = { x = 9666, z = 1444, r = 1050 }, unitNames = { ["critter_penguin"] = rnd(2, 4) } }, - { spawnCircle = { x = 5333, z = 8666, r = 600 }, unitNames = { ["critter_duck"] = rnd(4, 6) } }, - { spawnCircle = { x = 6633, z = 9595, r = 450 }, unitNames = { ["critter_duck"] = rnd(2, 3) } }, - { spawnBox = { x1 = 9980, z1 = 8333, x2 = 12250, z2 = 9933 }, unitNames = { ["critter_ant"] = rnd(4, 6) } }, - { spawnBox = { x1 = 5666, z1 = 11666, x2 = 12250, z2 = 12250 }, unitNames = { ["critter_ant"] = rnd(6, 10) } }, - { spawnBox = { x1 = 1333, z1 = 10300, x2 = 5666, z2 = 12250 }, unitNames = { ["critter_ant"] = rnd(10, 16) } }, + { spawnBox = { x1 = 50, z1 = 4000, x2 = 12250, z2 = 12250 }, unitNames = { critter_goldfish = rnd(220, 300) } }, + { spawnCircle = { x = 2050, z = 2700, r = 2500 }, unitNames = { critter_gull = rnd(4, 7) } }, + { spawnCircle = { x = 3000, z = 6700, r = 3300 }, unitNames = { critter_gull = rnd(8, 11) } }, + { spawnCircle = { x = 7100, z = 6300, r = 4200 }, unitNames = { critter_gull = rnd(11, 18) } }, + { spawnCircle = { x = 5200, z = 3000, r = 2500 }, unitNames = { critter_gull = rnd(5, 8) } }, + { spawnCircle = { x = 7350, z = 8250, r = 2000 }, unitNames = { critter_gull = rnd(5, 8) } }, + { spawnCircle = { x = 8500, z = 3650, r = 1550 }, unitNames = { critter_gull = rnd(2, 4) } }, + { spawnCircle = { x = 11000, z = 1600, r = 2300 }, unitNames = { critter_penguin = rnd(8, 12) } }, + { spawnCircle = { x = 11500, z = 3650, r = 1500 }, unitNames = { critter_penguin = rnd(6, 10) } }, + { spawnCircle = { x = 6550, z = 100, r = 1600 }, unitNames = { critter_penguin = rnd(6, 10) } }, + { spawnCircle = { x = 5080, z = 200, r = 850 }, unitNames = { critter_penguin = rnd(2, 4) } }, + { spawnCircle = { x = 12222, z = 500, r = 1100 }, unitNames = { critter_penguin = rnd(2, 4) } }, + { spawnCircle = { x = 7800, z = 1400, r = 200 }, unitNames = { critter_penguin = rnd(1, 2) } }, + { spawnCircle = { x = 9666, z = 1444, r = 1050 }, unitNames = { critter_penguin = rnd(2, 4) } }, + { spawnCircle = { x = 5333, z = 8666, r = 600 }, unitNames = { critter_duck = rnd(4, 6) } }, + { spawnCircle = { x = 6633, z = 9595, r = 450 }, unitNames = { critter_duck = rnd(2, 3) } }, + { spawnBox = { x1 = 9980, z1 = 8333, x2 = 12250, z2 = 9933 }, unitNames = { critter_ant = rnd(4, 6) } }, + { spawnBox = { x1 = 5666, z1 = 11666, x2 = 12250, z2 = 12250 }, unitNames = { critter_ant = rnd(6, 10) } }, + { spawnBox = { x1 = 1333, z1 = 10300, x2 = 5666, z2 = 12250 }, unitNames = { critter_ant = rnd(10, 16) } }, }, ["ring atoll remake"] = { - { spawnBox = { x1 = 2000, z1 = 2000, x2 = 7200, z2 = 7200 }, unitNames = { ["critter_goldfish"] = rnd(5, 15) } }, - { spawnBox = { x1 = 2000, z1 = 2000, x2 = 7200, z2 = 7200 }, unitNames = { ["critter_gull"] = rnd(5, 15) } }, - { spawnBox = { x1 = 2000, z1 = 2000, x2 = 7200, z2 = 7200 }, unitNames = { ["critter_crab"] = rnd(5, 15) } }, + { spawnBox = { x1 = 2000, z1 = 2000, x2 = 7200, z2 = 7200 }, unitNames = { critter_goldfish = rnd(5, 15) } }, + { spawnBox = { x1 = 2000, z1 = 2000, x2 = 7200, z2 = 7200 }, unitNames = { critter_gull = rnd(5, 15) } }, + { spawnBox = { x1 = 2000, z1 = 2000, x2 = 7200, z2 = 7200 }, unitNames = { critter_crab = rnd(5, 15) } }, }, ["serene caldera"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 15000, z2 = 15000 }, unitNames = { ["critter_goldfish"] = rnd(100, 150) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 15000, z2 = 15000 }, unitNames = { ["critter_gull"] = rnd(15, 30) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 15000, z2 = 15000 }, unitNames = { critter_goldfish = rnd(100, 150) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 15000, z2 = 15000 }, unitNames = { critter_gull = rnd(15, 30) } }, }, ["sulphur springs"] = { - { spawnCircle = { x = 4300, z = 8000, r = 2000 }, unitNames = { ["critter_ant"] = rnd(3, 10) } }, + { spawnCircle = { x = 4300, z = 8000, r = 2000 }, unitNames = { critter_ant = rnd(3, 10) } }, }, ["supreme isthmus winter"] = { - { spawnCircle = { x = 3500, z = 8500, r = 400 }, unitNames = { ["critter_penguin"] = rnd(2, 4) } }, - { spawnCircle = { x = 8800, z = 3800, r = 400 }, unitNames = { ["critter_penguin"] = rnd(2, 4) } }, - { spawnCircle = { x = 990, z = 1900, r = 400 }, unitNames = { ["critter_penguin"] = rnd(3, 5) } }, - { spawnCircle = { x = 11000, z = 10000, r = 400 }, unitNames = { ["critter_penguin"] = rnd(3, 5) } }, - { spawnCircle = { x = 6200, z = 300, r = 400 }, unitNames = { ["critter_penguin"] = rnd(2, 4) } }, - { spawnCircle = { x = 6000, z = 12000, r = 400 }, unitNames = { ["critter_penguin"] = rnd(2, 4) } }, - { spawnCircle = { x = 5500, z = 6400, r = 400 }, unitNames = { ["critter_penguin"] = rnd(2, 4) } }, - { spawnCircle = { x = 6600, z = 6200, r = 400 }, unitNames = { ["critter_penguin"] = rnd(2, 4) } }, - { spawnCircle = { x = 4000, z = 4800, r = 400 }, unitNames = { ["critter_penguin"] = rnd(2, 4) } }, - { spawnCircle = { x = 11800, z = 7300, r = 400 }, unitNames = { ["critter_penguin"] = rnd(2, 4) } }, + { spawnCircle = { x = 3500, z = 8500, r = 400 }, unitNames = { critter_penguin = rnd(2, 4) } }, + { spawnCircle = { x = 8800, z = 3800, r = 400 }, unitNames = { critter_penguin = rnd(2, 4) } }, + { spawnCircle = { x = 990, z = 1900, r = 400 }, unitNames = { critter_penguin = rnd(3, 5) } }, + { spawnCircle = { x = 11000, z = 10000, r = 400 }, unitNames = { critter_penguin = rnd(3, 5) } }, + { spawnCircle = { x = 6200, z = 300, r = 400 }, unitNames = { critter_penguin = rnd(2, 4) } }, + { spawnCircle = { x = 6000, z = 12000, r = 400 }, unitNames = { critter_penguin = rnd(2, 4) } }, + { spawnCircle = { x = 5500, z = 6400, r = 400 }, unitNames = { critter_penguin = rnd(2, 4) } }, + { spawnCircle = { x = 6600, z = 6200, r = 400 }, unitNames = { critter_penguin = rnd(2, 4) } }, + { spawnCircle = { x = 4000, z = 4800, r = 400 }, unitNames = { critter_penguin = rnd(2, 4) } }, + { spawnCircle = { x = 11800, z = 7300, r = 400 }, unitNames = { critter_penguin = rnd(2, 4) } }, }, ["supreme crossing"] = { - { spawnCircle = { x = 5800, z = 6250, r = 1300 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 7500, z = 5200, r = 200 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 2350, z = 1950, r = 1300 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 850, z = 2850, r = 200 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 7000, z = 1450, r = 450 }, unitNames = { ["critter_duck"] = rnd(0, 3) } }, - { spawnCircle = { x = 1220, z = 6720, r = 450 }, unitNames = { ["critter_duck"] = rnd(0, 3) } }, - { spawnBox = { x1 = 100, z1 = 100, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_gull"] = rnd(7, 12) } }, - { spawnBox = { x1 = 100, z1 = 100, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_goldfish"] = rnd(50, 100) } }, + { spawnCircle = { x = 5800, z = 6250, r = 1300 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 7500, z = 5200, r = 200 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 2350, z = 1950, r = 1300 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 850, z = 2850, r = 200 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 7000, z = 1450, r = 450 }, unitNames = { critter_duck = rnd(0, 3) } }, + { spawnCircle = { x = 1220, z = 6720, r = 450 }, unitNames = { critter_duck = rnd(0, 3) } }, + { spawnBox = { x1 = 100, z1 = 100, x2 = 8150, z2 = 8150 }, unitNames = { critter_gull = rnd(7, 12) } }, + { spawnBox = { x1 = 100, z1 = 100, x2 = 8150, z2 = 8150 }, unitNames = { critter_goldfish = rnd(50, 100) } }, }, ["supreme isthmus"] = { - { spawnCircle = { x = 8700, z = 9300, r = 2000 }, unitNames = { ["critter_goldfish"] = rnd(2, 10) } }, - { spawnCircle = { x = 3200, z = 2500, r = 2000 }, unitNames = { ["critter_goldfish"] = rnd(2, 10) } }, - { spawnCircle = { x = 9700, z = 3232, r = 500 }, unitNames = { ["critter_goldfish"] = rnd(1, 3) } }, - { spawnCircle = { x = 2500, z = 9000, r = 500 }, unitNames = { ["critter_goldfish"] = rnd(1, 3) } }, - { spawnCircle = { x = 6050, z = 6050, r = 800 }, unitNames = { ["critter_crab"] = rnd(2, 6) } }, - { spawnBox = { x1 = 100, z1 = 100, x2 = 12150, z2 = 12150 }, unitNames = { ["critter_gull"] = rnd(10, 20) } }, + { spawnCircle = { x = 8700, z = 9300, r = 2000 }, unitNames = { critter_goldfish = rnd(2, 10) } }, + { spawnCircle = { x = 3200, z = 2500, r = 2000 }, unitNames = { critter_goldfish = rnd(2, 10) } }, + { spawnCircle = { x = 9700, z = 3232, r = 500 }, unitNames = { critter_goldfish = rnd(1, 3) } }, + { spawnCircle = { x = 2500, z = 9000, r = 500 }, unitNames = { critter_goldfish = rnd(1, 3) } }, + { spawnCircle = { x = 6050, z = 6050, r = 800 }, unitNames = { critter_crab = rnd(2, 6) } }, + { spawnBox = { x1 = 100, z1 = 100, x2 = 12150, z2 = 12150 }, unitNames = { critter_gull = rnd(10, 20) } }, }, - ["tabula_remake"] = { + tabula_remake = { --{ spawnCircle = { x = 5440, z = 4700, r = 150 }, unitNames = { ["critter_ant"] = rnd(-3, 1) } }, --{ spawnCircle = { x = 5900, z = 7000, r = 150 }, unitNames = { ["critter_ant"] = rnd(-3, 1) } }, --{ spawnCircle = { x = 300, z = 6950, r = 220 }, unitNames = { ["critter_ant"] = rnd(-5, 5) } }, --{ spawnBox = { x1 = 2280, z1 = 12, x2 = 2410, z2 = 250 }, unitNames = { ["critter_ant"] = rnd(-3, 1) } }, - { spawnBox = { x1 = 6100, z1 = 1700, x2 = 6300, z2 = 2000 }, unitNames = { ["critter_duck"] = rnd(1, 3) } }, - { spawnBox = { x1 = 1500, z1 = 6000, x2 = 1800, z2 = 6600 }, unitNames = { ["critter_duck"] = rnd(1, 3) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 7150 }, unitNames = { ["critter_gull"] = rnd(5, 8) } }, - { spawnBox = { x1 = 1000, z1 = 4500, x2 = 3150, z2 = 8150 }, unitNames = { ["critter_gull"] = rnd(3, 4) } }, - { spawnBox = { x1 = 5000, z1 = 50, x2 = 7050, z2 = 4650 }, unitNames = { ["critter_gull"] = rnd(3, 4) } }, - { spawnBox = { x1 = 1700, z1 = 5750, x2 = 2600, z2 = 8150 }, unitNames = { ["critter_goldfish"] = rnd(4, 6) } }, - { spawnBox = { x1 = 5500, z1 = 50, x2 = 6500, z2 = 1450 }, unitNames = { ["critter_goldfish"] = rnd(4, 6) } }, - { spawnBox = { x1 = 1700, z1 = 5750, x2 = 2600, z2 = 8150 }, unitNames = { ["critter_crab"] = rnd(0, 1) } }, - { spawnBox = { x1 = 5500, z1 = 50, x2 = 6500, z2 = 1450 }, unitNames = { ["critter_crab"] = rnd(0, 1) } }, - }, - - ["talus"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_gull"] = rnd(7, 12) } }, - { spawnCircle = { x = 6555, z = 4155, r = 650 }, unitNames = { ["critter_gull"] = rnd(2, 4) } }, - { spawnCircle = { x = 1600, z = 4044, r = 650 }, unitNames = { ["critter_gull"] = rnd(2, 4) } }, - { spawnCircle = { x = 1310, z = 2065, r = 550 }, unitNames = { ["critter_gull"] = rnd(0, 1) } }, - { spawnCircle = { x = 1310, z = 2065, r = 30 }, unitNames = { ["critter_goldfish"] = rnd(-2, 1) }, nowatercheck = true }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_goldfish"] = rnd(30, 50) } }, - }, - - ["tangerine"] = { - { spawnCircle = { x = 1400, z = 7500, r = 500 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 750, z = 7000, r = 500 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 400, z = 3150, r = 400 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 120, z = 4000, r = 500 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 7500, z = 750, r = 550 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 7750, z = 4400, r = 550 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 6000, z = 4000, r = 500 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 2000, z = 5100, r = 700 }, unitNames = { ["critter_gull"] = rnd(0, 3) } }, - { spawnCircle = { x = 5200, z = 1300, r = 800 }, unitNames = { ["critter_gull"] = rnd(0, 3) } }, - { spawnCircle = { x = 5500, z = 4500, r = 1100 }, unitNames = { ["critter_gull"] = rnd(0, 3) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_goldfish"] = rnd(40, 80) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_gull"] = rnd(14, 20) } }, - }, - - ["tempest"] = { - { spawnCircle = { x = 6500, z = 4450, r = 500 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 6700, z = 6000, r = 350 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 4300, z = 7777, r = 280 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 3800, z = 2550, r = 280 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 3850, z = 5600, r = 800 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 5300, z = 5100, r = 1100 }, unitNames = { ["critter_goldfish"] = rnd(0, 3) } }, - { spawnCircle = { x = 5000, z = 2500, r = 1700 }, unitNames = { ["critter_gull"] = rnd(0, 3) } }, - { spawnCircle = { x = 5000, z = 7500, r = 1700 }, unitNames = { ["critter_gull"] = rnd(0, 3) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_goldfish"] = rnd(33, 66) } }, + { spawnBox = { x1 = 6100, z1 = 1700, x2 = 6300, z2 = 2000 }, unitNames = { critter_duck = rnd(1, 3) } }, + { spawnBox = { x1 = 1500, z1 = 6000, x2 = 1800, z2 = 6600 }, unitNames = { critter_duck = rnd(1, 3) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 7150 }, unitNames = { critter_gull = rnd(5, 8) } }, + { spawnBox = { x1 = 1000, z1 = 4500, x2 = 3150, z2 = 8150 }, unitNames = { critter_gull = rnd(3, 4) } }, + { spawnBox = { x1 = 5000, z1 = 50, x2 = 7050, z2 = 4650 }, unitNames = { critter_gull = rnd(3, 4) } }, + { spawnBox = { x1 = 1700, z1 = 5750, x2 = 2600, z2 = 8150 }, unitNames = { critter_goldfish = rnd(4, 6) } }, + { spawnBox = { x1 = 5500, z1 = 50, x2 = 6500, z2 = 1450 }, unitNames = { critter_goldfish = rnd(4, 6) } }, + { spawnBox = { x1 = 1700, z1 = 5750, x2 = 2600, z2 = 8150 }, unitNames = { critter_crab = rnd(0, 1) } }, + { spawnBox = { x1 = 5500, z1 = 50, x2 = 6500, z2 = 1450 }, unitNames = { critter_crab = rnd(0, 1) } }, + }, + + talus = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_gull = rnd(7, 12) } }, + { spawnCircle = { x = 6555, z = 4155, r = 650 }, unitNames = { critter_gull = rnd(2, 4) } }, + { spawnCircle = { x = 1600, z = 4044, r = 650 }, unitNames = { critter_gull = rnd(2, 4) } }, + { spawnCircle = { x = 1310, z = 2065, r = 550 }, unitNames = { critter_gull = rnd(0, 1) } }, + { spawnCircle = { x = 1310, z = 2065, r = 30 }, unitNames = { critter_goldfish = rnd(-2, 1) }, nowatercheck = true }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_goldfish = rnd(30, 50) } }, + }, + + tangerine = { + { spawnCircle = { x = 1400, z = 7500, r = 500 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 750, z = 7000, r = 500 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 400, z = 3150, r = 400 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 120, z = 4000, r = 500 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 7500, z = 750, r = 550 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 7750, z = 4400, r = 550 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 6000, z = 4000, r = 500 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 2000, z = 5100, r = 700 }, unitNames = { critter_gull = rnd(0, 3) } }, + { spawnCircle = { x = 5200, z = 1300, r = 800 }, unitNames = { critter_gull = rnd(0, 3) } }, + { spawnCircle = { x = 5500, z = 4500, r = 1100 }, unitNames = { critter_gull = rnd(0, 3) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_goldfish = rnd(40, 80) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_gull = rnd(14, 20) } }, + }, + + tempest = { + { spawnCircle = { x = 6500, z = 4450, r = 500 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 6700, z = 6000, r = 350 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 4300, z = 7777, r = 280 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 3800, z = 2550, r = 280 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 3850, z = 5600, r = 800 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 5300, z = 5100, r = 1100 }, unitNames = { critter_goldfish = rnd(0, 3) } }, + { spawnCircle = { x = 5000, z = 2500, r = 1700 }, unitNames = { critter_gull = rnd(0, 3) } }, + { spawnCircle = { x = 5000, z = 7500, r = 1700 }, unitNames = { critter_gull = rnd(0, 3) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_goldfish = rnd(33, 66) } }, }, ["titan-v"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 9200, z2 = 6100 }, unitNames = { ["critter_ant"] = rnd(7, 14) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 9200, z2 = 6100 }, unitNames = { critter_ant = rnd(7, 14) } }, }, - ["trefoil"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_goldfish"] = rnd(15, 30) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_gull"] = rnd(5, 10) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { ["critter_crab"] = rnd(1, 1) } }, + trefoil = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_goldfish = rnd(15, 30) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_gull = rnd(5, 10) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 8150, z2 = 8150 }, unitNames = { critter_crab = rnd(1, 1) } }, }, ["the cold place"] = { - { spawnCircle = { x = 5200, z = 6800, r = 700 }, unitNames = { ["critter_penguin"] = rnd(1, 3) } }, - { spawnCircle = { x = 6600, z = 1500, r = 500 }, unitNames = { ["critter_penguin"] = rnd(1, 3) } }, - { spawnCircle = { x = 1700, z = 3600, r = 500 }, unitNames = { ["critter_penguin"] = rnd(1, 3) } }, + { spawnCircle = { x = 5200, z = 6800, r = 700 }, unitNames = { critter_penguin = rnd(1, 3) } }, + { spawnCircle = { x = 6600, z = 1500, r = 500 }, unitNames = { critter_penguin = rnd(1, 3) } }, + { spawnCircle = { x = 1700, z = 3600, r = 500 }, unitNames = { critter_penguin = rnd(1, 3) } }, }, ["Requiem Outpost"] = { - { spawnCircle = { x = 6144, z = 3072, r = 700 }, unitNames = { ["critter_ant"] = rnd(2, 5) } }, - { spawnCircle = { x = 9144, z = 3072, r = 1400 }, unitNames = { ["critter_ant"] = rnd(2, 5) } }, + { spawnCircle = { x = 6144, z = 3072, r = 700 }, unitNames = { critter_ant = rnd(2, 5) } }, + { spawnCircle = { x = 9144, z = 3072, r = 1400 }, unitNames = { critter_ant = rnd(2, 5) } }, }, - ["quicksilver"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 7000, z2 = 7000 }, unitNames = { ["critter_goldfish"] = rnd(20, 30) } }, - { spawnBox = { x1 = 3681, z1 = 3717, x2 = 3804, z2 = 3858 }, unitNames = { ["critter_goldfish"] = rnd(1, 2) } }, - { spawnBox = { x1 = 1000, z1 = 500, x2 = 6500, z2 = 2400 }, unitNames = { ["critter_gull"] = rnd(2, 4) } }, - { spawnBox = { x1 = 500, z1 = 4300, x2 = 3500, z2 = 6700 }, unitNames = { ["critter_gull"] = rnd(2, 4) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 7000, z2 = 7000 }, unitNames = { ["critter_duck"] = rnd(1, 1) } }, - { spawnBox = { x1 = 2300, z1 = 900, x2 = 3100, z2 = 1600 }, unitNames = { ["critter_crab"] = rnd(0, 1) } }, - { spawnBox = { x1 = 5000, z1 = 5500, x2 = 5900, z2 = 6200 }, unitNames = { ["critter_crab"] = rnd(0, 1) } }, + quicksilver = { + { spawnBox = { x1 = 50, z1 = 50, x2 = 7000, z2 = 7000 }, unitNames = { critter_goldfish = rnd(20, 30) } }, + { spawnBox = { x1 = 3681, z1 = 3717, x2 = 3804, z2 = 3858 }, unitNames = { critter_goldfish = rnd(1, 2) } }, + { spawnBox = { x1 = 1000, z1 = 500, x2 = 6500, z2 = 2400 }, unitNames = { critter_gull = rnd(2, 4) } }, + { spawnBox = { x1 = 500, z1 = 4300, x2 = 3500, z2 = 6700 }, unitNames = { critter_gull = rnd(2, 4) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 7000, z2 = 7000 }, unitNames = { critter_duck = rnd(1, 1) } }, + { spawnBox = { x1 = 2300, z1 = 900, x2 = 3100, z2 = 1600 }, unitNames = { critter_crab = rnd(0, 1) } }, + { spawnBox = { x1 = 5000, z1 = 5500, x2 = 5900, z2 = 6200 }, unitNames = { critter_crab = rnd(0, 1) } }, }, ["tropical-v"] = { - { spawnCircle = { x = 1550, z = 4650, r = 400 }, unitNames = { ["critter_goldfish"] = rnd(0, 2) } }, - { spawnCircle = { x = 1000, z = 5300, r = 800 }, unitNames = { ["critter_goldfish"] = rnd(0, 2) } }, - { spawnCircle = { x = 1500, z = 5900, r = 700 }, unitNames = { ["critter_goldfish"] = rnd(0, 2) } }, - { spawnCircle = { x = 7700, z = 5300, r = 700 }, unitNames = { ["critter_goldfish"] = rnd(0, 2) } }, - { spawnCircle = { x = 7850, z = 4350, r = 800 }, unitNames = { ["critter_goldfish"] = rnd(0, 2) } }, - { spawnCircle = { x = 4600, z = 5200, r = 3500 }, unitNames = { ["critter_gull"] = rnd(3, 5) } }, - { spawnCircle = { x = 4600, z = 5200, r = 500 }, unitNames = { ["critter_duck"] = rnd(0, 2) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 9150, z2 = 10200 }, unitNames = { ["critter_goldfish"] = rnd(40, 80) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 9150, z2 = 10200 }, unitNames = { ["critter_gull"] = rnd(12, 20) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 9150, z2 = 10200 }, unitNames = { ["critter_crab"] = rnd(0, 1) } }, + { spawnCircle = { x = 1550, z = 4650, r = 400 }, unitNames = { critter_goldfish = rnd(0, 2) } }, + { spawnCircle = { x = 1000, z = 5300, r = 800 }, unitNames = { critter_goldfish = rnd(0, 2) } }, + { spawnCircle = { x = 1500, z = 5900, r = 700 }, unitNames = { critter_goldfish = rnd(0, 2) } }, + { spawnCircle = { x = 7700, z = 5300, r = 700 }, unitNames = { critter_goldfish = rnd(0, 2) } }, + { spawnCircle = { x = 7850, z = 4350, r = 800 }, unitNames = { critter_goldfish = rnd(0, 2) } }, + { spawnCircle = { x = 4600, z = 5200, r = 3500 }, unitNames = { critter_gull = rnd(3, 5) } }, + { spawnCircle = { x = 4600, z = 5200, r = 500 }, unitNames = { critter_duck = rnd(0, 2) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 9150, z2 = 10200 }, unitNames = { critter_goldfish = rnd(40, 80) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 9150, z2 = 10200 }, unitNames = { critter_gull = rnd(12, 20) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 9150, z2 = 10200 }, unitNames = { critter_crab = rnd(0, 1) } }, }, ["throne v"] = { - { spawnBox = { x1 = 50, z1 = 50, x2 = 12200, z2 = 12200 }, unitNames = { ["critter_goldfish"] = rnd(70, 140) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 12200, z2 = 12200 }, unitNames = { critter_goldfish = rnd(70, 140) } }, }, - ["tumult"] = { - { spawnBox = { x1 = 3450, z1 = 3490, x2 = 3660, z2 = 3720 }, unitNames = { ["critter_goldfish"] = rnd(5, 11) } }, - { spawnBox = { x1 = 50, z1 = 50, x2 = 7150, z2 = 7150 }, unitNames = { ["critter_ant"] = rnd(5, 10) } }, + tumult = { + { spawnBox = { x1 = 3450, z1 = 3490, x2 = 3660, z2 = 3720 }, unitNames = { critter_goldfish = rnd(5, 11) } }, + { spawnBox = { x1 = 50, z1 = 50, x2 = 7150, z2 = 7150 }, unitNames = { critter_ant = rnd(5, 10) } }, }, ["world in flames v"] = { - { spawnBox = { x1 = 50, z1 = 400, x2 = 16200, z2 = 7300 }, unitNames = { ["critter_goldfish"] = rnd(130, 170) } }, - { spawnCircle = { x = 3800, z = 5200, r = 600 }, unitNames = { ["critter_goldfish"] = rnd(9, 13) } }, -- silent sea - { spawnCircle = { x = 12500, z = 5400, r = 600 }, unitNames = { ["critter_goldfish"] = rnd(9, 13) } }, -- indian ocean - { spawnCircle = { x = 14300, z = 3100, r = 600 }, unitNames = { ["critter_goldfish"] = rnd(9, 13) } }, -- philippine sea - { spawnCircle = { x = 7000, z = 2400, r = 600 }, unitNames = { ["critter_goldfish"] = rnd(9, 13) } }, -- atlantic ocean europe - { spawnCircle = { x = 5300, z = 2800, r = 600 }, unitNames = { ["critter_goldfish"] = rnd(9, 13) } }, -- atlantic ocean americas - - { spawnBox = { x1 = 50, z1 = 7650, x2 = 16200, z2 = 8150 }, unitNames = { ["critter_penguin"] = rnd(14, 20) } }, -- antarctica - { spawnCircle = { x = 5050, z = 7450, r = 250 }, unitNames = { ["critter_penguin"] = rnd(7, 10) } }, -- antarctica colony 1 - { spawnCircle = { x = 15300, z = 7500, r = 250 }, unitNames = { ["critter_penguin"] = rnd(4, 6) } }, -- antarctica colony 2 - - { spawnCircle = { x = 14300, z = 5150, r = 530 }, unitNames = { ["critter_ant"] = rnd(5, 7) } }, -- australia center - { spawnCircle = { x = 14600, z = 4350, r = 280 }, unitNames = { ["critter_ant"] = rnd(2, 3) } }, -- australia top - - { spawnCircle = { x = 8900, z = 2400, r = 160 }, unitNames = { ["critter_duck"] = rnd(2, 3) } }, -- mediterranean sea - { spawnCircle = { x = 13400, z = 3400, r = 160 }, unitNames = { ["critter_duck"] = rnd(2, 3) } }, -- south china sea - - { spawnCircle = { x = 3050, z = 2900, r = 700 }, unitNames = { ["critter_gull"] = rnd(2, 3) } }, -- california - { spawnCircle = { x = 4600, z = 3350, r = 1100 }, unitNames = { ["critter_gull"] = rnd(6, 10) } }, -- jamaica - { spawnCircle = { x = 13400, z = 4000, r = 1100 }, unitNames = { ["critter_gull"] = rnd(6, 10) } }, -- indonesia - { spawnCircle = { x = 7900, z = 1900, r = 700 }, unitNames = { ["critter_gull"] = rnd(3, 5) } }, -- english strait - { spawnCircle = { x = 8900, z = 2400, r = 900 }, unitNames = { ["critter_gull"] = rnd(4, 6) } }, -- mediterranean sea - { spawnCircle = { x = 10400, z = 2200, r = 700 }, unitNames = { ["critter_gull"] = rnd(2, 3) } }, -- captic sea - { spawnCircle = { x = 6000, z = 4700, r = 1100 }, unitNames = { ["critter_gull"] = rnd(3, 5) } }, -- brasil - { spawnCircle = { x = 9000, z = 4000, r = 1100 }, unitNames = { ["critter_gull"] = rnd(3, 5) } }, -- mid-west africa - { spawnCircle = { x = 10500, z = 4700, r = 700 }, unitNames = { ["critter_gull"] = rnd(2, 3) } }, -- madagascar - { spawnCircle = { x = 14000, z = 2400, r = 700 }, unitNames = { ["critter_gull"] = rnd(2, 3) } }, -- south korea - { spawnCircle = { x = 14000, z = 2400, r = 700 }, unitNames = { ["critter_gull"] = rnd(2, 3) } }, -- south korea - { spawnCircle = { x = 10400, z = 3500, r = 700 }, unitNames = { ["critter_gull"] = rnd(2, 3) } }, -- gulf - { spawnCircle = { x = 16000, z = 6000, r = 700 }, unitNames = { ["critter_gull"] = rnd(2, 3) } }, -- new zealand + { spawnBox = { x1 = 50, z1 = 400, x2 = 16200, z2 = 7300 }, unitNames = { critter_goldfish = rnd(130, 170) } }, + { spawnCircle = { x = 3800, z = 5200, r = 600 }, unitNames = { critter_goldfish = rnd(9, 13) } }, -- silent sea + { spawnCircle = { x = 12500, z = 5400, r = 600 }, unitNames = { critter_goldfish = rnd(9, 13) } }, -- indian ocean + { spawnCircle = { x = 14300, z = 3100, r = 600 }, unitNames = { critter_goldfish = rnd(9, 13) } }, -- philippine sea + { spawnCircle = { x = 7000, z = 2400, r = 600 }, unitNames = { critter_goldfish = rnd(9, 13) } }, -- atlantic ocean europe + { spawnCircle = { x = 5300, z = 2800, r = 600 }, unitNames = { critter_goldfish = rnd(9, 13) } }, -- atlantic ocean americas + + { spawnBox = { x1 = 50, z1 = 7650, x2 = 16200, z2 = 8150 }, unitNames = { critter_penguin = rnd(14, 20) } }, -- antarctica + { spawnCircle = { x = 5050, z = 7450, r = 250 }, unitNames = { critter_penguin = rnd(7, 10) } }, -- antarctica colony 1 + { spawnCircle = { x = 15300, z = 7500, r = 250 }, unitNames = { critter_penguin = rnd(4, 6) } }, -- antarctica colony 2 + + { spawnCircle = { x = 14300, z = 5150, r = 530 }, unitNames = { critter_ant = rnd(5, 7) } }, -- australia center + { spawnCircle = { x = 14600, z = 4350, r = 280 }, unitNames = { critter_ant = rnd(2, 3) } }, -- australia top + + { spawnCircle = { x = 8900, z = 2400, r = 160 }, unitNames = { critter_duck = rnd(2, 3) } }, -- mediterranean sea + { spawnCircle = { x = 13400, z = 3400, r = 160 }, unitNames = { critter_duck = rnd(2, 3) } }, -- south china sea + + { spawnCircle = { x = 3050, z = 2900, r = 700 }, unitNames = { critter_gull = rnd(2, 3) } }, -- california + { spawnCircle = { x = 4600, z = 3350, r = 1100 }, unitNames = { critter_gull = rnd(6, 10) } }, -- jamaica + { spawnCircle = { x = 13400, z = 4000, r = 1100 }, unitNames = { critter_gull = rnd(6, 10) } }, -- indonesia + { spawnCircle = { x = 7900, z = 1900, r = 700 }, unitNames = { critter_gull = rnd(3, 5) } }, -- english strait + { spawnCircle = { x = 8900, z = 2400, r = 900 }, unitNames = { critter_gull = rnd(4, 6) } }, -- mediterranean sea + { spawnCircle = { x = 10400, z = 2200, r = 700 }, unitNames = { critter_gull = rnd(2, 3) } }, -- captic sea + { spawnCircle = { x = 6000, z = 4700, r = 1100 }, unitNames = { critter_gull = rnd(3, 5) } }, -- brasil + { spawnCircle = { x = 9000, z = 4000, r = 1100 }, unitNames = { critter_gull = rnd(3, 5) } }, -- mid-west africa + { spawnCircle = { x = 10500, z = 4700, r = 700 }, unitNames = { critter_gull = rnd(2, 3) } }, -- madagascar + { spawnCircle = { x = 14000, z = 2400, r = 700 }, unitNames = { critter_gull = rnd(2, 3) } }, -- south korea + { spawnCircle = { x = 14000, z = 2400, r = 700 }, unitNames = { critter_gull = rnd(2, 3) } }, -- south korea + { spawnCircle = { x = 10400, z = 3500, r = 700 }, unitNames = { critter_gull = rnd(2, 3) } }, -- gulf + { spawnCircle = { x = 16000, z = 6000, r = 700 }, unitNames = { critter_gull = rnd(2, 3) } }, -- new zealand }, diff --git a/luarules/configs/icon_generator.lua b/luarules/configs/icon_generator.lua index 94b21f979d5..79619fb4614 100644 --- a/luarules/configs/icon_generator.lua +++ b/luarules/configs/icon_generator.lua @@ -55,7 +55,7 @@ factionColors = function(faction) if color[scheme] then return color[scheme] else - return color['unknown'] + return color.unknown end end diff --git a/luarules/configs/map_biomes.lua b/luarules/configs/map_biomes.lua index ec2aeb54603..8ae27c4ae68 100644 --- a/luarules/configs/map_biomes.lua +++ b/luarules/configs/map_biomes.lua @@ -2,4 +2,4 @@ snowKeywords = {'argent strata','boreal falls','snow','frozen','cold','winter',' snowMaps = {} -- disable for maps that have a keyword but are not snowmaps -snowMaps['sacrifice_v1'] = false +snowMaps.sacrifice_v1 = false diff --git a/luarules/configs/powerusers.lua b/luarules/configs/powerusers.lua index fdd81f09d07..940b6599824 100644 --- a/luarules/configs/powerusers.lua +++ b/luarules/configs/powerusers.lua @@ -50,8 +50,8 @@ local singleplayer = { -- note: these permissions override others when singlepl -- Only applied when no accountID-based entry already exists for the player. local trustedNames = { ["[teh]Flow"] = everything, - ["Floris"] = everything, - ["PtaQ"] = everything, + Floris = everything, + PtaQ = everything, } return { diff --git a/luarules/configs/quick_start_build_defs.lua b/luarules/configs/quick_start_build_defs.lua index 71753bdd287..aa1dfbc4002 100644 --- a/luarules/configs/quick_start_build_defs.lua +++ b/luarules/configs/quick_start_build_defs.lua @@ -47,9 +47,9 @@ local quickStartConfig = { waterEnergyStorage = "other", }, buildSequence = { - ["metalMap"] = { - ["land"] = { - ["badWind"] = { + metalMap = { + land = { + badWind = { "mex", "solar", "solar", @@ -62,7 +62,7 @@ local quickStartConfig = { "solar", "landEnergyStorage", }, - ["goodWind"] = { + goodWind = { "mex", "windmill", "windmill", @@ -80,8 +80,8 @@ local quickStartConfig = { "solar", } }, - ["water"] = { - ["badWind"] = { + water = { + badWind = { "mex", "mex", "tidal", @@ -95,7 +95,7 @@ local quickStartConfig = { "tidal", "waterEnergyStorage", }, - ["goodWind"] = { + goodWind = { "mex", "mex", "tidal", @@ -111,9 +111,9 @@ local quickStartConfig = { } } }, - ["nonMetalMap"] = { - ["land"] = { - ["badWind"] = { + nonMetalMap = { + land = { + badWind = { "solar", "solar", "solar", @@ -127,7 +127,7 @@ local quickStartConfig = { "solar", "solar", }, - ["goodWind"] = { + goodWind = { "mex", "mex", "windmill", @@ -148,8 +148,8 @@ local quickStartConfig = { "converter", } }, - ["water"] = { - ["badWind"] = { + water = { + badWind = { "mex", "mex", "mex", @@ -164,7 +164,7 @@ local quickStartConfig = { "tidal", "tidal", }, - ["goodWind"] = { + goodWind = { "mex", "mex", "mex", diff --git a/luarules/configs/raptor_spawn_defs.lua b/luarules/configs/raptor_spawn_defs.lua index 9e7b9cb439c..2275900831d 100644 --- a/luarules/configs/raptor_spawn_defs.lua +++ b/luarules/configs/raptor_spawn_defs.lua @@ -25,27 +25,27 @@ local raptorTurrets = {} -- If you use fractions in spawnerPerWave, it becomes a percentage chance to spawn one. -raptorTurrets["raptor_turret_basic_t2_v1"] = { minQueenAnger = 0, spawnedPerWave = 0.5, maxExisting = 20, maxQueenAnger = 1000, } -raptorTurrets["raptor_turret_acid_t2_v1"] = { minQueenAnger = 15, spawnedPerWave = 0.25, maxExisting = 10, maxQueenAnger = 1000, } -raptorTurrets["raptor_turret_emp_t2_v1"] = { minQueenAnger = 15, spawnedPerWave = 0.25, maxExisting = 10, maxQueenAnger = 1000, } -raptorTurrets["raptor_turret_basic_t3_v1"] = { minQueenAnger = 30, spawnedPerWave = 0.5, maxExisting = 6, maxQueenAnger = 1000, } -raptorTurrets["raptor_turret_acid_t3_v1"] = { minQueenAnger = 45, spawnedPerWave = 0.25, maxExisting = 3, maxQueenAnger = 1000, } -raptorTurrets["raptor_turret_emp_t3_v1"] = { minQueenAnger = 45, spawnedPerWave = 0.25, maxExisting = 3, maxQueenAnger = 1000, } +raptorTurrets.raptor_turret_basic_t2_v1 = { minQueenAnger = 0, spawnedPerWave = 0.5, maxExisting = 20, maxQueenAnger = 1000, } +raptorTurrets.raptor_turret_acid_t2_v1 = { minQueenAnger = 15, spawnedPerWave = 0.25, maxExisting = 10, maxQueenAnger = 1000, } +raptorTurrets.raptor_turret_emp_t2_v1 = { minQueenAnger = 15, spawnedPerWave = 0.25, maxExisting = 10, maxQueenAnger = 1000, } +raptorTurrets.raptor_turret_basic_t3_v1 = { minQueenAnger = 30, spawnedPerWave = 0.5, maxExisting = 6, maxQueenAnger = 1000, } +raptorTurrets.raptor_turret_acid_t3_v1 = { minQueenAnger = 45, spawnedPerWave = 0.25, maxExisting = 3, maxQueenAnger = 1000, } +raptorTurrets.raptor_turret_emp_t3_v1 = { minQueenAnger = 45, spawnedPerWave = 0.25, maxExisting = 3, maxQueenAnger = 1000, } if not Spring.GetModOptions().unit_restrictions_nonukes then - raptorTurrets["raptor_turret_antinuke_t2_v1"] = { minQueenAnger = 15, spawnedPerWave = 0.25, maxExisting = 10, maxQueenAnger = 1000, } - raptorTurrets["raptor_turret_antinuke_t3_v1"] = { minQueenAnger = 45, spawnedPerWave = 0.25, maxExisting = 3, maxQueenAnger = 1000, } - raptorTurrets["raptor_turret_meteor_t4_v1"] = { minQueenAnger = 75, spawnedPerWave = 0.5, maxExisting = 6, maxQueenAnger = 1000, } + raptorTurrets.raptor_turret_antinuke_t2_v1 = { minQueenAnger = 15, spawnedPerWave = 0.25, maxExisting = 10, maxQueenAnger = 1000, } + raptorTurrets.raptor_turret_antinuke_t3_v1 = { minQueenAnger = 45, spawnedPerWave = 0.25, maxExisting = 3, maxQueenAnger = 1000, } + raptorTurrets.raptor_turret_meteor_t4_v1 = { minQueenAnger = 75, spawnedPerWave = 0.5, maxExisting = 6, maxQueenAnger = 1000, } end if not Spring.GetModOptions().unit_restrictions_noair then - raptorTurrets["raptor_turret_antiair_t2_v1"] = { minQueenAnger = 0, spawnedPerWave = 0.5, maxExisting = 20, maxQueenAnger = 1000, } - raptorTurrets["raptor_turret_antiair_t3_v1"] = { minQueenAnger = 30, spawnedPerWave = 0.5, maxExisting = 6, maxQueenAnger = 1000, } - raptorTurrets["raptor_turret_antiair_t4_v1"] = { minQueenAnger = 60, spawnedPerWave = 0.25, maxExisting = 2, maxQueenAnger = 1000, } + raptorTurrets.raptor_turret_antiair_t2_v1 = { minQueenAnger = 0, spawnedPerWave = 0.5, maxExisting = 20, maxQueenAnger = 1000, } + raptorTurrets.raptor_turret_antiair_t3_v1 = { minQueenAnger = 30, spawnedPerWave = 0.5, maxExisting = 6, maxQueenAnger = 1000, } + raptorTurrets.raptor_turret_antiair_t4_v1 = { minQueenAnger = 60, spawnedPerWave = 0.25, maxExisting = 2, maxQueenAnger = 1000, } end if not Spring.GetModOptions().unit_restrictions_nolrpc then - raptorTurrets["raptor_turret_basic_t4_v1"] = { minQueenAnger = 60, spawnedPerWave = 0.25, maxExisting = 2, maxQueenAnger = 1000, } - raptorTurrets["raptor_turret_emp_t4_v1"] = { minQueenAnger = 75, spawnedPerWave = 0.25, maxExisting = 1, maxQueenAnger = 1000, } - raptorTurrets["raptor_turret_acid_t4_v1"] = { minQueenAnger = 75, spawnedPerWave = 0.25, maxExisting = 1, maxQueenAnger = 1000, } + raptorTurrets.raptor_turret_basic_t4_v1 = { minQueenAnger = 60, spawnedPerWave = 0.25, maxExisting = 2, maxQueenAnger = 1000, } + raptorTurrets.raptor_turret_emp_t4_v1 = { minQueenAnger = 75, spawnedPerWave = 0.25, maxExisting = 1, maxQueenAnger = 1000, } + raptorTurrets.raptor_turret_acid_t4_v1 = { minQueenAnger = 75, spawnedPerWave = 0.25, maxExisting = 1, maxQueenAnger = 1000, } end local raptorEggs = { -- Specify eggs dropped by unit here, requires useEggs to be true, if some unit is not specified here, it drops random egg colors. @@ -158,142 +158,142 @@ local raptorEggs = { -- Specify eggs dropped by unit here, requires useEggs to b raptorBehaviours = { SKIRMISH = { -- Run away from target after target gets hit - [UnitDefNames["raptor_land_spiker_basic_t2_v1"].id] = { distance = 270, chance = 0.5 }, - [UnitDefNames["raptor_land_spiker_basic_t4_v1"].id] = { distance = 250, chance = 0.5 }, - [UnitDefNames["raptor_allterrain_arty_basic_t2_v1"].id] = { distance = 500, chance = 0.1 }, - [UnitDefNames["raptor_allterrain_arty_basic_t4_v1"].id] = { distance = 500, chance = 0.01 }, - [UnitDefNames["raptor_land_swarmer_emp_t2_v1"].id] = { distance = 300, chance = 1 }, - [UnitDefNames["raptor_land_assault_emp_t2_v1"].id] = { distance = 200, chance = 0.01 }, - [UnitDefNames["raptor_allterrain_assault_emp_t2_v1"].id] = { distance = 200, chance = 0.01 }, - [UnitDefNames["raptor_allterrain_arty_emp_t2_v1"].id] = { distance = 500, chance = 0.1 }, - [UnitDefNames["raptor_allterrain_arty_emp_t4_v1"].id] = { distance = 500, chance = 0.01 }, - [UnitDefNames["raptor_allterrain_swarmer_emp_t2_v1"].id] = { distance = 300, chance = 1 }, - [UnitDefNames["raptor_land_swarmer_acids_t2_v1"].id] = { distance = 300, chance = 1 }, - [UnitDefNames["raptor_land_assault_acid_t2_v1"].id] = { distance = 200, chance = 1 }, - [UnitDefNames["raptor_allterrain_assault_acid_t2_v1"].id] = { distance = 200, chance = 1 }, - [UnitDefNames["raptor_allterrain_arty_acid_t2_v1"].id] = { distance = 500, chance = 0.1 }, - [UnitDefNames["raptor_allterrain_arty_acid_t4_v1"].id] = { distance = 500, chance = 0.01 }, - [UnitDefNames["raptor_allterrain_swarmer_acid_t2_v1"].id] = { distance = 300, chance = 1 }, - [UnitDefNames["raptor_land_swarmer_brood_t4_v1"].id] = { distance = 500, chance = 0.25 }, - [UnitDefNames["raptor_allterrain_arty_brood_t2_v1"].id] = { distance = 500, chance = 1 }, - [UnitDefNames["raptor_allterrain_arty_brood_t4_v1"].id] = { distance = 500, chance = 0.1 }, - [UnitDefNames["raptor_land_swarmer_spectre_t3_v1"].id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, - [UnitDefNames["raptor_land_swarmer_spectre_t4_v1"].id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, - [UnitDefNames["raptor_land_spiker_spectre_t4_v1"].id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, - [UnitDefNames["raptor_land_assault_spectre_t2_v1"].id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, - [UnitDefNames["raptor_land_assault_spectre_t4_v1"].id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, - [UnitDefNames["raptor_matriarch_spectre"].id] = { distance = 500, chance = 0.001, teleport = true, teleportcooldown = 2 }, - [UnitDefNames["raptor_matriarch_electric"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["raptor_matriarch_acid"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["raptor_matriarch_healer"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["raptor_matriarch_basic"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["raptor_matriarch_fire"].id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.raptor_land_spiker_basic_t2_v1 .id] = { distance = 270, chance = 0.5 }, + [UnitDefNames.raptor_land_spiker_basic_t4_v1 .id] = { distance = 250, chance = 0.5 }, + [UnitDefNames.raptor_allterrain_arty_basic_t2_v1 .id] = { distance = 500, chance = 0.1 }, + [UnitDefNames.raptor_allterrain_arty_basic_t4_v1 .id] = { distance = 500, chance = 0.01 }, + [UnitDefNames.raptor_land_swarmer_emp_t2_v1 .id] = { distance = 300, chance = 1 }, + [UnitDefNames.raptor_land_assault_emp_t2_v1 .id] = { distance = 200, chance = 0.01 }, + [UnitDefNames.raptor_allterrain_assault_emp_t2_v1 .id] = { distance = 200, chance = 0.01 }, + [UnitDefNames.raptor_allterrain_arty_emp_t2_v1 .id] = { distance = 500, chance = 0.1 }, + [UnitDefNames.raptor_allterrain_arty_emp_t4_v1 .id] = { distance = 500, chance = 0.01 }, + [UnitDefNames.raptor_allterrain_swarmer_emp_t2_v1 .id] = { distance = 300, chance = 1 }, + [UnitDefNames.raptor_land_swarmer_acids_t2_v1 .id] = { distance = 300, chance = 1 }, + [UnitDefNames.raptor_land_assault_acid_t2_v1 .id] = { distance = 200, chance = 1 }, + [UnitDefNames.raptor_allterrain_assault_acid_t2_v1 .id] = { distance = 200, chance = 1 }, + [UnitDefNames.raptor_allterrain_arty_acid_t2_v1 .id] = { distance = 500, chance = 0.1 }, + [UnitDefNames.raptor_allterrain_arty_acid_t4_v1 .id] = { distance = 500, chance = 0.01 }, + [UnitDefNames.raptor_allterrain_swarmer_acid_t2_v1 .id] = { distance = 300, chance = 1 }, + [UnitDefNames.raptor_land_swarmer_brood_t4_v1 .id] = { distance = 500, chance = 0.25 }, + [UnitDefNames.raptor_allterrain_arty_brood_t2_v1 .id] = { distance = 500, chance = 1 }, + [UnitDefNames.raptor_allterrain_arty_brood_t4_v1 .id] = { distance = 500, chance = 0.1 }, + [UnitDefNames.raptor_land_swarmer_spectre_t3_v1 .id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, + [UnitDefNames.raptor_land_swarmer_spectre_t4_v1 .id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, + [UnitDefNames.raptor_land_spiker_spectre_t4_v1 .id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, + [UnitDefNames.raptor_land_assault_spectre_t2_v1 .id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, + [UnitDefNames.raptor_land_assault_spectre_t4_v1 .id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, + [UnitDefNames.raptor_matriarch_spectre .id] = { distance = 500, chance = 0.001, teleport = true, teleportcooldown = 2 }, + [UnitDefNames.raptor_matriarch_electric .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.raptor_matriarch_acid .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.raptor_matriarch_healer .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.raptor_matriarch_basic .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.raptor_matriarch_fire .id] = { distance = 500, chance = 0.001 }, }, COWARD = { -- Run away from target after getting hit by enemy - [UnitDefNames["raptor_land_swarmer_heal_t1_v1"].id] = { distance = 500, chance = 1 }, - [UnitDefNames["raptor_land_swarmer_heal_t2_v1"].id] = { distance = 500, chance = 1 }, - [UnitDefNames["raptor_land_swarmer_heal_t3_v1"].id] = { distance = 500, chance = 1 }, - [UnitDefNames["raptor_land_swarmer_heal_t4_v1"].id] = { distance = 500, chance = 1 }, - [UnitDefNames["raptorh1b"].id] = { distance = 500, chance = 1 }, - [UnitDefNames["raptor_land_spiker_basic_t2_v1"].id] = { distance = 270, chance = 0.5 }, - [UnitDefNames["raptor_land_spiker_basic_t4_v1"].id] = { distance = 250, chance = 0.5 }, - [UnitDefNames["raptor_allterrain_arty_basic_t2_v1"].id] = { distance = 500, chance = 1 }, - [UnitDefNames["raptor_allterrain_arty_basic_t4_v1"].id] = { distance = 500, chance = 0.1 }, - [UnitDefNames["raptor_allterrain_arty_emp_t2_v1"].id] = { distance = 500, chance = 1 }, - [UnitDefNames["raptor_allterrain_arty_emp_t4_v1"].id] = { distance = 500, chance = 0.1 }, - [UnitDefNames["raptor_allterrain_arty_acid_t2_v1"].id] = { distance = 500, chance = 1 }, - [UnitDefNames["raptor_allterrain_arty_acid_t4_v1"].id] = { distance = 500, chance = 0.1 }, - [UnitDefNames["raptor_allterrain_arty_brood_t2_v1"].id] = { distance = 500, chance = 1 }, - [UnitDefNames["raptor_allterrain_arty_brood_t4_v1"].id] = { distance = 500, chance = 0.1 }, - [UnitDefNames["raptor_land_swarmer_brood_t4_v1"].id] = { distance = 500, chance = 1 }, - [UnitDefNames["raptor_land_swarmer_brood_t3_v1"].id] = { distance = 500, chance = 0.25 }, - [UnitDefNames["raptor_land_swarmer_spectre_t3_v1"].id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, - [UnitDefNames["raptor_land_swarmer_spectre_t4_v1"].id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, - [UnitDefNames["raptor_land_spiker_spectre_t4_v1"].id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, - [UnitDefNames["raptor_land_assault_spectre_t2_v1"].id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, - [UnitDefNames["raptor_land_assault_spectre_t4_v1"].id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, - [UnitDefNames["raptor_matriarch_spectre"].id] = { distance = 500, chance = 0.001, teleport = true, teleportcooldown = 2 }, - [UnitDefNames["raptor_matriarch_electric"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["raptor_matriarch_acid"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["raptor_matriarch_healer"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["raptor_matriarch_basic"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["raptor_matriarch_fire"].id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.raptor_land_swarmer_heal_t1_v1 .id] = { distance = 500, chance = 1 }, + [UnitDefNames.raptor_land_swarmer_heal_t2_v1 .id] = { distance = 500, chance = 1 }, + [UnitDefNames.raptor_land_swarmer_heal_t3_v1 .id] = { distance = 500, chance = 1 }, + [UnitDefNames.raptor_land_swarmer_heal_t4_v1 .id] = { distance = 500, chance = 1 }, + [UnitDefNames.raptorh1b .id] = { distance = 500, chance = 1 }, + [UnitDefNames.raptor_land_spiker_basic_t2_v1 .id] = { distance = 270, chance = 0.5 }, + [UnitDefNames.raptor_land_spiker_basic_t4_v1 .id] = { distance = 250, chance = 0.5 }, + [UnitDefNames.raptor_allterrain_arty_basic_t2_v1 .id] = { distance = 500, chance = 1 }, + [UnitDefNames.raptor_allterrain_arty_basic_t4_v1 .id] = { distance = 500, chance = 0.1 }, + [UnitDefNames.raptor_allterrain_arty_emp_t2_v1 .id] = { distance = 500, chance = 1 }, + [UnitDefNames.raptor_allterrain_arty_emp_t4_v1 .id] = { distance = 500, chance = 0.1 }, + [UnitDefNames.raptor_allterrain_arty_acid_t2_v1 .id] = { distance = 500, chance = 1 }, + [UnitDefNames.raptor_allterrain_arty_acid_t4_v1 .id] = { distance = 500, chance = 0.1 }, + [UnitDefNames.raptor_allterrain_arty_brood_t2_v1 .id] = { distance = 500, chance = 1 }, + [UnitDefNames.raptor_allterrain_arty_brood_t4_v1 .id] = { distance = 500, chance = 0.1 }, + [UnitDefNames.raptor_land_swarmer_brood_t4_v1 .id] = { distance = 500, chance = 1 }, + [UnitDefNames.raptor_land_swarmer_brood_t3_v1 .id] = { distance = 500, chance = 0.25 }, + [UnitDefNames.raptor_land_swarmer_spectre_t3_v1 .id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, + [UnitDefNames.raptor_land_swarmer_spectre_t4_v1 .id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, + [UnitDefNames.raptor_land_spiker_spectre_t4_v1 .id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, + [UnitDefNames.raptor_land_assault_spectre_t2_v1 .id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, + [UnitDefNames.raptor_land_assault_spectre_t4_v1 .id] = { distance = 500, chance = 0.25, teleport = true, teleportcooldown = 2, }, + [UnitDefNames.raptor_matriarch_spectre .id] = { distance = 500, chance = 0.001, teleport = true, teleportcooldown = 2 }, + [UnitDefNames.raptor_matriarch_electric .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.raptor_matriarch_acid .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.raptor_matriarch_healer .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.raptor_matriarch_basic .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.raptor_matriarch_fire .id] = { distance = 500, chance = 0.001 }, }, BERSERK = { -- Run towards target after getting hit by enemy or after hitting the target - [UnitDefNames["raptor_land_spiker_basic_t4_v1"].id] = { chance = 0.2, distance = 750 }, - [UnitDefNames["raptor_land_assault_basic_t2_v1"].id] = { chance = 0.2, distance = 1500 }, - [UnitDefNames["raptor_land_assault_basic_t2_v2"].id] = { chance = 0.2, distance = 1500 }, - [UnitDefNames["raptor_land_assault_basic_t2_v3"].id] = { chance = 0.2, distance = 1500 }, - [UnitDefNames["raptor_allterrain_assault_basic_t2_v1"].id] = { chance = 0.2, distance = 1500 }, - [UnitDefNames["raptor_allterrain_assault_basic_t2_v2"].id] = { chance = 0.2, distance = 1500 }, - [UnitDefNames["raptor_allterrain_assault_basic_t2_v3"].id] = { chance = 0.2, distance = 1500 }, - [UnitDefNames["raptor_land_assault_basic_t4_v1"].id] = { chance = 0.2, distance = 3000 }, - [UnitDefNames["raptor_land_assault_basic_t4_v2"].id] = { chance = 0.2, distance = 3000 }, - [UnitDefNames["raptor_allterrain_assault_basic_t4_v1"].id] = { chance = 0.2, distance = 3000 }, - [UnitDefNames["raptor_allterrain_assault_basic_t4_v2"].id] = { chance = 0.2, distance = 3000 }, - [UnitDefNames["raptor_land_assault_emp_t2_v1"].id] = { chance = 0.05 }, - [UnitDefNames["raptor_allterrain_assault_emp_t2_v1"].id] = { chance = 0.05 }, - [UnitDefNames["raptor_land_assault_acid_t2_v1"].id] = { chance = 0.05 }, - [UnitDefNames["raptor_allterrain_assault_acid_t2_v1"].id] = { chance = 0.05 }, - [UnitDefNames["raptor_land_swarmer_acids_t2_v1"].id] = { chance = 0.01 }, - [UnitDefNames["raptor_allterrain_swarmer_acid_t2_v1"].id] = { chance = 0.01 }, - [UnitDefNames["raptor_land_swarmer_fire_t2_v1"].id] = { chance = 0.2 }, - [UnitDefNames["raptor_land_swarmer_fire_t4_v1"].id] = { chance = 0.2 }, - [UnitDefNames["raptor_allterrain_swarmer_fire_t2_v1"].id] = { chance = 0.2 }, - [UnitDefNames["raptor_land_swarmer_brood_t2_v1"].id] = { chance = 1 }, - [UnitDefNames["raptor_land_swarmer_spectre_t3_v1"].id] = { distance = 1000, chance = 0.25 }, - [UnitDefNames["raptor_land_swarmer_spectre_t4_v1"].id] = { distance = 1000, chance = 0.25 }, - [UnitDefNames["raptor_land_assault_spectre_t2_v1"].id] = { distance = 1000, chance = 0.25 }, - [UnitDefNames["raptor_land_assault_spectre_t4_v1"].id] = { distance = 1000, chance = 0.25 }, - [UnitDefNames["raptor_land_spiker_spectre_t4_v1"].id] = { distance = 1000, chance = 0.25 }, - [UnitDefNames["raptor_matriarch_spectre"].id] = { distance = 500, chance = 0.01 }, - [UnitDefNames["raptor_matriarch_electric"].id] = { distance = 500, chance = 0.01 }, - [UnitDefNames["raptor_matriarch_acid"].id] = { distance = 500, chance = 0.01 }, - [UnitDefNames["raptor_matriarch_healer"].id] = { distance = 500, chance = 0.01 }, - [UnitDefNames["raptor_matriarch_basic"].id] = { distance = 500, chance = 0.01 }, - [UnitDefNames["raptor_matriarch_fire"].id] = { distance = 500, chance = 0.01 }, - [UnitDefNames["raptor_queen_veryeasy"].id] = { chance = 0.005 }, - [UnitDefNames["raptor_queen_easy"].id] = { chance = 0.005 }, - [UnitDefNames["raptor_queen_normal"].id] = { chance = 0.005 }, - [UnitDefNames["raptor_queen_hard"].id] = { chance = 0.005 }, - [UnitDefNames["raptor_queen_veryhard"].id] = { chance = 0.005 }, - [UnitDefNames["raptor_queen_epic"].id] = { chance = 0.005 }, + [UnitDefNames.raptor_land_spiker_basic_t4_v1 .id] = { chance = 0.2, distance = 750 }, + [UnitDefNames.raptor_land_assault_basic_t2_v1 .id] = { chance = 0.2, distance = 1500 }, + [UnitDefNames.raptor_land_assault_basic_t2_v2 .id] = { chance = 0.2, distance = 1500 }, + [UnitDefNames.raptor_land_assault_basic_t2_v3 .id] = { chance = 0.2, distance = 1500 }, + [UnitDefNames.raptor_allterrain_assault_basic_t2_v1 .id] = { chance = 0.2, distance = 1500 }, + [UnitDefNames.raptor_allterrain_assault_basic_t2_v2 .id] = { chance = 0.2, distance = 1500 }, + [UnitDefNames.raptor_allterrain_assault_basic_t2_v3 .id] = { chance = 0.2, distance = 1500 }, + [UnitDefNames.raptor_land_assault_basic_t4_v1 .id] = { chance = 0.2, distance = 3000 }, + [UnitDefNames.raptor_land_assault_basic_t4_v2 .id] = { chance = 0.2, distance = 3000 }, + [UnitDefNames.raptor_allterrain_assault_basic_t4_v1 .id] = { chance = 0.2, distance = 3000 }, + [UnitDefNames.raptor_allterrain_assault_basic_t4_v2 .id] = { chance = 0.2, distance = 3000 }, + [UnitDefNames.raptor_land_assault_emp_t2_v1 .id] = { chance = 0.05 }, + [UnitDefNames.raptor_allterrain_assault_emp_t2_v1 .id] = { chance = 0.05 }, + [UnitDefNames.raptor_land_assault_acid_t2_v1 .id] = { chance = 0.05 }, + [UnitDefNames.raptor_allterrain_assault_acid_t2_v1 .id] = { chance = 0.05 }, + [UnitDefNames.raptor_land_swarmer_acids_t2_v1 .id] = { chance = 0.01 }, + [UnitDefNames.raptor_allterrain_swarmer_acid_t2_v1 .id] = { chance = 0.01 }, + [UnitDefNames.raptor_land_swarmer_fire_t2_v1 .id] = { chance = 0.2 }, + [UnitDefNames.raptor_land_swarmer_fire_t4_v1 .id] = { chance = 0.2 }, + [UnitDefNames.raptor_allterrain_swarmer_fire_t2_v1 .id] = { chance = 0.2 }, + [UnitDefNames.raptor_land_swarmer_brood_t2_v1 .id] = { chance = 1 }, + [UnitDefNames.raptor_land_swarmer_spectre_t3_v1 .id] = { distance = 1000, chance = 0.25 }, + [UnitDefNames.raptor_land_swarmer_spectre_t4_v1 .id] = { distance = 1000, chance = 0.25 }, + [UnitDefNames.raptor_land_assault_spectre_t2_v1 .id] = { distance = 1000, chance = 0.25 }, + [UnitDefNames.raptor_land_assault_spectre_t4_v1 .id] = { distance = 1000, chance = 0.25 }, + [UnitDefNames.raptor_land_spiker_spectre_t4_v1 .id] = { distance = 1000, chance = 0.25 }, + [UnitDefNames.raptor_matriarch_spectre .id] = { distance = 500, chance = 0.01 }, + [UnitDefNames.raptor_matriarch_electric .id] = { distance = 500, chance = 0.01 }, + [UnitDefNames.raptor_matriarch_acid .id] = { distance = 500, chance = 0.01 }, + [UnitDefNames.raptor_matriarch_healer .id] = { distance = 500, chance = 0.01 }, + [UnitDefNames.raptor_matriarch_basic .id] = { distance = 500, chance = 0.01 }, + [UnitDefNames.raptor_matriarch_fire .id] = { distance = 500, chance = 0.01 }, + [UnitDefNames.raptor_queen_veryeasy .id] = { chance = 0.005 }, + [UnitDefNames.raptor_queen_easy .id] = { chance = 0.005 }, + [UnitDefNames.raptor_queen_normal .id] = { chance = 0.005 }, + [UnitDefNames.raptor_queen_hard .id] = { chance = 0.005 }, + [UnitDefNames.raptor_queen_veryhard .id] = { chance = 0.005 }, + [UnitDefNames.raptor_queen_epic .id] = { chance = 0.005 }, }, HEALER = { -- Getting long max lifetime and always use Fight command. These units spawn as healers from burrows and queen - [UnitDefNames["raptor_land_swarmer_heal_t1_v1"].id] = true, - [UnitDefNames["raptor_land_swarmer_heal_t2_v1"].id] = true, - [UnitDefNames["raptor_land_swarmer_heal_t3_v1"].id] = true, - [UnitDefNames["raptor_land_swarmer_heal_t4_v1"].id] = true, - [UnitDefNames["raptorh1b"].id] = true, + [UnitDefNames.raptor_land_swarmer_heal_t1_v1 .id] = true, + [UnitDefNames.raptor_land_swarmer_heal_t2_v1 .id] = true, + [UnitDefNames.raptor_land_swarmer_heal_t3_v1 .id] = true, + [UnitDefNames.raptor_land_swarmer_heal_t4_v1 .id] = true, + [UnitDefNames.raptorh1b .id] = true, }, ARTILLERY = { -- Long lifetime and no regrouping, always uses Fight command to keep distance, friendly fire enabled (assuming nothing else in the game stops it) - [UnitDefNames["raptor_allterrain_arty_basic_t2_v1"].id] = true, - [UnitDefNames["raptor_allterrain_arty_basic_t4_v1"].id] = true, - [UnitDefNames["raptor_allterrain_arty_emp_t2_v1"].id] = true, - [UnitDefNames["raptor_allterrain_arty_emp_t4_v1"].id] = true, - [UnitDefNames["raptor_allterrain_arty_acid_t2_v1"].id] = true, - [UnitDefNames["raptor_allterrain_arty_acid_t4_v1"].id] = true, - [UnitDefNames["raptor_allterrain_arty_brood_t4_v1"].id] = true, - [UnitDefNames["raptor_allterrain_arty_brood_t2_v1"].id] = true, - [UnitDefNames["raptor_turret_meteor_t4_v1"].id] = true, + [UnitDefNames.raptor_allterrain_arty_basic_t2_v1 .id] = true, + [UnitDefNames.raptor_allterrain_arty_basic_t4_v1 .id] = true, + [UnitDefNames.raptor_allterrain_arty_emp_t2_v1 .id] = true, + [UnitDefNames.raptor_allterrain_arty_emp_t4_v1 .id] = true, + [UnitDefNames.raptor_allterrain_arty_acid_t2_v1 .id] = true, + [UnitDefNames.raptor_allterrain_arty_acid_t4_v1 .id] = true, + [UnitDefNames.raptor_allterrain_arty_brood_t4_v1 .id] = true, + [UnitDefNames.raptor_allterrain_arty_brood_t2_v1 .id] = true, + [UnitDefNames.raptor_turret_meteor_t4_v1 .id] = true, }, KAMIKAZE = { -- Long lifetime and no regrouping, always uses Move command to rush into the enemy - [UnitDefNames["raptor_land_kamikaze_basic_t2_v1"].id] = true, - [UnitDefNames["raptor_land_kamikaze_basic_t4_v1"].id] = true, - [UnitDefNames["raptor_land_kamikaze_emp_t2_v1"].id] = true, - [UnitDefNames["raptor_land_kamikaze_emp_t4_v1"].id] = true, - [UnitDefNames["raptor_air_kamikaze_basic_t2_v1"].id] = true, + [UnitDefNames.raptor_land_kamikaze_basic_t2_v1 .id] = true, + [UnitDefNames.raptor_land_kamikaze_basic_t4_v1 .id] = true, + [UnitDefNames.raptor_land_kamikaze_emp_t2_v1 .id] = true, + [UnitDefNames.raptor_land_kamikaze_emp_t4_v1 .id] = true, + [UnitDefNames.raptor_air_kamikaze_basic_t2_v1 .id] = true, }, ALLOWFRIENDLYFIRE = { - [UnitDefNames["raptor_allterrain_arty_basic_t2_v1"].id] = true, - [UnitDefNames["raptor_allterrain_arty_basic_t4_v1"].id] = true, - [UnitDefNames["raptor_turret_basic_t2_v1"].id] = true, - [UnitDefNames["raptor_turret_basic_t3_v1"].id] = true, - [UnitDefNames["raptor_turret_basic_t4_v1"].id] = true, - [UnitDefNames["raptor_turret_meteor_t4_v1"].id] = true, - [UnitDefNames["raptor_hive"].id] = true, + [UnitDefNames.raptor_allterrain_arty_basic_t2_v1 .id] = true, + [UnitDefNames.raptor_allterrain_arty_basic_t4_v1 .id] = true, + [UnitDefNames.raptor_turret_basic_t2_v1 .id] = true, + [UnitDefNames.raptor_turret_basic_t3_v1 .id] = true, + [UnitDefNames.raptor_turret_basic_t4_v1 .id] = true, + [UnitDefNames.raptor_turret_meteor_t4_v1 .id] = true, + [UnitDefNames.raptor_hive .id] = true, }, - PROBE_UNIT = UnitDefNames["raptor_land_swarmer_basic_t4_v1"].id, -- tester unit for picking viable spawn positions - use some medium sized unit + PROBE_UNIT = UnitDefNames.raptor_land_swarmer_basic_t4_v1 .id, -- tester unit for picking viable spawn positions - use some medium sized unit } local optionValues = { @@ -477,63 +477,63 @@ local miniBosses = { -- Units that spawn alongside queen } local raptorMinions = { -- Units spawning other units - ["raptor_matriarch_electric"] = { + raptor_matriarch_electric = { "raptor_land_swarmer_emp_t2_v1", "raptor_land_assault_emp_t2_v1", --"raptor_allterrain_arty_emp_t2_v1", "raptor_allterrain_swarmer_emp_t2_v1", "raptor_allterrain_assault_emp_t2_v1", }, - ["raptor_matriarch_acid"] = { + raptor_matriarch_acid = { "raptor_land_swarmer_acids_t2_v1", "raptor_land_assault_acid_t2_v1", --"raptor_allterrain_arty_acid_t2_v1", "raptor_allterrain_swarmer_acid_t2_v1", "raptor_allterrain_assault_acid_t2_v1", }, - ["raptor_matriarch_healer"] = { + raptor_matriarch_healer = { "raptor_land_swarmer_heal_t1_v1", "raptor_land_swarmer_heal_t2_v1", "raptor_land_swarmer_heal_t3_v1", "raptor_land_swarmer_heal_t4_v1", --"raptorh1b", }, - ["raptor_matriarch_basic"] = { + raptor_matriarch_basic = { "raptor_land_swarmer_basic_t2_v1", "raptor_land_swarmer_basic_t3_v1", "raptor_land_swarmer_basic_t4_v1", "raptor_land_swarmer_basic_t4_v2", "raptor_allterrain_swarmer_basic_t4_v1", }, - ["raptor_matriarch_fire"] = { + raptor_matriarch_fire = { "raptor_land_swarmer_fire_t2_v1", "raptor_land_swarmer_fire_t4_v1", "raptor_allterrain_swarmer_fire_t2_v1", }, - ["raptor_matriarch_spectre"] = { + raptor_matriarch_spectre = { "raptor_land_spiker_spectre_t4_v1", "raptor_land_swarmer_spectre_t3_v1", "raptor_land_swarmer_spectre_t4_v1", "raptor_land_assault_spectre_t2_v1", "raptor_land_assault_spectre_t4_v1", }, - ["raptor_land_swarmer_brood_t4_v1"] = { + raptor_land_swarmer_brood_t4_v1 = { "raptor_land_swarmer_brood_t3_v1", "raptor_land_swarmer_brood_t2_v1", }, - ["raptor_land_swarmer_brood_t3_v1"] = { + raptor_land_swarmer_brood_t3_v1 = { "raptor_land_swarmer_brood_t2_v1", }, - ["raptor_allterrain_arty_brood_t4_v1"] = { + raptor_allterrain_arty_brood_t4_v1 = { "raptor_land_swarmer_brood_t2_v1", }, - ["raptor_queen_veryeasy"] = { + raptor_queen_veryeasy = { "raptor_land_swarmer_brood_t4_v1", "raptor_land_swarmer_brood_t3_v1", "raptor_land_swarmer_brood_t2_v1", "raptor_land_swarmer_heal_t1_v1", }, - ["raptor_queen_easy"] = { + raptor_queen_easy = { "raptor_land_swarmer_brood_t4_v1", "raptor_land_swarmer_brood_t3_v1", "raptor_land_swarmer_brood_t2_v1", @@ -541,7 +541,7 @@ local raptorMinions = { -- Units spawning other units "raptor_land_swarmer_heal_t1_v1", "raptor_land_swarmer_heal_t2_v1", }, - ["raptor_queen_normal"] = { + raptor_queen_normal = { "raptor_land_swarmer_brood_t4_v1", "raptor_land_swarmer_brood_t3_v1", "raptor_land_swarmer_brood_t2_v1", @@ -549,7 +549,7 @@ local raptorMinions = { -- Units spawning other units "raptor_land_swarmer_heal_t2_v1", "raptor_land_swarmer_heal_t3_v1", }, - ["raptor_queen_hard"] = { + raptor_queen_hard = { "raptor_land_swarmer_brood_t4_v1", "raptor_land_swarmer_brood_t3_v1", "raptor_land_swarmer_brood_t2_v1", @@ -557,7 +557,7 @@ local raptorMinions = { -- Units spawning other units "raptor_land_swarmer_heal_t2_v1", "raptor_land_swarmer_heal_t3_v1", }, - ["raptor_queen_veryhard"] = { + raptor_queen_veryhard = { "raptor_land_swarmer_brood_t4_v1", "raptor_land_swarmer_brood_t3_v1", "raptor_land_swarmer_brood_t2_v1", @@ -565,7 +565,7 @@ local raptorMinions = { -- Units spawning other units "raptor_land_swarmer_heal_t3_v1", "raptor_land_swarmer_heal_t4_v1", }, - ["raptor_queen_epic"] = { + raptor_queen_epic = { "raptor_land_swarmer_brood_t4_v1", "raptor_land_swarmer_brood_t3_v1", "raptor_land_swarmer_brood_t2_v1", diff --git a/luarules/configs/scav_spawn_defs.lua b/luarules/configs/scav_spawn_defs.lua index ca1decab92d..a1ff523a99b 100644 --- a/luarules/configs/scav_spawn_defs.lua +++ b/luarules/configs/scav_spawn_defs.lua @@ -212,10 +212,10 @@ local tierConfiguration = { -- Double maxSquadSize for special squads ---------------------------------------------------------------------------------------------- local BurrowUnitsList = { - ['scavbeacon_t1_scav'] = {minAnger = tierConfiguration[1].minAnger, maxAnger = tierConfiguration[2].maxAnger}, - ['scavbeacon_t2_scav'] = {minAnger = tierConfiguration[2].minAnger, maxAnger = tierConfiguration[3].maxAnger}, - ['scavbeacon_t3_scav'] = {minAnger = tierConfiguration[3].minAnger, maxAnger = tierConfiguration[5].maxAnger}, - ['scavbeacon_t4_scav'] = {minAnger = tierConfiguration[4].minAnger, maxAnger = tierConfiguration[7].maxAnger}, + scavbeacon_t1_scav = {minAnger = tierConfiguration[1].minAnger, maxAnger = tierConfiguration[2].maxAnger}, + scavbeacon_t2_scav = {minAnger = tierConfiguration[2].minAnger, maxAnger = tierConfiguration[3].maxAnger}, + scavbeacon_t3_scav = {minAnger = tierConfiguration[3].minAnger, maxAnger = tierConfiguration[5].maxAnger}, + scavbeacon_t4_scav = {minAnger = tierConfiguration[4].minAnger, maxAnger = tierConfiguration[7].maxAnger}, } ---------------------------------------------------------------------------------------------- @@ -226,58 +226,58 @@ local LandUnitsList = { Raid = { [1] = { --Armada - ["armflea_scav"] = 4, - ["armpw_scav"] = 3, - ["armfav_scav"] = 3, - ["armsh_scav"] = 3, + armflea_scav = 4, + armpw_scav = 3, + armfav_scav = 3, + armsh_scav = 3, --Cortex - ["corak_scav"] = 3, - ["corfav_scav"] = 4, - ["corsh_scav"] = 2, + corak_scav = 3, + corfav_scav = 4, + corsh_scav = 2, --Legion - ["leggob_scav"] = 4, - ["legsh_scav"] = 2, - ["legscout_scav"] = 3, + leggob_scav = 4, + legsh_scav = 2, + legscout_scav = 3, }, [2] = { --Armada - ["armflea_scav"] = 3, - ["armpw_scav"] = 4, - ["armfav_scav"] = 3, - ["armsh_scav"] = 3, + armflea_scav = 3, + armpw_scav = 4, + armfav_scav = 3, + armsh_scav = 3, --Cortex - ["corak_scav"] = 4, - ["corfav_scav"] = 3, - ["corsh_scav"] = 3, + corak_scav = 4, + corfav_scav = 3, + corsh_scav = 3, --Legion - ["leggob_scav"] = 4, - ["legsh_scav"] = 3, - ["leghades_scav"] = 4, + leggob_scav = 4, + legsh_scav = 3, + leghades_scav = 4, }, [3] = { --Armada - ["armflash_scav"] = 4, - ["armzapper_scav"] = 4, + armflash_scav = 4, + armzapper_scav = 4, --Cortex - ["corgator_scav"] = 3, + corgator_scav = 3, --Legion - ["legamphtank_scav"] = 3, + legamphtank_scav = 3, }, [4] = { --Armada - ["armlatnk_scav"] = 4, - ["armamph_scav"] = 3, - ["armfast_scav"] = 4, + armlatnk_scav = 4, + armamph_scav = 3, + armfast_scav = 4, --Cortex - ["cortorch_scav"] = 3, - ["corsala_scav"] = 3, - ["corpyro_scav"] = 4, - ["corseal_scav"] = 3, - ["coramph_scav"] = 3, - ["corphantom_scav"] = 3, + cortorch_scav = 3, + corsala_scav = 3, + corpyro_scav = 4, + corseal_scav = 3, + coramph_scav = 3, + corphantom_scav = 3, --Legion - ["legmrv_scav"] = 4, - ["legstr_scav"] = 4, + legmrv_scav = 4, + legstr_scav = 4, }, [5] = { --Armada @@ -290,19 +290,19 @@ local LandUnitsList = { }, [6] = { --Armada - ["armpwt4_scav"] = 3, - ["armmar_scav"] = 4, + armpwt4_scav = 3, + armmar_scav = 4, --Cortex - ["corakt4_scav"] = 3, + corakt4_scav = 3, --Legion - ["legjav_scav"] = 3, + legjav_scav = 3, --N/A }, [7] = { --Armada - ["armraz_scav"] = 3, + armraz_scav = 3, --Cortex - ["cordemon_scav"] = 3, + cordemon_scav = 3, --Legion --N/A }, @@ -315,102 +315,102 @@ local LandUnitsList = { }, [2] = { --Armada - ["armham_scav"] = 4, - ["armpincer_scav"] = 2, + armham_scav = 4, + armpincer_scav = 2, --Cortex - ["corthud_scav"] = 3, - ["corgarp_scav"] = 2, + corthud_scav = 3, + corgarp_scav = 2, --Legion - ["legcen_scav"] = 3, - ["leglob_scav"] = 3, + legcen_scav = 3, + leglob_scav = 3, }, [3] = { --Armada - ["armwar_scav"] = 3, - ["armstump_scav"] = 4, - ["armjanus_scav"] = 2, - ["armanac_scav"] = 4, + armwar_scav = 3, + armstump_scav = 4, + armjanus_scav = 2, + armanac_scav = 4, --Cortex - ["corraid_scav"] = 4, - ["corlevlr_scav"] = 4, - ["corsnap_scav"] = 2, + corraid_scav = 4, + corlevlr_scav = 4, + corsnap_scav = 2, --Legion - ["leggat_scav"] = 4, - ["legkark_scav"] = 4, - ["corkark_scav"] = 4, - ["legner_scav"] = 4, + leggat_scav = 4, + legkark_scav = 4, + corkark_scav = 4, + legner_scav = 4, }, [4] = { --Armada - ["armzeus_scav"] = 4, + armzeus_scav = 4, --Cortex - ["corcan_scav"] = 4, - ["corhal_scav"] = 4, + corcan_scav = 4, + corhal_scav = 4, --Legion - ["legshot_scav"] = 4, + legshot_scav = 4, }, [5] = { --Armada - ["armsnipe_scav"] = 2, - ["armvader_scav"] = 4, - ["armsptk_scav"] = 2, - ["armbull_scav"] = 4, - ["armcroc_scav"] = 4, - --Cortex - ["corparrow_scav"] = 2, - ["cordeadeye_scav"] = 2, - ["corftiger_scav"] = 4, - ["corgol_scav"] = 2, - ["corroach_scav"] = 4, - ["corsktl_scav"] = 2, - ["cortermite_scav"] = 4, - ["corsumo_scav"] = 2, - ["correap_scav"] = 2, - ["corgatreap_scav"] = 4, + armsnipe_scav = 2, + armvader_scav = 4, + armsptk_scav = 2, + armbull_scav = 4, + armcroc_scav = 4, + --Cortex + corparrow_scav = 2, + cordeadeye_scav = 2, + corftiger_scav = 4, + corgol_scav = 2, + corroach_scav = 4, + corsktl_scav = 2, + cortermite_scav = 4, + corsumo_scav = 2, + correap_scav = 2, + corgatreap_scav = 4, --Legion - ["legaheattank_scav"] = 4, - ["legamph_scav"] = 3, - ["leginc_scav"] = 2, - ["legfloat_scav"] = 4, + legaheattank_scav = 4, + legamph_scav = 3, + leginc_scav = 2, + legfloat_scav = 4, }, [6] = { --Armada - ["armassimilator_scav"] = 4, - ["armmeatball_scav"] = 4, - ["armlun_scav"] = 4, + armassimilator_scav = 4, + armmeatball_scav = 4, + armlun_scav = 4, --Cortex - ["corshiva_scav"] = 4, - ["corkarg_scav"] = 4, - ["corthermite"] = 4, - ["corsok_scav"] = 2, + corshiva_scav = 4, + corkarg_scav = 4, + corthermite = 4, + corsok_scav = 2, --Legion - ["legpede_scav"] = 1, - ["legkeres_scav"] = 4, - ["legeallterrainmech_scav"] = 4, - ["legerailtank_scav"] = 2, - ["legbunk_scav"] = 2, - ["legehovertank_scav"] = 2, + legpede_scav = 1, + legkeres_scav = 4, + legeallterrainmech_scav = 4, + legerailtank_scav = 2, + legbunk_scav = 2, + legehovertank_scav = 2, }, [7] = { --Armada - ["armthor_scav"] = 3, - ["armbanth_scav"] = 4, - ["armrattet4_scav"] = 2, - ["armvadert4_scav"] = 2, - ["armsptkt4_scav"] = 2, + armthor_scav = 3, + armbanth_scav = 4, + armrattet4_scav = 2, + armvadert4_scav = 2, + armsptkt4_scav = 2, --Cortex - ["corjugg_scav"] = 2, - ["corkorg_scav"] = 2, - ["corkarganetht4_scav"] = 2, - ["corgolt4_scav"] = 2, + corjugg_scav = 2, + corkorg_scav = 2, + corkarganetht4_scav = 2, + corgolt4_scav = 2, --Legion - ["leegmech_scav"] = 2, - ["legeshotgunmech_scav"] = 3, - ["legerailtank_scav"] = 4, - ["legeheatraymech_scav"] = 1, - ["legeheatraymech_old_scav"] = 3, - ["legelrpcmech_scav"] = 3, + leegmech_scav = 2, + legeshotgunmech_scav = 3, + legerailtank_scav = 4, + legeheatraymech_scav = 1, + legeheatraymech_old_scav = 3, + legelrpcmech_scav = 3, }, }, Support = { @@ -421,217 +421,217 @@ local LandUnitsList = { }, [2] = { --Armada - ["armrock_scav"] = 2, - ["armjeth_scav"] = 2, - ["armah_scav"] = 2, + armrock_scav = 2, + armjeth_scav = 2, + armah_scav = 2, --Cortex - ["corstorm_scav"] = 2, - ["corcrash_scav"] = 2, - ["corah_scav"] = 2, + corstorm_scav = 2, + corcrash_scav = 2, + corah_scav = 2, --Legion - ["legbal_scav"] = 2, + legbal_scav = 2, }, [3] = { --Armada - ["armart_scav"] = 2, - ["armsam_scav"] = 2, - ["armmh_scav"] = 2, + armart_scav = 2, + armsam_scav = 2, + armmh_scav = 2, --Cortex - ["corwolv_scav"] = 2, - ["cormist_scav"] = 2, - ["cormh_scav"] = 2, + corwolv_scav = 2, + cormist_scav = 2, + cormh_scav = 2, --Legion - ["leghelios_scav"] = 2, - ["legbar_scav"] = 2, - ["legrail_scav"] = 2, - ["legmh_scav"] = 2, - ["legah_scav"] = 2, + leghelios_scav = 2, + legbar_scav = 2, + legrail_scav = 2, + legmh_scav = 2, + legah_scav = 2, }, [4] = { --Armada - ["armfido_scav"] = 2, - ["armaak_scav"] = 2, - ["armmav_scav"] = 2, - ["armyork_scav"] = 2, - ["armmart_scav"] = 2, + armfido_scav = 2, + armaak_scav = 2, + armmav_scav = 2, + armyork_scav = 2, + armmart_scav = 2, --Cortex - ["cormart_scav"] = 2, - ["corsent_scav"] = 2, - ["coraak_scav"] = 2, - ["cormort_scav"] = 2, + cormart_scav = 2, + corsent_scav = 2, + coraak_scav = 2, + cormort_scav = 2, --Legion - ["legaskirmtank_scav"] = 2, - ["legamcluster_scav"] = 2, - ["legvcarry_scav"] = 2, - ["legbart_scav"] = 2, - ["legsrail_scav"] = 2, - ["legvflak_scav"] = 2, + legaskirmtank_scav = 2, + legamcluster_scav = 2, + legvcarry_scav = 2, + legbart_scav = 2, + legsrail_scav = 2, + legvflak_scav = 2, }, [5] = { --Armada - ["armfboy_scav"] = 2, - ["armmanni_scav"] = 2, - ["armmerl_scav"] = 2, + armfboy_scav = 2, + armmanni_scav = 2, + armmerl_scav = 2, --Cortex - ["corban_scav"] = 2, - ["corvroc_scav"] = 2, - ["cortrem_scav"] = 2, - ["corhrk_scav"] = 2, - ["corsiegebreaker_scav"] = 2, + corban_scav = 2, + corvroc_scav = 2, + cortrem_scav = 2, + corhrk_scav = 2, + corsiegebreaker_scav = 2, --Legion - ["legavroc_scav"] = 2, - ["leginf_scav"] = 2, - ["legmed_scav"] = 2, + legavroc_scav = 2, + leginf_scav = 2, + legmed_scav = 2, }, [6] = { --Armada - ["armvang_scav"] = 2, - ["armdronecarryland_scav"] = 2, - ["armscab_scav"] = 2, + armvang_scav = 2, + armdronecarryland_scav = 2, + armscab_scav = 2, --Cortex - ["corcat_scav"] = 2, - ["cormabm_scav"] = 2, + corcat_scav = 2, + cormabm_scav = 2, --Legion - ["leggobt3_scav"] = 3, + leggobt3_scav = 3, }, [7] = { --Armada --Cortex - ["CorPrince_scav"] = 2, + CorPrince_scav = 2, --Legion - ["legsrailt4_scav"] = 2, + legsrailt4_scav = 2, }, }, Healer = { [1] = { --Armada - ["armck_scav"] = 2, - ["armrectr_scav"] = 40, - ["armcv_scav"] = 2, - ["armch_scav"] = 2, + armck_scav = 2, + armrectr_scav = 40, + armcv_scav = 2, + armch_scav = 2, --Cortex - ["corck_scav"] = 2, - ["cornecro_scav"] = 40, - ["corcv_scav"] = 2, - ["corch_scav"] = 2, + corck_scav = 2, + cornecro_scav = 40, + corcv_scav = 2, + corch_scav = 2, --Legion - ["legcv_scav"] = 2, - ["legck_scav"] = 2, - ["legch_scav"] = 2, - ["legotter_scav"] = 2, + legcv_scav = 2, + legck_scav = 2, + legch_scav = 2, + legotter_scav = 2, }, [2] = { --Armada - ["armck_scav"] = 2, - ["armrectr_scav"] = 40, - ["armcv_scav"] = 2, - ["armch_scav"] = 2, + armck_scav = 2, + armrectr_scav = 40, + armcv_scav = 2, + armch_scav = 2, --Cortex - ["corck_scav"] = 2, - ["cornecro_scav"] = 40, - ["corcv_scav"] = 2, - ["corch_scav"] = 2, + corck_scav = 2, + cornecro_scav = 40, + corcv_scav = 2, + corch_scav = 2, --Legion - ["legcv_scav"] = 2, - ["legck_scav"] = 2, - ["legch_scav"] = 2, - ["legotter_scav"] = 2, + legcv_scav = 2, + legck_scav = 2, + legch_scav = 2, + legotter_scav = 2, }, [3] = { --Armada - ["armck_scav"] = 2, - ["armrectr_scav"] = 40, - ["armcv_scav"] = 2, - ["armch_scav"] = 2, + armck_scav = 2, + armrectr_scav = 40, + armcv_scav = 2, + armch_scav = 2, --Cortex - ["corck_scav"] = 2, - ["cornecro_scav"] = 40, - ["corcv_scav"] = 2, - ["corch_scav"] = 2, + corck_scav = 2, + cornecro_scav = 40, + corcv_scav = 2, + corch_scav = 2, --Legion - ["legcv_scav"] = 2, - ["legck_scav"] = 2, - ["legch_scav"] = 2, - ["legotter_scav"] = 2, + legcv_scav = 2, + legck_scav = 2, + legch_scav = 2, + legotter_scav = 2, }, [4] = { --Armada - ["armrectr_scav"] = 40, - ["armack_scav"] = 2, - ["armacv_scav"] = 2, - ["armfark_scav"] = 2, - ["armconsul_scav"] = 2, - --Cortex - ["cornecro_scav"] = 40, - ["corack_scav"] = 2, - ["coracv_scav"] = 2, - ["corfast_scav"] = 2, - ["cormando_scav"] = 2, - ["corforge_scav"] = 2, + armrectr_scav = 40, + armack_scav = 2, + armacv_scav = 2, + armfark_scav = 2, + armconsul_scav = 2, + --Cortex + cornecro_scav = 40, + corack_scav = 2, + coracv_scav = 2, + corfast_scav = 2, + cormando_scav = 2, + corforge_scav = 2, --Legion - ["legacv_scav"] = 2, - ["legack_scav"] = 2, - ["legaceb_scav"] = 2, + legacv_scav = 2, + legack_scav = 2, + legaceb_scav = 2, }, [5] = { --Armada - ["armrectr_scav"] = 40, - ["armack_scav"] = 2, - ["armacv_scav"] = 2, - ["armfark_scav"] = 2, - ["armconsul_scav"] = 2, - --Cortex - ["cornecro_scav"] = 40, - ["corack_scav"] = 2, - ["coracv_scav"] = 2, - ["corfast_scav"] = 2, - ["cormando_scav"] = 2, - ["corforge_scav"] = 2, + armrectr_scav = 40, + armack_scav = 2, + armacv_scav = 2, + armfark_scav = 2, + armconsul_scav = 2, + --Cortex + cornecro_scav = 40, + corack_scav = 2, + coracv_scav = 2, + corfast_scav = 2, + cormando_scav = 2, + corforge_scav = 2, --Legion - ["legacv_scav"] = 2, - ["legack_scav"] = 2, - ["legaceb_scav"] = 2, + legacv_scav = 2, + legack_scav = 2, + legaceb_scav = 2, }, [6] = { --Armada - ["armrectr_scav"] = 40, - ["armack_scav"] = 2, - ["armacv_scav"] = 2, - ["armfark_scav"] = 2, - ["armconsul_scav"] = 2, - --Cortex - ["cornecro_scav"] = 40, - ["corack_scav"] = 2, - ["coracv_scav"] = 2, - ["corfast_scav"] = 2, - ["cormando_scav"] = 2, - ["corforge_scav"] = 2, + armrectr_scav = 40, + armack_scav = 2, + armacv_scav = 2, + armfark_scav = 2, + armconsul_scav = 2, + --Cortex + cornecro_scav = 40, + corack_scav = 2, + coracv_scav = 2, + corfast_scav = 2, + cormando_scav = 2, + corforge_scav = 2, --Legion - ["legacv_scav"] = 2, - ["legack_scav"] = 2, - ["legaceb_scav"] = 2, + legacv_scav = 2, + legack_scav = 2, + legaceb_scav = 2, }, [7] = { --Armada - ["armrectr_scav"] = 40, - ["armack_scav"] = 2, - ["armacv_scav"] = 2, - ["armfark_scav"] = 2, - ["armconsul_scav"] = 2, - --Cortex - ["cornecro_scav"] = 40, - ["corack_scav"] = 2, - ["coracv_scav"] = 2, - ["corfast_scav"] = 2, - ["cormando_scav"] = 2, - ["corforge_scav"] = 2, + armrectr_scav = 40, + armack_scav = 2, + armacv_scav = 2, + armfark_scav = 2, + armconsul_scav = 2, + --Cortex + cornecro_scav = 40, + corack_scav = 2, + coracv_scav = 2, + corfast_scav = 2, + cormando_scav = 2, + corforge_scav = 2, --Legion - ["legacv_scav"] = 2, - ["legack_scav"] = 2, - ["legaceb_scav"] = 2, + legacv_scav = 2, + legack_scav = 2, + legaceb_scav = 2, }, }, } @@ -644,24 +644,24 @@ local SeaUnitsList = { Raid = { [1] = { --Armada - ["armdecade_scav"] = 3, - ["armsh_scav"] = 3, + armdecade_scav = 3, + armsh_scav = 3, --Cortex - ["coresupp_scav"] = 3, - ["corsh_scav"] = 3, + coresupp_scav = 3, + corsh_scav = 3, --Legion - ["legsh_scav"] = 3, - ["legnavyscout_scav"] = 3, + legsh_scav = 3, + legnavyscout_scav = 3, }, [2] = { --Armada - ["armdecade_scav"] = 3, - ["armsh_scav"] = 3, + armdecade_scav = 3, + armsh_scav = 3, --Cortex - ["coresupp_scav"] = 3, - ["corsh_scav"] = 3, + coresupp_scav = 3, + corsh_scav = 3, --Legion - ["legsh_scav"] = 3, + legsh_scav = 3, }, [3] = { --Armada @@ -670,19 +670,19 @@ local SeaUnitsList = { }, [4] = { --Armada - ["armlship_scav"] = 3, + armlship_scav = 3, --Cortex - ["corfship_scav"] = 3, + corfship_scav = 3, --Legion - ["leganavyantiswarm_scav"] = 3, + leganavyantiswarm_scav = 3, }, [5] = { --Armada - ["armsubk_scav"] = 2, + armsubk_scav = 2, --Cortex - ["corshark_scav"] = 2, + corshark_scav = 2, --Legion - ["leganavybattlesub_scav"] = 2, + leganavybattlesub_scav = 2, }, [6] = { --Armada @@ -710,230 +710,230 @@ local SeaUnitsList = { }, [3] = { --Armada - ["armpship_scav"] = 4, - ["armroy_scav"] = 2, - ["armanac_scav"] = 3, + armpship_scav = 4, + armroy_scav = 2, + armanac_scav = 3, --Cortex - ["corpship_scav"] = 4, - ["corroy_scav"] = 2, - ["corsnap_scav"] = 4, + corpship_scav = 4, + corroy_scav = 2, + corsnap_scav = 4, --Legion - ["legnavyfrigate"] = 3, - ["legner_scav"] = 4, - ["legnavydestro_scav"] = 2, + legnavyfrigate = 3, + legner_scav = 4, + legnavydestro_scav = 2, }, [4] = { --Armada - ["armcrus_scav"] = 3, + armcrus_scav = 3, --Cortex - ["corcrus_scav"] = 3, - ["corhal_scav"] = 3, + corcrus_scav = 3, + corhal_scav = 3, --Legion - ["leganavycruiser_scav"] = 3, + leganavycruiser_scav = 3, }, [5] = { --Armada - ["armbats_scav"] = 3, + armbats_scav = 3, --Cortex - ["corbats_scav"] = 3, + corbats_scav = 3, --Legion - ["leganavybattleship_scav"] = 3, + leganavybattleship_scav = 3, }, [6] = { --Armada - ["armpshipt3_scav"] = 2, - ["armptt2_scav"] = 2, + armpshipt3_scav = 2, + armptt2_scav = 2, --Cortex - ["corprince_scav"] = 2, + corprince_scav = 2, --Legion - ["leganavyartyship"] = 2, + leganavyartyship = 2, }, [7] = { --Armada - ["armepoch_scav"] = 2, - ["armserpt3_scav"] = 2, + armepoch_scav = 2, + armserpt3_scav = 2, --Cortex - ["coresuppt3_scav"] = 2, - ["corblackhy_scav"] = 3, + coresuppt3_scav = 2, + corblackhy_scav = 3, --Legion - ["leganavyflagship"] = 2, + leganavyflagship = 2, }, }, Support = { [1] = { --Armada - ["armpt_scav"] = 2, + armpt_scav = 2, --Cortex - ["corpt_scav"] = 2, + corpt_scav = 2, --Legion - ["legnavyaaship_scav"] = 2, + legnavyaaship_scav = 2, }, [2] = { --Armada - ["armpt_scav"] = 2, + armpt_scav = 2, --Cortex - ["corpt_scav"] = 2, + corpt_scav = 2, --Legion - ["legnavyaaship_scav"] = 2, + legnavyaaship_scav = 2, }, [3] = { --Armada - ["armsub_scav"] = 2, - ["armah_scav"] = 2, - ["armmh_scav"] = 2, + armsub_scav = 2, + armah_scav = 2, + armmh_scav = 2, --Cortex - ["corsub_scav"] = 2, - ["corah_scav"] = 2, - ["cormh_scav"] = 2, + corsub_scav = 2, + corah_scav = 2, + cormh_scav = 2, --Legion - ["legah_scav"] = 2, - ["legmh_scav"] = 2, - ["leganavysub_scav"] = 2, + legah_scav = 2, + legmh_scav = 2, + leganavysub_scav = 2, }, [4] = { --Armada - ["armantiship_scav"] = 2, - ["armdronecarry_scav"] = 2, - ["armaas_scav"] = 2, + armantiship_scav = 2, + armdronecarry_scav = 2, + armaas_scav = 2, --Cortex - ["cordronecarry_scav"] = 2, - ["corantiship_scav"] = 2, - ["corarch_scav"] = 2, + cordronecarry_scav = 2, + corantiship_scav = 2, + corarch_scav = 2, --Legion - ["leganavyantinukecarrier_scav"] = 4, - ["leganavyaaship_scav"] = 2, + leganavyantinukecarrier_scav = 4, + leganavyaaship_scav = 2, }, [5] = { --Armada - ["armserp_scav"] = 2, - ["armmship_scav"] = 2, - ["armsjam_scav"] = 2, - ["armtrident_scav"] = 2, + armserp_scav = 2, + armmship_scav = 2, + armsjam_scav = 2, + armtrident_scav = 2, --Cortex - ["corssub_scav"] = 2, - ["cormship_scav"] = 2, - ["corsjam_scav"] = 2, - ["corsentinel_scav"] = 2, + corssub_scav = 2, + cormship_scav = 2, + corsjam_scav = 2, + corsentinel_scav = 2, --Legion - ["leganavyheavysub_scav"] = 2, - ["leganavymissileship_scav"] = 2, - ["leganavyradjamship_scav"] = 2, + leganavyheavysub_scav = 2, + leganavymissileship_scav = 2, + leganavyradjamship_scav = 2, }, [6] = { --Armada - ["armexcalibur_scav"] = 1, - ["armseadeagon_scav"] = 1, + armexcalibur_scav = 1, + armseadeagon_scav = 1, --Cortex - ["coronager_scav"] = 1, - ["cordesolator_scav"] = 1, + coronager_scav = 1, + cordesolator_scav = 1, }, [7] = { --Armada - ["armdecadet3_scav"] = 2, + armdecadet3_scav = 2, --Cortex - ["corslrpc_scav"] = 2, + corslrpc_scav = 2, }, }, Healer = { [1] = { --Armada - ["armcs_scav"] = 2, - ["armrecl_scav"] = 40, - ["armch_scav"] = 2, + armcs_scav = 2, + armrecl_scav = 40, + armch_scav = 2, --Cortex - ["corcs_scav"] = 2, - ["correcl_scav"] = 40, - ["corch_scav"] = 2, + corcs_scav = 2, + correcl_scav = 40, + corch_scav = 2, --legion - ["legnavyconship_scav"] = 2, - ["legnavyrezsub_scav"] = 40, - ["legch_scav"] = 2, + legnavyconship_scav = 2, + legnavyrezsub_scav = 40, + legch_scav = 2, }, [2] = { --Armada - ["armcs_scav"] = 2, - ["armrecl_scav"] = 40, - ["armch_scav"] = 2, + armcs_scav = 2, + armrecl_scav = 40, + armch_scav = 2, --Cortex - ["corcs_scav"] = 2, - ["correcl_scav"] = 40, - ["corch_scav"] = 2, + corcs_scav = 2, + correcl_scav = 40, + corch_scav = 2, --Legion - ["legnavyconship_scav"] = 2, - ["legnavyrezsub_scav"] = 40, - ["legch_scav"] = 2, + legnavyconship_scav = 2, + legnavyrezsub_scav = 40, + legch_scav = 2, }, [3] = { --Armada - ["armcs_scav"] = 2, - ["armrecl_scav"] = 40, - ["armch_scav"] = 2, + armcs_scav = 2, + armrecl_scav = 40, + armch_scav = 2, --Cortex - ["corcs_scav"] = 2, - ["correcl_scav"] = 40, - ["corch_scav"] = 2, + corcs_scav = 2, + correcl_scav = 40, + corch_scav = 2, --Legion - ["legnavyconship_scav"] = 2, - ["legnavyrezsub_scav"] = 40, - ["legch_scav"] = 2, + legnavyconship_scav = 2, + legnavyrezsub_scav = 40, + legch_scav = 2, }, [4] = { --Armada - ["armacsub_scav"] = 2, - ["armrecl_scav"] = 40, - ["armmls_scav"] = 2, + armacsub_scav = 2, + armrecl_scav = 40, + armmls_scav = 2, --Cortex - ["coracsub_scav"] = 2, - ["correcl_scav"] = 40, - ["cormls_scav"] = 2, + coracsub_scav = 2, + correcl_scav = 40, + cormls_scav = 2, --Legion - ["leganavyconsub_scav"] = 2, - ["legnavyrezsub_scav"] = 40, - ["leganavyengineer_scav"] = 2, + leganavyconsub_scav = 2, + legnavyrezsub_scav = 40, + leganavyengineer_scav = 2, }, [5] = { --Armada - ["armacsub_scav"] = 2, - ["armrecl_scav"] = 40, - ["armmls_scav"] = 2, + armacsub_scav = 2, + armrecl_scav = 40, + armmls_scav = 2, --Cortex - ["coracsub_scav"] = 2, - ["correcl_scav"] = 40, - ["cormls_scav"] = 2, + coracsub_scav = 2, + correcl_scav = 40, + cormls_scav = 2, --Legion - ["leganavyconsub_scav"] = 2, - ["legnavyrezsub_scav"] = 40, - ["leganavyengineer_scav"] = 2, + leganavyconsub_scav = 2, + legnavyrezsub_scav = 40, + leganavyengineer_scav = 2, }, [6] = { --Armada - ["armacsub_scav"] = 2, - ["armrecl_scav"] = 40, - ["armmls_scav"] = 2, + armacsub_scav = 2, + armrecl_scav = 40, + armmls_scav = 2, --Cortex - ["coracsub_scav"] = 2, - ["correcl_scav"] = 40, - ["cormls_scav"] = 2, + coracsub_scav = 2, + correcl_scav = 40, + cormls_scav = 2, --Legion - ["leganavyconsub_scav"] = 2, - ["legnavyrezsub_scav"] = 40, - ["leganavyengineer_scav"] = 2, + leganavyconsub_scav = 2, + legnavyrezsub_scav = 40, + leganavyengineer_scav = 2, }, [7] = { --Armada - ["armacsub_scav"] = 2, - ["armrecl_scav"] = 40, - ["armmls_scav"] = 2, + armacsub_scav = 2, + armrecl_scav = 40, + armmls_scav = 2, --Cortex - ["coracsub_scav"] = 2, - ["correcl_scav"] = 40, - ["cormls_scav"] = 2, + coracsub_scav = 2, + correcl_scav = 40, + cormls_scav = 2, --Legion - ["leganavyconsub_scav"] = 2, - ["legnavyrezsub_scav"] = 40, - ["leganavyengineer_scav"] = 2, + leganavyconsub_scav = 2, + legnavyrezsub_scav = 40, + leganavyengineer_scav = 2, }, }, } @@ -943,19 +943,19 @@ local SeaUnitsList = { ---------------------------------------------------------------------------------------------- if not Spring.GetModOptions().unit_restrictions_noair then local t1landairconstructors = { - ["armca_scav"] = 2, - ["corca_scav"] = 2, - ["legca_scav"] = 2, - ["armfify_scav"] = 2, + armca_scav = 2, + corca_scav = 2, + legca_scav = 2, + armfify_scav = 2, } local t2landairconstructors = { - ["armaca_scav"] = 2, - ["coraca_scav"] = 2, - ["legaca_scav"] = 2, + armaca_scav = 2, + coraca_scav = 2, + legaca_scav = 2, } local t2seaairconstructors = { - ["armcsa_scav"] = 2, - ["corcsa_scav"] = 2, + armcsa_scav = 2, + corcsa_scav = 2, } table.append(LandUnitsList.Healer[2], table.copy(t1landairconstructors)) @@ -982,176 +982,176 @@ local AirUnitsList = { Land = { [1] = { --Armada - ["armpeep_scav"] = 2, + armpeep_scav = 2, --Cortex - ["corfink_scav"] = 2, + corfink_scav = 2, --Legion }, [2] = { --Armada - ["armpeep_scav"] = 2, + armpeep_scav = 2, --Cortex - ["corfink_scav"] = 2, - ["corbw_scav"] = 2, + corfink_scav = 2, + corbw_scav = 2, --Legion - ["legfig_scav"] = 2, + legfig_scav = 2, }, [3] = { --Armada - ["armfig_scav"] = 2, - ["armkam_scav"] = 2, - ["armthund_scav"] = 2, + armfig_scav = 2, + armkam_scav = 2, + armthund_scav = 2, --Cortex - ["corveng_scav"] = 2, - ["corshad_scav"] = 2, + corveng_scav = 2, + corshad_scav = 2, --Legion - ["legmos_scav"] = 2, - ["legcib_scav"] = 2, - ["legkam_scav"] = 2, + legmos_scav = 2, + legcib_scav = 2, + legkam_scav = 2, }, [4] = { --Armada - ["armawac_scav"] = 2, - ["armdfly_scav"] = 2, + armawac_scav = 2, + armdfly_scav = 2, --Cortex - ["corawac_scav"] = 2, + corawac_scav = 2, --Legion - ["legwhisper_scav"] = 2, + legwhisper_scav = 2, }, [5] = { --Armada - ["armhawk_scav"] = 3, - ["armbrawl_scav"] = 3, - ["armpnix_scav"] = 3, - ["armstil_scav"] = 3, - ["armblade_scav"] = 3, - ["armliche_scav"] = 1, - ["armdfly_scav"] = 2, - --Cortex - ["corvamp_scav"] = 3, - ["corape_scav"] = 3, - ["corhurc_scav"] = 3, - ["corcrw_scav"] = 1, - ["corcrwh_scav"] = 1, + armhawk_scav = 3, + armbrawl_scav = 3, + armpnix_scav = 3, + armstil_scav = 3, + armblade_scav = 3, + armliche_scav = 1, + armdfly_scav = 2, + --Cortex + corvamp_scav = 3, + corape_scav = 3, + corhurc_scav = 3, + corcrw_scav = 1, + corcrwh_scav = 1, --Legion - ["legstronghold_scav"] = 2, - ["legvenator_scav"] = 3, - ["legionnaire_scav"] = 3, - ["legafigdef_scav"] = 3, - ["legnap_scav"] = 3, - ["legmineb_scav"] = 3, - ["legphoenix_scav"] = 3, - ["legfort_scav"] = 1, - ["legmost3_scav"] = 1, + legstronghold_scav = 2, + legvenator_scav = 3, + legionnaire_scav = 3, + legafigdef_scav = 3, + legnap_scav = 3, + legmineb_scav = 3, + legphoenix_scav = 3, + legfort_scav = 1, + legmost3_scav = 1, }, [6] = { --Armada - ["armdfly_scav"] = 2, + armdfly_scav = 2, --Cortex - ["cordronecarryair_scav"] = 2, + cordronecarryair_scav = 2, --Legion }, [7] = { --Armada - ["armliche_scav"] = 10, - ["armthundt4_scav"] = 2, - ["armfepocht4_scav"] = 1, + armliche_scav = 10, + armthundt4_scav = 2, + armfepocht4_scav = 1, --Cortex - ["corcrw_scav"] = 3, - ["corcrwh_scav"] = 3, - ["corfblackhyt4_scav"] = 1, - ["corcrwt4_scav"] = 2, + corcrw_scav = 3, + corcrwh_scav = 3, + corfblackhyt4_scav = 1, + corcrwt4_scav = 2, --Legion - ["legfort_scav"] = 3, - ["legmost3_scav"] = 2, - ["legfortt4_scav"] = 1, + legfort_scav = 3, + legmost3_scav = 2, + legfortt4_scav = 1, }, }, Sea = { [1] = { - ["armpeep_scav"] = 2, + armpeep_scav = 2, - ["corfink_scav"] = 2, + corfink_scav = 2, }, [2] = { - ["armsehak_scav"] = 2, - ["armsfig_scav"] = 2, + armsehak_scav = 2, + armsfig_scav = 2, - ["corsfig_scav"] = 2, - ["corhunt_scav"] = 2, + corsfig_scav = 2, + corhunt_scav = 2, }, [3] = { - ["armsfig_scav"] = 2, - ["corsfig_scav"] = 2, + armsfig_scav = 2, + corsfig_scav = 2, }, [4] = { - ["armsfig_scav"] = 2, - ["armsaber_scav"] = 2, - ["armseap_scav"] = 2, - ["armsb_scav"] = 2, - ["armlance_scav"] = 2, - ["armdfly_scav"] = 2, + armsfig_scav = 2, + armsaber_scav = 2, + armseap_scav = 2, + armsb_scav = 2, + armlance_scav = 2, + armdfly_scav = 2, - ["corsfig_scav"] = 2, - ["corsb_scav"] = 2, - ["corseap_scav"] = 2, - ["corcut_scav"] = 2, - ["cortitan_scav"] = 2, + corsfig_scav = 2, + corsb_scav = 2, + corseap_scav = 2, + corcut_scav = 2, + cortitan_scav = 2, - ["legatorpbomber"] = 2, + legatorpbomber = 2, }, [5] = { - ["armsfig_scav"] = 2, - ["armsaber_scav"] = 2, - ["armseap_scav"] = 2, - ["armsb_scav"] = 2, - ["armlance_scav"] = 2, - ["armdfly_scav"] = 2, - - ["corsfig_scav"] = 2, - ["corsb_scav"] = 2, - ["corseap_scav"] = 2, - ["corcut_scav"] = 2, - ["cortitan_scav"] = 2, + armsfig_scav = 2, + armsaber_scav = 2, + armseap_scav = 2, + armsb_scav = 2, + armlance_scav = 2, + armdfly_scav = 2, + + corsfig_scav = 2, + corsb_scav = 2, + corseap_scav = 2, + corcut_scav = 2, + cortitan_scav = 2, - ["legatorpbomber"] = 2, + legatorpbomber = 2, }, [6] = { - ["armsfig_scav"] = 2, - ["armsaber_scav"] = 2, - ["armseap_scav"] = 2, - ["armsb_scav"] = 2, - ["armlance_scav"] = 2, - ["armdfly_scav"] = 2, - - ["corsfig_scav"] = 2, - ["corsb_scav"] = 2, - ["corseap_scav"] = 2, - ["corcut_scav"] = 2, - ["cortitan_scav"] = 2, + armsfig_scav = 2, + armsaber_scav = 2, + armseap_scav = 2, + armsb_scav = 2, + armlance_scav = 2, + armdfly_scav = 2, + + corsfig_scav = 2, + corsb_scav = 2, + corseap_scav = 2, + corcut_scav = 2, + cortitan_scav = 2, - ["legatorpbomber"] = 2, + legatorpbomber = 2, }, [7] = { --Armada - ["armliche_scav"] = 4, - ["armthundt4_scav"] = 2, - ["armfepocht4_scav"] = 1, + armliche_scav = 4, + armthundt4_scav = 2, + armfepocht4_scav = 1, --Cortex - ["corfblackhyt4_scav"] = 1, - ["corcrwt4_scav"] = 2, - ["corcrw_scav"] = 3, - ["corcrwh_scav"] = 3, + corfblackhyt4_scav = 1, + corcrwt4_scav = 2, + corcrw_scav = 3, + corcrwh_scav = 3, --Legion - ["legfort_scav"] = 3, - ["legfortt4_scav"] = 3, - ["legmost3_scav"] = 2, + legfort_scav = 3, + legfortt4_scav = 3, + legmost3_scav = 2, }, } } @@ -1165,232 +1165,232 @@ local AirUnitsList = { local Turrets = { [1] = { - ["armllt_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 10}, - ["corllt_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 10}, - ["leglht_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 10}, - ["armrl_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 10}, - ["corrl_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 10}, - ["cortl_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 4}, - ["armtl_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 4}, - ["armfrt_scav"] = {type = "antiair", surface = "sea", spawnedPerWave = 0.1, maxExisting = 2}, - ["corfrt_scav"] = {type = "antiair", surface = "sea", spawnedPerWave = 0.1, maxExisting = 2}, + armllt_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 10}, + corllt_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 10}, + leglht_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 10}, + armrl_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 10}, + corrl_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 10}, + cortl_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 4}, + armtl_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 4}, + armfrt_scav = {type = "antiair", surface = "sea", spawnedPerWave = 0.1, maxExisting = 2}, + corfrt_scav = {type = "antiair", surface = "sea", spawnedPerWave = 0.1, maxExisting = 2}, }, [2] = { --["cordl_scav"] = {type = "normal", surface = "mixed", spawnedPerWave = 0.1, maxExisting = 1}, --["armdl_scav"] = {type = "normal", surface = "mixed", spawnedPerWave = 0.1, maxExisting = 1}, --Sea Only - ["armfhlt_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, - ["corfhlt_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, - ["armfrock_scav"] = {type = "antiair", surface = "sea", spawnedPerWave = 0.1, maxExisting = 2}, - ["corfrock_scav"] = {type = "antiair", surface = "sea", spawnedPerWave = 0.1, maxExisting = 2}, - ["corgplat_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, - ["armgplat_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, + armfhlt_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, + corfhlt_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, + armfrock_scav = {type = "antiair", surface = "sea", spawnedPerWave = 0.1, maxExisting = 2}, + corfrock_scav = {type = "antiair", surface = "sea", spawnedPerWave = 0.1, maxExisting = 2}, + corgplat_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, + armgplat_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, --Eco - ["armsolar_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["corsolar_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["legsolar_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["armwin_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["corwin_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["legwin_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["legadvsol_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["armtide_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 3}, - ["cortide_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 3}, - ["armmstor_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["cormstor_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["armestor_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, - ["corestor_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, - ["armuwms_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, - ["coruwms_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, - ["armuwes_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, - ["coruwes_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, - ["armmakr_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["cormakr_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["armfmkr_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, - ["corfmkr_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, + armsolar_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + corsolar_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + legsolar_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + armwin_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + corwin_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + legwin_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + legadvsol_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + armtide_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 3}, + cortide_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 3}, + armmstor_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + cormstor_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + armestor_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, + corestor_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, + armuwms_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, + coruwms_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, + armuwes_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, + coruwes_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, + armmakr_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + cormakr_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + armfmkr_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, + corfmkr_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, --Factories - ["armlab_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["armvp_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["armap_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["armhp_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["corlab_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["corvp_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["corap_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["corhp_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["leglab_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["legvp_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["legap_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["leghp_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["armfhp_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, - ["armsy_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, - ["corfhp_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, - ["corsy_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, - ["legfhp_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, + armlab_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + armvp_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + armap_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + armhp_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + corlab_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + corvp_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + corap_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + corhp_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + leglab_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + legvp_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + legap_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + leghp_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + armfhp_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, + armsy_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, + corfhp_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, + corsy_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, + legfhp_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, --["legsy_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, }, [3] = { - ["armbeamer_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, - ["corhllt_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, - ["legmg_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, - ["cormaw_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 4}, - ["armclaw_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 4}, - ["legdtr_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 4}, - ["armferret_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["cormadsam_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, - ["corhlt_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["corpun_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["armhlt_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, - ["armguard_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["legcluster_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["corscavdtl_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["corscavdtf_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["corscavdtm_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["leghive_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + armbeamer_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, + corhllt_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, + legmg_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, + cormaw_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 4}, + armclaw_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 4}, + legdtr_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 4}, + armferret_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + cormadsam_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, + corhlt_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + corpun_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + armhlt_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 5}, + armguard_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + legcluster_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + corscavdtl_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + corscavdtf_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + corscavdtm_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + leghive_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, --radar/jam - ["corrad_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["corjamt_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["armrad_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["armjamt_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["armjuno_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["corjuno_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["legjuno_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["legrad_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["legjam_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + corrad_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + corjamt_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + armrad_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + armjamt_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + armjuno_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + corjuno_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + legjuno_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + legrad_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + legjam_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, }, [4] = { - ["armcir_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["corerad_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["leglupara_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + armcir_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + corerad_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + leglupara_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, --Sea - ["corfdoom_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, - ["coratl_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, - ["corenaa_scav"] = {type = "antiair", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, - ["corason_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 0.4}, - ["armkraken_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, - ["armfflak_scav"] = {type = "antiair", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, - ["armatl_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, - ["armason_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 0.4}, + corfdoom_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, + coratl_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, + corenaa_scav = {type = "antiair", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, + corason_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 0.4}, + armkraken_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, + armfflak_scav = {type = "antiair", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, + armatl_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 5}, + armason_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 0.4}, --T2 Radar/jam - ["corarad_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["corshroud_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["armarad_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["armveil_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + corarad_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + corshroud_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + armarad_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + armveil_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, --T2 Popups - ["armlwall_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["cormwall_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["legrwall_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["armpb_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["corvipe_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["legbombard_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + armlwall_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + cormwall_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + legrwall_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + armpb_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + corvipe_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + legbombard_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, --Misc - ["corhllllt_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["armgate_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["corgate_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + corhllllt_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + armgate_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + corgate_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, --T2 AA - ["corflak_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 4}, - ["armflak_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 4}, - ["legflak_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 4}, + corflak_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 4}, + armflak_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 4}, + legflak_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.1, maxExisting = 4}, --Eco - ["armwint2_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["corwint2_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["legwint2_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["armfus_scav"] = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 5}, - ["armckfus_scav"] = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 5}, - ["corfus_scav"] = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 5}, - ["armuwfus_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 1, maxExisting = 5}, - ["coruwfus_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 1, maxExisting = 5}, - ["armuwadvms_scav"] = {type = "normal", surface = "mixed", spawnedPerWave = 0.1, maxExisting = 1}, - ["coruwadvms_scav"] = {type = "normal", surface = "mixed", spawnedPerWave = 0.1, maxExisting = 1}, - ["legamstor_scav"] = {type = "normal", surface = "mixed", spawnedPerWave = 0.1, maxExisting = 1}, - ["armuwadves_scav"] = {type = "normal", surface = "mixed", spawnedPerWave = 0.1, maxExisting = 3}, - ["coruwadves_scav"] = {type = "normal", surface = "mixed", spawnedPerWave = 0.1, maxExisting = 3}, - ["armmmkr_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["cormmkr_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["legadveconv_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["armuwmmm_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, - ["coruwmmm_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, + armwint2_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + corwint2_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + legwint2_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + armfus_scav = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 5}, + armckfus_scav = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 5}, + corfus_scav = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 5}, + armuwfus_scav = {type = "normal", surface = "sea", spawnedPerWave = 1, maxExisting = 5}, + coruwfus_scav = {type = "normal", surface = "sea", spawnedPerWave = 1, maxExisting = 5}, + armuwadvms_scav = {type = "normal", surface = "mixed", spawnedPerWave = 0.1, maxExisting = 1}, + coruwadvms_scav = {type = "normal", surface = "mixed", spawnedPerWave = 0.1, maxExisting = 1}, + legamstor_scav = {type = "normal", surface = "mixed", spawnedPerWave = 0.1, maxExisting = 1}, + armuwadves_scav = {type = "normal", surface = "mixed", spawnedPerWave = 0.1, maxExisting = 3}, + coruwadves_scav = {type = "normal", surface = "mixed", spawnedPerWave = 0.1, maxExisting = 3}, + armmmkr_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + cormmkr_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + legadveconv_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + armuwmmm_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, + coruwmmm_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, -- Factories - ["armalab_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["armavp_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["armaap_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["coralab_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["coravp_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["coraap_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["legalab_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["legavp_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["legaap_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, - ["armamsub_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, - ["armasy_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, - ["armplat_scav"] = {type = "antiair", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, - ["coramsub_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, - ["corasy_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, - ["corplat_scav"] = {type = "antiair", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, - ["legamsub_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, + armalab_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + armavp_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + armaap_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + coralab_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + coravp_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + coraap_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + legalab_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + legavp_scav = {type = "normal", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + legaap_scav = {type = "antiair", surface = "land", spawnedPerWave = 0.05, maxExisting = 1}, + armamsub_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, + armasy_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, + armplat_scav = {type = "antiair", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, + coramsub_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, + corasy_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, + corplat_scav = {type = "antiair", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, + legamsub_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, --["legasy_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.05, maxExisting = 1}, }, [5] = { -- T2 popup arty - ["armamb_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["cortoast_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["legacluster_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + armamb_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + cortoast_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + legacluster_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, -- Pulsar and Bulwark normals - ["armanni_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["cordoom_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["legbastion_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + armanni_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + cordoom_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + legbastion_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, --LRPC - ["armbrtha_scav"] = {type = "lrpc", surface = "land", spawnedPerWave = 0.25, maxExisting = 7}, - ["corint_scav"] = {type = "lrpc", surface = "land", spawnedPerWave = 0.25, maxExisting = 7}, - ["leglrpc_scav"] = {type = "lrpc", surface = "land", spawnedPerWave = 0.25, maxExisting = 7}, + armbrtha_scav = {type = "lrpc", surface = "land", spawnedPerWave = 0.25, maxExisting = 7}, + corint_scav = {type = "lrpc", surface = "land", spawnedPerWave = 0.25, maxExisting = 7}, + leglrpc_scav = {type = "lrpc", surface = "land", spawnedPerWave = 0.25, maxExisting = 7}, --antinukes - ["armamd_scav"] = {type = "nuke", surface = "land", spawnedPerWave = 1, maxExisting = 5}, - ["corfmd_scav"] = {type = "nuke", surface = "land", spawnedPerWave = 1, maxExisting = 5}, + armamd_scav = {type = "nuke", surface = "land", spawnedPerWave = 1, maxExisting = 5}, + corfmd_scav = {type = "nuke", surface = "land", spawnedPerWave = 1, maxExisting = 5}, --Tactical Weapons - ["cortron_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["armemp_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["legperdition_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + cortron_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + armemp_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + legperdition_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, --T2 AA - ["armmercury_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 1, maxExisting = 2}, - ["corscreamer_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 1, maxExisting = 2}, - ["leglraa_scav"] = {type = "antiair", surface = "land", spawnedPerWave = 1, maxExisting = 2}, + armmercury_scav = {type = "antiair", surface = "land", spawnedPerWave = 1, maxExisting = 2}, + corscreamer_scav = {type = "antiair", surface = "land", spawnedPerWave = 1, maxExisting = 2}, + leglraa_scav = {type = "antiair", surface = "land", spawnedPerWave = 1, maxExisting = 2}, }, [6] = { -- nukes - ["corsilo_scav"] = {type = "nuke", surface = "land", spawnedPerWave = 1, maxExisting = 3}, - ["armsilo_scav"] = {type = "nuke", surface = "land", spawnedPerWave = 1, maxExisting = 3}, - ["legsilo_scav"] = {type = "nuke", surface = "land", spawnedPerWave = 1, maxExisting = 3}, + corsilo_scav = {type = "nuke", surface = "land", spawnedPerWave = 1, maxExisting = 3}, + armsilo_scav = {type = "nuke", surface = "land", spawnedPerWave = 1, maxExisting = 3}, + legsilo_scav = {type = "nuke", surface = "land", spawnedPerWave = 1, maxExisting = 3}, -- misc t3 turrets - ["armminivulc_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["corminibuzz_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["legministarfall_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["armbotrail_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + armminivulc_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + corminibuzz_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + legministarfall_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + armbotrail_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, --Eco - ["armafus_scav"] = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 5}, - ["corafus_scav"] = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 5}, - ["legafus_scav"] = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 5}, + armafus_scav = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 5}, + corafus_scav = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 5}, + legafus_scav = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 5}, --Factories - ["armshltx_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["corgant_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["leggant_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["armshltxuw_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, - ["corgantuw_scav"] = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, + armshltx_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + corgant_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + leggant_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + armshltxuw_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, + corgantuw_scav = {type = "normal", surface = "sea", spawnedPerWave = 0.1, maxExisting = 1}, --misc - ["armgatet3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["corgatet3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, - ["leggatet3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + armgatet3_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + corgatet3_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, + leggatet3_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 2}, }, [7] = { --Epic Bulwark and Pulsar/rag/cal - ["armannit3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["cordoomt3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, - ["armvulc_scav"] = {type = "lrpc", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["corbuzz_scav"] = {type = "lrpc", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, - ["legstarfall_scav"] = {type = "lrpc", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + armannit3_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + cordoomt3_scav = {type = "normal", surface = "land", spawnedPerWave = 0.1, maxExisting = 3}, + armvulc_scav = {type = "lrpc", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + corbuzz_scav = {type = "lrpc", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, + legstarfall_scav = {type = "lrpc", surface = "land", spawnedPerWave = 0.1, maxExisting = 1}, --Eco - ["armafust3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 1}, - ["corafust3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 1}, - ["legafust3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 1}, - ["armmmkrt3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 1}, - ["cormmkrt3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 1}, - ["legadveconvt3_scav"] = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 1}, + armafust3_scav = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 1}, + corafust3_scav = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 1}, + legafust3_scav = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 1}, + armmmkrt3_scav = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 1}, + cormmkrt3_scav = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 1}, + legadveconvt3_scav = {type = "normal", surface = "land", spawnedPerWave = 1, maxExisting = 1}, }, } @@ -1423,202 +1423,202 @@ end scavBehaviours = { SKIRMISH = { -- Run away from target after target gets hit - [UnitDefNames["legcom_scav"].id] = { distance = 100, chance = 0.1 }, - [UnitDefNames["legdecom_scav"].id] = { distance = 100, chance = 0.1 }, - [UnitDefNames["legcomlvl2_scav"].id] = { distance = 150, chance = 0.1 }, - [UnitDefNames["legcomlvl3_scav"].id] = { distance = 200, chance = 0.1 }, - [UnitDefNames["legdecomlvl3_scav"].id] = { distance = 200, chance = 0.1 }, - [UnitDefNames["legcomlvl4_scav"].id] = { distance = 250, chance = 0.1 }, - [UnitDefNames["legcomlvl5_scav"].id] = { distance = 300, chance = 0.01 }, - [UnitDefNames["legcomlvl6_scav"].id] = { distance = 350, chance = 0.01 }, - [UnitDefNames["legdecomlvl6_scav"].id] = { distance = 350, chance = 0.01 }, - [UnitDefNames["legcomlvl7_scav"].id] = { distance = 400, chance = 0.01 }, - [UnitDefNames["legcomlvl8_scav"].id] = { distance = 450, chance = 0.001 }, - [UnitDefNames["legcomlvl9_scav"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["legcomlvl10_scav"].id] = { distance = 550, chance = 0.001 }, - [UnitDefNames["legdecomlvl10_scav"].id] = { distance = 550, chance = 0.001 }, - [UnitDefNames["armcom_scav"].id] = { distance = 100, chance = 0.1 }, - [UnitDefNames["armdecom_scav"].id] = { distance = 100, chance = 0.1 }, - [UnitDefNames["armcomlvl2_scav"].id] = { distance = 200, chance = 0.1 }, - [UnitDefNames["armcomlvl3_scav"].id] = { distance = 300, chance = 0.1 }, - [UnitDefNames["armdecomlvl3_scav"].id] = { distance = 300, chance = 0.1 }, - [UnitDefNames["armcomlvl4_scav"].id] = { distance = 400, chance = 0.1 }, - [UnitDefNames["armcomlvl5_scav"].id] = { distance = 500, chance = 0.01 }, - [UnitDefNames["armcomlvl6_scav"].id] = { distance = 600, chance = 0.01 }, - [UnitDefNames["armdecomlvl6_scav"].id] = { distance = 600, chance = 0.01 }, - [UnitDefNames["armcomlvl7_scav"].id] = { distance = 700, chance = 0.01 }, - [UnitDefNames["armcomlvl8_scav"].id] = { distance = 800, chance = 0.001 }, - [UnitDefNames["armcomlvl9_scav"].id] = { distance = 900, chance = 0.001 }, - [UnitDefNames["armcomlvl10_scav"].id] = { distance = 1000, chance = 0.001 }, - [UnitDefNames["armdecomlvl10_scav"].id] = { distance = 1000, chance = 0.001 }, - [UnitDefNames["corcom_scav"].id] = { distance = 2000, chance = 0.1 }, - [UnitDefNames["cordecom_scav"].id] = { distance = 2000, chance = 0.1 }, - [UnitDefNames["corcomlvl2_scav"].id] = { distance = 2000, chance = 0.1 }, - [UnitDefNames["corcomlvl3_scav"].id] = { distance = 2000, chance = 0.1 }, - [UnitDefNames["cordecomlvl3_scav"].id] = { distance = 2000, chance = 0.1 }, - [UnitDefNames["corcomlvl4_scav"].id] = { distance = 2000, chance = 0.1 }, - - [UnitDefNames["squadarmpwt4_scav"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["squadcorakt4_scav"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["squadarmsptkt4_scav"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["squadcorkarganetht4_scav"].id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.legcom_scav .id] = { distance = 100, chance = 0.1 }, + [UnitDefNames.legdecom_scav .id] = { distance = 100, chance = 0.1 }, + [UnitDefNames.legcomlvl2_scav .id] = { distance = 150, chance = 0.1 }, + [UnitDefNames.legcomlvl3_scav .id] = { distance = 200, chance = 0.1 }, + [UnitDefNames.legdecomlvl3_scav .id] = { distance = 200, chance = 0.1 }, + [UnitDefNames.legcomlvl4_scav .id] = { distance = 250, chance = 0.1 }, + [UnitDefNames.legcomlvl5_scav .id] = { distance = 300, chance = 0.01 }, + [UnitDefNames.legcomlvl6_scav .id] = { distance = 350, chance = 0.01 }, + [UnitDefNames.legdecomlvl6_scav .id] = { distance = 350, chance = 0.01 }, + [UnitDefNames.legcomlvl7_scav .id] = { distance = 400, chance = 0.01 }, + [UnitDefNames.legcomlvl8_scav .id] = { distance = 450, chance = 0.001 }, + [UnitDefNames.legcomlvl9_scav .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.legcomlvl10_scav .id] = { distance = 550, chance = 0.001 }, + [UnitDefNames.legdecomlvl10_scav .id] = { distance = 550, chance = 0.001 }, + [UnitDefNames.armcom_scav .id] = { distance = 100, chance = 0.1 }, + [UnitDefNames.armdecom_scav .id] = { distance = 100, chance = 0.1 }, + [UnitDefNames.armcomlvl2_scav .id] = { distance = 200, chance = 0.1 }, + [UnitDefNames.armcomlvl3_scav .id] = { distance = 300, chance = 0.1 }, + [UnitDefNames.armdecomlvl3_scav .id] = { distance = 300, chance = 0.1 }, + [UnitDefNames.armcomlvl4_scav .id] = { distance = 400, chance = 0.1 }, + [UnitDefNames.armcomlvl5_scav .id] = { distance = 500, chance = 0.01 }, + [UnitDefNames.armcomlvl6_scav .id] = { distance = 600, chance = 0.01 }, + [UnitDefNames.armdecomlvl6_scav .id] = { distance = 600, chance = 0.01 }, + [UnitDefNames.armcomlvl7_scav .id] = { distance = 700, chance = 0.01 }, + [UnitDefNames.armcomlvl8_scav .id] = { distance = 800, chance = 0.001 }, + [UnitDefNames.armcomlvl9_scav .id] = { distance = 900, chance = 0.001 }, + [UnitDefNames.armcomlvl10_scav .id] = { distance = 1000, chance = 0.001 }, + [UnitDefNames.armdecomlvl10_scav .id] = { distance = 1000, chance = 0.001 }, + [UnitDefNames.corcom_scav .id] = { distance = 2000, chance = 0.1 }, + [UnitDefNames.cordecom_scav .id] = { distance = 2000, chance = 0.1 }, + [UnitDefNames.corcomlvl2_scav .id] = { distance = 2000, chance = 0.1 }, + [UnitDefNames.corcomlvl3_scav .id] = { distance = 2000, chance = 0.1 }, + [UnitDefNames.cordecomlvl3_scav .id] = { distance = 2000, chance = 0.1 }, + [UnitDefNames.corcomlvl4_scav .id] = { distance = 2000, chance = 0.1 }, + + [UnitDefNames.squadarmpwt4_scav .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.squadcorakt4_scav .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.squadarmsptkt4_scav .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.squadcorkarganetht4_scav .id] = { distance = 500, chance = 0.001 }, }, COWARD = { -- Run away from target after getting hit by enemy - [UnitDefNames["armcom_scav"].id] = { distance = 100, chance = 0.1 }, - [UnitDefNames["armcomlvl2_scav"].id] = { distance = 150, chance = 0.1 }, - [UnitDefNames["armcomlvl3_scav"].id] = { distance = 200, chance = 0.1 }, - [UnitDefNames["armdecomlvl3_scav"].id] = { distance = 200, chance = 0.1 }, - [UnitDefNames["armcomlvl4_scav"].id] = { distance = 250, chance = 0.1 }, - [UnitDefNames["armcomlvl5_scav"].id] = { distance = 300, chance = 0.01 }, - [UnitDefNames["armcomlvl6_scav"].id] = { distance = 350, chance = 0.01 }, - [UnitDefNames["armdecomlvl6_scav"].id] = { distance = 350, chance = 0.01 }, - [UnitDefNames["armcomlvl7_scav"].id] = { distance = 400, chance = 0.01 }, - [UnitDefNames["armcomlvl8_scav"].id] = { distance = 450, chance = 0.001 }, - [UnitDefNames["armcomlvl9_scav"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["armcomlvl10_scav"].id] = { distance = 550, chance = 0.001 }, - [UnitDefNames["armdecomlvl10_scav"].id] = { distance = 550, chance = 0.001 }, - [UnitDefNames["corcom_scav"].id] = { distance = 100, chance = 0.1 }, - [UnitDefNames["cordecom_scav"].id] = { distance = 100, chance = 0.1 }, - [UnitDefNames["corcomlvl2_scav"].id] = { distance = 150, chance = 0.1 }, - [UnitDefNames["corcomlvl3_scav"].id] = { distance = 200, chance = 0.1 }, - [UnitDefNames["cordecomlvl3_scav"].id] = { distance = 200, chance = 0.1 }, - [UnitDefNames["corcomlvl4_scav"].id] = { distance = 250, chance = 0.1 }, - [UnitDefNames["corcomlvl5_scav"].id] = { distance = 300, chance = 0.01 }, - [UnitDefNames["corcomlvl6_scav"].id] = { distance = 350, chance = 0.01 }, - [UnitDefNames["cordecomlvl6_scav"].id] = { distance = 350, chance = 0.01 }, - [UnitDefNames["corcomlvl7_scav"].id] = { distance = 400, chance = 0.01 }, - [UnitDefNames["corcomlvl8_scav"].id] = { distance = 450, chance = 0.001 }, - [UnitDefNames["corcomlvl9_scav"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["corcomlvl10_scav"].id] = { distance = 550, chance = 0.001 }, - [UnitDefNames["cordecomlvl10_scav"].id] = { distance = 550, chance = 0.001 }, - [UnitDefNames["legcom_scav"].id] = { distance = 100, chance = 0.1 }, - [UnitDefNames["legdecom_scav"].id] = { distance = 100, chance = 0.1 }, - [UnitDefNames["legcomlvl2_scav"].id] = { distance = 150, chance = 0.1 }, - [UnitDefNames["legcomlvl3_scav"].id] = { distance = 200, chance = 0.1 }, - [UnitDefNames["legdecomlvl3_scav"].id] = { distance = 200, chance = 0.1 }, - [UnitDefNames["legcomlvl4_scav"].id] = { distance = 250, chance = 0.1 }, - [UnitDefNames["legcomlvl5_scav"].id] = { distance = 300, chance = 0.01 }, - [UnitDefNames["legcomlvl6_scav"].id] = { distance = 350, chance = 0.01 }, - [UnitDefNames["legdecomlvl6_scav"].id] = { distance = 350, chance = 0.01 }, - [UnitDefNames["legcomlvl7_scav"].id] = { distance = 400, chance = 0.01 }, - [UnitDefNames["legcomlvl8_scav"].id] = { distance = 450, chance = 0.001 }, - [UnitDefNames["legcomlvl9_scav"].id] = { distance = 500, chance = 0.001 }, - [UnitDefNames["legcomlvl10_scav"].id] = { distance = 550, chance = 0.001 }, - [UnitDefNames["legdecomlvl10_scav"].id] = { distance = 550, chance = 0.001 }, - [UnitDefNames["cormandot4_scav"].id] = { distance = 500, chance = 0.1 }, - - [UnitDefNames["squadarmpwt4_scav"].id] = { distance = 500, chance = 0.1 }, - [UnitDefNames["squadcorakt4_scav"].id] = { distance = 500, chance = 0.1 }, - [UnitDefNames["squadarmsptkt4_scav"].id] = { distance = 500, chance = 0.1 }, - [UnitDefNames["squadcorkarganetht4_scav"].id] = { distance = 500, chance = 0.1 }, + [UnitDefNames.armcom_scav .id] = { distance = 100, chance = 0.1 }, + [UnitDefNames.armcomlvl2_scav .id] = { distance = 150, chance = 0.1 }, + [UnitDefNames.armcomlvl3_scav .id] = { distance = 200, chance = 0.1 }, + [UnitDefNames.armdecomlvl3_scav .id] = { distance = 200, chance = 0.1 }, + [UnitDefNames.armcomlvl4_scav .id] = { distance = 250, chance = 0.1 }, + [UnitDefNames.armcomlvl5_scav .id] = { distance = 300, chance = 0.01 }, + [UnitDefNames.armcomlvl6_scav .id] = { distance = 350, chance = 0.01 }, + [UnitDefNames.armdecomlvl6_scav .id] = { distance = 350, chance = 0.01 }, + [UnitDefNames.armcomlvl7_scav .id] = { distance = 400, chance = 0.01 }, + [UnitDefNames.armcomlvl8_scav .id] = { distance = 450, chance = 0.001 }, + [UnitDefNames.armcomlvl9_scav .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.armcomlvl10_scav .id] = { distance = 550, chance = 0.001 }, + [UnitDefNames.armdecomlvl10_scav .id] = { distance = 550, chance = 0.001 }, + [UnitDefNames.corcom_scav .id] = { distance = 100, chance = 0.1 }, + [UnitDefNames.cordecom_scav .id] = { distance = 100, chance = 0.1 }, + [UnitDefNames.corcomlvl2_scav .id] = { distance = 150, chance = 0.1 }, + [UnitDefNames.corcomlvl3_scav .id] = { distance = 200, chance = 0.1 }, + [UnitDefNames.cordecomlvl3_scav .id] = { distance = 200, chance = 0.1 }, + [UnitDefNames.corcomlvl4_scav .id] = { distance = 250, chance = 0.1 }, + [UnitDefNames.corcomlvl5_scav .id] = { distance = 300, chance = 0.01 }, + [UnitDefNames.corcomlvl6_scav .id] = { distance = 350, chance = 0.01 }, + [UnitDefNames.cordecomlvl6_scav .id] = { distance = 350, chance = 0.01 }, + [UnitDefNames.corcomlvl7_scav .id] = { distance = 400, chance = 0.01 }, + [UnitDefNames.corcomlvl8_scav .id] = { distance = 450, chance = 0.001 }, + [UnitDefNames.corcomlvl9_scav .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.corcomlvl10_scav .id] = { distance = 550, chance = 0.001 }, + [UnitDefNames.cordecomlvl10_scav .id] = { distance = 550, chance = 0.001 }, + [UnitDefNames.legcom_scav .id] = { distance = 100, chance = 0.1 }, + [UnitDefNames.legdecom_scav .id] = { distance = 100, chance = 0.1 }, + [UnitDefNames.legcomlvl2_scav .id] = { distance = 150, chance = 0.1 }, + [UnitDefNames.legcomlvl3_scav .id] = { distance = 200, chance = 0.1 }, + [UnitDefNames.legdecomlvl3_scav .id] = { distance = 200, chance = 0.1 }, + [UnitDefNames.legcomlvl4_scav .id] = { distance = 250, chance = 0.1 }, + [UnitDefNames.legcomlvl5_scav .id] = { distance = 300, chance = 0.01 }, + [UnitDefNames.legcomlvl6_scav .id] = { distance = 350, chance = 0.01 }, + [UnitDefNames.legdecomlvl6_scav .id] = { distance = 350, chance = 0.01 }, + [UnitDefNames.legcomlvl7_scav .id] = { distance = 400, chance = 0.01 }, + [UnitDefNames.legcomlvl8_scav .id] = { distance = 450, chance = 0.001 }, + [UnitDefNames.legcomlvl9_scav .id] = { distance = 500, chance = 0.001 }, + [UnitDefNames.legcomlvl10_scav .id] = { distance = 550, chance = 0.001 }, + [UnitDefNames.legdecomlvl10_scav .id] = { distance = 550, chance = 0.001 }, + [UnitDefNames.cormandot4_scav .id] = { distance = 500, chance = 0.1 }, + + [UnitDefNames.squadarmpwt4_scav .id] = { distance = 500, chance = 0.1 }, + [UnitDefNames.squadcorakt4_scav .id] = { distance = 500, chance = 0.1 }, + [UnitDefNames.squadarmsptkt4_scav .id] = { distance = 500, chance = 0.1 }, + [UnitDefNames.squadcorkarganetht4_scav .id] = { distance = 500, chance = 0.1 }, }, BERSERK = { -- Run towards target after getting hit by enemy or after hitting the target - [UnitDefNames["armcomlvl5_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["armcomlvl6_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["armdecomlvl6_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["armcomlvl7_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["armcomlvl8_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["armcomlvl9_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["armcomlvl10_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["armdecomlvl10_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["corcomlvl5_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["corcomlvl6_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["cordecomlvl6_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["corcomlvl7_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["corcomlvl8_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["corcomlvl9_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["corcomlvl10_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["cordecomlvl10_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["legcomlvl5_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["legcomlvl6_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["legdecomlvl6_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["legcomlvl7_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["legcomlvl8_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["legcomlvl9_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["legcomlvl10_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["legdecomlvl10_scav"].id] = { distance = 5000, chance = 0.01 }, - [UnitDefNames["scavmist_scav"].id] = { distance = 2000, chance = 1}, - [UnitDefNames["scavmistxl_scav"].id] = { distance = 2000, chance = 1}, - [UnitDefNames["scavmistxxl_scav"].id] = { distance = 2000, chance = 1}, + [UnitDefNames.armcomlvl5_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.armcomlvl6_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.armdecomlvl6_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.armcomlvl7_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.armcomlvl8_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.armcomlvl9_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.armcomlvl10_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.armdecomlvl10_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.corcomlvl5_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.corcomlvl6_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.cordecomlvl6_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.corcomlvl7_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.corcomlvl8_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.corcomlvl9_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.corcomlvl10_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.cordecomlvl10_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.legcomlvl5_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.legcomlvl6_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.legdecomlvl6_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.legcomlvl7_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.legcomlvl8_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.legcomlvl9_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.legcomlvl10_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.legdecomlvl10_scav .id] = { distance = 5000, chance = 0.01 }, + [UnitDefNames.scavmist_scav .id] = { distance = 2000, chance = 1}, + [UnitDefNames.scavmistxl_scav .id] = { distance = 2000, chance = 1}, + [UnitDefNames.scavmistxxl_scav .id] = { distance = 2000, chance = 1}, }, HEALER = { -- Getting long max lifetime and always use Fight command. These units spawn as healers from burrows and boss --[UnitDefNames["raptor_land_swarmer_heal_t1_v1"].id] = true, - [UnitDefNames["armrectr_scav"].id] = true,--Armada Rezzer - [UnitDefNames["cornecro_scav"].id] = true,--Cortex Rezzer - [UnitDefNames["armca_scav"].id] = true, - [UnitDefNames["armaca_scav"].id] = true, - [UnitDefNames["armfify_scav"].id] = true, - [UnitDefNames["armcsa_scav"].id] = true, - [UnitDefNames["corca_scav"].id] = true, - [UnitDefNames["coraca_scav"].id] = true, - [UnitDefNames["corcsa_scav"].id] = true, - [UnitDefNames["legca_scav"].id] = true, - [UnitDefNames["legaca_scav"].id] = true, - - - [UnitDefNames["armcom_scav"].id] = true, - [UnitDefNames["corcom_scav"].id] = true, - [UnitDefNames["legcom_scav"].id] = true, - [UnitDefNames["armcomlvl2_scav"].id] = true, - [UnitDefNames["corcomlvl2_scav"].id] = true, - [UnitDefNames["legcomlvl2_scav"].id] = true, - [UnitDefNames["armcomlvl3_scav"].id] = true, - [UnitDefNames["corcomlvl3_scav"].id] = true, - [UnitDefNames["legcomlvl3_scav"].id] = true, - [UnitDefNames["armcomlvl4_scav"].id] = true, - [UnitDefNames["corcomlvl4_scav"].id] = true, - [UnitDefNames["legcomlvl4_scav"].id] = true, - [UnitDefNames["armcomlvl5_scav"].id] = true, - [UnitDefNames["corcomlvl5_scav"].id] = true, - [UnitDefNames["legcomlvl5_scav"].id] = true, - [UnitDefNames["armcomlvl6_scav"].id] = true, - [UnitDefNames["corcomlvl6_scav"].id] = true, - [UnitDefNames["legcomlvl6_scav"].id] = true, - [UnitDefNames["armcomlvl7_scav"].id] = true, - [UnitDefNames["corcomlvl7_scav"].id] = true, - [UnitDefNames["legcomlvl7_scav"].id] = true, - [UnitDefNames["armcomlvl8_scav"].id] = true, - [UnitDefNames["corcomlvl8_scav"].id] = true, - [UnitDefNames["legcomlvl8_scav"].id] = true, - [UnitDefNames["armcomlvl9_scav"].id] = true, - [UnitDefNames["corcomlvl9_scav"].id] = true, - [UnitDefNames["legcomlvl9_scav"].id] = true, - [UnitDefNames["armcomlvl10_scav"].id] = true, - [UnitDefNames["corcomlvl10_scav"].id] = true, - [UnitDefNames["legcomlvl10_scav"].id] = true, - - [UnitDefNames["armdecom_scav"].id] = true, - [UnitDefNames["armdecomlvl3_scav"].id] = true, - [UnitDefNames["armdecomlvl6_scav"].id] = true, - [UnitDefNames["armdecomlvl10_scav"].id] = true, - - [UnitDefNames["cordecom_scav"].id] = true, - [UnitDefNames["cordecomlvl3_scav"].id] = true, - [UnitDefNames["cordecomlvl6_scav"].id] = true, - [UnitDefNames["cordecomlvl10_scav"].id] = true, - - [UnitDefNames["legdecom_scav"].id] = true, - [UnitDefNames["legdecomlvl3_scav"].id] = true, - [UnitDefNames["legdecomlvl6_scav"].id] = true, - [UnitDefNames["legdecomlvl10_scav"].id] = true, + [UnitDefNames.armrectr_scav .id] = true,--Armada Rezzer + [UnitDefNames.cornecro_scav .id] = true,--Cortex Rezzer + [UnitDefNames.armca_scav .id] = true, + [UnitDefNames.armaca_scav .id] = true, + [UnitDefNames.armfify_scav .id] = true, + [UnitDefNames.armcsa_scav .id] = true, + [UnitDefNames.corca_scav .id] = true, + [UnitDefNames.coraca_scav .id] = true, + [UnitDefNames.corcsa_scav .id] = true, + [UnitDefNames.legca_scav .id] = true, + [UnitDefNames.legaca_scav .id] = true, + + + [UnitDefNames.armcom_scav .id] = true, + [UnitDefNames.corcom_scav .id] = true, + [UnitDefNames.legcom_scav .id] = true, + [UnitDefNames.armcomlvl2_scav .id] = true, + [UnitDefNames.corcomlvl2_scav .id] = true, + [UnitDefNames.legcomlvl2_scav .id] = true, + [UnitDefNames.armcomlvl3_scav .id] = true, + [UnitDefNames.corcomlvl3_scav .id] = true, + [UnitDefNames.legcomlvl3_scav .id] = true, + [UnitDefNames.armcomlvl4_scav .id] = true, + [UnitDefNames.corcomlvl4_scav .id] = true, + [UnitDefNames.legcomlvl4_scav .id] = true, + [UnitDefNames.armcomlvl5_scav .id] = true, + [UnitDefNames.corcomlvl5_scav .id] = true, + [UnitDefNames.legcomlvl5_scav .id] = true, + [UnitDefNames.armcomlvl6_scav .id] = true, + [UnitDefNames.corcomlvl6_scav .id] = true, + [UnitDefNames.legcomlvl6_scav .id] = true, + [UnitDefNames.armcomlvl7_scav .id] = true, + [UnitDefNames.corcomlvl7_scav .id] = true, + [UnitDefNames.legcomlvl7_scav .id] = true, + [UnitDefNames.armcomlvl8_scav .id] = true, + [UnitDefNames.corcomlvl8_scav .id] = true, + [UnitDefNames.legcomlvl8_scav .id] = true, + [UnitDefNames.armcomlvl9_scav .id] = true, + [UnitDefNames.corcomlvl9_scav .id] = true, + [UnitDefNames.legcomlvl9_scav .id] = true, + [UnitDefNames.armcomlvl10_scav .id] = true, + [UnitDefNames.corcomlvl10_scav .id] = true, + [UnitDefNames.legcomlvl10_scav .id] = true, + + [UnitDefNames.armdecom_scav .id] = true, + [UnitDefNames.armdecomlvl3_scav .id] = true, + [UnitDefNames.armdecomlvl6_scav .id] = true, + [UnitDefNames.armdecomlvl10_scav .id] = true, + + [UnitDefNames.cordecom_scav .id] = true, + [UnitDefNames.cordecomlvl3_scav .id] = true, + [UnitDefNames.cordecomlvl6_scav .id] = true, + [UnitDefNames.cordecomlvl10_scav .id] = true, + + [UnitDefNames.legdecom_scav .id] = true, + [UnitDefNames.legdecomlvl3_scav .id] = true, + [UnitDefNames.legdecomlvl6_scav .id] = true, + [UnitDefNames.legdecomlvl10_scav .id] = true, }, ARTILLERY = { -- Long lifetime and no regrouping, always uses Fight command to keep distance --[UnitDefNames["raptor_allterrain_arty_basic_t2_v1"].id] = true, - [UnitDefNames["squadarmpwt4_scav"].id] = true, - [UnitDefNames["squadcorakt4_scav"].id] = true, - [UnitDefNames["squadarmsptkt4_scav"].id] = true, - [UnitDefNames["squadcorkarganetht4_scav"].id] = true, + [UnitDefNames.squadarmpwt4_scav .id] = true, + [UnitDefNames.squadcorakt4_scav .id] = true, + [UnitDefNames.squadarmsptkt4_scav .id] = true, + [UnitDefNames.squadcorkarganetht4_scav .id] = true, }, KAMIKAZE = { -- Long lifetime and no regrouping, always uses Move command to rush into the enemy --[UnitDefNames["raptor_land_kamikaze_basic_t2_v1"].id] = true, - [UnitDefNames["scavmist_scav"].id] = true, - [UnitDefNames["scavmistxl_scav"].id] = true, - [UnitDefNames["scavmistxxl_scav"].id] = true, - [UnitDefNames["armvadert4_scav"].id] = true, + [UnitDefNames.scavmist_scav .id] = true, + [UnitDefNames.scavmistxl_scav .id] = true, + [UnitDefNames.scavmistxxl_scav .id] = true, + [UnitDefNames.armvadert4_scav .id] = true, }, ALWAYSMOVE = { -- Always use Move command, no matter what category this unit is in - [UnitDefNames["cormandot4_scav"].id] = true, + [UnitDefNames.cormandot4_scav .id] = true, }, ALWAYSFIGHT = { -- Always use Fight command, no matter what category this unit is in }, @@ -1642,57 +1642,57 @@ local squadSpawnOptionsTable = { healerLand = {}, -- Healers/Medics healerSea = {}, -- Healers/Medics commanders = { - ["armcom_scav"] = { minAnger = 10, maxAnger = 40, maxAlive = 1 }, - ["armcomlvl2_scav"] = { minAnger = 15, maxAnger = 50, maxAlive = 1 }, - ["armcomlvl3_scav"] = { minAnger = 20, maxAnger = 60, maxAlive = 1 }, - ["armcomlvl4_scav"] = { minAnger = 30, maxAnger = 70, maxAlive = 1 }, - ["armcomlvl5_scav"] = { minAnger = 40, maxAnger = 80, maxAlive = 1 }, - ["armcomlvl6_scav"] = { minAnger = 50, maxAnger = 90, maxAlive = 1 }, - ["armcomlvl7_scav"] = { minAnger = 60, maxAnger = 100, maxAlive = 1 }, - ["armcomlvl8_scav"] = { minAnger = 70, maxAnger = 110, maxAlive = 1 }, - ["armcomlvl9_scav"] = { minAnger = 80, maxAnger = 120, maxAlive = 1 }, - ["armcomlvl10_scav"] = { minAnger = 90, maxAnger = 1000, maxAlive = 4 }, - ["corcom_scav"] = { minAnger = 10, maxAnger = 40, maxAlive = 1 }, - ["corcomlvl2_scav"] = { minAnger = 15, maxAnger = 50, maxAlive = 1 }, - ["corcomlvl3_scav"] = { minAnger = 20, maxAnger = 60, maxAlive = 1 }, - ["corcomlvl4_scav"] = { minAnger = 30, maxAnger = 70, maxAlive = 1 }, - ["corcomlvl5_scav"] = { minAnger = 40, maxAnger = 80, maxAlive = 1 }, - ["corcomlvl6_scav"] = { minAnger = 50, maxAnger = 90, maxAlive = 1 }, - ["corcomlvl7_scav"] = { minAnger = 60, maxAnger = 100, maxAlive = 1 }, - ["corcomlvl8_scav"] = { minAnger = 70, maxAnger = 110, maxAlive = 1 }, - ["corcomlvl9_scav"] = { minAnger = 80, maxAnger = 120, maxAlive = 1 }, - ["corcomlvl10_scav"] = { minAnger = 90, maxAnger = 1000, maxAlive = 4 }, - ["legcom_scav"] = { minAnger = 10, maxAnger = 40, maxAlive = 1 }, - ["legcomlvl2_scav"] = { minAnger = 15, maxAnger = 50, maxAlive = 1 }, - ["legcomlvl3_scav"] = { minAnger = 20, maxAnger = 60, maxAlive = 1 }, - ["legcomlvl4_scav"] = { minAnger = 30, maxAnger = 70, maxAlive = 1 }, - ["legcomlvl5_scav"] = { minAnger = 40, maxAnger = 80, maxAlive = 1 }, - ["legcomlvl6_scav"] = { minAnger = 50, maxAnger = 90, maxAlive = 1 }, - ["legcomlvl7_scav"] = { minAnger = 60, maxAnger = 100, maxAlive = 1 }, - ["legcomlvl8_scav"] = { minAnger = 70, maxAnger = 110, maxAlive = 1 }, - ["legcomlvl9_scav"] = { minAnger = 80, maxAnger = 120, maxAlive = 1 }, - ["legcomlvl10_scav"] = { minAnger = 90, maxAnger = 1000, maxAlive = 4 }, + armcom_scav = { minAnger = 10, maxAnger = 40, maxAlive = 1 }, + armcomlvl2_scav = { minAnger = 15, maxAnger = 50, maxAlive = 1 }, + armcomlvl3_scav = { minAnger = 20, maxAnger = 60, maxAlive = 1 }, + armcomlvl4_scav = { minAnger = 30, maxAnger = 70, maxAlive = 1 }, + armcomlvl5_scav = { minAnger = 40, maxAnger = 80, maxAlive = 1 }, + armcomlvl6_scav = { minAnger = 50, maxAnger = 90, maxAlive = 1 }, + armcomlvl7_scav = { minAnger = 60, maxAnger = 100, maxAlive = 1 }, + armcomlvl8_scav = { minAnger = 70, maxAnger = 110, maxAlive = 1 }, + armcomlvl9_scav = { minAnger = 80, maxAnger = 120, maxAlive = 1 }, + armcomlvl10_scav = { minAnger = 90, maxAnger = 1000, maxAlive = 4 }, + corcom_scav = { minAnger = 10, maxAnger = 40, maxAlive = 1 }, + corcomlvl2_scav = { minAnger = 15, maxAnger = 50, maxAlive = 1 }, + corcomlvl3_scav = { minAnger = 20, maxAnger = 60, maxAlive = 1 }, + corcomlvl4_scav = { minAnger = 30, maxAnger = 70, maxAlive = 1 }, + corcomlvl5_scav = { minAnger = 40, maxAnger = 80, maxAlive = 1 }, + corcomlvl6_scav = { minAnger = 50, maxAnger = 90, maxAlive = 1 }, + corcomlvl7_scav = { minAnger = 60, maxAnger = 100, maxAlive = 1 }, + corcomlvl8_scav = { minAnger = 70, maxAnger = 110, maxAlive = 1 }, + corcomlvl9_scav = { minAnger = 80, maxAnger = 120, maxAlive = 1 }, + corcomlvl10_scav = { minAnger = 90, maxAnger = 1000, maxAlive = 4 }, + legcom_scav = { minAnger = 10, maxAnger = 40, maxAlive = 1 }, + legcomlvl2_scav = { minAnger = 15, maxAnger = 50, maxAlive = 1 }, + legcomlvl3_scav = { minAnger = 20, maxAnger = 60, maxAlive = 1 }, + legcomlvl4_scav = { minAnger = 30, maxAnger = 70, maxAlive = 1 }, + legcomlvl5_scav = { minAnger = 40, maxAnger = 80, maxAlive = 1 }, + legcomlvl6_scav = { minAnger = 50, maxAnger = 90, maxAlive = 1 }, + legcomlvl7_scav = { minAnger = 60, maxAnger = 100, maxAlive = 1 }, + legcomlvl8_scav = { minAnger = 70, maxAnger = 110, maxAlive = 1 }, + legcomlvl9_scav = { minAnger = 80, maxAnger = 120, maxAlive = 1 }, + legcomlvl10_scav = { minAnger = 90, maxAnger = 1000, maxAlive = 4 }, }, decoyCommanders = { - ["armdecom_scav"] = { minAnger = 10, maxAnger = 40, maxAlive = 1 }, - ["armdecomlvl3_scav"] = { minAnger = 20, maxAnger = 60, maxAlive = 1 }, - ["armdecomlvl6_scav"] = { minAnger = 50, maxAnger = 90, maxAlive = 1 }, - ["armdecomlvl10_scav"] = { minAnger = 80, maxAnger = 1000, maxAlive = 1 }, - - ["cordecom_scav"] = { minAnger = 10, maxAnger = 40, maxAlive = 1 }, - ["cordecomlvl3_scav"] = { minAnger = 20, maxAnger = 60, maxAlive = 1}, - ["cordecomlvl6_scav"] = { minAnger = 50, maxAnger = 90, maxAlive = 1 }, - ["cordecomlvl10_scav"] = { minAnger = 80, maxAnger = 1000, maxAlive = 1 }, - - ["legdecom_scav"] = { minAnger = 10, maxAnger = 40, maxAlive = 1 }, - ["legdecomlvl3_scav"] = { minAnger = 20, maxAnger = 60, maxAlive = 1 }, - ["legdecomlvl6_scav"] = { minAnger = 50, maxAnger = 90, maxAlive = 1 }, - ["legdecomlvl10_scav"] = { minAnger = 80, maxAnger = 1000, maxAlive = 1 }, - - ["cormandot4_scav"] = { minAnger = 60, maxAnger = 1000, maxAlive = 4 }, + armdecom_scav = { minAnger = 10, maxAnger = 40, maxAlive = 1 }, + armdecomlvl3_scav = { minAnger = 20, maxAnger = 60, maxAlive = 1 }, + armdecomlvl6_scav = { minAnger = 50, maxAnger = 90, maxAlive = 1 }, + armdecomlvl10_scav = { minAnger = 80, maxAnger = 1000, maxAlive = 1 }, + + cordecom_scav = { minAnger = 10, maxAnger = 40, maxAlive = 1 }, + cordecomlvl3_scav = { minAnger = 20, maxAnger = 60, maxAlive = 1}, + cordecomlvl6_scav = { minAnger = 50, maxAnger = 90, maxAlive = 1 }, + cordecomlvl10_scav = { minAnger = 80, maxAnger = 1000, maxAlive = 1 }, + + legdecom_scav = { minAnger = 10, maxAnger = 40, maxAlive = 1 }, + legdecomlvl3_scav = { minAnger = 20, maxAnger = 60, maxAlive = 1 }, + legdecomlvl6_scav = { minAnger = 50, maxAnger = 90, maxAlive = 1 }, + legdecomlvl10_scav = { minAnger = 80, maxAnger = 1000, maxAlive = 1 }, + + cormandot4_scav = { minAnger = 60, maxAnger = 1000, maxAlive = 4 }, } --frontbusters = { -- @@ -2785,40 +2785,40 @@ local ecoBuildingsPenalty = { -- Additional boss hatch per second from eco build local highValueTargetsNames = { -- Priority targets for Scav. Must be immobile to prevent issues. -- T2 Energy - ["armwint2"] = true, - ["corwint2"] = true, - ["legwint2"] = true, - ["armfus"] = true, - ["armckfus"] = true, - ["corfus"] = true, - ["armuwfus"] = true, - ["coruwfus"] = true, - ["armageo"] = true, - ["corageo"] = true, - ["armafus"] = true, - ["corafus"] = true, - ["legafus"] = true, - ["armafust3"] = true, - ["corafust3"] = true, - ["legafust3"] = true, + armwint2 = true, + corwint2 = true, + legwint2 = true, + armfus = true, + armckfus = true, + corfus = true, + armuwfus = true, + coruwfus = true, + armageo = true, + corageo = true, + armafus = true, + corafus = true, + legafus = true, + armafust3 = true, + corafust3 = true, + legafust3 = true, -- T2 Metal Makers - ["armmmkr"] = true, - ["cormmkr"] = true, - ["legadveconv"] = true, - ["armmmkrt3"] = true, - ["cormmkrt3"] = true, - ["legadveconvt3"] = true, - ["armuwmmm"] = true, - ["coruwmmm"] = true, + armmmkr = true, + cormmkr = true, + legadveconv = true, + armmmkrt3 = true, + cormmkrt3 = true, + legadveconvt3 = true, + armuwmmm = true, + coruwmmm = true, -- T2 Metal Extractors - ["cormoho"] = true, - ["armmoho"] = true, + cormoho = true, + armmoho = true, -- Nukes - ["corsilo"] = true, - ["armsilo"] = true, + corsilo = true, + armsilo = true, -- Antinukes - ["armamd"] = true, - ["corfmd"] = true, + armamd = true, + corfmd = true, } -- convert unitname -> unitDefID local highValueTargets = {} diff --git a/luarules/gadgets/ai/STAI/armyhst.lua b/luarules/gadgets/ai/STAI/armyhst.lua index 6b4c6c25435..3c0382ec54b 100644 --- a/luarules/gadgets/ai/STAI/armyhst.lua +++ b/luarules/gadgets/ai/STAI/armyhst.lua @@ -899,12 +899,12 @@ local featureKeysToGet = { "metal" , "energy", "reclaimable", "blocking", } local function getDPS(unitDefID) local unitDef = UnitDefs[unitDefID] - local weapons = unitDef["weapons"] + local weapons = unitDef.weapons local dps = 0 for i=1, #weapons do - local weaponDefID = weapons[i]["weaponDef"] + local weaponDefID = weapons[i].weaponDef local weaponDef = WeaponDefs[weaponDefID] - dps = dps + weaponDef['damages'][0] / weaponDef['reload'] + dps = dps + weaponDef.damages [0] / weaponDef.reload end return dps end @@ -913,13 +913,13 @@ end local function getInterceptor(unitDefID) local unitDef = UnitDefs[unitDefID] - local weapons = unitDef["weapons"] + local weapons = unitDef.weapons local interceptor = false for i=1, #weapons do - local weaponDefID = weapons[i]["weaponDef"] + local weaponDefID = weapons[i].weaponDef local weaponDef = WeaponDefs[weaponDefID] - if weaponDef['interceptor'] then - interceptor = weaponDef['interceptor'] == 1 + if weaponDef.interceptor then + interceptor = weaponDef.interceptor == 1 end end return interceptor @@ -927,13 +927,13 @@ end local function getTargetableWeapon(unitDefID) local unitDef = UnitDefs[unitDefID] - local weapons = unitDef["weapons"] + local weapons = unitDef.weapons local targetable = false for i=1, #weapons do - local weaponDefID = weapons[i]["weaponDef"] + local weaponDefID = weapons[i].weaponDef local weaponDef = WeaponDefs[weaponDefID] - if weaponDef['targetable'] then - targetable = weaponDef['targetable'] == 1 + if weaponDef.targetable then + targetable = weaponDef.targetable == 1 end end --('targetable',targetable) @@ -942,12 +942,12 @@ end local function getParalyzer(unitDefID) local unitDef = UnitDefs[unitDefID] - local weapons = unitDef["weapons"] + local weapons = unitDef.weapons local paralyzer = nil for i=1, #weapons do - local weaponDefID = weapons[i]["weaponDef"] + local weaponDefID = weapons[i].weaponDef local weaponDef = WeaponDefs[weaponDefID] - paralyzer = weaponDef['paralyzer'] + paralyzer = weaponDef.paralyzer end return paralyzer end @@ -957,7 +957,7 @@ local function getOnlyTargets(weapons) for index,weapon in pairs (weapons) do if weapon.onlyTargets then for name,_ in pairs(weapon.onlyTargets) do - local weaponDefID = weapon["weaponDef"] + local weaponDefID = weapon.weaponDef local weaponDef = WeaponDefs[weaponDefID] targets[name] = weaponDef.range end @@ -971,7 +971,7 @@ local function getBadTargets(weapons) for index,weapon in pairs (weapons) do if weapon.badTargets then for name,_ in pairs(weapon.badTargets) do - local weaponDefID = weapon["weaponDef"] + local weaponDefID = weapon.weaponDef local weaponDef = WeaponDefs[weaponDefID] targets[name] = weaponDef.range end @@ -982,10 +982,10 @@ end local function GetLongestWeaponRange(unitDefID, GroundAirSubmerged) local weaponRange = 0 local unitDef = UnitDefs[unitDefID] - local weapons = unitDef["weapons"] + local weapons = unitDef.weapons local dps = 0 for i=1, #weapons do - local weaponDefID = weapons[i]["weaponDef"] + local weaponDefID = weapons[i].weaponDef local weaponDef = WeaponDefs[weaponDefID] --print(weaponDefID) --print(weaponDef["canAttackGround"]) @@ -993,17 +993,17 @@ local function GetLongestWeaponRange(unitDefID, GroundAirSubmerged) --print(weaponDef["range"]) --print(weaponDef["type"]) local wType = 0 - if weaponDef["canAttackGround"] == false then + if weaponDef.canAttackGround == false then wType = 1 - elseif weaponDef["waterWeapon"] then + elseif weaponDef.waterWeapon then wType = 2 else wType = 0 end -- --print(wType) if wType == GroundAirSubmerged then - if weaponDef["range"] > weaponRange then - weaponRange = weaponDef["range"] + if weaponDef.range > weaponRange then + weaponRange = weaponDef.range end end @@ -1120,11 +1120,11 @@ function ArmyHST:GetUnitTable() utable.humanName = unitDef.humanName utable.side = side utable.defId = unitDefID - utable.radarDistance = unitDef["radarDistance"] - utable.airSightDistance = unitDef["airSightDistance"] - utable.sightDistance = unitDef["losRadius"] - utable.sonarDistance = unitDef["sonarDistance"] - utable.radarDistanceJam = unitDef["radarDistanceJam"] + utable.radarDistance = unitDef.radarDistance + utable.airSightDistance = unitDef.airSightDistance + utable.sightDistance = unitDef.losRadius + utable.sonarDistance = unitDef.sonarDistance + utable.radarDistanceJam = unitDef.radarDistanceJam utable.stealth = unitDef.stealth utable.metalCost = unitDef.metalCost utable.energyCost = unitDef.energyCost @@ -1225,16 +1225,16 @@ function ArmyHST:GetUnitTable() utable.antiNuke = getInterceptor(unitDefID) utable.targetableWeapon = getTargetableWeapon(unitDefID) utable.paralyzer = getParalyzer(unitDefID) - utable.techLevel = unitsLevels[unitDef["name"]] or 1 - if unitDef["modCategories"]["weapon"] then + utable.techLevel = unitsLevels[unitDef.name ] or 1 + if unitDef.modCategories .weapon then utable.isWeapon = true end - if unitDef["weapons"][1] then - local defWepon1 = unitDef["weapons"][1] - utable.onlyTargets = getOnlyTargets(unitDef["weapons"]) - utable.badTargets = getBadTargets(unitDef["weapons"]) - utable.firstWeapon = WeaponDefs[unitDef["weapons"][1]["weaponDef"]] - utable.weaponType = utable.firstWeapon['type'] + if unitDef.weapons [1] then + local defWepon1 = unitDef.weapons [1] + utable.onlyTargets = getOnlyTargets(unitDef.weapons ) + utable.badTargets = getBadTargets(unitDef.weapons ) + utable.firstWeapon = WeaponDefs[unitDef.weapons [1].weaponDef ] + utable.weaponType = utable.firstWeapon.type utable.badTg = '' if defWepon1.badTargets then for ii,vv in pairs(defWepon1.badTargets) do @@ -1262,16 +1262,16 @@ function ArmyHST:GetUnitTable() utable.isTurret = true if unitDef.modCategories.mine then utable.isMine = utable.techLevel - elseif utable.firstWeapon and utable.firstWeapon['type'] == ('StarburstLauncher' or 'MissileLauncher') then + elseif utable.firstWeapon and utable.firstWeapon.type == ('StarburstLauncher' or 'MissileLauncher') then utable.isTacticalTurret = utable.techLevel - elseif utable.firstWeapon and utable.firstWeapon['type'] == 'Cannon' then + elseif utable.firstWeapon and utable.firstWeapon.type == 'Cannon' then utable.isCannonTurret = utable.techLevel if not utable.firstWeapon.selfExplode then utable.isPlasmaCannon = utable.techLevel end - elseif utable.firstWeapon and utable.firstWeapon['type'] == 'BeamLaser' then + elseif utable.firstWeapon and utable.firstWeapon.type == 'BeamLaser' then utable.isLaserTurret = utable.techLevel - elseif utable.firstWeapon and utable.firstWeapon['type'] == 'TorpedoLauncher' then + elseif utable.firstWeapon and utable.firstWeapon.type == 'TorpedoLauncher' then utable.isTorpedoTurret = utable.techLevel end if utable.groundRange and utable.groundRange > 0 then @@ -1288,7 +1288,7 @@ function ArmyHST:GetUnitTable() utable.airRange = utable.groundRange end utable.needsWater = unitDef.minWaterDepth > 0 - if unitDef["canFly"] then + if unitDef.canFly then utable.mtype = "air" utable.LAYER = 'A' elseif utable.isBuilding and utable.needsWater then @@ -1325,18 +1325,18 @@ function ArmyHST:GetUnitTable() end end - if unitDef["isBuilder"] and #unitDef["buildOptions"] < 1 and not unitDef.moveDef.name then + if unitDef.isBuilder and #unitDef.buildOptions < 1 and not unitDef.moveDef.name then utable.isNano = true end - if unitDef["isBuilder"] and #unitDef["buildOptions"] > 0 then + if unitDef.isBuilder and #unitDef.buildOptions > 0 then utable.buildOptions = true - if unitDef["isBuilding"] then - utable['isFactory'] = {} + if unitDef.isBuilding then + utable.isFactory = {} utable.unitsCanBuild = {} - for i, oid in pairs (unitDef["buildOptions"]) do + for i, oid in pairs (unitDef.buildOptions ) do local buildDef = UnitDefs[oid] - table.insert(utable.unitsCanBuild, buildDef["name"]) + table.insert(utable.unitsCanBuild, buildDef.name ) --and save all the mtype that can andle --utable.isFactory[unitName[buildDef.name].mtype] = TODO end @@ -1344,13 +1344,13 @@ function ArmyHST:GetUnitTable() else utable.factoriesCanBuild = {} utable.buildingsCanBuild = {} - for i, oid in pairs (unitDef["buildOptions"]) do + for i, oid in pairs (unitDef.buildOptions ) do local buildDef = UnitDefs[oid] - table.insert(utable.buildingsCanBuild, buildDef["name"]) - if #buildDef["buildOptions"] > 0 and buildDef["isBuilding"] then + table.insert(utable.buildingsCanBuild, buildDef.name ) + if #buildDef.buildOptions > 0 and buildDef.isBuilding then -- build option is a factory, add it to factories this unit can build - table.insert(utable.factoriesCanBuild, buildDef["name"]) + table.insert(utable.factoriesCanBuild, buildDef.name ) end end @@ -1367,11 +1367,11 @@ function ArmyHST:GetUnitTable() utable.isAttacker = true --Spring:Echo(utable.name, 'isAttacker') end - utable.bigExplosion = unitDef["deathExplosion"] == "atomic_blast" - utable.xsize = unitDef["xsize"] - utable.zsize = unitDef["zsize"] - utable.corpse = unitDef["corpse"] - self.wrecks[unitDef["corpse"]] = unitDef["name"] + utable.bigExplosion = unitDef.deathExplosion == "atomic_blast" + utable.xsize = unitDef.xsize + utable.zsize = unitDef.zsize + utable.corpse = unitDef.corpse + self.wrecks[unitDef.corpse ] = unitDef.name --end end end @@ -1385,8 +1385,8 @@ function ArmyHST:GetFeatureTable() local v = featureDef[k] ftable[k] = v end - if self.wrecks[featureDef["name"]] then - ftable.unitName = self.wrecks[featureDef["name"]] + if self.wrecks[featureDef.name ] then + ftable.unitName = self.wrecks[featureDef.name ] end self.featureTable[featureDef.name] = ftable end diff --git a/luarules/gadgets/ai/STAI/ecohst.lua b/luarules/gadgets/ai/STAI/ecohst.lua index 97ae00b1ba0..11d144db158 100644 --- a/luarules/gadgets/ai/STAI/ecohst.lua +++ b/luarules/gadgets/ai/STAI/ecohst.lua @@ -23,7 +23,7 @@ function EcoHST:Init() self.samples[i] = {} self.samples[i].Metal = {} self.samples[i].Energy = {} - local M = self.samples[i]['Metal'] + local M = self.samples[i].Metal M.reserves = McurrentLevel M.capacity = Mstorage M.pull = Mpull @@ -34,7 +34,7 @@ function EcoHST:Init() M.received = Mreceived M.full = 1 - local E = self.samples[i]['Energy'] + local E = self.samples[i].Energy E.reserves = EcurrentLevel E.capacity = Estorage E.pull = Epull diff --git a/luarules/gadgets/ai/STAI/labshst.lua b/luarules/gadgets/ai/STAI/labshst.lua index 23dc99ec44e..342e148965c 100644 --- a/luarules/gadgets/ai/STAI/labshst.lua +++ b/luarules/gadgets/ai/STAI/labshst.lua @@ -65,11 +65,11 @@ function LabsHST:factoriesRating() for i,v in pairs(t) do self:EchoDebug('pre sorted',i,v) if self.ai.armyhst.factoryMobilities[i][1] == 'hov' or self.ai.armyhst.factoryMobilities[i][1] == 'amp' then - if not t['armsy'] or t['armsy'] < 0.33 then + if not t.armsy or t.armsy < 0.33 then t[i] = nil elseif i == 'armamsub' or i == 'coramsub' then - t[i] = (t['armsy'] + t['armvp']) * 0.5 - elseif not t['armvp'] or (t['armvp'] < 0.6 and t['armsy'] < 0.6) then + t[i] = (t.armsy + t.armvp ) * 0.5 + elseif not t.armvp or (t.armvp < 0.6 and t.armsy < 0.6) then t[i] = 1 diff --git a/luarules/gadgets/ai/STAI/maphst.lua b/luarules/gadgets/ai/STAI/maphst.lua index 6dacadf0b22..df3ea079f9d 100644 --- a/luarules/gadgets/ai/STAI/maphst.lua +++ b/luarules/gadgets/ai/STAI/maphst.lua @@ -688,13 +688,13 @@ function MapHST:UnitMexMoveTest(testUnit)--check how many time a unit(i chose co end function MapHST:SetStartLocation()-- find start locations (loading them into air's list for later localization) - if self.startLocations["air"] == nil then - self.startLocations["air"] = {} + if self.startLocations.air == nil then + self.startLocations.air = {} end - self.startLocations["air"][1] = self:GuessStartLocations(self.METALS) - if self.startLocations["air"][1] ~= nil then + self.startLocations.air [1] = self:GuessStartLocations(self.METALS) + if self.startLocations.air [1] ~= nil then -- localize start locations into mobility networks - for i, start in pairs(self.startLocations["air"][1]) do + for i, start in pairs(self.startLocations.air [1]) do self:EchoDebug("start location guessed at: " .. start.x .. ", " .. start.z) for layer, net in pairs(self.networks) do if layer ~= "air" then -- air list is already filled diff --git a/luarules/gadgets/ai/STAI/raidhst.lua b/luarules/gadgets/ai/STAI/raidhst.lua index c8e63282ffe..9abcbfc8de9 100644 --- a/luarules/gadgets/ai/STAI/raidhst.lua +++ b/luarules/gadgets/ai/STAI/raidhst.lua @@ -178,7 +178,7 @@ function RaidHST:SquadFindPath(squad,target) end self:EchoDebug('search a path for ',squad.squadID,target.X,target.Z) local path - if not self.ai.armyhst['airgun'][game:GetUnitByID(squad.leader):Name()] then --TODO workaraund for airgun that do not have mclass + if not self.ai.armyhst.airgun [game:GetUnitByID(squad.leader):Name()] then --TODO workaraund for airgun that do not have mclass path = self.ai.maphst:getPath(game:GetUnitByID(squad.leader):Name(),squad.leaderPos,self.ai.maphst:GridToPos(target.X,target.Z),true) end diff --git a/luarules/gadgets/ai/STAI/tool.lua b/luarules/gadgets/ai/STAI/tool.lua index 6836930905a..8e13ddc7ac8 100644 --- a/luarules/gadgets/ai/STAI/tool.lua +++ b/luarules/gadgets/ai/STAI/tool.lua @@ -646,13 +646,13 @@ function Tool:WhatHurtsUnit(unitName, mtype, position) end end if mtype == "veh" or mtype == "bot" or mtype == "amp" or mtype == "hov" or mtype == "shp" then - hurts["ground"] = true + hurts.ground = true end if mtype == "air" then - hurts["air"] = true + hurts.air = true end if mtype == "sub" or mtype == "shp" or mtype == "amp" then - hurts["submerged"] = true + hurts.submerged = true end if unitName then whatHurtsUnit[unitName] = hurts end if mtype then whatHurtsMtype[mtype] = hurts end diff --git a/luarules/gadgets/ai/Shard/placementhandler.lua b/luarules/gadgets/ai/Shard/placementhandler.lua index ced7148a4c8..3368a51607e 100644 --- a/luarules/gadgets/ai/Shard/placementhandler.lua +++ b/luarules/gadgets/ai/Shard/placementhandler.lua @@ -62,16 +62,16 @@ function PlacementHandler:NewJob( details ) cleanup_on_unit_death } ]]-- - if details["start_position"] == nil then + if details.start_position == nil then return false end - if details["unittype"] == nil then + if details.unittype == nil then return false end - if details["max_radius"] == nil then + if details.max_radius == nil then details.max_radius = 1500 end - if details["increment"] == nil then + if details.increment == nil then details.increment = 16 end if details.increment < 16 then @@ -338,7 +338,7 @@ be cleaned up to save cpu ]] function PlacementHandler:UnitDead(engineunit) for i,j in ipairs(self.jobs) do - if j['cleanup_on_unit_death'] ~= nil then + if j.cleanup_on_unit_death ~= nil then if j.cleanup_on_unit_death == engineunit:ID() then j.status = 'cleanup' end diff --git a/luarules/gadgets/ai/shard_runtime/shard_null/unit.lua b/luarules/gadgets/ai/shard_runtime/shard_null/unit.lua index bd5051d8ca4..3b0eec6bad3 100644 --- a/luarules/gadgets/ai/shard_runtime/shard_null/unit.lua +++ b/luarules/gadgets/ai/shard_runtime/shard_null/unit.lua @@ -8,7 +8,7 @@ end) function ShardUnit:Unit_to_id( unit ) local gid = unit if type( unit ) == 'table' then - if unit['id'] ~= nil then + if unit.id ~= nil then gid = unit.id else -- error! diff --git a/luarules/gadgets/ai/shard_runtime/spring_lua/unit.lua b/luarules/gadgets/ai/shard_runtime/spring_lua/unit.lua index 3a4bc14f667..65af564d70a 100644 --- a/luarules/gadgets/ai/shard_runtime/spring_lua/unit.lua +++ b/luarules/gadgets/ai/shard_runtime/spring_lua/unit.lua @@ -11,7 +11,7 @@ end) function ShardUnit:Unit_to_id( unit ) local gid = unit if type( unit ) == 'table' then - if unit['id'] ~= nil then + if unit.id ~= nil then gid = unit.id else -- error! diff --git a/luarules/gadgets/ai_ruins.lua b/luarules/gadgets/ai_ruins.lua index 95a9843a7e0..eb84af9d3f6 100644 --- a/luarules/gadgets/ai_ruins.lua +++ b/luarules/gadgets/ai_ruins.lua @@ -222,7 +222,7 @@ end function getNearestBlocker(x, z) local lowestDist = math.huge - local metalSpots = GG["resource_spot_finder"] and GG["resource_spot_finder"].metalSpotsList or nil + local metalSpots = GG.resource_spot_finder and GG.resource_spot_finder .metalSpotsList or nil if metalSpots then for i = 1, #metalSpots do local spot = metalSpots[i] @@ -235,7 +235,7 @@ function getNearestBlocker(x, z) end end end - local geoSpots = GG["resource_spot_finder"] and GG["resource_spot_finder"].geoSpotsList or nil + local geoSpots = GG.resource_spot_finder and GG.resource_spot_finder .geoSpotsList or nil if geoSpots then for i = 1, #geoSpots do local spot = geoSpots[i] @@ -398,7 +398,7 @@ local function SpawnGeos(geoSpots) end local function SpawnMexGeoRandomStructures() - local mexSpots = GG["resource_spot_finder"] and GG["resource_spot_finder"].metalSpotsList or nil + local mexSpots = GG.resource_spot_finder and GG.resource_spot_finder .metalSpotsList or nil if mexSpots and #mexSpots > 5 then for i = 1,#mexSpots do if SpawnedMexes[i] then @@ -444,7 +444,7 @@ local function SpawnMexGeoRandomStructures() end end - local geoSpots = GG["resource_spot_finder"] and GG["resource_spot_finder"].geoSpotsList or nil + local geoSpots = GG.resource_spot_finder and GG.resource_spot_finder .geoSpotsList or nil if geoSpots and #geoSpots >= 1 then for i = 1,#geoSpots do if SpawnedGeos[i] then @@ -537,14 +537,14 @@ end function gadget:GameFrame(n) if n == math.ceil(spawnCutoffFrame*0.5) then - local mexSpots = GG["resource_spot_finder"] and GG["resource_spot_finder"].metalSpotsList or nil + local mexSpots = GG.resource_spot_finder and GG.resource_spot_finder .metalSpotsList or nil if mexSpots and #mexSpots > 5 then SpawnMexes(mexSpots) end end if n == 30 then - local geoSpots = GG["resource_spot_finder"] and GG["resource_spot_finder"].geoSpotsList or nil + local geoSpots = GG.resource_spot_finder and GG.resource_spot_finder .geoSpotsList or nil if geoSpots and #geoSpots >= 1 then SpawnGeos(geoSpots) end diff --git a/luarules/gadgets/ai_simpleai.lua b/luarules/gadgets/ai_simpleai.lua index d529fa8fd41..5be3d4b4955 100644 --- a/luarules/gadgets/ai_simpleai.lua +++ b/luarules/gadgets/ai_simpleai.lua @@ -141,7 +141,7 @@ for unitDefID, unitDef in pairs(UnitDefs) do skip = true end -- objects/walls - if unitDef.modCategories['object'] or unitDef.customParams.objectify then + if unitDef.modCategories.object or unitDef.customParams.objectify then skip = true end @@ -202,7 +202,7 @@ local function SimpleGetClosestMexSpot(x, z) --tracy.ZoneBeginN("SimpleAI:SimpleGetClosestMexSpot") local bestSpot local bestDist = math_huge - local metalSpots = GG["resource_spot_finder"] and GG["resource_spot_finder"].metalSpotsList or nil + local metalSpots = GG.resource_spot_finder and GG.resource_spot_finder .metalSpotsList or nil if metalSpots then for i = 1, #metalSpots do local spot = metalSpots[i] diff --git a/luarules/gadgets/api_enemyunitdestroyed.lua b/luarules/gadgets/api_enemyunitdestroyed.lua index 83bfe48d99c..a076205249c 100644 --- a/luarules/gadgets/api_enemyunitdestroyed.lua +++ b/luarules/gadgets/api_enemyunitdestroyed.lua @@ -31,7 +31,7 @@ if not gadgetHandler:IsSyncedCode() then local allyTeam = spGetUnitAllyTeam(unitID) if (spec and fullview) or (allyTeam and allyTeam ~= myAllyTeamID) then local losstate = Spring.GetUnitLosState(unitID, myAllyTeamID) - if losstate and losstate["los"] and Script.LuaUI("EnemyUnitDestroyed") then + if losstate and losstate.los and Script.LuaUI("EnemyUnitDestroyed") then Script.LuaUI.EnemyUnitDestroyed(unitID, unitDefID, teamID, attackerID, attackerDefID, attackerTeamID, weaponDefID) end end diff --git a/luarules/gadgets/api_missions.lua b/luarules/gadgets/api_missions.lua index 0005f0f6479..a24d798b602 100644 --- a/luarules/gadgets/api_missions.lua +++ b/luarules/gadgets/api_missions.lua @@ -26,8 +26,8 @@ local function loadMission() triggersController.PreprocessRawTriggers(rawTriggers) actionsController.PreprocessRawActions(rawActions) - GG['MissionAPI'].Triggers = triggersController.GetTriggers() - GG['MissionAPI'].Actions = actionsController.GetActions() + GG.MissionAPI .Triggers = triggersController.GetTriggers() + GG.MissionAPI .Actions = actionsController.GetActions() triggersController.PostprocessTriggers() end @@ -41,15 +41,15 @@ function gadget:Initialize() return end - GG['MissionAPI'] = {} - GG['MissionAPI'].Difficulty = Spring.GetModOptions().mission_difficulty --TODO: add mission difficulty modoption + GG.MissionAPI = {} + GG.MissionAPI .Difficulty = Spring.GetModOptions().mission_difficulty --TODO: add mission difficulty modoption local triggersSchema = VFS.Include('luarules/mission_api/triggers_schema.lua') local actionsSchema = VFS.Include('luarules/mission_api/actions_schema.lua') - GG['MissionAPI'].TriggerTypes = triggersSchema.Types - GG['MissionAPI'].ActionTypes = actionsSchema.Types + GG.MissionAPI .TriggerTypes = triggersSchema.Types + GG.MissionAPI .ActionTypes = actionsSchema.Types - GG['MissionAPI'].TrackedUnits = {} + GG.MissionAPI .TrackedUnits = {} triggersController = VFS.Include('luarules/mission_api/triggers_loader.lua') actionsController = VFS.Include('luarules/mission_api/actions_loader.lua') @@ -58,5 +58,5 @@ function gadget:Initialize() end function gadget:Shutdown() - GG['MissionAPI'] = nil + GG.MissionAPI = nil end \ No newline at end of file diff --git a/luarules/gadgets/api_missions_triggers.lua b/luarules/gadgets/api_missions_triggers.lua index bf785289374..a08d22bfd9b 100644 --- a/luarules/gadgets/api_missions_triggers.lua +++ b/luarules/gadgets/api_missions_triggers.lua @@ -68,7 +68,7 @@ local function triggerValid(trigger) if trigger.triggered and not trigger.settings.repeating then return false end if trigger.settings.repeating and trigger.settings.maxRepeats ~= nil and trigger.repeatCount > trigger.settings.maxRepeats then return false end - if trigger.settings.difficulties ~= nil and not trigger.settings.difficulties[GG['MissionAPI'].Difficulty] then return false end + if trigger.settings.difficulties ~= nil and not trigger.settings.difficulties[GG.MissionAPI .Difficulty] then return false end --[[ --TODO: co-op check @@ -92,15 +92,15 @@ local function activateTrigger(trigger) end function gadget:Initialize() - if not GG['MissionAPI'] then + if not GG.MissionAPI then gadgetHandler:RemoveGadget() return end actionsDispatcher = VFS.Include('luarules/mission_api/actions_dispatcher.lua') - types = GG['MissionAPI'].TriggerTypes - triggers = GG['MissionAPI'].Triggers - trackedUnits = GG['MissionAPI'].TrackedUnits + types = GG.MissionAPI .TriggerTypes + triggers = GG.MissionAPI .Triggers + trackedUnits = GG.MissionAPI .TrackedUnits end function gadget:GameFrame(n) diff --git a/luarules/gadgets/cmd_dev_helpers.lua b/luarules/gadgets/cmd_dev_helpers.lua index d874582f163..180894c052d 100644 --- a/luarules/gadgets/cmd_dev_helpers.lua +++ b/luarules/gadgets/cmd_dev_helpers.lua @@ -1135,16 +1135,16 @@ else -- UNSYNCED local mapcz = Game.mapSizeZ/2 local mapcy = Spring.GetGroundHeight(mapcx,mapcz) - camState["px"] = mapcx - camState["py"] = mapcy - camState["pz"] = mapcz - camState["dy"] = -1 - camState["dz"] = -1 - camState["dx"] = 0 - camState["rx"] = 2.75 - camState["height"] = mapcy + 2000 - camState["dist"] = mapcy + 2000 - camState["name"] = "spring" + camState.px = mapcx + camState.py = mapcy + camState.pz = mapcz + camState.dy = -1 + camState.dz = -1 + camState.dx = 0 + camState.rx = 2.75 + camState.height = mapcy + 2000 + camState.dist = mapcy + 2000 + camState.name = "spring" Spring.SetCameraState(camState, 0.75) end @@ -1544,10 +1544,10 @@ else -- UNSYNCED local techLevels = {} local facSuffix = { --ignore t3 - ["veh"] = "vp", ["bot"] = "lab", ["ship"] = "sy", ["hover"] = "hp" --hover are special case, no t2 fac + veh = "vp", bot = "lab", ship = "sy", hover = "hp" --hover are special case, no t2 fac } local techSuffix = { - ["t1"] = "", ["t2"] = "a" --t3 added later + t1 = "", t2 = "a" --t3 added later } for t, suffix in pairs(facSuffix) do local acceptableUDIDs = {} @@ -1583,14 +1583,14 @@ else -- UNSYNCED techLevels[t] = acceptableUDIDs end local t3Units = {} - for _, uDID in ipairs(UnitDefNames["corgant"].buildOptions) do + for _, uDID in ipairs(UnitDefNames.corgant .buildOptions) do t3Units[uDID] = true end - for _, uDID in ipairs(UnitDefNames["armshltx"].buildOptions) do + for _, uDID in ipairs(UnitDefNames.armshltx .buildOptions) do t3Units[uDID] = true end - techLevels['t3'] = t3Units - techSuffix['t3'] = 't3' + techLevels.t3 = t3Units + techSuffix.t3 = 't3' local Accept = {} -- table of conditions that must be satisfied for the unitDef to be given diff --git a/luarules/gadgets/cmd_factory_stop_production.lua b/luarules/gadgets/cmd_factory_stop_production.lua index 353082c5cb4..c790cc455e3 100644 --- a/luarules/gadgets/cmd_factory_stop_production.lua +++ b/luarules/gadgets/cmd_factory_stop_production.lua @@ -87,7 +87,7 @@ if gadgetHandler:IsSyncedCode() then local keepDefID if total > 1 then local firstCommand = Spring.GetFactoryCommands(unitID, 1) - local firstID = firstCommand[1]['id'] + local firstID = firstCommand[1].id if firstID < 0 then keepDefID = -firstID end diff --git a/luarules/gadgets/cmd_give.lua b/luarules/gadgets/cmd_give.lua index 9a35760ecc0..e3214342e9c 100644 --- a/luarules/gadgets/cmd_give.lua +++ b/luarules/gadgets/cmd_give.lua @@ -21,7 +21,7 @@ local PACKET_HEADER_LENGTH = string.len(PACKET_HEADER) local isSilentUnitGift = {} for udefID,def in ipairs(UnitDefs) do - if def.modCategories['object'] or def.customParams.objectify then + if def.modCategories.object or def.customParams.objectify then isSilentUnitGift[udefID] = true end end diff --git a/luarules/gadgets/cmd_mex_denier.lua b/luarules/gadgets/cmd_mex_denier.lua index 05801ed8dfc..a6c2b62ca49 100644 --- a/luarules/gadgets/cmd_mex_denier.lua +++ b/luarules/gadgets/cmd_mex_denier.lua @@ -37,12 +37,12 @@ local metalSpotsList function gadget:Initialize() gadgetHandler:RegisterAllowCommand(CMD.BUILD) - local isMetalMap = GG["resource_spot_finder"].isMetalMap + local isMetalMap = GG.resource_spot_finder .isMetalMap if isMetalMap then Spring.Log(gadget:GetInfo().name, LOG.INFO, "Metal map detected, removing self") gadgetHandler:RemoveGadget(self) end - metalSpotsList = GG["resource_spot_finder"].metalSpotsList + metalSpotsList = GG.resource_spot_finder .metalSpotsList end local function mexExists(spot, allyTeamID, cmdX, cmdZ) @@ -69,7 +69,7 @@ function gadget:AllowCommand(unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdO local closestSpot = math.getClosestPosition(bx, bz, metalSpotsList) -- We check if current order is to build mex in closest spot - if not (closestSpot and GG["resource_spot_finder"].IsMexPositionValid(closestSpot, bx, bz)) then + if not (closestSpot and GG.resource_spot_finder .IsMexPositionValid(closestSpot, bx, bz)) then return false end diff --git a/luarules/gadgets/cus_gl4.lua b/luarules/gadgets/cus_gl4.lua index a94f00cd546..e8204982f94 100644 --- a/luarules/gadgets/cus_gl4.lua +++ b/luarules/gadgets/cus_gl4.lua @@ -458,15 +458,15 @@ local function GetShader(drawPass, objectDefID) end if objectDefID >= 0 then if unitDefsUseSkinning[objectDefID] then - return shaders[drawPass]['unitskinning'] + return shaders[drawPass].unitskinning else - return shaders[drawPass]['unit'] + return shaders[drawPass].unit end else if featuresDefsWithAlpha[objectDefID] then - return shaders[drawPass]['tree'] + return shaders[drawPass].tree else - return shaders[drawPass]['feature'] + return shaders[drawPass].feature end end end @@ -835,22 +835,22 @@ local function GenFastTextureKey(objectDefID, objectDef, normaltexpath, texturet end local wreckAtlases = { - ["arm"] = { -- these are only here for posterity + arm = { -- these are only here for posterity "unittextures/Arm_wreck_color.dds", "unittextures/Arm_wreck_other.dds", "unittextures/Arm_wreck_color_normal.dds", }, - ["cor"] = { + cor = { "unittextures/cor_color_wreck.dds", "unittextures/cor_other_wreck.dds", "unittextures/cor_color_wreck_normal.dds", }, - ["leg"] = { + leg = { "unittextures/leg_wreck_color.dds", "unittextures/leg_wreck_shader.dds", "unittextures/leg_wreck_normal.dds", }, - ["raptor"] = { + raptor = { "luaui/images/lavadistortion.png", } } @@ -1054,7 +1054,7 @@ local function initBinsAndTextures() objectDefToUniformBin[unitDefID] = 'legscavenger' end elseif unitDef.name:find("raptor", nil, true) or unitDef.name:find("raptor_hive", nil, true) then - textureTable[5] = wreckAtlases['raptor'][1] + textureTable[5] = wreckAtlases.raptor [1] objectDefToUniformBin[unitDefID] = 'raptor' --Spring.Echo("Raptorwreck", textureTable[5]) elseif wreckTex1 and wreckTex2 then -- just a true unit: @@ -2290,8 +2290,8 @@ function gadget:SunChanged() -- Note that map_nightmode.lua gadget has to change if df == lastSunChanged then return end lastSunChanged = df local nightFactor = 1.0 - if GG['NightFactor'] then - nightFactor = (GG['NightFactor'].red + GG['NightFactor'].green + GG['NightFactor'].blue) * 0.33 + if GG.NightFactor then + nightFactor = (GG.NightFactor .red + GG.NightFactor .green + GG.NightFactor .blue) * 0.33 end for uniformBinName, defaultBrightnessFactor in pairs(nightFactorBins) do uniformBins[uniformBinName].brightnessFactor = defaultBrightnessFactor * nightFactor diff --git a/luarules/gadgets/game_apm_broadcast.lua b/luarules/gadgets/game_apm_broadcast.lua index e82c1ea3f43..5220b8b965e 100644 --- a/luarules/gadgets/game_apm_broadcast.lua +++ b/luarules/gadgets/game_apm_broadcast.lua @@ -38,8 +38,8 @@ if gadgetHandler:IsSyncedCode() then end function gadget:Initialize() - GG['apm'] = {} - GG['apm'].addSkipOrder = addSkipOrder + GG.apm = {} + GG.apm .addSkipOrder = addSkipOrder gadgetHandler:RegisterAllowCommand(CMD.ANY) end diff --git a/luarules/gadgets/game_easter_eggs.lua b/luarules/gadgets/game_easter_eggs.lua index 56904bb5c45..d3da4e9ea0c 100644 --- a/luarules/gadgets/game_easter_eggs.lua +++ b/luarules/gadgets/game_easter_eggs.lua @@ -12,7 +12,7 @@ function gadget:GetInfo() } end -if not Spring.Utilities.Gametype.GetCurrentHolidays()["easter"] then +if not Spring.Utilities.Gametype.GetCurrentHolidays().easter then return false end @@ -57,7 +57,7 @@ end function gadget:GameFrame(frame) if frame == 7 then - local metalSpots = GG["resource_spot_finder"] and GG["resource_spot_finder"].metalSpotsList or nil + local metalSpots = GG.resource_spot_finder and GG.resource_spot_finder .metalSpotsList or nil if metalSpots then for i = 1, #metalSpots do local spot = metalSpots[i] diff --git a/luarules/gadgets/game_end.lua b/luarules/gadgets/game_end.lua index d13723ec133..40168b5d6a4 100644 --- a/luarules/gadgets/game_end.lua +++ b/luarules/gadgets/game_end.lua @@ -349,8 +349,8 @@ if gadgetHandler:IsSyncedCode() then Spring.CallCOBScript(unitID, 'GameOverAnim', 0, true) else local scriptEnv = Spring.UnitScript.GetScriptEnv(unitID) - if scriptEnv and scriptEnv['GameOverAnim'] then - Spring.UnitScript.CallAsUnit(unitID, scriptEnv['GameOverAnim'], true) + if scriptEnv and scriptEnv.GameOverAnim then + Spring.UnitScript.CallAsUnit(unitID, scriptEnv.GameOverAnim , true) end end end diff --git a/luarules/gadgets/game_no_rush_mode.lua b/luarules/gadgets/game_no_rush_mode.lua index 1f08906fbdb..730b637f90b 100644 --- a/luarules/gadgets/game_no_rush_mode.lua +++ b/luarules/gadgets/game_no_rush_mode.lua @@ -53,8 +53,8 @@ local CommandsToCatchFeature = { -- CMDTYPES: ICON_UNIT_FEATURE_OR_AREA } local LuaAIsToExclude = { - ["ScavengersAI"] = true, - ["RaptorsAI"] = true, + ScavengersAI = true, + RaptorsAI = true, } local TeamIDsToExclude = {} -- dynamically filled below diff --git a/luarules/gadgets/game_quick_start.lua b/luarules/gadgets/game_quick_start.lua index 664162866af..d4e52dab4f5 100644 --- a/luarules/gadgets/game_quick_start.lua +++ b/luarules/gadgets/game_quick_start.lua @@ -941,8 +941,8 @@ function gadget:Initialize() Spring.SetTeamRulesParam(teamID, "quickStartFactoryDiscountUsed", nil) end isGoodWind = windFunctions.isGoodWind() - isMetalMap = GG and GG["resource_spot_finder"] and GG["resource_spot_finder"].isMetalMap - metalSpotsList = GG and GG["resource_spot_finder"] and GG["resource_spot_finder"].metalSpotsList + isMetalMap = GG and GG.resource_spot_finder and GG.resource_spot_finder .isMetalMap + metalSpotsList = GG and GG.resource_spot_finder and GG.resource_spot_finder .metalSpotsList local frame = Spring.GetGameFrame() Spring.SetGameRulesParam("quickStartBudgetBase", BUDGET) diff --git a/luarules/gadgets/game_team_power_watcher.lua b/luarules/gadgets/game_team_power_watcher.lua index 5c6f32e7178..e1cc757bdcc 100644 --- a/luarules/gadgets/game_team_power_watcher.lua +++ b/luarules/gadgets/game_team_power_watcher.lua @@ -580,39 +580,39 @@ end function gadget:Initialize() GG.PowerLib = {} - GG.PowerLib["ScavengerTeam"] = scavengerTeam - GG.PowerLib["RaptorTeam"] = raptorTeam - GG.PowerLib["AiTeams"] = aiTeams - GG.PowerLib["NeutralTeam"] = neutralTeam - GG.PowerLib["HumanTeams"] = humanTeams - GG.PowerLib["PlayerTeams"] = playerTeams - GG.PowerLib["TeamPowers"] = teamPowers - GG.PowerLib["PeakTeamPowers"] = peakTeamPowers - GG.PowerLib["PowerThresholds"] = powerThresholds - GG.PowerLib["TeamPower"] = teamPower - GG.PowerLib["TotalPlayerTeamsPower"] = totalPlayerTeamsPower - GG.PowerLib["HighestPlayerTeamPower"] = highestPlayerTeamPower - GG.PowerLib["AveragePlayerTeamPower"] = averagePlayerTeamPower - GG.PowerLib["LowestPlayerTeamPower"] = lowestPlayerTeamPower - GG.PowerLib["HighestHumanTeamPower"] = highestHumanTeamPower - GG.PowerLib["AverageHumanTeamPower"] = averageHumanTeamPower - GG.PowerLib["LowestHumanTeamPower"] = lowestHumanTeamPower - GG.PowerLib["HighestAlliedTeamPower"] = highestAlliedTeamPower - GG.PowerLib["AverageAlliedTeamPower"] = averageAlliedTeamPower - GG.PowerLib["LowestAlliedTeamPower"] = lowestAlliedTeamPower - GG.PowerLib["TechGuesstimate"] = techGuesstimate - GG.PowerLib["TeamTechGuesstimate"] = teamTechGuesstimate - GG.PowerLib["AveragePlayerTechGuesstimate"] = averagePlayerTechGuesstimate - GG.PowerLib["AverageHumanTechGuesstimate"] = averageHumanTechGuesstimate - GG.PowerLib["AverageAlliedTechGuesstimate"] = averageAlliedTechGuesstimate - GG.PowerLib["TeamPeakPower"] = teamPeakPower - GG.PowerLib["TotalPlayerPeakPower"] = totalPlayerPeakPower - GG.PowerLib["HighestPlayerPeakPower"] = highestPlayerPeakPower - GG.PowerLib["HighestAlliedPeakPower"] = highestAlliedPeakPower - GG.PowerLib["AverageHumanPeakPower"] = averageHumanPeakPower - GG.PowerLib["AverageAlliedPeakPower"] = averageAlliedPeakPower - GG.PowerLib["TeamComparedToAveragedPlayers"] = teamComparedToAveragedPlayers - GG.PowerLib["IsTeamOverPowered"] = isTeamOverPowered - GG.PowerLib["AlliesComparedToAverage"] = alliesComparedToAverage - GG.PowerLib["IsAllyTeamWinning"] = isAllyTeamWinning + GG.PowerLib.ScavengerTeam = scavengerTeam + GG.PowerLib.RaptorTeam = raptorTeam + GG.PowerLib.AiTeams = aiTeams + GG.PowerLib.NeutralTeam = neutralTeam + GG.PowerLib.HumanTeams = humanTeams + GG.PowerLib.PlayerTeams = playerTeams + GG.PowerLib.TeamPowers = teamPowers + GG.PowerLib.PeakTeamPowers = peakTeamPowers + GG.PowerLib.PowerThresholds = powerThresholds + GG.PowerLib.TeamPower = teamPower + GG.PowerLib.TotalPlayerTeamsPower = totalPlayerTeamsPower + GG.PowerLib.HighestPlayerTeamPower = highestPlayerTeamPower + GG.PowerLib.AveragePlayerTeamPower = averagePlayerTeamPower + GG.PowerLib.LowestPlayerTeamPower = lowestPlayerTeamPower + GG.PowerLib.HighestHumanTeamPower = highestHumanTeamPower + GG.PowerLib.AverageHumanTeamPower = averageHumanTeamPower + GG.PowerLib.LowestHumanTeamPower = lowestHumanTeamPower + GG.PowerLib.HighestAlliedTeamPower = highestAlliedTeamPower + GG.PowerLib.AverageAlliedTeamPower = averageAlliedTeamPower + GG.PowerLib.LowestAlliedTeamPower = lowestAlliedTeamPower + GG.PowerLib.TechGuesstimate = techGuesstimate + GG.PowerLib.TeamTechGuesstimate = teamTechGuesstimate + GG.PowerLib.AveragePlayerTechGuesstimate = averagePlayerTechGuesstimate + GG.PowerLib.AverageHumanTechGuesstimate = averageHumanTechGuesstimate + GG.PowerLib.AverageAlliedTechGuesstimate = averageAlliedTechGuesstimate + GG.PowerLib.TeamPeakPower = teamPeakPower + GG.PowerLib.TotalPlayerPeakPower = totalPlayerPeakPower + GG.PowerLib.HighestPlayerPeakPower = highestPlayerPeakPower + GG.PowerLib.HighestAlliedPeakPower = highestAlliedPeakPower + GG.PowerLib.AverageHumanPeakPower = averageHumanPeakPower + GG.PowerLib.AverageAlliedPeakPower = averageAlliedPeakPower + GG.PowerLib.TeamComparedToAveragedPlayers = teamComparedToAveragedPlayers + GG.PowerLib.IsTeamOverPowered = isTeamOverPowered + GG.PowerLib.AlliesComparedToAverage = alliesComparedToAverage + GG.PowerLib.IsAllyTeamWinning = isAllyTeamWinning end \ No newline at end of file diff --git a/luarules/gadgets/gfx_raptor_scum_gl4.lua b/luarules/gadgets/gfx_raptor_scum_gl4.lua index 11e96beb5b1..6b04c1e6b5a 100644 --- a/luarules/gadgets/gfx_raptor_scum_gl4.lua +++ b/luarules/gadgets/gfx_raptor_scum_gl4.lua @@ -889,12 +889,12 @@ elseif not Spring.Utilities.Gametype.IsScavengers() then -- UNSYNCED local df = Spring.GetDrawFrame() if df == lastSunChanged then return end lastSunChanged = df - if GG['NightFactor'] then + if GG.NightFactor then local altitudefactor = 1.0 --+ (1.0 - WG['NightFactor'].altitude) * 0.5 - nightFactor[1] = GG['NightFactor'].red - nightFactor[2] = GG['NightFactor'].green - nightFactor[3] = GG['NightFactor'].blue - nightFactor[4] = GG['NightFactor'].shadow + nightFactor[1] = GG.NightFactor .red + nightFactor[2] = GG.NightFactor .green + nightFactor[3] = GG.NightFactor .blue + nightFactor[4] = GG.NightFactor .shadow end end diff --git a/luarules/gadgets/gfx_reclaim_fx.lua b/luarules/gadgets/gfx_reclaim_fx.lua index e104c12ae1c..823a8458096 100644 --- a/luarules/gadgets/gfx_reclaim_fx.lua +++ b/luarules/gadgets/gfx_reclaim_fx.lua @@ -38,7 +38,7 @@ if gadgetHandler:IsSyncedCode() then local unitMaxY = {} local ignoreUnits = {} for unitDefID, unitDef in ipairs(UnitDefs) do - if unitDef.modCategories['object'] or unitDef.customParams.objectify then + if unitDef.modCategories.object or unitDef.customParams.objectify then ignoreUnits[unitDefID] = true else unitNumFx[unitDefID] = math.min(1 + math.ceil(unitDef.metalCost/250), 30) diff --git a/luarules/gadgets/gfx_tree_feller.lua b/luarules/gadgets/gfx_tree_feller.lua index d2e9194f792..64a1b4e32e1 100644 --- a/luarules/gadgets/gfx_tree_feller.lua +++ b/luarules/gadgets/gfx_tree_feller.lua @@ -27,7 +27,7 @@ if gadgetHandler:IsSyncedCode() then local treefireExplosion = { tiny = { - weaponDef = WeaponDefNames['treefire_tiny'].id, + weaponDef = WeaponDefNames.treefire_tiny .id, -- owner = -1, hitUnit = 1, hitFeature = 1, @@ -40,7 +40,7 @@ if gadgetHandler:IsSyncedCode() then damageGround = true, }, small = { - weaponDef = WeaponDefNames['treefire_small'].id, + weaponDef = WeaponDefNames.treefire_small .id, -- owner = -1, hitUnit = 1, hitFeature = 1, @@ -53,7 +53,7 @@ if gadgetHandler:IsSyncedCode() then damageGround = true, }, medium = { - weaponDef = WeaponDefNames['treefire_medium'].id, + weaponDef = WeaponDefNames.treefire_medium .id, -- owner = -1, hitUnit = 1, hitFeature = 1, @@ -66,7 +66,7 @@ if gadgetHandler:IsSyncedCode() then damageGround = true, }, large = { - weaponDef = WeaponDefNames['treefire_large'].id, + weaponDef = WeaponDefNames.treefire_large .id, -- owner = -1, hitUnit = 1, hitFeature = 1, @@ -80,10 +80,10 @@ if gadgetHandler:IsSyncedCode() then }, } local treeWeapons = {} - treeWeapons[WeaponDefNames['treefire_tiny'].id] = true - treeWeapons[WeaponDefNames['treefire_small'].id] = true - treeWeapons[WeaponDefNames['treefire_medium'].id] = true - treeWeapons[WeaponDefNames['treefire_large'].id] = true + treeWeapons[WeaponDefNames.treefire_tiny .id] = true + treeWeapons[WeaponDefNames.treefire_small .id] = true + treeWeapons[WeaponDefNames.treefire_medium .id] = true + treeWeapons[WeaponDefNames.treefire_large .id] = true local noFireWeapons = {} for id, wDefs in pairs(WeaponDefs) do diff --git a/luarules/gadgets/gfx_unit_shield_effects.lua b/luarules/gadgets/gfx_unit_shield_effects.lua index 3d0a392c89b..a82029cae40 100644 --- a/luarules/gadgets/gfx_unit_shield_effects.lua +++ b/luarules/gadgets/gfx_unit_shield_effects.lua @@ -672,11 +672,11 @@ local function InitializeShader() -- Cache uniform locations for performance local uniformLocations = shieldShader.uniformLocations - uTranslationScale = uniformLocations["translationScale"] - uRotMargin = uniformLocations["rotMargin"] - uEffects = uniformLocations['effects'] - uColor1 = uniformLocations['color1'] - uColor2 = uniformLocations['color2'] + uTranslationScale = uniformLocations.translationScale + uRotMargin = uniformLocations.rotMargin + uEffects = uniformLocations.effects + uColor1 = uniformLocations.color1 + uColor2 = uniformLocations.color2 uImpactCount = uniformLocations["impactInfo.count"] -- Cache impact info uniform locations diff --git a/luarules/gadgets/map_atmosphere_cegs.lua b/luarules/gadgets/map_atmosphere_cegs.lua index e611c87cf5f..164ffbb43d1 100644 --- a/luarules/gadgets/map_atmosphere_cegs.lua +++ b/luarules/gadgets/map_atmosphere_cegs.lua @@ -125,9 +125,9 @@ if not gadgetHandler:IsSyncedCode() then end end end - if a['sunDir'] and b['sunDir'] then - local asun = a['sunDir'] - local bsun = b['sunDir'] + if a.sunDir and b.sunDir then + local asun = a.sunDir + local bsun = b.sunDir local alength = 1.0 / diag(asun[1], asun[2], asun[3]) local blength = 1.0 / diag(bsun[1], bsun[2], bsun[3]) @@ -151,10 +151,10 @@ if not gadgetHandler:IsSyncedCode() then local targetrot = mix(aworldrot, bworldrot, mixfactor) local targetheight = mix(aheight, bheight, mixfactor) - if target['sunDir'] == nil then target['sunDir'] = {0,1,0} end - target['sunDir'][1] = sin(targetrot) * cos(targetheight) - target['sunDir'][2] = sin(targetheight) - target['sunDir'][3] = cos(targetrot) * cos(targetheight) + if target.sunDir == nil then target.sunDir = {0,1,0} end + target.sunDir [1] = sin(targetrot) * cos(targetheight) + target.sunDir [2] = sin(targetheight) + target.sunDir [3] = cos(targetrot) * cos(targetheight) --Spring.Echo("sunDir", mixfactor, "targetrot",targetrot, "targetheight", targetheight, aworldrot , bworldrot) end diff --git a/luarules/gadgets/map_nightmode.lua b/luarules/gadgets/map_nightmode.lua index fc3785c08f3..352146be5f4 100644 --- a/luarules/gadgets/map_nightmode.lua +++ b/luarules/gadgets/map_nightmode.lua @@ -123,7 +123,7 @@ if not gadgetHandler:IsSyncedCode() then end end end - Spring.Echo('sunDir = '..quicktablestring(l['sunDir'])) + Spring.Echo('sunDir = '..quicktablestring(l.sunDir )) end local function GetLightingAndAtmosphere() -- returns a table of the common parameters @@ -162,12 +162,12 @@ if not gadgetHandler:IsSyncedCode() then end local currentNightFactor = {red = 1, green = 1, blue = 1, shadow = 1, altitude = 1} - GG['NightFactor'] = currentNightFactor + GG.NightFactor = currentNightFactor local function SetLightingAndAtmosphere(lightandatmos) for k,_ in pairs(currentNightFactor) do - GG['NightFactor'][k] = lightandatmos.nightFactor[k] + GG.NightFactor [k] = lightandatmos.nightFactor[k] end if Script.LuaUI("NightFactorChanged") then @@ -243,12 +243,12 @@ if not gadgetHandler:IsSyncedCode() then end end end - if a['sunDir'] and b['sunDir'] then - local asun = a['sunDir'] - local bsun = b['sunDir'] + if a.sunDir and b.sunDir then + local asun = a.sunDir + local bsun = b.sunDir - local aworldrot, aheight = SunDirToAzimuthHeight(a['sunDir'] ) - local bworldrot, bheight = SunDirToAzimuthHeight(b['sunDir'] ) + local aworldrot, aheight = SunDirToAzimuthHeight(a.sunDir ) + local bworldrot, bheight = SunDirToAzimuthHeight(b.sunDir ) --Spring.Echo(("Arot = %.2f, Brot = %.2f"):format(aworldrot, bworldrot)) -- if close to 180 degrees, then rotate clockwise @@ -263,7 +263,7 @@ if not gadgetHandler:IsSyncedCode() then local targetrot = mix(aworldrot, bworldrot, mixfactor) local targetheight = mix(aheight, bheight, mixfactor) - SunAzimuthHeightToDir(targetrot, targetheight, target['sunDir']) + SunAzimuthHeightToDir(targetrot, targetheight, target.sunDir ) --Spring.Echo("sunDir", mixfactor, "targetrot",targetrot, "targetheight", targetheight, aworldrot , bworldrot) end if a.nightFactor and b.nightFactor then diff --git a/luarules/gadgets/mo_preventcombomb.lua b/luarules/gadgets/mo_preventcombomb.lua index fd5ef253f89..e96811d93a9 100644 --- a/luarules/gadgets/mo_preventcombomb.lua +++ b/luarules/gadgets/mo_preventcombomb.lua @@ -38,7 +38,7 @@ local cantFall = {} local commCountCache = {} local commCountCacheFrame = -1 -local COM_BLAST = WeaponDefNames['commanderexplosion'].id +local COM_BLAST = WeaponDefNames.commanderexplosion .id local isCommander = {} local commanderDefIDs = {} diff --git a/luarules/gadgets/pve_areahealers.lua b/luarules/gadgets/pve_areahealers.lua index b781b24abf3..a9867ee459a 100644 --- a/luarules/gadgets/pve_areahealers.lua +++ b/luarules/gadgets/pve_areahealers.lua @@ -43,29 +43,29 @@ local pveTeamID = Spring.Utilities.GetRaptorTeamID() or Spring.Utilities.GetScav local aliveHealers = {} local healersTable = {} if Spring.Utilities.Gametype.IsRaptors() then - healersTable[UnitDefNames["raptor_land_swarmer_heal_t1_v1"].id] = { - healingpower = UnitDefNames["raptor_land_swarmer_heal_t1_v1"].repairSpeed, - healingrange = UnitDefNames["raptor_land_swarmer_heal_t1_v1"].buildDistance*2, + healersTable[UnitDefNames.raptor_land_swarmer_heal_t1_v1 .id] = { + healingpower = UnitDefNames.raptor_land_swarmer_heal_t1_v1 .repairSpeed, + healingrange = UnitDefNames.raptor_land_swarmer_heal_t1_v1 .buildDistance*2, canbehealed = false, } - healersTable[UnitDefNames["raptor_land_swarmer_heal_t2_v1"].id] = { - healingpower = UnitDefNames["raptor_land_swarmer_heal_t2_v1"].repairSpeed, - healingrange = UnitDefNames["raptor_land_swarmer_heal_t2_v1"].buildDistance*2, + healersTable[UnitDefNames.raptor_land_swarmer_heal_t2_v1 .id] = { + healingpower = UnitDefNames.raptor_land_swarmer_heal_t2_v1 .repairSpeed, + healingrange = UnitDefNames.raptor_land_swarmer_heal_t2_v1 .buildDistance*2, canbehealed = false, } - healersTable[UnitDefNames["raptor_land_swarmer_heal_t3_v1"].id] = { - healingpower = UnitDefNames["raptor_land_swarmer_heal_t3_v1"].repairSpeed, - healingrange = UnitDefNames["raptor_land_swarmer_heal_t3_v1"].buildDistance*2, + healersTable[UnitDefNames.raptor_land_swarmer_heal_t3_v1 .id] = { + healingpower = UnitDefNames.raptor_land_swarmer_heal_t3_v1 .repairSpeed, + healingrange = UnitDefNames.raptor_land_swarmer_heal_t3_v1 .buildDistance*2, canbehealed = false, } - healersTable[UnitDefNames["raptor_land_swarmer_heal_t4_v1"].id] = { - healingpower = UnitDefNames["raptor_land_swarmer_heal_t4_v1"].repairSpeed, - healingrange = UnitDefNames["raptor_land_swarmer_heal_t4_v1"].buildDistance*2, + healersTable[UnitDefNames.raptor_land_swarmer_heal_t4_v1 .id] = { + healingpower = UnitDefNames.raptor_land_swarmer_heal_t4_v1 .repairSpeed, + healingrange = UnitDefNames.raptor_land_swarmer_heal_t4_v1 .buildDistance*2, canbehealed = false, } - healersTable[UnitDefNames["raptor_matriarch_healer"].id] = { - healingpower = UnitDefNames["raptor_matriarch_healer"].repairSpeed, - healingrange = UnitDefNames["raptor_matriarch_healer"].buildDistance*2, + healersTable[UnitDefNames.raptor_matriarch_healer .id] = { + healingpower = UnitDefNames.raptor_matriarch_healer .repairSpeed, + healingrange = UnitDefNames.raptor_matriarch_healer .buildDistance*2, canbehealed = false, } end diff --git a/luarules/gadgets/pve_boss_drones.lua b/luarules/gadgets/pve_boss_drones.lua index aef5734479a..35177b9b668 100644 --- a/luarules/gadgets/pve_boss_drones.lua +++ b/luarules/gadgets/pve_boss_drones.lua @@ -28,7 +28,7 @@ local positionCheckLibrary = VFS.Include("luarules/utilities/damgam_lib/position local unitListNames = { -- Brood Raptors - ["raptor_land_swarmer_brood_t4_v1"] = { + raptor_land_swarmer_brood_t4_v1 = { [1] = { name = "raptor_land_swarmer_brood_t3_v1", type = "ground", @@ -48,7 +48,7 @@ local unitListNames = { spawnTimer = 60, }, }, - ["raptor_land_swarmer_brood_t3_v1"] = { + raptor_land_swarmer_brood_t3_v1 = { [1] = { name = "raptor_land_swarmer_brood_t2_v1", type = "ground", @@ -61,7 +61,7 @@ local unitListNames = { }, -- Miniqueens - ["raptor_matriarch_basic"] = { + raptor_matriarch_basic = { [1] = { name = "raptor_land_swarmer_basic_t3_v1", type = "ground", @@ -108,7 +108,7 @@ local unitListNames = { spawnTimer = 10, }, }, - ["raptor_matriarch_healer"] = { + raptor_matriarch_healer = { [1] = { name = "raptor_land_swarmer_heal_t1_v1", type = "ground", @@ -146,7 +146,7 @@ local unitListNames = { spawnTimer = 10, }, }, - ["raptor_matriarch_acid"] = { + raptor_matriarch_acid = { [1] = { name = "raptor_land_swarmer_acids_t2_v1", type = "ground", @@ -175,7 +175,7 @@ local unitListNames = { spawnTimer = 10, }, }, - ["raptor_matriarch_electric"] = { + raptor_matriarch_electric = { [1] = { name = "raptor_land_swarmer_emp_t2_v1", type = "ground", @@ -204,7 +204,7 @@ local unitListNames = { spawnTimer = 10, }, }, - ["raptor_matriarch_fire"] = { + raptor_matriarch_fire = { [1] = { name = "raptor_land_swarmer_fire_t2_v1", type = "ground", @@ -224,7 +224,7 @@ local unitListNames = { spawnTimer = 10, }, }, - ["raptor_matriarch_spectre"] = { + raptor_matriarch_spectre = { [1] = { name = "raptor_land_swarmer_spectre_t3_v1", type = "ground", @@ -255,7 +255,7 @@ local unitListNames = { }, -- Queens - ["raptor_queen_veryeasy"] = { + raptor_queen_veryeasy = { [1] = { name = "raptor_air_fighter_basic_t1_v1", type = "air", @@ -293,7 +293,7 @@ local unitListNames = { spawnTimer = 10*raptorQueenCount, }, }, - ["raptor_queen_easy"] = { + raptor_queen_easy = { [1] = { name = "raptor_air_fighter_basic_t1_v1", type = "air", @@ -331,7 +331,7 @@ local unitListNames = { spawnTimer = 10*raptorQueenCount, }, }, - ["raptor_queen_normal"] = { + raptor_queen_normal = { [1] = { name = "raptor_air_fighter_basic_t1_v1", type = "air", @@ -369,7 +369,7 @@ local unitListNames = { spawnTimer = 10*raptorQueenCount, }, }, - ["raptor_queen_hard"] = { + raptor_queen_hard = { [1] = { name = "raptor_air_fighter_basic_t2_v1", type = "air", @@ -416,7 +416,7 @@ local unitListNames = { spawnTimer = 10*raptorQueenCount, }, }, - ["raptor_queen_veryhard"] = { + raptor_queen_veryhard = { [1] = { name = "raptor_air_fighter_basic_t2_v1", type = "air", @@ -463,7 +463,7 @@ local unitListNames = { spawnTimer = 10*raptorQueenCount, }, }, - ["raptor_queen_epic"] = { + raptor_queen_epic = { [1] = { name = "raptor_air_fighter_basic_t4_v1", type = "air", diff --git a/luarules/gadgets/raptor_spawner_defense.lua b/luarules/gadgets/raptor_spawner_defense.lua index 0a2c1c42d4c..ceec34d4e35 100644 --- a/luarules/gadgets/raptor_spawner_defense.lua +++ b/luarules/gadgets/raptor_spawner_defense.lua @@ -197,7 +197,7 @@ if gadgetHandler:IsSyncedCode() then local isObject = {} for udefID, def in ipairs(UnitDefs) do - if def.modCategories['object'] or def.customParams.objectify then + if def.modCategories.object or def.customParams.objectify then isObject[udefID] = true end end @@ -2222,13 +2222,13 @@ else -- UNSYNCED if hasRaptorEvent then local raptorEventArgs = {} if type ~= nil then - raptorEventArgs["type"] = type + raptorEventArgs.type = type end if num ~= nil then - raptorEventArgs["number"] = num + raptorEventArgs.number = num end if tech ~= nil then - raptorEventArgs["tech"] = tech + raptorEventArgs.tech = tech end Script.LuaUI.RaptorEvent(raptorEventArgs) end diff --git a/luarules/gadgets/ruins/Blueprints/BYAR/blueprint_tiers.lua b/luarules/gadgets/ruins/Blueprints/BYAR/blueprint_tiers.lua index 70561fd5c16..448b303e65e 100644 --- a/luarules/gadgets/ruins/Blueprints/BYAR/blueprint_tiers.lua +++ b/luarules/gadgets/ruins/Blueprints/BYAR/blueprint_tiers.lua @@ -2,89 +2,89 @@ local UDN = UnitDefNames local gaiaTeamID = Spring.Utilities.GetScavTeamID() or Spring.GetGaiaTeamID() local wallUnitDefs = { - ["arm"] = { + arm = { [1] = { - ["land"] = { + land = { unarmed = {"armdrag"}, armed = {"armclaw"}, }, - ["sea"] = { + sea = { unarmed = {"armfdrag"}, armed = {"armfdrag"}, -- placeholder, }, }, [2] = { - ["land"] = { + land = { unarmed = {"armfort"}, armed = {"armlwall"}, }, - ["sea"] = { + sea = { unarmed = {"armfdrag"}, -- placeholder, armed = {"armfdrag"}, -- placeholder, }, }, }, - ["cor"] = { + cor = { [1] = { - ["land"] = { + land = { unarmed = {"cordrag"}, armed = {"cormaw"}, }, - ["sea"] = { + sea = { unarmed = {"corfdrag"}, armed = {"corfdrag"}, -- placeholder, }, }, [2] = { - ["land"] = { + land = { unarmed = {"corfort"}, armed = {"cormwall"}, }, - ["sea"] = { + sea = { unarmed = {"corfdrag"}, -- placeholder, armed = {"corfdrag"}, -- placeholder, }, }, }, - ["leg"] = { + leg = { [1] = { - ["land"] = { + land = { unarmed = {"legdrag"}, armed = {"legdtr"}, }, - ["sea"] = { + sea = { unarmed = {"legfdrag"}, armed = {"legfdrag"}, -- placeholder, }, }, [2] = { - ["land"] = { + land = { unarmed = {"legforti"}, armed = {"legrwall"}, }, - ["sea"] = { + sea = { unarmed = {"legfdrag"}, -- placeholder, armed = {"legfdrag"}, -- placeholder, }, }, }, - ["scav"] = { + scav = { [1] = { - ["land"] = { + land = { unarmed = {"corscavdrag"}, armed = {"corscavdtf", "corscavdtl", "corscavdtm"}, }, - ["sea"] = { + sea = { unarmed = {"corfdrag"}, -- placeholder, armed = {"corfdrag"}, -- placeholder, }, }, [2] = { - ["land"] = { + land = { unarmed = {"corscavfort"}, armed = {"corscavfort"}, -- placeholder, }, - ["sea"] = { + sea = { unarmed = {"corfdrag"}, -- placeholder, armed = {"corfdrag"}, -- placeholder, }, diff --git a/luarules/gadgets/scav_cloud_spawner.lua b/luarules/gadgets/scav_cloud_spawner.lua index 93637c4860f..4a19ac5e472 100644 --- a/luarules/gadgets/scav_cloud_spawner.lua +++ b/luarules/gadgets/scav_cloud_spawner.lua @@ -26,9 +26,9 @@ if gadgetHandler:IsSyncedCode() then -- Synced local aliveMists = {} local aliveWrecks = {} local mistDefIDs = { - [UnitDefNames["scavmist_scav"].id] = true, - [UnitDefNames["scavmistxl_scav"].id] = true, - [UnitDefNames["scavmistxxl_scav"].id] = true, + [UnitDefNames.scavmist_scav .id] = true, + [UnitDefNames.scavmistxl_scav .id] = true, + [UnitDefNames.scavmistxxl_scav .id] = true, } VFS.Include('common/wav.lua') diff --git a/luarules/gadgets/scav_lootbox_collector.lua b/luarules/gadgets/scav_lootbox_collector.lua index 7bd09d47c12..51e96241d58 100644 --- a/luarules/gadgets/scav_lootbox_collector.lua +++ b/luarules/gadgets/scav_lootbox_collector.lua @@ -45,11 +45,11 @@ for unitDefName, tier in pairs({lootboxbronze_scav = 1, lootboxsilver_scav = 1, end local spawnerList = {} -if UnitDefNames["scavbeacon_t1_scav"] then - spawnerList[UnitDefNames["scavbeacon_t1_scav"].id] = true - spawnerList[UnitDefNames["scavbeacon_t2_scav"].id] = true - spawnerList[UnitDefNames["scavbeacon_t3_scav"].id] = true - spawnerList[UnitDefNames["scavbeacon_t4_scav"].id] = true +if UnitDefNames.scavbeacon_t1_scav then + spawnerList[UnitDefNames.scavbeacon_t1_scav .id] = true + spawnerList[UnitDefNames.scavbeacon_t2_scav .id] = true + spawnerList[UnitDefNames.scavbeacon_t3_scav .id] = true + spawnerList[UnitDefNames.scavbeacon_t4_scav .id] = true end local scavTeamID = Spring.Utilities.GetScavTeamID() diff --git a/luarules/gadgets/scav_spawner_defense.lua b/luarules/gadgets/scav_spawner_defense.lua index 996d35626d1..635ba5c4483 100644 --- a/luarules/gadgets/scav_spawner_defense.lua +++ b/luarules/gadgets/scav_spawner_defense.lua @@ -2469,13 +2469,13 @@ else -- UNSYNCED if hasScavEvent then local scavEventArgs = {} if type ~= nil then - scavEventArgs["type"] = type + scavEventArgs.type = type end if num ~= nil then - scavEventArgs["number"] = num + scavEventArgs.number = num end if tech ~= nil then - scavEventArgs["tech"] = tech + scavEventArgs.tech = tech end Script.LuaUI.ScavEvent(scavEventArgs) end diff --git a/luarules/gadgets/sfx_notifications.lua b/luarules/gadgets/sfx_notifications.lua index 8ca1e4b4151..79d562bd006 100644 --- a/luarules/gadgets/sfx_notifications.lua +++ b/luarules/gadgets/sfx_notifications.lua @@ -74,9 +74,9 @@ if gadgetHandler:IsSyncedCode() then for ct, player in pairs (players) do if tostring(player) then if GetAllyTeamID(newTeam) == GetAllyTeamID(oldTeam) then -- We got it from a teammate - GG["notifications"].queueNotification("UnitsReceived", "playerID", tostring(player)) + GG.notifications .queueNotification("UnitsReceived", "playerID", tostring(player)) else -- We got it from an enemy - GG["notifications"].queueNotification("UnitsCaptured", "playerID", tostring(player)) + GG.notifications .queueNotification("UnitsCaptured", "playerID", tostring(player)) end end end @@ -89,14 +89,14 @@ if gadgetHandler:IsSyncedCode() then local players = AllButAllyTeamID(GetAllyTeamID(Spring.GetUnitTeam(proOwnerID))) for ct, player in pairs (players) do if tostring(player) then - GG["notifications"].queueNotification("NukeLaunched", "playerID", tostring(player)) + GG.notifications .queueNotification("NukeLaunched", "playerID", tostring(player)) end end local players = PlayersInAllyTeamID(GetAllyTeamID(Spring.GetUnitTeam(proOwnerID))) for ct, player in pairs (players) do if tostring(player) then - GG["notifications"].queueNotification("AlliedNukeLaunched", "playerID", tostring(player)) + GG.notifications .queueNotification("AlliedNukeLaunched", "playerID", tostring(player)) end end end @@ -112,7 +112,7 @@ if gadgetHandler:IsSyncedCode() then if tostring(playerID) then _, _, spec, _, playerAllyTeam = spGetPlayerInfo(playerID, false) if not spec and playerAllyTeam == allyTeam and unitAllyTeam ~= playerAllyTeam then - GG["notifications"].queueNotification(event, "playerID", tostring(playerID)) + GG.notifications .queueNotification(event, "playerID", tostring(playerID)) end end end @@ -198,7 +198,7 @@ else function gadget:UnitDamaged(unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam) if unitTeam == myTeamID and isLrpc[attackerDefID] and attackerTeam and GetAllyTeamID(attackerTeam) ~= myAllyTeamID then - GG["notifications"].queueNotification('LrpcTargetUnits', "playerID", tostring(myPlayerID)) + GG.notifications .queueNotification('LrpcTargetUnits', "playerID", tostring(myPlayerID)) end if isCommander[unitDefID] then commanderLastDamaged[unitID] = Spring.GetGameFrame() @@ -208,18 +208,18 @@ else local health, maxhealth = Spring.GetUnitHealth(unitID) local healthPercent = health/maxhealth if healthPercent < 0.2 then - GG["notifications"].queueNotification('ComHeavyDamage', "playerID", tostring(myPlayerID)) + GG.notifications .queueNotification('ComHeavyDamage', "playerID", tostring(myPlayerID)) else - GG["notifications"].queueNotification('CommanderUnderAttack', "playerID", tostring(myPlayerID)) + GG.notifications .queueNotification('CommanderUnderAttack', "playerID", tostring(myPlayerID)) end elseif isFactory[unitDefID] then - GG["notifications"].queueNotification('FactoryUnderAttack', "playerID", tostring(myPlayerID)) + GG.notifications .queueNotification('FactoryUnderAttack', "playerID", tostring(myPlayerID)) elseif isBuilding[unitDefID] == true and (not isMex[unitDefID]) and (isEconomy[unitDefID]) then - GG["notifications"].queueNotification('EconomyUnderAttack', "playerID", tostring(myPlayerID)) + GG.notifications .queueNotification('EconomyUnderAttack', "playerID", tostring(myPlayerID)) elseif isBuilding[unitDefID] == true and (not isMex[unitDefID]) and isDefenseTurret[unitDefID] then - GG["notifications"].queueNotification('DefenseUnderAttack', "playerID", tostring(myPlayerID)) + GG.notifications .queueNotification('DefenseUnderAttack', "playerID", tostring(myPlayerID)) else - GG["notifications"].queueNotification('UnitsUnderAttack', "playerID", tostring(myPlayerID)) + GG.notifications .queueNotification('UnitsUnderAttack', "playerID", tostring(myPlayerID)) end end end @@ -235,15 +235,15 @@ else if not isSpec and unitTeam == myTeamID and attackerTeam and attackerTeam ~= unitTeam and (not isObjectified[unitDefID]) then -- and not unitInView if isRadar[unitDefID] then local event = isRadar[unitDefID] > 2800 and 'AdvRadarLost' or 'RadarLost' - GG["notifications"].queueNotification(event, "playerID", tostring(myPlayerID)) + GG.notifications .queueNotification(event, "playerID", tostring(myPlayerID)) return end if isMex[unitDefID] then - GG["notifications"].queueNotification("MetalExtractorLost", "playerID", tostring(myPlayerID)) + GG.notifications .queueNotification("MetalExtractorLost", "playerID", tostring(myPlayerID)) return end if not isCommander[unitDefID] then - GG["notifications"].queueNotification("UnitLost", "playerID", tostring(myPlayerID)) + GG.notifications .queueNotification("UnitLost", "playerID", tostring(myPlayerID)) return end end @@ -276,16 +276,16 @@ else if Spring.GetUnitRulesParam(unitID, "unit_evolved") then elseif not attackerTeam and select(6, Spring.GetTeamInfo(unitTeam, false)) == myAllyTeamID and (not commanderLastDamaged[unitID] or commanderLastDamaged[unitID]+150 < Spring.GetGameFrame()) then - GG["notifications"].queueNotification("FriendlyCommanderSelfD", "playerID", tostring(player)) + GG.notifications .queueNotification("FriendlyCommanderSelfD", "playerID", tostring(player)) else - GG["notifications"].queueNotification("FriendlyCommanderDied", "playerID", tostring(player)) + GG.notifications .queueNotification("FriendlyCommanderDied", "playerID", tostring(player)) end --end if enableLastcomNotif and allyComCount == 1 then if myComCount == 1 then - GG["notifications"].queueNotification("YouHaveLastCommander", "playerID", tostring(player)) + GG.notifications .queueNotification("YouHaveLastCommander", "playerID", tostring(player)) else - GG["notifications"].queueNotification("TeamDownLastCommander", "playerID", tostring(player)) + GG.notifications .queueNotification("TeamDownLastCommander", "playerID", tostring(player)) end end end @@ -295,7 +295,7 @@ else local players = AllButAllyTeamID(GetAllyTeamID(Spring.GetUnitTeam(unitID))) for ct, player in pairs (players) do if tostring(player) and not Spring.GetUnitRulesParam(unitID, "unit_evolved") then - GG["notifications"].queueNotification("EnemyCommanderDied", "playerID", tostring(player)) + GG.notifications .queueNotification("EnemyCommanderDied", "playerID", tostring(player)) end end --end @@ -305,9 +305,9 @@ else if tostring(player) then if Spring.GetUnitRulesParam(unitID, "unit_evolved") then elseif not attackerTeam and (not commanderLastDamaged[unitID] or commanderLastDamaged[unitID]+150 < Spring.GetGameFrame()) then - GG["notifications"].queueNotification("NeutralCommanderSelfD", "playerID", tostring(player), true) + GG.notifications .queueNotification("NeutralCommanderSelfD", "playerID", tostring(player), true) else - GG["notifications"].queueNotification("NeutralCommanderDied", "playerID", tostring(player), true) + GG.notifications .queueNotification("NeutralCommanderDied", "playerID", tostring(player), true) end end end @@ -316,9 +316,9 @@ else if tostring(player) then if Spring.GetUnitRulesParam(unitID, "unit_evolved") then elseif not attackerTeam and (not commanderLastDamaged[unitID] or commanderLastDamaged[unitID]+150 < Spring.GetGameFrame()) then - GG["notifications"].queueNotification("NeutralCommanderSelfD", "playerID", tostring(player), true) + GG.notifications .queueNotification("NeutralCommanderSelfD", "playerID", tostring(player), true) else - GG["notifications"].queueNotification("NeutralCommanderDied", "playerID", tostring(player), true) + GG.notifications .queueNotification("NeutralCommanderDied", "playerID", tostring(player), true) end end end diff --git a/luarules/gadgets/sfx_notifications_broadcaster.lua b/luarules/gadgets/sfx_notifications_broadcaster.lua index f0f502d9569..782a54dad3d 100644 --- a/luarules/gadgets/sfx_notifications_broadcaster.lua +++ b/luarules/gadgets/sfx_notifications_broadcaster.lua @@ -29,12 +29,12 @@ if not gadgetHandler:IsSyncedCode() then end end -GG["notifications"] = {} +GG.notifications = {} ---@param event string Notification event name (e.g., "commanderDetected", "EnemyCommanderDied"). Must match an event defined in sounds/voice/config.lua with properties: delay (integer), stackedDelay (bool), resetOtherEventDelay (string), soundEffect (string), notext (bool), tutorial (bool) ---@param idtype "playerID"|"teamID"|"allyTeamID" Type of ID to target: "playerID" for specific player, "teamID" for all players on a team, "allyTeamID" for all players in an ally team ---@param id number|string PlayerID, TeamID, or AllyTeamID (converted to number internally) ---@param forceplay boolean|nil If true, skips spectator check and allows playing in pregame -GG["notifications"].queueNotification = function(event, idtype, id, forceplay) +GG.notifications .queueNotification = function(event, idtype, id, forceplay) local playerIDs = {} id = tonumber(id) diff --git a/luarules/gadgets/unit_attached_con_turret.lua b/luarules/gadgets/unit_attached_con_turret.lua index e99a461ac92..77994b0260a 100644 --- a/luarules/gadgets/unit_attached_con_turret.lua +++ b/luarules/gadgets/unit_attached_con_turret.lua @@ -66,27 +66,27 @@ local function auto_repair_routine(nanoID, unitDefID, baseUnitID) end -- first, check command the body is performing local commandQueue = SpGetUnitCommands(attached_builders[nanoID], 1) - if (commandQueue[1] ~= nil and commandQueue[1]["id"] < 0) then + if (commandQueue[1] ~= nil and commandQueue[1].id < 0) then -- build command -- The attached turret must have the same buildlist as the body for this to work correctly --for XX, YY, baseUnitID in pairs(commandQueue[1]["params"]) do -- Spring.Echo(XX, YY) --end - SpGiveOrderToUnit(nanoID, commandQueue[1]["id"], commandQueue[1]["params"]) + SpGiveOrderToUnit(nanoID, commandQueue[1].id , commandQueue[1].params ) end - if (commandQueue[1] ~= nil and commandQueue[1]["id"] == CMD_REPAIR) then + if (commandQueue[1] ~= nil and commandQueue[1].id == CMD_REPAIR) then -- repair command --for XX, YY, baseUnitID in pairs(commandQueue[1]["params"]) do -- Spring.Echo(XX, YY) --end - if #commandQueue[1]["params"] ~= 4 then - SpGiveOrderToUnit(nanoID, CMD_REPAIR, commandQueue[1]["params"]) + if #commandQueue[1].params ~= 4 then + SpGiveOrderToUnit(nanoID, CMD_REPAIR, commandQueue[1].params ) end end - if (commandQueue[1] ~= nil and commandQueue[1]["id"] == CMD_RECLAIM) then + if (commandQueue[1] ~= nil and commandQueue[1].id == CMD_RECLAIM) then -- reclaim command - if #commandQueue[1]["params"] ~= 4 then - SpGiveOrderToUnit(nanoID, CMD_RECLAIM, commandQueue[1]["params"]) + if #commandQueue[1].params ~= 4 then + SpGiveOrderToUnit(nanoID, CMD_RECLAIM, commandQueue[1].params ) end end @@ -97,32 +97,32 @@ local function auto_repair_routine(nanoID, unitDefID, baseUnitID) local radius = UnitDefs[unitDefID].buildDistance local distance = radius^2 + 1 local object_radius = 0 - if (commandQueue[1] ~= nil and commandQueue[1]["id"] < 0) then + if (commandQueue[1] ~= nil and commandQueue[1].id < 0) then -- out of range build command - object_radius = SpGetUnitDefDimensions(-commandQueue[1]["id"]).radius - distance = math.sqrt((ux-commandQueue[1]["params"][1])^2 + (uz-commandQueue[1]["params"][3])^2) - object_radius + object_radius = SpGetUnitDefDimensions(-commandQueue[1].id ).radius + distance = math.sqrt((ux-commandQueue[1].params [1])^2 + (uz-commandQueue[1].params [3])^2) - object_radius end - if (commandQueue[1] ~= nil and commandQueue[1]["id"] == CMD_REPAIR) then + if (commandQueue[1] ~= nil and commandQueue[1].id == CMD_REPAIR) then -- out of range repair command - if (commandQueue[1]["params"][1] >= Game.maxUnits) then - tx, ty, tz = SpGetFeaturePosition(commandQueue[1]["params"][1] - Game.maxUnits) - object_radius = SpGetFeatureRadius(commandQueue[1]["params"][1] - Game.maxUnits) + if (commandQueue[1].params [1] >= Game.maxUnits) then + tx, ty, tz = SpGetFeaturePosition(commandQueue[1].params [1] - Game.maxUnits) + object_radius = SpGetFeatureRadius(commandQueue[1].params [1] - Game.maxUnits) else - tx, ty, tz = SpGetUnitPosition(commandQueue[1]["params"][1]) - object_radius = SpGetUnitRadius(commandQueue[1]["params"][1]) + tx, ty, tz = SpGetUnitPosition(commandQueue[1].params [1]) + object_radius = SpGetUnitRadius(commandQueue[1].params [1]) end if tx ~= nil then distance = math.sqrt((ux-tx)^2 + (uz-tz)^2) - object_radius end end - if (commandQueue[1] ~= nil and commandQueue[1]["id"] == CMD_RECLAIM) then + if (commandQueue[1] ~= nil and commandQueue[1].id == CMD_RECLAIM) then -- out of range reclaim command - if (commandQueue[1]["params"][1] >= Game.maxUnits) then - tx, ty, tz = SpGetFeaturePosition(commandQueue[1]["params"][1] - Game.maxUnits) - object_radius = SpGetFeatureRadius(commandQueue[1]["params"][1] - Game.maxUnits) + if (commandQueue[1].params [1] >= Game.maxUnits) then + tx, ty, tz = SpGetFeaturePosition(commandQueue[1].params [1] - Game.maxUnits) + object_radius = SpGetFeatureRadius(commandQueue[1].params [1] - Game.maxUnits) else - tx, ty, tz = SpGetUnitPosition(commandQueue[1]["params"][1]) - object_radius = SpGetUnitRadius(commandQueue[1]["params"][1]) + tx, ty, tz = SpGetUnitPosition(commandQueue[1].params [1]) + object_radius = SpGetUnitRadius(commandQueue[1].params [1]) end if tx ~= nil then distance = math.sqrt((ux-tx)^2 + (uz-tz)^2) - object_radius diff --git a/luarules/gadgets/unit_bomber_no_air_target.lua b/luarules/gadgets/unit_bomber_no_air_target.lua index 84dfa2b7fe0..bf1ff0956d2 100644 --- a/luarules/gadgets/unit_bomber_no_air_target.lua +++ b/luarules/gadgets/unit_bomber_no_air_target.lua @@ -19,7 +19,7 @@ local isBomber = {} local isAir = {} for udid, unitDef in pairs(UnitDefs) do - if unitDef.modCategories and unitDef.modCategories['vtol'] then + if unitDef.modCategories and unitDef.modCategories.vtol then isAir[udid] = true end if unitDef.canFly and not unitDef.hoverAttack and unitDef.weapons and unitDef.weapons[1] then diff --git a/luarules/gadgets/unit_combomb_full_damage.lua b/luarules/gadgets/unit_combomb_full_damage.lua index ac56505e257..8828eb118aa 100644 --- a/luarules/gadgets/unit_combomb_full_damage.lua +++ b/luarules/gadgets/unit_combomb_full_damage.lua @@ -21,7 +21,7 @@ if not gadgetHandler:IsSyncedCode() then return false end -local COM_BLAST = WeaponDefNames['commanderexplosion'].id +local COM_BLAST = WeaponDefNames.commanderexplosion .id function gadget:UnitPreDamaged(unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam) --we use UnitPreDamaged so as we get in before unit_transportfix has its effect diff --git a/luarules/gadgets/unit_commando_watch.lua b/luarules/gadgets/unit_commando_watch.lua index 7976a8fe377..0ea461dfdc8 100644 --- a/luarules/gadgets/unit_commando_watch.lua +++ b/luarules/gadgets/unit_commando_watch.lua @@ -21,12 +21,12 @@ end local MAPSIZEX = Game.mapSizeX local MAPSIZEZ = Game.mapSizeZ -local MINE2 = UnitDefNames["cormine4"].id +local MINE2 = UnitDefNames.cormine4 .id local mines = {} local MINE_BLAST = {} -MINE_BLAST[WeaponDefNames["mine_light"].id] = true -MINE_BLAST[WeaponDefNames["mine_medium"].id] = true -MINE_BLAST[WeaponDefNames["mine_heavy"].id] = true +MINE_BLAST[WeaponDefNames.mine_light .id] = true +MINE_BLAST[WeaponDefNames.mine_medium .id] = true +MINE_BLAST[WeaponDefNames.mine_heavy .id] = true local isBuilding = {} local isCommando = {} diff --git a/luarules/gadgets/unit_continuous_aim.lua b/luarules/gadgets/unit_continuous_aim.lua index b43efc70994..f637da732e5 100644 --- a/luarules/gadgets/unit_continuous_aim.lua +++ b/luarules/gadgets/unit_continuous_aim.lua @@ -22,130 +22,130 @@ local tableCopy = table.copy local convertedUnitsNames = { -- value is reaimtime in frames, engine default is 15 - ['armfav'] = 3, - ['armbeamer'] = 3, - ['armpw'] = 2, - ['armpwt4'] = 2, - ['armflea'] = 2, - ['armrock'] = 2, - ['armham'] = 2, - ['armwar'] = 6, - ['armjeth'] = 2, - ['corfav'] = 3, - ['corak'] = 2, - ['corthud'] = 2, - ['corstorm'] = 2, - ['corcrash'] = 5, - ['legkark'] = 2, - ['corkark'] = 2, - ['cordeadeye'] =2, - ['armsnipe'] = 2, - ['armfido'] = 3, - ['armfboy'] = 2, - ['armfast'] = 2, - ['armamph'] = 3, - ['armmav'] = 2, - ['armspid'] = 3, - ['armsptk'] = 5, - ['armzeus'] = 3, - ['coramph'] = 3, - ['corcan'] = 2, - ['corhrk'] = 5, - ['cormando'] = 2, - ['cormort'] = 2, - ['corpyro'] = 2, - ['cortermite'] = 2, - ['armraz'] = 6, - ['armmar'] = 3, - ['armbanth'] = 1, - ['corkorg'] = 1, - ['armvang'] = 3, - ['armcrus'] = 5, - ['corsala'] = 6, - ['corsiegebreaker'] = 5, - ['legerailtank'] = 9, + armfav = 3, + armbeamer = 3, + armpw = 2, + armpwt4 = 2, + armflea = 2, + armrock = 2, + armham = 2, + armwar = 6, + armjeth = 2, + corfav = 3, + corak = 2, + corthud = 2, + corstorm = 2, + corcrash = 5, + legkark = 2, + corkark = 2, + cordeadeye =2, + armsnipe = 2, + armfido = 3, + armfboy = 2, + armfast = 2, + armamph = 3, + armmav = 2, + armspid = 3, + armsptk = 5, + armzeus = 3, + coramph = 3, + corcan = 2, + corhrk = 5, + cormando = 2, + cormort = 2, + corpyro = 2, + cortermite = 2, + armraz = 6, + armmar = 3, + armbanth = 1, + corkorg = 1, + armvang = 3, + armcrus = 5, + corsala = 6, + corsiegebreaker = 5, + legerailtank = 9, -- the following units get a faster reaimtime to counteract their turret acceleration - ['armthor'] = 4, - ['armflash'] = 6, - ['corgator'] = 6, - ['armdecade'] = 6, - ['coresupp'] = 6, - ['corhlt'] = 5, - ['corfhlt'] = 5, - ['cordoom'] = 5, - ['corshiva'] = 5, - ['corcat'] = 5, - ['corkarg'] = 5, - ['corbhmth'] = 5, - ['armguard'] = 5, - ['armamb'] = 5, - ['corpun'] = 5, - ['cortoast'] = 5, - ['corbats'] = 5, - ['corblackhy'] = 6, - ['corscreamer'] = 5, - ['corcom'] = 5, - ['armcom'] = 5, - ['cordecom'] = 5, - ['armdecom'] = 5, - ['legcom'] = 5, - ['legdecom'] = 5, - ['legcomlvl2'] = 5, - ['legcomlvl3'] = 5, - ['legcomlvl4'] = 5, - ['legcomlvl5'] = 5, - ['legcomlvl6'] = 5, - ['legcomlvl7'] = 5, - ['legcomlvl8'] = 5, - ['legcomlvl9'] = 5, - ['legcomlvl10'] = 5, - ['legah'] = 5, - ['legbal'] = 5, - ['legbastion'] = 5, - ['legcen'] = 3, - ['legfloat'] = 5, - ['leggat'] = 5, - ['leggob'] = 5, - ['leginc'] = 1, - ['cordemon'] = 6, - ['corcrwh'] = 7, - ['leglob'] = 5, - ['legmos'] = 5, - ['leghades'] = 5, - ['leghelios'] = 5, - ['legheavydrone'] = 5, - ['legkeres'] = 5, - ['legrail'] = 5, - ['legbar'] = 5, - ['legcomoff'] = 5, - ['legcomt2off'] = 5, - ['legcomt2com'] = 5, - ['legstr'] = 3, - ['legamph'] = 4, - ['legbart'] = 5, - ['legmrv'] = 5, - ['legsco'] = 5, - ['leegmech'] = 5, - ['legionnaire'] = 5, - ['legafigdef'] = 5, - ['legvenator'] = 5, - ['legmed'] = 5, - ['legaskirmtank'] = 5, - ['legaheattank'] = 3, - ['legeheatraymech'] = 1, - ['legtriariusdrone'] = 1, - ['legnavydestro'] = 4, - ['legeheatraymech_old'] = 1, - ['legbunk'] = 3, - ['legrwall'] = 4, - ['legjav'] = 1, - ['legeshotgunmech'] = 3, - ['legehovertank'] = 4, - ['armanavaldefturret'] = 4, - ['leganavyflagship'] = 4, - ['leganavyantiswarm'] = 5, - ['leganavycruiser'] = 5, + armthor = 4, + armflash = 6, + corgator = 6, + armdecade = 6, + coresupp = 6, + corhlt = 5, + corfhlt = 5, + cordoom = 5, + corshiva = 5, + corcat = 5, + corkarg = 5, + corbhmth = 5, + armguard = 5, + armamb = 5, + corpun = 5, + cortoast = 5, + corbats = 5, + corblackhy = 6, + corscreamer = 5, + corcom = 5, + armcom = 5, + cordecom = 5, + armdecom = 5, + legcom = 5, + legdecom = 5, + legcomlvl2 = 5, + legcomlvl3 = 5, + legcomlvl4 = 5, + legcomlvl5 = 5, + legcomlvl6 = 5, + legcomlvl7 = 5, + legcomlvl8 = 5, + legcomlvl9 = 5, + legcomlvl10 = 5, + legah = 5, + legbal = 5, + legbastion = 5, + legcen = 3, + legfloat = 5, + leggat = 5, + leggob = 5, + leginc = 1, + cordemon = 6, + corcrwh = 7, + leglob = 5, + legmos = 5, + leghades = 5, + leghelios = 5, + legheavydrone = 5, + legkeres = 5, + legrail = 5, + legbar = 5, + legcomoff = 5, + legcomt2off = 5, + legcomt2com = 5, + legstr = 3, + legamph = 4, + legbart = 5, + legmrv = 5, + legsco = 5, + leegmech = 5, + legionnaire = 5, + legafigdef = 5, + legvenator = 5, + legmed = 5, + legaskirmtank = 5, + legaheattank = 3, + legeheatraymech = 1, + legtriariusdrone = 1, + legnavydestro = 4, + legeheatraymech_old = 1, + legbunk = 3, + legrwall = 4, + legjav = 1, + legeshotgunmech = 3, + legehovertank = 4, + armanavaldefturret = 4, + leganavyflagship = 4, + leganavyantiswarm = 5, + leganavycruiser = 5, } --add entries for scavboss local scavengerBossV4Table = {'scavengerbossv4_veryeasy', 'scavengerbossv4_easy', 'scavengerbossv4_normal', 'scavengerbossv4_hard', 'scavengerbossv4_veryhard', 'scavengerbossv4_epic', @@ -167,11 +167,11 @@ convertedUnitsNames = nil local spamUnitsTeamsNames = { --{unitDefID = {teamID = totalcreated,...}} - ['armpw'] = {}, - ['armflea'] = {}, - ['armfav'] = {}, - ['corak'] = {}, - ['corfav'] = {}, + armpw = {}, + armflea = {}, + armfav = {}, + corak = {}, + corfav = {}, } -- convert unitname -> unitDefID local spamUnitsTeams = {} diff --git a/luarules/gadgets/unit_crashing_aircraft.lua b/luarules/gadgets/unit_crashing_aircraft.lua index 834255cdf1b..bf71c8420e4 100644 --- a/luarules/gadgets/unit_crashing_aircraft.lua +++ b/luarules/gadgets/unit_crashing_aircraft.lua @@ -30,7 +30,7 @@ if gadgetHandler:IsSyncedCode() then local SetUnitRulesParam = Spring.SetUnitRulesParam local COB_CRASHING = COB.CRASHING - local COM_BLAST = WeaponDefNames['commanderexplosion'].id -- used to prevent them being boosted and flying far away + local COM_BLAST = WeaponDefNames.commanderexplosion .id -- used to prevent them being boosted and flying far away local CMD_STOP = CMD.STOP local crashing = {} @@ -60,8 +60,8 @@ if gadgetHandler:IsSyncedCode() then if crashable[unitDefID] and (damage > GetUnitHealth(unitID)) and weaponDefID ~= COM_BLAST then -- increase gravity so it crashes faster local moveTypeData = GetUnitMoveTypeData(unitID) - if moveTypeData['myGravity'] then - SetAirMoveTypeData(unitID, 'myGravity', moveTypeData['myGravity'] * gravityMult) + if moveTypeData.myGravity then + SetAirMoveTypeData(unitID, 'myGravity', moveTypeData.myGravity * gravityMult) end -- make it crash crashingCount = crashingCount + 1 diff --git a/luarules/gadgets/unit_dynamic_collision_volume.lua b/luarules/gadgets/unit_dynamic_collision_volume.lua index 68ef5df441d..b11818d7e59 100644 --- a/luarules/gadgets/unit_dynamic_collision_volume.lua +++ b/luarules/gadgets/unit_dynamic_collision_volume.lua @@ -152,12 +152,12 @@ if gadgetHandler:IsSyncedCode() then if unitDefMidAndAimPos[unitDefID] then local midAndAimPos = unitDefMidAndAimPos[unitDefID] Spring.SetUnitMidAndAimPos(unitID, - midAndAimPos['midx'] or 0, - midAndAimPos['midy'] or 0, - midAndAimPos['midz'] or 0, - (midAndAimPos['aimx'] or 0) * -1, -- because engine is bugged - midAndAimPos['aimy'] or 0, - midAndAimPos['aimz'] or 0, -- relative? + midAndAimPos.midx or 0, + midAndAimPos.midy or 0, + midAndAimPos.midz or 0, + (midAndAimPos.aimx or 0) * -1, -- because engine is bugged + midAndAimPos.aimy or 0, + midAndAimPos.aimz or 0, -- relative? true) end if pieceCollisionVolume[unitName[unitDefID]] then @@ -215,7 +215,7 @@ if gadgetHandler:IsSyncedCode() then -- make sure underwater units are really underwater (need midpoint + model radius <0) local h = spGetUnitHeight(unitID) local wd = UnitDefs[unitDefID].minWaterDepth - if UnitDefs[unitDefID].modCategories['underwater'] and wd and wd+r>0 then + if UnitDefs[unitDefID].modCategories.underwater and wd and wd+r>0 then spSetUnitRadiusAndHeight(unitID, wd-1, h) end elseif unitModeltype[unitDefID] == "s3o" then @@ -254,12 +254,12 @@ if gadgetHandler:IsSyncedCode() then --Spring.SetFeatureMidAndAimPos ( number featureID, number mpX, number mpY, number mpZ, number apX, number apY, number apZ [, bool relative ) local midAndAimPos = featureDefMidAndAimPos[featureDefID] Spring.SetFeatureMidAndAimPos(featureID, - midAndAimPos['midx'] or 0, - midAndAimPos['midy'] or 0, - midAndAimPos['midz'] or 0, - (midAndAimPos['aimx'] or 0) * -1, -- because engine is bugged - midAndAimPos['aimy'] or 0, - midAndAimPos['aimz'] or 0-- relative? + midAndAimPos.midx or 0, + midAndAimPos.midy or 0, + midAndAimPos.midz or 0, + (midAndAimPos.aimx or 0) * -1, -- because engine is bugged + midAndAimPos.aimy or 0, + midAndAimPos.aimz or 0-- relative? ) end if is3doFeature[Spring.GetFeatureDefID(featureID)] then diff --git a/luarules/gadgets/unit_hats.lua b/luarules/gadgets/unit_hats.lua index 92aa16b11e5..122a80a145f 100644 --- a/luarules/gadgets/unit_hats.lua +++ b/luarules/gadgets/unit_hats.lua @@ -166,26 +166,26 @@ function gadget:GameFrame(gf) if unitDefCanWearHats[unitDefID] then - if MatchPlayer(halloween, playerName, accountID) and UnitDefNames['cor_hat_hw'] then - local hatDefID = UnitDefNames['cor_hat_hw'].id + if MatchPlayer(halloween, playerName, accountID) and UnitDefNames.cor_hat_hw then + local hatDefID = UnitDefNames.cor_hat_hw .id local unitID = Spring.CreateUnit(hatDefID, unitPosX, unitPosY, unitPosZ, 0, teamID) gadget:UnitGiven(unitID, hatDefID, teamID) end - if MatchPlayer(legchamps, playerName, accountID) and UnitDefNames['cor_hat_legfn'] then - local hatDefID = UnitDefNames['cor_hat_legfn'].id + if MatchPlayer(legchamps, playerName, accountID) and UnitDefNames.cor_hat_legfn then + local hatDefID = UnitDefNames.cor_hat_legfn .id local unitID = Spring.CreateUnit(hatDefID, unitPosX, unitPosY, unitPosZ, 0, teamID) gadget:UnitGiven(unitID, hatDefID, teamID) end - if MatchPlayer(champion, playerName, accountID) and UnitDefNames['cor_hat_fightnight'] then - local hatDefID = UnitDefNames['cor_hat_fightnight'].id + if MatchPlayer(champion, playerName, accountID) and UnitDefNames.cor_hat_fightnight then + local hatDefID = UnitDefNames.cor_hat_fightnight .id local unitID = Spring.CreateUnit(hatDefID, unitPosX, unitPosY, unitPosZ, 0, teamID) gadget:UnitGiven(unitID, hatDefID, teamID) end - if MatchPlayer(vikings, playerName, accountID) and UnitDefNames['cor_hat_viking'] then - local hatDefID = UnitDefNames['cor_hat_viking'].id + if MatchPlayer(vikings, playerName, accountID) and UnitDefNames.cor_hat_viking then + local hatDefID = UnitDefNames.cor_hat_viking .id local unitID = Spring.CreateUnit(hatDefID, unitPosX, unitPosY, unitPosZ, 0, teamID) gadget:UnitGiven(unitID, hatDefID, teamID) end @@ -199,17 +199,17 @@ function gadget:GameFrame(gf) if string.sub(UnitDefs[unitDefID].name, 1, 3) == 'arm' then local scriptEnv = Spring.UnitScript.GetScriptEnv(unitID) if scriptEnv then - if MatchPlayer(kings, playerName, accountID) and scriptEnv['ShowCrown'] then - Spring.UnitScript.CallAsUnit(unitID, scriptEnv['ShowCrown'], true) + if MatchPlayer(kings, playerName, accountID) and scriptEnv.ShowCrown then + Spring.UnitScript.CallAsUnit(unitID, scriptEnv.ShowCrown , true) end - if MatchPlayer(goldMedals, playerName, accountID) and scriptEnv['ShowMedalGold'] then - Spring.UnitScript.CallAsUnit(unitID, scriptEnv['ShowMedalGold'], true) + if MatchPlayer(goldMedals, playerName, accountID) and scriptEnv.ShowMedalGold then + Spring.UnitScript.CallAsUnit(unitID, scriptEnv.ShowMedalGold , true) end - if MatchPlayer(silverMedals, playerName, accountID) and scriptEnv['ShowMedalSilver'] then - Spring.UnitScript.CallAsUnit(unitID, scriptEnv['ShowMedalSilver'], true) + if MatchPlayer(silverMedals, playerName, accountID) and scriptEnv.ShowMedalSilver then + Spring.UnitScript.CallAsUnit(unitID, scriptEnv.ShowMedalSilver , true) end - if MatchPlayer(bronzeMedals, playerName, accountID) and scriptEnv['ShowMedalBronze'] then - Spring.UnitScript.CallAsUnit(unitID, scriptEnv['ShowMedalBronze'], true) + if MatchPlayer(bronzeMedals, playerName, accountID) and scriptEnv.ShowMedalBronze then + Spring.UnitScript.CallAsUnit(unitID, scriptEnv.ShowMedalBronze , true) end end else diff --git a/luarules/gadgets/unit_icongenerator.lua b/luarules/gadgets/unit_icongenerator.lua index bfba4d63b96..90ce1a2e868 100644 --- a/luarules/gadgets/unit_icongenerator.lua +++ b/luarules/gadgets/unit_icongenerator.lua @@ -227,11 +227,11 @@ else local function LoadScheme() local G = getfenv() - G["scheme"] = scheme - G["ratio"] = ratio - G["ratio_name"] = ratio_name - G["iconX"] = iconX - G["iconY"] = iconY + G.scheme = scheme + G.ratio = ratio + G.ratio_name = ratio_name + G.iconX = iconX + G.iconY = iconY autoConfigs = {} --// reset diff --git a/luarules/gadgets/unit_intergrated_hats.lua b/luarules/gadgets/unit_intergrated_hats.lua index 9f7e1478e66..b4fc1d68176 100644 --- a/luarules/gadgets/unit_intergrated_hats.lua +++ b/luarules/gadgets/unit_intergrated_hats.lua @@ -29,11 +29,11 @@ local unitCount = 0 do local hats - if Spring.Utilities.Gametype.GetCurrentHolidays()["aprilfools"] then + if Spring.Utilities.Gametype.GetCurrentHolidays().aprilfools then hats = "april" end - if Spring.Utilities.Gametype.GetCurrentHolidays()["halloween"] then + if Spring.Utilities.Gametype.GetCurrentHolidays().halloween then hats = "halloween" end diff --git a/luarules/gadgets/unit_juno_damage.lua b/luarules/gadgets/unit_juno_damage.lua index 1f2b56234d7..b9c2a98c722 100644 --- a/luarules/gadgets/unit_juno_damage.lua +++ b/luarules/gadgets/unit_juno_damage.lua @@ -22,67 +22,67 @@ if gadgetHandler:IsSyncedCode() then -- Config ---------------------------------------------------------------- local tokillUnitsNames = { - ['armarad'] = true, - ['armaser'] = true, - ['armason'] = true, - ['armeyes'] = true, - ['armfrad'] = true, - ['armjam'] = true, - ['armjamt'] = true, - ['armmark'] = true, - ['armrad'] = true, - ['armseer'] = true, - ['armsjam'] = true, - ['armsonar'] = true, - ['armveil'] = true, - ['corarad'] = true, - ['corason'] = true, - ['coreter'] = true, - ['coreyes'] = true, - ['corfrad'] = true, - ['corjamt'] = true, - ['corrad'] = true, - ['legjam'] = true, - ['legrad'] = true, - ['corshroud'] = true, - ['corsjam'] = true, - ['corsonar'] = true, - ['corspec'] = true, - ['corvoyr'] = true, - ['corvrad'] = true, - ['legarad'] = true, - ['legajam'] = true, - ['legavrad'] = true, - ['legavjam'] = true, - ['legaradk'] = true, - ['legajamk'] = true, - ['legfrad'] = true, - - ['armmine1'] = true, - ['armmine2'] = true, - ['armmine3'] = true, - ['armfmine3'] = true, - ['cormine1'] = true, - ['cormine2'] = true, - ['cormine3'] = true, - ['cormine4'] = true, - ['corfmine3'] = true, - ['legmine1'] = true, - ['legmine2'] = true, - ['legmine3'] = true, - - ['corfav'] = true, - ['armfav'] = true, - ['armflea'] = true, - ['legscout'] = true, - ['raptor_land_swarmer_brood_t2_v1'] = true, - ['raptor_land_kamikaze_basic_t2_v1'] = true, - ['raptor_land_kamikaze_emp_t2_v1'] = true, - ['raptor_land_kamikaze_basic_t4_v1'] = true, - ['raptor_land_kamikaze_emp_t4_v1'] = true, - ['scavmist'] = true, - ['scavmistxl'] = true, - ['scavmistxxl'] = true, + armarad = true, + armaser = true, + armason = true, + armeyes = true, + armfrad = true, + armjam = true, + armjamt = true, + armmark = true, + armrad = true, + armseer = true, + armsjam = true, + armsonar = true, + armveil = true, + corarad = true, + corason = true, + coreter = true, + coreyes = true, + corfrad = true, + corjamt = true, + corrad = true, + legjam = true, + legrad = true, + corshroud = true, + corsjam = true, + corsonar = true, + corspec = true, + corvoyr = true, + corvrad = true, + legarad = true, + legajam = true, + legavrad = true, + legavjam = true, + legaradk = true, + legajamk = true, + legfrad = true, + + armmine1 = true, + armmine2 = true, + armmine3 = true, + armfmine3 = true, + cormine1 = true, + cormine2 = true, + cormine3 = true, + cormine4 = true, + corfmine3 = true, + legmine1 = true, + legmine2 = true, + legmine3 = true, + + corfav = true, + armfav = true, + armflea = true, + legscout = true, + raptor_land_swarmer_brood_t2_v1 = true, + raptor_land_kamikaze_basic_t2_v1 = true, + raptor_land_kamikaze_emp_t2_v1 = true, + raptor_land_kamikaze_basic_t4_v1 = true, + raptor_land_kamikaze_emp_t4_v1 = true, + scavmist = true, + scavmistxl = true, + scavmistxxl = true, } -- convert unitname -> unitDefID local tokillUnits = {} @@ -94,18 +94,18 @@ if gadgetHandler:IsSyncedCode() then tokillUnitsNames = nil local todenyUnitsNames = { - ['corfav'] = true, - ['armfav'] = true, - ['armflea'] = true, - ['legscout'] = true, - ['raptor_land_swarmer_brood_t2_v1'] = true, - ['raptor_land_kamikaze_basic_t2_v1'] = true, - ['raptor_land_kamikaze_emp_t2_v1'] = true, - ['raptor_land_kamikaze_basic_t4_v1'] = true, - ['raptor_land_kamikaze_emp_t4_v1'] = true, - ['scavmist'] = true, - ['scavmistxl'] = true, - ['scavmistxxl'] = true, + corfav = true, + armfav = true, + armflea = true, + legscout = true, + raptor_land_swarmer_brood_t2_v1 = true, + raptor_land_kamikaze_basic_t2_v1 = true, + raptor_land_kamikaze_emp_t2_v1 = true, + raptor_land_kamikaze_basic_t4_v1 = true, + raptor_land_kamikaze_emp_t4_v1 = true, + scavmist = true, + scavmistxl = true, + scavmistxxl = true, } -- convert unitname -> unitDefID local todenyUnits = {} @@ -153,12 +153,12 @@ if gadgetHandler:IsSyncedCode() then -- kill appropriate things from initial juno blast -- local junoWeaponsNames = { - ["armjuno_juno_pulse"] = true, - ["legjuno_juno_pulse"] = true, - ["corjuno_juno_pulse"] = true, - ["armjuno_scav_juno_pulse"] = true, - ["legjuno_scav_juno_pulse"] = true, - ["corjuno_scav_juno_pulse"] = true, + armjuno_juno_pulse = true, + legjuno_juno_pulse = true, + corjuno_juno_pulse = true, + armjuno_scav_juno_pulse = true, + legjuno_scav_juno_pulse = true, + corjuno_scav_juno_pulse = true, } -- convert unitname -> unitDefID local junoWeapons = {} diff --git a/luarules/gadgets/unit_juno_damage_mini.lua b/luarules/gadgets/unit_juno_damage_mini.lua index 7b9e3c0ac17..16c4f7bf8ac 100644 --- a/luarules/gadgets/unit_juno_damage_mini.lua +++ b/luarules/gadgets/unit_juno_damage_mini.lua @@ -26,67 +26,67 @@ if gadgetHandler:IsSyncedCode() then -- Config ---------------------------------------------------------------- local tokillUnitsNames = { - ['armarad'] = true, - ['armaser'] = true, - ['armason'] = true, - ['armeyes'] = true, - ['armfrad'] = true, - ['armjam'] = true, - ['armjamt'] = true, - ['armmark'] = true, - ['armrad'] = true, - ['armseer'] = true, - ['armsjam'] = true, - ['armsonar'] = true, - ['armveil'] = true, - ['corarad'] = true, - ['corason'] = true, - ['coreter'] = true, - ['coreyes'] = true, - ['corfrad'] = true, - ['corjamt'] = true, - ['corrad'] = true, - ['legjam'] = true, - ['legrad'] = true, - ['corshroud'] = true, - ['corsjam'] = true, - ['corsonar'] = true, - ['corspec'] = true, - ['corvoyr'] = true, - ['corvrad'] = true, - ['legarad'] = true, - ['legajam'] = true, - ['legavrad'] = true, - ['legavjam'] = true, - ['legaradk'] = true, - ['legajamk'] = true, - ['legfrad'] = true, + armarad = true, + armaser = true, + armason = true, + armeyes = true, + armfrad = true, + armjam = true, + armjamt = true, + armmark = true, + armrad = true, + armseer = true, + armsjam = true, + armsonar = true, + armveil = true, + corarad = true, + corason = true, + coreter = true, + coreyes = true, + corfrad = true, + corjamt = true, + corrad = true, + legjam = true, + legrad = true, + corshroud = true, + corsjam = true, + corsonar = true, + corspec = true, + corvoyr = true, + corvrad = true, + legarad = true, + legajam = true, + legavrad = true, + legavjam = true, + legaradk = true, + legajamk = true, + legfrad = true, - ['armmine1'] = true, - ['armmine2'] = true, - ['armmine3'] = true, - ['armfmine3'] = true, - ['cormine1'] = true, - ['cormine2'] = true, - ['cormine3'] = true, - ['cormine4'] = true, - ['corfmine3'] = true, - ['legmine1'] = true, - ['legmine2'] = true, - ['legmine3'] = true, - - ['corfav'] = true, - ['armfav'] = true, - ['armflea'] = true, - ['legscout'] = true, - ['raptor_land_swarmer_brood_t2_v1'] = true, - ['raptor_land_kamikaze_basic_t2_v1'] = true, - ['raptor_land_kamikaze_emp_t2_v1'] = true, - ['raptor_land_kamikaze_basic_t4_v1'] = true, - ['raptor_land_kamikaze_emp_t4_v1'] = true, - ['scavmist'] = true, - ['scavmistxl'] = true, - ['scavmistxxl'] = true, + armmine1 = true, + armmine2 = true, + armmine3 = true, + armfmine3 = true, + cormine1 = true, + cormine2 = true, + cormine3 = true, + cormine4 = true, + corfmine3 = true, + legmine1 = true, + legmine2 = true, + legmine3 = true, + + corfav = true, + armfav = true, + armflea = true, + legscout = true, + raptor_land_swarmer_brood_t2_v1 = true, + raptor_land_kamikaze_basic_t2_v1 = true, + raptor_land_kamikaze_emp_t2_v1 = true, + raptor_land_kamikaze_basic_t4_v1 = true, + raptor_land_kamikaze_emp_t4_v1 = true, + scavmist = true, + scavmistxl = true, + scavmistxxl = true, } -- convert unitname -> unitDefID local tokillUnits = {} @@ -98,18 +98,18 @@ if gadgetHandler:IsSyncedCode() then tokillUnitsNames = nil local todenyUnitsNames = { - ['corfav'] = true, - ['armfav'] = true, - ['armflea'] = true, - ['legscout'] = true, - ['raptor_land_swarmer_brood_t2_v1'] = true, - ['raptor_land_kamikaze_basic_t2_v1'] = true, - ['raptor_land_kamikaze_emp_t2_v1'] = true, - ['raptor_land_kamikaze_basic_t4_v1'] = true, - ['raptor_land_kamikaze_emp_t4_v1'] = true, - ['scavmist'] = true, - ['scavmistxl'] = true, - ['scavmistxxl'] = true, + corfav = true, + armfav = true, + armflea = true, + legscout = true, + raptor_land_swarmer_brood_t2_v1 = true, + raptor_land_kamikaze_basic_t2_v1 = true, + raptor_land_kamikaze_emp_t2_v1 = true, + raptor_land_kamikaze_basic_t4_v1 = true, + raptor_land_kamikaze_emp_t4_v1 = true, + scavmist = true, + scavmistxl = true, + scavmistxxl = true, } -- convert unitname -> unitDefID local todenyUnits = {} @@ -154,7 +154,7 @@ if gadgetHandler:IsSyncedCode() then -- kill appropriate things from initial juno blast -- local junoWeaponsNames = { - ['legcib_juno_pulse_mini'] = true, + legcib_juno_pulse_mini = true, } -- convert unitname -> unitDefID local junoWeapons = {} diff --git a/luarules/gadgets/unit_juno_rework_damage.lua b/luarules/gadgets/unit_juno_rework_damage.lua index fd9b0745c22..96270719761 100644 --- a/luarules/gadgets/unit_juno_rework_damage.lua +++ b/luarules/gadgets/unit_juno_rework_damage.lua @@ -32,57 +32,57 @@ if gadgetHandler:IsSyncedCode() then local tokillUnitsNames = { - ['corfav'] = true, - ['armfav'] = true, - ['armflea'] = true, - ['legscout'] = true, - ['raptor_land_swarmer_brood_t2_v1'] = true, - ['raptor_land_kamikaze_basic_t2_v1'] = true, - ['raptor_land_kamikaze_emp_t2_v1'] = true, - ['raptor_land_kamikaze_basic_t4_v1'] = true, - ['raptor_land_kamikaze_emp_t4_v1'] = true, + corfav = true, + armfav = true, + armflea = true, + legscout = true, + raptor_land_swarmer_brood_t2_v1 = true, + raptor_land_kamikaze_basic_t2_v1 = true, + raptor_land_kamikaze_emp_t2_v1 = true, + raptor_land_kamikaze_basic_t4_v1 = true, + raptor_land_kamikaze_emp_t4_v1 = true, } --emp these local toStunUnitsNames = {--this could maybe use customparams later, at least in part to detect mines - ['armarad'] = true, - ['armaser'] = true, - ['armason'] = true, - ['armfrad'] = true, - ['armjam'] = true, - ['armjamt'] = true, - ['armmark'] = true, - ['armrad'] = true, - ['armseer'] = true, - ['armsjam'] = true, - ['armsonar'] = true, - ['armveil'] = true, - ['corarad'] = true, - ['corason'] = true, - ['coreter'] = true, - ['corfrad'] = true, - ['corjamt'] = true, - ['corrad'] = true, - ['corshroud'] = true, - ['corsjam'] = true, - ['corsonar'] = true, - ['corspec'] = true, - ['corvoyr'] = true, - ['corvrad'] = true, - - ['coreyes'] = true, - ['armeyes'] = true, - ['armmine1'] = true, - ['armmine2'] = true, - ['armmine3'] = true, - ['cormine1'] = true, - ['cormine2'] = true, - ['cormine3'] = true, - ['armfmine3'] = true, - ['corfmine3'] = true, - ['legmine1'] = true, - ['legmine2'] = true, - ['legmine3'] = true, + armarad = true, + armaser = true, + armason = true, + armfrad = true, + armjam = true, + armjamt = true, + armmark = true, + armrad = true, + armseer = true, + armsjam = true, + armsonar = true, + armveil = true, + corarad = true, + corason = true, + coreter = true, + corfrad = true, + corjamt = true, + corrad = true, + corshroud = true, + corsjam = true, + corsonar = true, + corspec = true, + corvoyr = true, + corvrad = true, + + coreyes = true, + armeyes = true, + armmine1 = true, + armmine2 = true, + armmine3 = true, + cormine1 = true, + cormine2 = true, + cormine3 = true, + armfmine3 = true, + corfmine3 = true, + legmine1 = true, + legmine2 = true, + legmine3 = true, } @@ -92,20 +92,20 @@ local stunDuration = Spring.GetModOptions().emprework and 32 or 30 local toTarpitUnitsNames = { - ['corak'] = true, - ['armpw'] = true, - ['leggob'] = true, + corak = true, + armpw = true, + leggob = true, } local todenyUnitsNames = { - ['corfav'] = true, - ['armfav'] = true, - ['armflea'] = true, - ['raptor_land_swarmer_brood_t2_v1'] = true, - ['raptor_land_kamikaze_basic_t2_v1'] = true, - ['raptor_land_kamikaze_emp_t2_v1'] = true, - ['raptor_land_kamikaze_basic_t4_v1'] = true, - ['raptor_land_kamikaze_emp_t4_v1'] = true, + corfav = true, + armfav = true, + armflea = true, + raptor_land_swarmer_brood_t2_v1 = true, + raptor_land_kamikaze_basic_t2_v1 = true, + raptor_land_kamikaze_emp_t2_v1 = true, + raptor_land_kamikaze_basic_t4_v1 = true, + raptor_land_kamikaze_emp_t4_v1 = true, } @@ -188,12 +188,12 @@ local todenyUnitsNames = { -- kill appropriate things from initial juno blast -- local junoWeaponsNames = { - ["armjuno_juno_pulse"] = true, - ["corjuno_juno_pulse"] = true, - ["legjuno_juno_pulse"] = true, - ["armjuno_scav_juno_pulse"] = true, - ["corjuno_scav_juno_pulse"] = true, - ["legjuno_scav_juno_pulse"] = true, + armjuno_juno_pulse = true, + corjuno_juno_pulse = true, + legjuno_juno_pulse = true, + armjuno_scav_juno_pulse = true, + corjuno_scav_juno_pulse = true, + legjuno_scav_juno_pulse = true, } -- convert unitname -> unitDefID local junoWeapons = {} @@ -326,7 +326,7 @@ local todenyUnitsNames = { local health, maxHealth, paralyzeDamage, capture, build = Spring.GetUnitHealth(unitID) --Spring.Echo(paralyzeDamage, maxHealth*1.2) if (paralyzeDamage < maxHealth*1.2) then--try to prevent excessive stun times, also needless restuns - Spring.AddUnitDamage (unitID, maxHealth*2, 5, 99, WeaponDefNames["corjuno_juno_pulse_ghost"].id)---...close enough? + Spring.AddUnitDamage (unitID, maxHealth*2, 5, 99, WeaponDefNames.corjuno_juno_pulse_ghost .id)---...close enough? Spring.SpawnCEG("juno-damage", px, py + 8, pz, 0, 1, 0) end diff --git a/luarules/gadgets/unit_lightning_splash_dmg.lua b/luarules/gadgets/unit_lightning_splash_dmg.lua index b87b0a8d239..93b5517df9d 100644 --- a/luarules/gadgets/unit_lightning_splash_dmg.lua +++ b/luarules/gadgets/unit_lightning_splash_dmg.lua @@ -19,7 +19,7 @@ end -- Options here local terminal_spark_effect = "genericshellexplosion-splash-lightning" -- can refactor into sparkWeapons if per-unit effects defined by customParams are desired -local visual_chain_weapon = WeaponDefNames["lightning_chain"].id -- can refactor into sparkWeapons if per-unit effects defined by customParams are desired +local visual_chain_weapon = WeaponDefNames.lightning_chain .id -- can refactor into sparkWeapons if per-unit effects defined by customParams are desired local spGetUnitsInSphere = Spring.GetUnitsInSphere local spGetUnitDefID = Spring.GetUnitDefID @@ -157,7 +157,7 @@ function gadget:ProjectileDestroyed(proID) projectileCacheTable['end'][3] = ez -- NB: Lightning sparks have no team/owner. So are not subject to LOS (natural force). But they give no credit for damage (stats, xp, etc). - spSpawnProjectile(lightning.weaponDefID, {["pos"]={lightning.x,lightning.y,lightning.z},["end"] = {ex,ey,ez}, ["ttl"] = 2, ["owner"] = -1}) + spSpawnProjectile(lightning.weaponDefID, {pos={lightning.x,lightning.y,lightning.z},["end"] = {ex,ey,ez}, ttl = 2, owner = -1}) count = count - 1 -- spark target count accounting end end @@ -189,7 +189,7 @@ function gadget:ProjectileDestroyed(proID) projectileCacheTable['end'][2] = height2 projectileCacheTable['end'][3] = newz --spSpawnProjectile(visual_chain_weapon, projectileCacheTable) - spSpawnProjectile(visual_chain_weapon, {["pos"]={lightning.x,height1,lightning.z},["end"] = {newx,height2,newz}, ["ttl"] = 2, ["owner"] = -1}) + spSpawnProjectile(visual_chain_weapon, {pos={lightning.x,height1,lightning.z},["end"] = {newx,height2,newz}, ttl = 2, owner = -1}) spSpawnCEG(terminal_spark_effect,newx,height2,newz,0,0,0) end diff --git a/luarules/gadgets/unit_prevent_unload_hax.lua b/luarules/gadgets/unit_prevent_unload_hax.lua index 12d75e8adcb..8fd4e1b12cc 100644 --- a/luarules/gadgets/unit_prevent_unload_hax.lua +++ b/luarules/gadgets/unit_prevent_unload_hax.lua @@ -50,7 +50,7 @@ function gadget:UnitUnloaded(unitID, unitDefID, teamID, transportID) local px,py,pz = Spring.GetUnitPosition(unitID) local dx,dy,dz = Spring.GetUnitDirection(unitID) local frame = SpGetGameFrame() + frameMargin - unloadedUnits[unitID] = {["px"]=px,["py"]=py,["pz"]=pz,["dx"]=dx,["dy"]=dy,["dz"]=dz,["frame"]=frame} + unloadedUnits[unitID] = {px=px,py=py,pz=pz,dx=dx,dy=dy,dz=dz,frame=frame} SpSetUnitVelocity(unitID, 0,0,0) end diff --git a/luarules/gadgets/unit_reverse_move.lua b/luarules/gadgets/unit_reverse_move.lua index 40236cd0193..cc6e442cd92 100644 --- a/luarules/gadgets/unit_reverse_move.lua +++ b/luarules/gadgets/unit_reverse_move.lua @@ -78,7 +78,7 @@ end function gadget:GameFrame(f) for unitID, unitDefID in pairs(refreshList) do local cmd = spGetUnitCommands(unitID, 1) - if cmd and cmd[1] and cmd[1]["options"] and cmd[1]["options"].ctrl then + if cmd and cmd[1] and cmd[1].options and cmd[1].options .ctrl then Spring.MoveCtrl.SetGroundMoveTypeData(unitID, "maxSpeed", unitRspeed[unitDefID]) Spring.MoveCtrl.SetGroundMoveTypeData(unitID, "maxReverseSpeed", unitRspeed[unitDefID]) else diff --git a/luarules/gadgets/unit_script.lua b/luarules/gadgets/unit_script.lua index d6866395fa3..383b38efdfa 100644 --- a/luarules/gadgets/unit_script.lua +++ b/luarules/gadgets/unit_script.lua @@ -615,7 +615,7 @@ local StartThread = Spring.UnitScript.StartThread local function Wrap_AimWeapon(unitID, callins) - local AimWeapon = callins["AimWeapon"] + local AimWeapon = callins.AimWeapon if (not AimWeapon) then return end -- SetUnitShieldState wants true or false, while @@ -635,14 +635,14 @@ local function Wrap_AimWeapon(unitID, callins) return sp_SetUnitWeaponState(unitID, weaponNum, "aimReady", fAimReady) end - callins["AimWeapon"] = function(weaponNum, heading, pitch) + callins.AimWeapon = function(weaponNum, heading, pitch) return StartThread(AimWeaponThread, weaponNum, heading, pitch) end end local function Wrap_AimShield(unitID, callins) - local AimShield = callins["AimShield"] + local AimShield = callins.AimShield if (not AimShield) then return end -- SetUnitShieldState wants true or false, while @@ -653,14 +653,14 @@ local function Wrap_AimShield(unitID, callins) return sp_SetUnitShieldState(unitID, weaponNum, enabled) end - callins["AimShield"] = function(weaponNum) + callins.AimShield = function(weaponNum) return StartThread(AimShieldThread, weaponNum) end end local function Wrap_Killed(unitID, callins) - local Killed = callins["Killed"] + local Killed = callins.Killed if (not Killed) then return end local function KilledThread(recentDamage, maxHealth) @@ -670,7 +670,7 @@ local function Wrap_Killed(unitID, callins) sp_SetDeathScriptFinished(wreckLevel) end - callins["Killed"] = function(recentDamage, maxHealth) + callins.Killed = function(recentDamage, maxHealth) StartThread(KilledThread, recentDamage, maxHealth) return -- no return value signals Spring to wait for SetDeathScriptFinished call. end diff --git a/luarules/gadgets/unit_target_on_the_move.lua b/luarules/gadgets/unit_target_on_the_move.lua index 7d6a1e5b63a..5dbeb08cfc5 100644 --- a/luarules/gadgets/unit_target_on_the_move.lua +++ b/luarules/gadgets/unit_target_on_the_move.lua @@ -472,7 +472,7 @@ if gadgetHandler:IsSyncedCode() then optionKeys[optionKeysCount] = optionName end end - if not cmdOptions["shift"] and unitTargets[unitID] then + if not cmdOptions.shift and unitTargets[unitID] then -- Need to clear orders if not in shift, since just sending the first one -- as not-shift would sometimes fail if that unit is in the end not valid. orders[1] = {CMD_UNIT_CANCEL_TARGET, {}, {}} diff --git a/luarules/gadgets/unit_xmas.lua b/luarules/gadgets/unit_xmas.lua index 66e5b95f80e..6be5ef656af 100644 --- a/luarules/gadgets/unit_xmas.lua +++ b/luarules/gadgets/unit_xmas.lua @@ -1,4 +1,4 @@ -if not Spring.Utilities.Gametype.GetCurrentHolidays()["xmas"] then +if not Spring.Utilities.Gametype.GetCurrentHolidays().xmas then return end @@ -90,7 +90,7 @@ local costSettings = { } local hasDecoration = {} for udefID,def in ipairs(UnitDefs) do - if not def.isAirUnit and not def.modCategories["ship"] and not def.modCategories["hover"] and not def.modCategories["underwater"] and not def.modCategories["object"] then + if not def.isAirUnit and not def.modCategories.ship and not def.modCategories.hover and not def.modCategories.underwater and not def.modCategories.object then if def.mass >= 35 then local balls = math.floor(((def.radius-13) / 7.5)) local cost = def.metalCost + (def.energyCost/100) diff --git a/luarules/mission_api/actions.lua b/luarules/mission_api/actions.lua index 99a25ea6381..3d8c85e2792 100644 --- a/luarules/mission_api/actions.lua +++ b/luarules/mission_api/actions.lua @@ -1,5 +1,5 @@ -local trackedUnits = GG['MissionAPI'].TrackedUnits -local triggers = GG['MissionAPI'].Triggers +local trackedUnits = GG.MissionAPI .TrackedUnits +local triggers = GG.MissionAPI .Triggers local function enableTrigger(triggerId) triggers[triggerId].settings.active = true diff --git a/luarules/mission_api/actions_dispatcher.lua b/luarules/mission_api/actions_dispatcher.lua index 246ff84cc2b..dd655a5f0a8 100644 --- a/luarules/mission_api/actions_dispatcher.lua +++ b/luarules/mission_api/actions_dispatcher.lua @@ -1,8 +1,8 @@ local actionsSchema = VFS.Include('luarules/mission_api/actions_schema.lua') local actionFunctions = VFS.Include('luarules/mission_api/actions.lua') local parameterSchema = actionsSchema.Parameters -local types = GG['MissionAPI'].ActionTypes -local actions = GG['MissionAPI'].Actions +local types = GG.MissionAPI .ActionTypes +local actions = GG.MissionAPI .Actions local typeMapping = { [types.EnableTrigger] = actionFunctions.EnableTrigger, diff --git a/luarules/mission_api/triggers_loader.lua b/luarules/mission_api/triggers_loader.lua index 1ac6d187122..1a440d44b2c 100644 --- a/luarules/mission_api/triggers_loader.lua +++ b/luarules/mission_api/triggers_loader.lua @@ -68,7 +68,7 @@ local function preprocessRawTriggers(rawTriggers) end local function postvalidateTriggers() - local actions = GG['MissionAPI'].Actions + local actions = GG.MissionAPI .Actions for triggerId, trigger in pairs(triggers) do for _, actionId in pairs(trigger.actions) do if not actions[actionId] then diff --git a/luaui/Include/blueprint_substitution/reports.lua b/luaui/Include/blueprint_substitution/reports.lua index 1f4c95ce31c..1328460e1ba 100644 --- a/luaui/Include/blueprint_substitution/reports.lua +++ b/luaui/Include/blueprint_substitution/reports.lua @@ -65,7 +65,7 @@ function REPORTS.generateMappingReport() sideTotals = { [SIDES.ARMADA]=0, [SIDES.CORTEX]=0, [SIDES.LEGION]=0 } sideComplete = { [SIDES.ARMADA]=0, [SIDES.CORTEX]=0, [SIDES.LEGION]=0 } - uncategorizedUnits = { [SIDES.ARMADA]={}, [SIDES.CORTEX]={}, [SIDES.LEGION]={}, ["UNKNOWN"]={} } + uncategorizedUnits = { [SIDES.ARMADA]={}, [SIDES.CORTEX]={}, [SIDES.LEGION]={}, UNKNOWN={} } -- Iterate the minimal data, but fetch details from UnitDefs for unitNameLower, buildingCoreData in pairs(masterBuildingDataMinimal) do @@ -126,7 +126,7 @@ function REPORTS.generateMappingReport() table.insert(uncategorizedUnits[side], reportLine) end else - table.insert(uncategorizedUnits["UNKNOWN"], reportLine) + table.insert(uncategorizedUnits.UNKNOWN , reportLine) end else Spring.Log("BlueprintReports", "warning", "[Mapping Report] Could not find UnitDef for ID: " .. tostring(buildingCoreData.unitDefID) .. " Name: " .. unitNameLower); @@ -139,7 +139,7 @@ function REPORTS.generateMappingReport() local percentage = total > 0 and (complete / total * 100) or 0 table.insert(reportLines, string.format("[Mapping Report Summary] %s: %d / %d buildings categorized (%.2f%%)", side, complete, total, percentage)) end - local unknownCount = #uncategorizedUnits["UNKNOWN"] + local unknownCount = #uncategorizedUnits.UNKNOWN if unknownCount > 0 then table.insert(reportLines, string.format("[Mapping Report Summary] Buildings with UNKNOWN side: %d", unknownCount)) end diff --git a/luaui/Include/select_api.lua b/luaui/Include/select_api.lua index ece8370956f..37031189f34 100644 --- a/luaui/Include/select_api.lua +++ b/luaui/Include/select_api.lua @@ -4,8 +4,8 @@ --- @field getCommand fun(cmd: string): any local SelectApi = {} -local defaultdamagetag = Game.armorTypes['default'] -local vtoldamagetag = Game.armorTypes['vtol'] +local defaultdamagetag = Game.armorTypes.default +local vtoldamagetag = Game.armorTypes.vtol local spGetUnitIsCloaked = Spring.GetUnitIsCloaked local spGetUnitCommands = Spring.GetUnitCommands @@ -89,7 +89,7 @@ end local function checkCmd(uid, cmdId, indexTemp) local index = indexTemp or 1 local cmd = spGetUnitCommands(uid, index) - if cmd and cmd[index] and cmd[index]["id"] == cmdId then + if cmd and cmd[index] and cmd[index].id == cmdId then return true end return false diff --git a/luaui/RmlWidgets/gui_quick_start/gui_quick_start.lua b/luaui/RmlWidgets/gui_quick_start/gui_quick_start.lua index b2debde4f09..cd226346820 100644 --- a/luaui/RmlWidgets/gui_quick_start/gui_quick_start.lua +++ b/luaui/RmlWidgets/gui_quick_start/gui_quick_start.lua @@ -769,12 +769,12 @@ function widget:Initialize() widgetState.document = document document:Show() - wgBuildMenu = WG['buildmenu'] - wgGridMenu = WG['gridmenu'] - wgTopbar = WG['topbar'] + wgBuildMenu = WG.buildmenu + wgGridMenu = WG.gridmenu + wgTopbar = WG.topbar wgPregameBuild = WG['pregame-build'] - wgPregameUI = WG['pregameui'] - wgPregameUIDraft = WG['pregameui_draft'] + wgPregameUI = WG.pregameui + wgPregameUIDraft = WG.pregameui_draft wgGetBuildQueueFunc = wgPregameBuild and wgPregameBuild.getBuildQueue wgGetBuildPositionsFunc = wgPregameBuild and wgPregameBuild.getBuildPositions wgGetPregameUnitSelectedFunc = function() return WG['pregame-unit-selected'] or -1 end @@ -803,8 +803,8 @@ function widget:Initialize() wgTopbar.setResourceBarsVisible(false) end - WG["getBuildQueueSpawnStatus"] = getBuildQueueSpawnStatus - WG["quick_start_updateSpawnPositions"] = updateSpawnPositions + WG.getBuildQueueSpawnStatus = getBuildQueueSpawnStatus + WG.quick_start_updateSpawnPositions = updateSpawnPositions for id, def in pairs(UnitDefs) do if def.isFactory then @@ -824,8 +824,8 @@ function widget:Shutdown() wgTopbar.setResourceBarsVisible(true) end - WG["getBuildQueueSpawnStatus"] = nil - WG["quick_start_updateSpawnPositions"] = nil + WG.getBuildQueueSpawnStatus = nil + WG.quick_start_updateSpawnPositions = nil if wgBuildMenu and wgBuildMenu.clearCostOverrides then wgBuildMenu.clearCostOverrides() diff --git a/luaui/RmlWidgets/gui_territorial_domination/gui_territorial_domination.lua b/luaui/RmlWidgets/gui_territorial_domination/gui_territorial_domination.lua index 42862b6ba41..7f1d8ec8579 100644 --- a/luaui/RmlWidgets/gui_territorial_domination/gui_territorial_domination.lua +++ b/luaui/RmlWidgets/gui_territorial_domination/gui_territorial_domination.lua @@ -475,17 +475,17 @@ local function calculateUILayout() local tdRootElement = widgetState.document:GetElementById("td-root") if not tdRootElement then return end - local advPlayerListAPI = WG['advplayerlist_api'] + local advPlayerListAPI = WG.advplayerlist_api local topElement = nil - if WG['playertv'] and WG['playertv'].GetPosition and (WG['playertv'].isActive == nil or WG['playertv'].isActive()) then - topElement = WG['playertv'] - elseif WG['displayinfo'] and WG['displayinfo'].GetPosition then - topElement = WG['displayinfo'] - elseif WG['unittotals'] and WG['unittotals'].GetPosition then - topElement = WG['unittotals'] - elseif WG['music'] and WG['music'].GetPosition then - topElement = WG['music'] + if WG.playertv and WG.playertv .GetPosition and (WG.playertv .isActive == nil or WG.playertv .isActive()) then + topElement = WG.playertv + elseif WG.displayinfo and WG.displayinfo .GetPosition then + topElement = WG.displayinfo + elseif WG.unittotals and WG.unittotals .GetPosition then + topElement = WG.unittotals + elseif WG.music and WG.music .GetPosition then + topElement = WG.music elseif advPlayerListAPI and advPlayerListAPI.GetPosition then topElement = advPlayerListAPI end @@ -983,12 +983,12 @@ local function updatePlayerDisplay() if isNowInLead ~= widgetState.lastWasInLead then if isNowInLead then - if WG['notifications'] and WG['notifications'].addEvent then - WG['notifications'].addEvent('TerritorialDomination/GainedLead', false) + if WG.notifications and WG.notifications .addEvent then + WG.notifications .addEvent('TerritorialDomination/GainedLead', false) end else - if WG['notifications'] and WG['notifications'].addEvent then - WG['notifications'].addEvent('TerritorialDomination/LostLead', false) + if WG.notifications and WG.notifications .addEvent then + WG.notifications .addEvent('TerritorialDomination/LostLead', false) end end widgetState.lastWasInLead = isNowInLead diff --git a/luaui/Tests/cmd_blueprint/test_cmd_blueprint_line.lua b/luaui/Tests/cmd_blueprint/test_cmd_blueprint_line.lua index 90acdaf2afa..aaa951ed615 100644 --- a/luaui/Tests/cmd_blueprint/test_cmd_blueprint_line.lua +++ b/luaui/Tests/cmd_blueprint/test_cmd_blueprint_line.lua @@ -44,7 +44,7 @@ function test() local x, z = Game.mapSizeX / 2, Game.mapSizeZ / 2 local y = Spring.GetGroundHeight(x, z) local facing = 1 - local bpW, bpH = WG["api_blueprint"].getBuildingDimensions(blueprintUnitDefID, facing) + local bpW, bpH = WG.api_blueprint .getBuildingDimensions(blueprintUnitDefID, facing) local bpCount = 5 diff --git a/luaui/Tests/mex-building/pregame_mex_queue.lua b/luaui/Tests/mex-building/pregame_mex_queue.lua index 30668834fa8..085c7f402cf 100644 --- a/luaui/Tests/mex-building/pregame_mex_queue.lua +++ b/luaui/Tests/mex-building/pregame_mex_queue.lua @@ -36,8 +36,8 @@ end -- tests both pregame mex snap behavior, as well as basic queue and blueprint handling function test() - local mexUnitDefId = UnitDefNames["armmex"].id - local metalSpots = WG['resource_spot_finder'].metalSpotsList + local mexUnitDefId = UnitDefNames.armmex .id + local metalSpots = WG.resource_spot_finder .metalSpotsList local midX, midZ = Game.mapSizeX / 2, Game.mapSizeZ / 2 local targetMex = nil diff --git a/luaui/Tests/mex-building/pregame_mex_snap.lua b/luaui/Tests/mex-building/pregame_mex_snap.lua index d2d573cb12b..52ca3a6ced1 100644 --- a/luaui/Tests/mex-building/pregame_mex_snap.lua +++ b/luaui/Tests/mex-building/pregame_mex_snap.lua @@ -34,8 +34,8 @@ function cleanup() end function test() - mexUnitDefId = UnitDefNames["armmex"].id - metalSpots = WG['resource_spot_finder'].metalSpotsList + mexUnitDefId = UnitDefNames.armmex .id + metalSpots = WG.resource_spot_finder .metalSpotsList midX, midZ = Game.mapSizeX / 2, Game.mapSizeZ / 2 targetMex = nil diff --git a/luaui/Tests/weapondefs/test_flighttime.lua b/luaui/Tests/weapondefs/test_flighttime.lua index 78a48953776..996b6a2e9cc 100644 --- a/luaui/Tests/weapondefs/test_flighttime.lua +++ b/luaui/Tests/weapondefs/test_flighttime.lua @@ -75,14 +75,14 @@ function runDistanceTest(flightTime, shouldAlive) Test.waitFrames(1) - Spring.GiveOrderToUnit(unitNames["corbuzz"], CMD.ATTACK, {unitNames["armsolar"]}, 0) - Spring.GiveOrderToUnit(unitNames["corstorm"], CMD.ATTACK, {unitNames["armpw"]}, 0) - Spring.GiveOrderToUnit(unitNames["armrock"], CMD.ATTACK, {unitNames["armpw"]}, 0) + Spring.GiveOrderToUnit(unitNames.corbuzz , CMD.ATTACK, {unitNames.armsolar }, 0) + Spring.GiveOrderToUnit(unitNames.corstorm , CMD.ATTACK, {unitNames.armpw }, 0) + Spring.GiveOrderToUnit(unitNames.armrock , CMD.ATTACK, {unitNames.armpw }, 0) Test.waitFrames(300) - local isAlive = Spring.ValidUnitID(unitNames["armsolar"]) - local isAlive2 = Spring.ValidUnitID(unitNames["armpw"]) + local isAlive = Spring.ValidUnitID(unitNames.armsolar ) + local isAlive2 = Spring.ValidUnitID(unitNames.armpw ) assert(isAlive == shouldAlive) assert(isAlive2 == shouldAlive) diff --git a/luaui/Widgets/__defs_write.lua b/luaui/Widgets/__defs_write.lua index f88ee6a19dd..82664b50365 100644 --- a/luaui/Widgets/__defs_write.lua +++ b/luaui/Widgets/__defs_write.lua @@ -82,16 +82,16 @@ local spEcho = Spring.Echo local keyTypes = { - ['string'] = true, - ['number'] = true, - ['boolean'] = true, + string = true, + number = true, + boolean = true, } local valueTypes = { - ['string'] = true, - ['number'] = true, - ['boolean'] = true, - ['table'] = true, + string = true, + number = true, + boolean = true, + table = true, } diff --git a/luaui/Widgets/ai_ruins_blueprint_generator.lua b/luaui/Widgets/ai_ruins_blueprint_generator.lua index 12ab9eb0066..c3bcf4968a3 100644 --- a/luaui/Widgets/ai_ruins_blueprint_generator.lua +++ b/luaui/Widgets/ai_ruins_blueprint_generator.lua @@ -61,32 +61,32 @@ end local unitOverrides = { -- Armada Walls - ["armdrag"] = "BPWallOrPopup('arm', 1, 'land')", - ["armclaw"] = "BPWallOrPopup('arm', 1, 'land')", - ["armfdrag"] = "BPWallOrPopup('arm', 1, 'sea')", - ["armfort"] = "BPWallOrPopup('arm', 2, 'land')", - ["armlwall"] = "BPWallOrPopup('arm', 2, 'land')", + armdrag = "BPWallOrPopup('arm', 1, 'land')", + armclaw = "BPWallOrPopup('arm', 1, 'land')", + armfdrag = "BPWallOrPopup('arm', 1, 'sea')", + armfort = "BPWallOrPopup('arm', 2, 'land')", + armlwall = "BPWallOrPopup('arm', 2, 'land')", -- Cortex Walls - ["cordrag"] = "BPWallOrPopup('cor', 1, 'land')", - ["cormaw"] = "BPWallOrPopup('cor', 1, 'land')", - ["corfdrag"] = "BPWallOrPopup('cor', 1, 'sea')", - ["corfort"] = "BPWallOrPopup('cor', 2, 'land')", - ["cormwall"] = "BPWallOrPopup('cor', 2, 'land')", + cordrag = "BPWallOrPopup('cor', 1, 'land')", + cormaw = "BPWallOrPopup('cor', 1, 'land')", + corfdrag = "BPWallOrPopup('cor', 1, 'sea')", + corfort = "BPWallOrPopup('cor', 2, 'land')", + cormwall = "BPWallOrPopup('cor', 2, 'land')", -- Legion Walls - ["legdrag"] = "BPWallOrPopup('leg', 1, 'land')", - ["legdtr"] = "BPWallOrPopup('leg', 1, 'land')", - ["legfdrag"] = "BPWallOrPopup('leg', 1, 'sea')", - ["legforti"] = "BPWallOrPopup('leg', 2, 'land')", - ["legrwall"] = "BPWallOrPopup('leg', 2, 'land')", + legdrag = "BPWallOrPopup('leg', 1, 'land')", + legdtr = "BPWallOrPopup('leg', 1, 'land')", + legfdrag = "BPWallOrPopup('leg', 1, 'sea')", + legforti = "BPWallOrPopup('leg', 2, 'land')", + legrwall = "BPWallOrPopup('leg', 2, 'land')", -- Scavenger Walls - ["corscavdrag"] = "BPWallOrPopup('scav', 1, 'land')", - ["corscavdtf"] = "BPWallOrPopup('scav', 1, 'land')", - ["corscavdtl"] = "BPWallOrPopup('scav', 1, 'land')", - ["corscavdtm"] = "BPWallOrPopup('scav', 1, 'land')", - ["corscavfort"] = "BPWallOrPopup('scav', 1, 'land')", + corscavdrag = "BPWallOrPopup('scav', 1, 'land')", + corscavdtf = "BPWallOrPopup('scav', 1, 'land')", + corscavdtl = "BPWallOrPopup('scav', 1, 'land')", + corscavdtm = "BPWallOrPopup('scav', 1, 'land')", + corscavfort = "BPWallOrPopup('scav', 1, 'land')", } local function generateCode(type) diff --git a/luaui/Widgets/api_blueprint.lua b/luaui/Widgets/api_blueprint.lua index ad6ecf29bb5..2004dbb512d 100644 --- a/luaui/Widgets/api_blueprint.lua +++ b/luaui/Widgets/api_blueprint.lua @@ -828,7 +828,7 @@ local function createBlueprintFromSerialized(serializedBlueprint) for _, serializedUnit in ipairs(serializedBlueprint.units) do local unitDefID = UnitDefNames[serializedUnit.unitName] and UnitDefNames[serializedUnit.unitName].id tableInsert(result.units, { - blueprintUnitID = WG['cmd_blueprint'].nextBlueprintUnitID(), + blueprintUnitID = WG.cmd_blueprint .nextBlueprintUnitID(), position = serializedUnit.position, facing = serializedUnit.facing, unitDefID = unitDefID, @@ -872,7 +872,7 @@ function widget:Initialize() Spring.Log("BlueprintAPI", LOG.INFO, "Reports are DISABLED.") end - WG["api_blueprint"] = { + WG.api_blueprint = { getActiveBlueprint = function() return activeBlueprint end, setActiveBlueprint = setActiveBlueprint, setActiveBuilders = setActiveBuilders, @@ -899,7 +899,7 @@ function widget:Initialize() end function widget:Shutdown() - WG["api_blueprint"] = nil + WG.api_blueprint = nil Spring.Log(widget:GetInfo().name, LOG.INFO, "Blueprint API shutdown.") if isHeadless then return end diff --git a/luaui/Widgets/api_los_combiner_gl4.lua b/luaui/Widgets/api_los_combiner_gl4.lua index e04780f7510..54a2ab31777 100644 --- a/luaui/Widgets/api_los_combiner_gl4.lua +++ b/luaui/Widgets/api_los_combiner_gl4.lua @@ -217,16 +217,16 @@ function widget:Initialize() fullScreenQuadVAO = InstanceVBOTable.MakeTexRectVAO()-- -1, -1, 1, 0, 0,0,1, 0.5 - WG['api_los_combiner'] = {} - WG['api_los_combiner'].GetInfoLOSTexture = GetInfoLOSTexture - widgetHandler:RegisterGlobal('GetInfoLOSTexture', WG['api_los_combiner'].GetInfoLOSTexture) + WG.api_los_combiner = {} + WG.api_los_combiner .GetInfoLOSTexture = GetInfoLOSTexture + widgetHandler:RegisterGlobal('GetInfoLOSTexture', WG.api_los_combiner .GetInfoLOSTexture) end function widget:Shutdown() for i, infoTexture in pairs(infoTextures) do gl.DeleteTexture(infoTexture) end - WG['api_los_combiner'] = nil + WG.api_los_combiner = nil widgetHandler:DeregisterGlobal('GetInfoLOSTexture') end @@ -267,7 +267,7 @@ if autoreload then gl.Text(tostring(currentAllyTeam), shaderConfig.TEXX, shaderConfig.TEXY,16) gl.Texture(0,"$info:los") - gl.TexRect(texX, 0, texX + shaderConfig['LOSXSIZE'], shaderConfig['LOSYSIZE'], 0, 1, 1, 0) + gl.TexRect(texX, 0, texX + shaderConfig.LOSXSIZE , shaderConfig.LOSYSIZE , 0, 1, 1, 0) gl.Texture(0,false) gl.Blending(GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA) diff --git a/luaui/Widgets/api_object_spotlight.lua b/luaui/Widgets/api_object_spotlight.lua index 6cfd9e04bb5..20d5590122c 100644 --- a/luaui/Widgets/api_object_spotlight.lua +++ b/luaui/Widgets/api_object_spotlight.lua @@ -457,16 +457,16 @@ local function removeAllSpotlights(owner) end function widget:UnitDestroyed(unitID, unitDefID, unitTeam, attackerID, attackerDefID, attackerTeam) - if objectOwners["unit"][unitID] then - for owner in pairs(objectOwners["unit"][unitID]) do + if objectOwners.unit [unitID] then + for owner in pairs(objectOwners.unit [unitID]) do removeSpotlight("unit", owner, unitID) end end end function widget:FeatureDestroyed(featureID, allyTeamID) - if objectOwners["feature"][featureID] then - for owner in pairs(objectOwners["feature"][featureID]) do + if objectOwners.feature [featureID] then + for owner in pairs(objectOwners.feature [featureID]) do removeSpotlight("feature", owner, featureID) end end @@ -530,7 +530,7 @@ function widget:Initialize() return end - WG["ObjectSpotlight"] = { + WG.ObjectSpotlight = { ---Adds a new spotlight for a given object. Only one call is needed to create the spotlight (the position is handled in ---the shader), but this can be called again to update extra options. Unless a duration is provided, calling ---removeSpotlight later is necessary to remove the spotlight. @@ -578,5 +578,5 @@ function widget:Shutdown() shader:Finalize() end - WG["ObjectSpotlight"] = nil + WG.ObjectSpotlight = nil end diff --git a/luaui/Widgets/api_resource_spot_builder.lua b/luaui/Widgets/api_resource_spot_builder.lua index 1fd0cc4bba9..74e733cf9ce 100644 --- a/luaui/Widgets/api_resource_spot_builder.lua +++ b/luaui/Widgets/api_resource_spot_builder.lua @@ -385,7 +385,7 @@ local function PreviewExtractorCommand(params, extractor, spot, metalMap) targetPos = { x=occupiedPos[1], y=occupiedPos[2], z=occupiedPos[3] } targetOwner = spGetUnitTeam(occupiedSpot) -- because gadget "Mex Upgrade Reclaimer" will share a t2 mex build upon ally t1 mex else - local buildingPositions = WG['resource_spot_finder'].GetBuildingPositions(spot, -buildingId, 0, true) + local buildingPositions = WG.resource_spot_finder .GetBuildingPositions(spot, -buildingId, 0, true) targetPos = math.getClosestPosition(cmdX, cmdZ, buildingPositions) targetOwner = spGetMyTeamID() end @@ -487,32 +487,32 @@ function widget:Initialize() end --make interfaces available to other widgets: - WG['resource_spot_builder'] = { } - WG['resource_spot_builder'].ExtractorCanBeBuiltOnSpot = extractorCanBeBuiltOnSpot - WG['resource_spot_builder'].ExtractorCanBeUpgraded = extractorCanBeUpgraded - WG['resource_spot_builder'].FindNearestValidSpotForExtractor = findNearestValidSpotForExtractor - WG['resource_spot_builder'].PreviewExtractorCommand = PreviewExtractorCommand - WG['resource_spot_builder'].ApplyPreviewCmds = ApplyPreviewCmds - WG['resource_spot_builder'].SpotHasExtractorQueued = spotHasExtractorQueued - WG['resource_spot_builder'].GetBestExtractorFromBuilders = getBestExtractorFromBuilders + WG.resource_spot_builder = { } + WG.resource_spot_builder .ExtractorCanBeBuiltOnSpot = extractorCanBeBuiltOnSpot + WG.resource_spot_builder .ExtractorCanBeUpgraded = extractorCanBeUpgraded + WG.resource_spot_builder .FindNearestValidSpotForExtractor = findNearestValidSpotForExtractor + WG.resource_spot_builder .PreviewExtractorCommand = PreviewExtractorCommand + WG.resource_spot_builder .ApplyPreviewCmds = ApplyPreviewCmds + WG.resource_spot_builder .SpotHasExtractorQueued = spotHasExtractorQueued + WG.resource_spot_builder .GetBestExtractorFromBuilders = getBestExtractorFromBuilders ---------------------------------------------- -- builders and buildings - MEX ---------------------------------------------- - WG['resource_spot_builder'].GetMexConstructors = function() + WG.resource_spot_builder .GetMexConstructors = function() return mexConstructors end - WG['resource_spot_builder'].GetMexBuildings = function() + WG.resource_spot_builder .GetMexBuildings = function() return mexBuildings end - WG['resource_spot_builder'].GetGeoConstructors = function() + WG.resource_spot_builder .GetGeoConstructors = function() return geoConstructors end - WG['resource_spot_builder'].GetGeoBuildings = function() + WG.resource_spot_builder .GetGeoBuildings = function() return geoBuildings end end diff --git a/luaui/Widgets/api_screencopy_manager.lua b/luaui/Widgets/api_screencopy_manager.lua index 066b568f672..fa909b3efc7 100644 --- a/luaui/Widgets/api_screencopy_manager.lua +++ b/luaui/Widgets/api_screencopy_manager.lua @@ -116,17 +116,17 @@ function widget:Initialize() return false end self:ViewResize(vsx, vsy) - WG['screencopymanager'] = {} - WG['screencopymanager'].GetScreenCopy = GetScreenCopy - WG['screencopymanager'].GetDepthCopy = GetDepthCopy - widgetHandler:RegisterGlobal('GetScreenCopy', WG['screencopymanager'].GetScreenCopy) - widgetHandler:RegisterGlobal('GetDepthCopy', WG['screencopymanager'].GetDepthCopy) + WG.screencopymanager = {} + WG.screencopymanager .GetScreenCopy = GetScreenCopy + WG.screencopymanager .GetDepthCopy = GetDepthCopy + widgetHandler:RegisterGlobal('GetScreenCopy', WG.screencopymanager .GetScreenCopy) + widgetHandler:RegisterGlobal('GetDepthCopy', WG.screencopymanager .GetDepthCopy) end function widget:Shutdown() gl.DeleteTexture(ScreenCopy or 0) gl.DeleteTexture(DepthCopy or 0) - WG['screencopymanager'] = nil + WG.screencopymanager = nil widgetHandler:DeregisterGlobal('GetScreenCopy') widgetHandler:DeregisterGlobal('GetDepthCopy') end diff --git a/luaui/Widgets/api_shared_state.lua b/luaui/Widgets/api_shared_state.lua index dc4e22363c9..174b64caf02 100644 --- a/luaui/Widgets/api_shared_state.lua +++ b/luaui/Widgets/api_shared_state.lua @@ -52,11 +52,11 @@ function widget:Initialize() state.vsx = vsx state.vsy = vsy state.isGUIHidden = spIsGUIHidden() - WG['sharedstate'] = state + WG.sharedstate = state end function widget:Shutdown() - WG['sharedstate'] = nil + WG.sharedstate = nil end function widget:PlayerChanged(playerID) diff --git a/luaui/Widgets/api_unit_tracker_gl4.lua b/luaui/Widgets/api_unit_tracker_gl4.lua index bbae88014b0..1f178b77791 100644 --- a/luaui/Widgets/api_unit_tracker_gl4.lua +++ b/luaui/Widgets/api_unit_tracker_gl4.lua @@ -589,10 +589,10 @@ local function initializeAllUnits() widget:UnitCreated(unitID, spGetUnitDefID(unitID), spGetUnitTeam(unitID), nil, "initializeAllUnits", true) -- silent is true end - WG['unittrackerapi'].visibleUnits = visibleUnits - WG['unittrackerapi'].visibleUnitsTeam = visibleUnitsTeam - WG['unittrackerapi'].alliedUnits = alliedUnits - WG['unittrackerapi'].alliedUnitsTeam = alliedUnitsTeam + WG.unittrackerapi .visibleUnits = visibleUnits + WG.unittrackerapi .visibleUnitsTeam = visibleUnitsTeam + WG.unittrackerapi .alliedUnits = alliedUnits + WG.unittrackerapi .alliedUnitsTeam = alliedUnitsTeam visibleUnitsChanged() alliedUnitsChanged() end @@ -776,11 +776,11 @@ function widget:Initialize() initGL4() end - WG['unittrackerapi'] = {} - WG['unittrackerapi'].visibleUnits = visibleUnits - WG['unittrackerapi'].visibleUnitsTeam = visibleUnitsTeam - WG['unittrackerapi'].alliedUnits = alliedUnits - WG['unittrackerapi'].alliedUnitsTeam = alliedUnitsTeam + WG.unittrackerapi = {} + WG.unittrackerapi .visibleUnits = visibleUnits + WG.unittrackerapi .visibleUnitsTeam = visibleUnitsTeam + WG.unittrackerapi .alliedUnits = alliedUnits + WG.unittrackerapi .alliedUnitsTeam = alliedUnitsTeam initializeAllUnits() widgetHandler:RegisterGlobal('GadgetCrashingAircraft1', GadgetCrashingAircraft) end @@ -840,10 +840,10 @@ function widget:Shutdown() numVisibleUnits = 0 - WG['unittrackerapi'].visibleUnits = visibleUnits - WG['unittrackerapi'].visibleUnitsTeam = visibleUnitsTeam - WG['unittrackerapi'].alliedUnits = alliedUnits - WG['unittrackerapi'].alliedUnitsTeam = alliedUnitsTeam + WG.unittrackerapi .visibleUnits = visibleUnits + WG.unittrackerapi .visibleUnitsTeam = visibleUnitsTeam + WG.unittrackerapi .alliedUnits = alliedUnits + WG.unittrackerapi .alliedUnitsTeam = alliedUnitsTeam visibleUnitsChanged() alliedUnitsChanged() diff --git a/luaui/Widgets/api_unitbufferuniform_copy.lua b/luaui/Widgets/api_unitbufferuniform_copy.lua index e6cd196066d..7e17d94bdd1 100644 --- a/luaui/Widgets/api_unitbufferuniform_copy.lua +++ b/luaui/Widgets/api_unitbufferuniform_copy.lua @@ -102,12 +102,12 @@ function widget:Initialize() if not shaderCompiled then widgetHandler:RemoveWidget() end spEcho("Hello") - WG['api_unitbufferuniform_copy'] = {} - WG['api_unitbufferuniform_copy'].GetUnitUniformBufferCopy = function() + WG.api_unitbufferuniform_copy = {} + WG.api_unitbufferuniform_copy .GetUnitUniformBufferCopy = function() copyRequested = true return UniformsBufferCopy end - widgetHandler:RegisterGlobal('GetUnitUniformBufferCopy', WG['api_unitbufferuniform_copy'].GetUnitUniformBufferCopy) + widgetHandler:RegisterGlobal('GetUnitUniformBufferCopy', WG.api_unitbufferuniform_copy .GetUnitUniformBufferCopy) end function widget:Shutdown() diff --git a/luaui/Widgets/camera_fov_changer.lua b/luaui/Widgets/camera_fov_changer.lua index 6c353a92e0e..f1e4cd0f78a 100644 --- a/luaui/Widgets/camera_fov_changer.lua +++ b/luaui/Widgets/camera_fov_changer.lua @@ -41,6 +41,6 @@ function widget:KeyRelease(key, modifier) end end spEcho('target FOV: '..current_cam_state.fov) - Spring.SetCameraState(current_cam_state, WG['options'] and WG['options'].getCameraSmoothness() or 2) + Spring.SetCameraState(current_cam_state, WG.options and WG.options .getCameraSmoothness() or 2) end end diff --git a/luaui/Widgets/camera_player_tv.lua b/luaui/Widgets/camera_player_tv.lua index d9c8a242dcf..03c1dd08707 100644 --- a/luaui/Widgets/camera_player_tv.lua +++ b/luaui/Widgets/camera_player_tv.lua @@ -304,7 +304,7 @@ local function refreshUiDrawing() end) end - if WG['guishader'] and (isSpec or lockPlayerID) then + if WG.guishader and (isSpec or lockPlayerID) then if backgroundGuishader then backgroundGuishader = gl.DeleteList(backgroundGuishader) end @@ -319,21 +319,21 @@ local function refreshUiDrawing() RectRound(toggleButton3[1], toggleButton3[2], toggleButton3[3], toggleButton3[4], elementCorner, 1, 1, 0, toggleButton3[1] < left and 1 or 0) end end) - WG['guishader'].InsertDlist(backgroundGuishader, 'playertv', true) + WG.guishader .InsertDlist(backgroundGuishader, 'playertv', true) showBackgroundGuishader = true end end local function updatePosition() local prevPos = parentPos - if WG['displayinfo'] ~= nil then - parentPos = WG['displayinfo'].GetPosition() -- returns {top,left,bottom,right,widgetScale} - elseif WG['unittotals'] ~= nil then - parentPos = WG['unittotals'].GetPosition() -- returns {top,left,bottom,right,widgetScale} - elseif WG['music'] ~= nil then - parentPos = WG['music'].GetPosition() -- returns {top,left,bottom,right,widgetScale} - elseif WG['advplayerlist_api'] ~= nil then - parentPos = WG['advplayerlist_api'].GetPosition() -- returns {top,left,bottom,right,widgetScale} + if WG.displayinfo ~= nil then + parentPos = WG.displayinfo .GetPosition() -- returns {top,left,bottom,right,widgetScale} + elseif WG.unittotals ~= nil then + parentPos = WG.unittotals .GetPosition() -- returns {top,left,bottom,right,widgetScale} + elseif WG.music ~= nil then + parentPos = WG.music .GetPosition() -- returns {top,left,bottom,right,widgetScale} + elseif WG.advplayerlist_api ~= nil then + parentPos = WG.advplayerlist_api .GetPosition() -- returns {top,left,bottom,right,widgetScale} else local scale = (vsy / 880) * (1 + (Spring.GetConfigFloat("ui_scale", 1) - 1) / 1.25) parentPos = {0,vsx-(220*scale),0,vsx,scale} @@ -447,7 +447,7 @@ function widget:Update(dt) updatePosition() -- detect guishader toggle: force refresh when it comes back on - local guishaderActive = WG['guishader'] ~= nil + local guishaderActive = WG.guishader ~= nil if guishaderActive and not guishaderWasActive then showBackgroundGuishader = nil updateDrawing = true @@ -476,8 +476,8 @@ function widget:Update(dt) end local prevRejoining = rejoining - if WG['rejoin'] then - rejoining = WG['rejoin'].showingRejoining() + if WG.rejoin then + rejoining = WG.rejoin .showingRejoining() end if isSpec and toggled and spGetGameFrame() % 30 == 5 then if rejoining and prevRejoining ~= rejoining then @@ -521,18 +521,18 @@ function widget:Update(dt) end if (isSpec or lockPlayerID) and not rejoining then - if WG['tooltip'] and not toggled and not lockPlayerID then + if WG.tooltip and not toggled and not lockPlayerID then if buttonHovered and buttonHovered == 1 then Spring.SetMouseCursor('cursornormal') - WG['tooltip'].ShowTooltip('playertv', Spring.I18N('ui.playerTV.tooltip')) + WG.tooltip .ShowTooltip('playertv', Spring.I18N('ui.playerTV.tooltip')) end if buttonHovered and buttonHovered == 2 then Spring.SetMouseCursor('cursornormal') - WG['tooltip'].ShowTooltip('playertv', Spring.I18N('ui.playerTV.playerViewTooltip')) + WG.tooltip .ShowTooltip('playertv', Spring.I18N('ui.playerTV.playerViewTooltip')) end if buttonHovered and buttonHovered == 3 then Spring.SetMouseCursor('cursornormal') - WG['tooltip'].ShowTooltip('playertv', Spring.I18N('ui.playerTV.playerCameraTooltip')) + WG.tooltip .ShowTooltip('playertv', Spring.I18N('ui.playerTV.playerCameraTooltip')) end end @@ -546,11 +546,11 @@ end local function drawContent() local gameFrame = spGetGameFrame() if (rejoining or gameFrame == 0) and not lockPlayerID then - if WG['guishader'] then - WG['guishader'].RemoveDlist('playertv') + if WG.guishader then + WG.guishader .RemoveDlist('playertv') end elseif backgroundGuishader and not showBackgroundGuishader then - WG['guishader'].InsertDlist(backgroundGuishader, 'playertv', true) + WG.guishader .InsertDlist(backgroundGuishader, 'playertv', true) showBackgroundGuishader = true end @@ -580,7 +580,7 @@ local function drawContent() end end if displayPlayername then - if WG['advplayerlist_api'] and WG.lockcamera then + if WG.advplayerlist_api and WG.lockcamera then if not lockPlayerID or lockPlayerID ~= WG.lockcamera.GetPlayerID() and nextTrackingPlayerChange-os.clock() < 0 then --nextTrackingPlayerChange = os.clock() - 2 lockPlayerID = WG.lockcamera.GetPlayerID() @@ -765,7 +765,7 @@ function widget:Initialize() if isSpec and not fullview then toggled2 = true end - if WG['advplayerlist_api'] == nil then + if WG.advplayerlist_api == nil then widgetHandler:RemoveWidget() return end @@ -789,24 +789,24 @@ function widget:Initialize() tsOrderPlayers() updatePosition() - WG['playertv'] = {} - WG['playertv'].GetPosition = function() + WG.playertv = {} + WG.playertv .GetPosition = function() return { top, left, bottom, right, widgetScale } end - WG['playertv'].isActive = function() + WG.playertv .isActive = function() return (toggled and isSpec) end - WG['playertv'].GetPlayerChangeDelay = function() + WG.playertv .GetPlayerChangeDelay = function() return playerChangeDelay end - WG['playertv'].SetPlayerChangeDelay = function(value) + WG.playertv .SetPlayerChangeDelay = function(value) playerChangeDelay = value createCountdownLists() end - WG['playertv'].GetAlwaysDisplayName = function() + WG.playertv .GetAlwaysDisplayName = function() return alwaysDisplayName end - WG['playertv'].SetAlwaysDisplayName = function(value) + WG.playertv .SetAlwaysDisplayName = function(value) alwaysDisplayName = value end @@ -850,8 +850,8 @@ function widget:ViewResize() elementCorner = WG.FlowUI.elementCorner RectRound = WG.FlowUI.Draw.RectRound - font = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2, 2, 0.2, 3) + font = WG.fonts .getFont() + font2 = WG.fonts .getFont(2, 2, 0.2, 3) for i = 1, #drawlistsCountdown do gl.DeleteList(drawlistsCountdown[i]) @@ -861,7 +861,7 @@ function widget:ViewResize() end drawlistsCountdown = {} drawlistsPlayername = {} - if WG['guishader'] and backgroundGuishader then + if WG.guishader and backgroundGuishader then if backgroundGuishader then backgroundGuishader = gl.DeleteList(backgroundGuishader) end @@ -891,8 +891,8 @@ function widget:Shutdown() end drawlistsCountdown = {} drawlistsPlayername = {} - if WG['guishader'] then - WG['guishader'].DeleteDlist('playertv') + if WG.guishader then + WG.guishader .DeleteDlist('playertv') end for i = 1, #drawlist do gl.DeleteList(drawlist[i]) diff --git a/luaui/Widgets/camera_shake.lua b/luaui/Widgets/camera_shake.lua index f924a5b7166..0714d874d0f 100644 --- a/luaui/Widgets/camera_shake.lua +++ b/luaui/Widgets/camera_shake.lua @@ -53,11 +53,11 @@ function widget:Initialize() -- (threshold uses the 1/d*d power) spSetShockFrontFactors(minArea, minPower, distAdj) - WG['camerashake'] = {} - WG['camerashake'].getStrength = function() + WG.camerashake = {} + WG.camerashake .getStrength = function() return powerScale end - WG['camerashake'].setStrength = function(value) + WG.camerashake .setStrength = function(value) powerScale = mathFloor(value) if powerScale <= 0 then minPower = 0 diff --git a/luaui/Widgets/cmd_area_mex.lua b/luaui/Widgets/cmd_area_mex.lua index 7cda8f6808f..15d41f2553d 100644 --- a/luaui/Widgets/cmd_area_mex.lua +++ b/luaui/Widgets/cmd_area_mex.lua @@ -37,13 +37,13 @@ local function setAreaMexType(uDefID) end function widget:Initialize() - metalSpots = WG['resource_spot_finder'].metalSpotsList - metalMap = WG['resource_spot_finder'].isMetalMap - mexBuildings = WG["resource_spot_builder"].GetMexBuildings() - mexConstructors = WG["resource_spot_builder"].GetMexConstructors() + metalSpots = WG.resource_spot_finder .metalSpotsList + metalMap = WG.resource_spot_finder .isMetalMap + mexBuildings = WG.resource_spot_builder .GetMexBuildings() + mexConstructors = WG.resource_spot_builder .GetMexConstructors() - WG['areamex'] = {} - WG['areamex'].setAreaMexType = function(uDefID) + WG.areamex = {} + WG.areamex .setAreaMexType = function(uDefID) setAreaMexType(uDefID) end end @@ -129,10 +129,10 @@ local function getCmdsForValidSpots(spots, shift) local cmds = {} for i = 1, #spots do local spot = spots[i] - local spotHasQueue = shift and WG["resource_spot_builder"].SpotHasExtractorQueued(spot) or false + local spotHasQueue = shift and WG.resource_spot_builder .SpotHasExtractorQueued(spot) or false if not spotHasQueue then local pos = { spot.x, spot.y, spot.z } - local cmd = WG['resource_spot_builder'].PreviewExtractorCommand(pos, selectedMex, spot) + local cmd = WG.resource_spot_builder .PreviewExtractorCommand(pos, selectedMex, spot) if cmd then cmds[#cmds + 1] = cmd end @@ -182,7 +182,7 @@ function widget:CommandNotify(id, params, options) local spots = getSpotsInArea(cmdX, cmdZ, cmdRadius) if not selectedMex then - selectedMex = WG['resource_spot_builder'].GetBestExtractorFromBuilders(selectedUnits, mexConstructors, mexBuildings) + selectedMex = WG.resource_spot_builder .GetBestExtractorFromBuilders(selectedUnits, mexConstructors, mexBuildings) end local alt, ctrl, meta, shift = Spring.GetModKeyState() @@ -190,12 +190,12 @@ function widget:CommandNotify(id, params, options) local sortedCmds = calculateCmdOrder(cmds, spots, shift) - WG['resource_spot_builder'].ApplyPreviewCmds(sortedCmds, mexConstructors, shift) + WG.resource_spot_builder .ApplyPreviewCmds(sortedCmds, mexConstructors, shift) selectedMex = nil if not options.shift then - if WG["gridmenu"] then WG["gridmenu"].clearCategory() end + if WG.gridmenu then WG.gridmenu .clearCategory() end end return true end @@ -235,7 +235,7 @@ function widget:CommandsChanged() if selectedUnits and #selectedUnits > 0 then local customCommands = widgetHandler.customCommands for i = 1, #selectedUnits do - if WG['resource_spot_builder'] and WG['resource_spot_builder'].GetMexConstructors()[selectedUnits[i]] then + if WG.resource_spot_builder and WG.resource_spot_builder .GetMexConstructors()[selectedUnits[i]] then customCommands[#customCommands + 1] = { id = CMD_AREA_MEX, type = CMDTYPE.ICON_AREA, diff --git a/luaui/Widgets/cmd_attack_no_ally.lua b/luaui/Widgets/cmd_attack_no_ally.lua index ba5b5da9865..977979eca2f 100644 --- a/luaui/Widgets/cmd_attack_no_ally.lua +++ b/luaui/Widgets/cmd_attack_no_ally.lua @@ -45,11 +45,11 @@ local function IssueGroundCommand(cmdID, cmdOptions) end function widget:Initialize() - WG['attacknoally'] = true + WG.attacknoally = true end function widget:Shutdown() - WG['attacknoally'] = nil + WG.attacknoally = nil end -- Right mouse button function widget:MousePress(x, y, button) @@ -58,7 +58,7 @@ function widget:MousePress(x, y, button) return false end - if WG['attacknoally'] then + if WG.attacknoally then local _, activeCmdID = Spring.GetActiveCommand() if activeCmdID and hasRightClickAttack[activeCmdID] then rmbCancelPending = true diff --git a/luaui/Widgets/cmd_bar_hotkeys.lua b/luaui/Widgets/cmd_bar_hotkeys.lua index fba4e876db1..3f984b020b5 100644 --- a/luaui/Widgets/cmd_bar_hotkeys.lua +++ b/luaui/Widgets/cmd_bar_hotkeys.lua @@ -86,8 +86,8 @@ end function widget:Initialize() reloadBindings() - WG['bar_hotkeys'] = {} - WG['bar_hotkeys'].reloadBindings = reloadBindings + WG.bar_hotkeys = {} + WG.bar_hotkeys .reloadBindings = reloadBindings end function widget:Shutdown() diff --git a/luaui/Widgets/cmd_blueprint.lua b/luaui/Widgets/cmd_blueprint.lua index bd0b4e7aada..2c2d8207354 100644 --- a/luaui/Widgets/cmd_blueprint.lua +++ b/luaui/Widgets/cmd_blueprint.lua @@ -295,7 +295,7 @@ local function setSelectedBlueprintIndex(index) selectedBlueprintIndex = index if not selectedBlueprintIndex then - WG["api_blueprint"].setActiveBlueprint(nil) + WG.api_blueprint .setActiveBlueprint(nil) end if blueprintPlacementActive and index ~= nil and index > 0 then @@ -346,7 +346,7 @@ end local function getMouseWorldPosition(blueprint, x, y) local _, pos = SpringTraceScreenRay(x, y, true, true, false, not blueprint.floatOnWater) if pos then - pos = WG["api_blueprint"].snapBlueprint( + pos = WG.api_blueprint .snapBlueprint( blueprint, pos, blueprint.facing @@ -362,28 +362,28 @@ local function determineBuildMode(modKeys, targetID) local mode = nil if shift and ctrl and targetID then - mode = WG["api_blueprint"].BUILD_MODES.AROUND + mode = WG.api_blueprint .BUILD_MODES.AROUND elseif shift and state.startPosition then if alt and ctrl then - mode = WG["api_blueprint"].BUILD_MODES.BOX + mode = WG.api_blueprint .BUILD_MODES.BOX elseif alt and not ctrl then - mode = WG["api_blueprint"].BUILD_MODES.GRID + mode = WG.api_blueprint .BUILD_MODES.GRID elseif not alt and ctrl then - mode = WG["api_blueprint"].BUILD_MODES.SNAPLINE + mode = WG.api_blueprint .BUILD_MODES.SNAPLINE elseif not alt and not ctrl then - mode = WG["api_blueprint"].BUILD_MODES.LINE + mode = WG.api_blueprint .BUILD_MODES.LINE end else - mode = WG["api_blueprint"].BUILD_MODES.SINGLE + mode = WG.api_blueprint .BUILD_MODES.SINGLE end return mode end local function determineBuildModeArgs(mode, startPosition, endPosition, targetID, spacing) - if mode == WG["api_blueprint"].BUILD_MODES.AROUND then + if mode == WG.api_blueprint .BUILD_MODES.AROUND then return { targetID } - elseif mode == WG["api_blueprint"].BUILD_MODES.SINGLE then + elseif mode == WG.api_blueprint .BUILD_MODES.SINGLE then return { endPosition } else return { startPosition, endPosition, spacing } @@ -392,7 +392,7 @@ end local function postProcessBlueprint(bp) -- precompute some useful information - bp.dimensions = pack(WG["api_blueprint"].getBlueprintDimensions(bp)) + bp.dimensions = pack(WG.api_blueprint .getBlueprintDimensions(bp)) bp.floatOnWater = table.any(bp.units, function(u) return u.unitDefID and UnitDefs[u.unitDefID] and UnitDefs[u.unitDefID].floatOnWater end) @@ -400,7 +400,7 @@ local function postProcessBlueprint(bp) if not u.unitDefID then return acc end - local w, h = WG["api_blueprint"].getBuildingDimensions( + local w, h = WG.api_blueprint .getBuildingDimensions( u.unitDefID, 0 ) @@ -457,7 +457,7 @@ local function createBlueprint(unitIDs, ordered) return end - local xMin, xMax, zMin, zMax = WG["api_blueprint"].getUnitsBounds(blueprint.units) + local xMin, xMax, zMin, zMax = WG.api_blueprint .getUnitsBounds(blueprint.units) local center = { (xMin + xMax) / 2, 0, (zMin + zMax) / 2 } -- Adjust positions relative to center @@ -526,23 +526,23 @@ local function setBlueprintSpacing(spacing) end local function updateBuildingGridState(active, blueprint) - if WG['buildinggrid'] == nil then + if WG.buildinggrid == nil then return end if active then - local unitDefID = UnitDefNames["armuwms"].id + local unitDefID = UnitDefNames.armuwms .id if blueprint and blueprint.floatOnWater then -- if we have any floating units, pass a generic floating unit to buildinggrid - unitDefID = UnitDefNames["armfmkr"].id + unitDefID = UnitDefNames.armfmkr .id end - WG['buildinggrid'].setForceShow( + WG.buildinggrid .setForceShow( widget:GetInfo().name, active and blueprint ~= nil, unitDefID ) else - WG['buildinggrid'].setForceShow(widget:GetInfo().name, false) + WG.buildinggrid .setForceShow(widget:GetInfo().name, false) end end @@ -558,8 +558,8 @@ local function setBlueprintPlacementActive(active) Spring.PlaySoundFile(sounds.activateBlueprint, 0.75, "ui") else - WG["api_blueprint"].setActiveBlueprint(nil) - WG["api_blueprint"].setBlueprintPositions({}) + WG.api_blueprint .setActiveBlueprint(nil) + WG.api_blueprint .setBlueprintPositions({}) end updateBuildingGridState(active, getSelectedBlueprint()) @@ -657,7 +657,7 @@ function widget:Update(dt) state.blueprint = blueprint state.blueprint.dirty = false - WG["api_blueprint"].setActiveBlueprint(blueprint) + WG.api_blueprint .setActiveBlueprint(blueprint) updateBuildingGridState(true, blueprint) end @@ -702,14 +702,14 @@ function widget:Update(dt) end if endPositionChanged or modeChanged or targetIDChanged or blueprintChanged then - state.buildPositions = WG["api_blueprint"].calculateBuildPositions( + state.buildPositions = WG.api_blueprint .calculateBuildPositions( blueprint, state.mode, unpack(determineBuildModeArgs( state.mode, state.startPosition, state.endPosition, state.targetID, blueprint.spacing )) ) - WG["api_blueprint"].setBlueprintPositions(state.buildPositions) + WG.api_blueprint .setBlueprintPositions(state.buildPositions) end end @@ -726,15 +726,15 @@ local drawCursorText = glListCache(function(index) local hotkeys = { { name = "Next", - key = keyConfig.sanitizeKey(actionHotkeys["blueprint_next"], currentLayout), + key = keyConfig.sanitizeKey(actionHotkeys.blueprint_next , currentLayout), }, { name = "Previous", - key = keyConfig.sanitizeKey(actionHotkeys["blueprint_prev"], currentLayout), + key = keyConfig.sanitizeKey(actionHotkeys.blueprint_prev , currentLayout), }, { name = "Delete", - key = keyConfig.sanitizeKey(actionHotkeys["blueprint_delete"], currentLayout), + key = keyConfig.sanitizeKey(actionHotkeys.blueprint_delete , currentLayout), }, } @@ -788,7 +788,7 @@ function widget:SelectionChanged(selection) end ) - WG["api_blueprint"].setActiveBuilders(builders) + WG.api_blueprint .setActiveBuilders(builders) end -- track selection order (skip if we're still box selecting) @@ -930,7 +930,7 @@ local function handleSpacingAction(_, _, args) local minSpacing = math.floor( -(mathMin(bp.dimensions[1], bp.dimensions[2]) - bp.minBuildingDimension) - / WG["api_blueprint"].BUILD_SQUARE_SIZE + / WG.api_blueprint .BUILD_SQUARE_SIZE ) local newSpacing = nil @@ -1012,7 +1012,7 @@ function widget:CommandNotify(cmdID, cmdParams, cmdOpts) handleBlueprintCreateAction() elseif cmdID == CMD_BLUEPRINT_PLACE then -- Get the blueprint data *as processed and displayed by the API* but keep the original variable name - local selectedBlueprint = WG["api_blueprint"].getActiveBlueprint() + local selectedBlueprint = WG.api_blueprint .getActiveBlueprint() if not selectedBlueprint then FeedbackForUser("[Blueprint] No active blueprint ready for placement.") @@ -1057,7 +1057,7 @@ function widget:CommandNotify(cmdID, cmdParams, cmdOpts) end local facing = pos[4] or 0 if not blueprintRotations[facing] then - blueprintRotations[facing] = WG["api_blueprint"].rotateBlueprint( + blueprintRotations[facing] = WG.api_blueprint .rotateBlueprint( selectedBlueprint, selectedBlueprint.facing + facing ) @@ -1138,7 +1138,7 @@ end ---@param serializedBlueprint SerializedBlueprint ---@return Blueprint local function deserializeBlueprint(serializedBlueprint, index) - local blueprint = WG["api_blueprint"].createBlueprintFromSerialized(serializedBlueprint) + local blueprint = WG.api_blueprint .createBlueprintFromSerialized(serializedBlueprint) if not blueprint or not table.any(blueprint.units, function(u) return u.unitDefID ~= nil end) then local name = serializedBlueprint.name @@ -1224,17 +1224,17 @@ end local loadedBlueprints = false function widget:Initialize() - if not WG["api_blueprint"] then + if not WG.api_blueprint then widgetHandler:RemoveWidget(self) return end reloadBindings() - WG['cmd_blueprint'] = { + WG.cmd_blueprint = { reloadBindings = reloadBindings, } - WG['cmd_blueprint'].nextBlueprintUnitID = nextBlueprintUnitID + WG.cmd_blueprint .nextBlueprintUnitID = nextBlueprintUnitID loadBlueprintsFromFile() loadedBlueprints = true @@ -1250,12 +1250,12 @@ function widget:Initialize() end function widget:Shutdown() - if WG["api_blueprint"] then - WG["api_blueprint"].setActiveBlueprint(nil) - WG["api_blueprint"].setBlueprintPositions({}) + if WG.api_blueprint then + WG.api_blueprint .setActiveBlueprint(nil) + WG.api_blueprint .setBlueprintPositions({}) end - WG['cmd_blueprint'] = nil + WG.cmd_blueprint = nil drawCursorText.invalidate() diff --git a/luaui/Widgets/cmd_bomber_attack_building_ground.lua b/luaui/Widgets/cmd_bomber_attack_building_ground.lua index fd9a6bde5df..97b2342b6a3 100644 --- a/luaui/Widgets/cmd_bomber_attack_building_ground.lua +++ b/luaui/Widgets/cmd_bomber_attack_building_ground.lua @@ -35,7 +35,7 @@ for udid, ud in pairs(UnitDefs) do if ud.isBuilding or string.find(ud.name, "nanotc") then isBuilding[udid] = true end - if (ud["weapons"] and ud["weapons"][1] and isBomb[ud["weapons"][1].weaponDef] == true) or (string.find(ud.name, 'armlance') or string.find(ud.name, 'cortitan') or string.find(ud.name, 'legatorpbomber')) then + if (ud.weapons and ud.weapons [1] and isBomb[ud.weapons [1].weaponDef] == true) or (string.find(ud.name, 'armlance') or string.find(ud.name, 'cortitan') or string.find(ud.name, 'legatorpbomber')) then isBomber[udid] = true end end diff --git a/luaui/Widgets/cmd_commandinsert.lua b/luaui/Widgets/cmd_commandinsert.lua index 1261f520a62..c31e8465891 100644 --- a/luaui/Widgets/cmd_commandinsert.lua +++ b/luaui/Widgets/cmd_commandinsert.lua @@ -162,7 +162,7 @@ function widget:CommandNotify(id, params, options) end -- Spring.GiveOrder(CMD.INSERT,{0,id,opt,unpack(params)},{"alt"}) - local my_command = {["id"]=id, ["params"]=params, ["options"]=options} + local my_command = {id=id, params=params, options=options} local cx,cy,cz = GetCommandPos(my_command) if cx < -1 then return false diff --git a/luaui/Widgets/cmd_customformations2.lua b/luaui/Widgets/cmd_customformations2.lua index f5ec7e5e4c5..acdad5e758c 100644 --- a/luaui/Widgets/cmd_customformations2.lua +++ b/luaui/Widgets/cmd_customformations2.lua @@ -913,11 +913,11 @@ end function widget:GetConfigData() -- Saving return { - ['maxHungarianUnits'] = maxHungarianUnits, + maxHungarianUnits = maxHungarianUnits, } end function widget:SetConfigData(data) -- Loading - maxHungarianUnits = data['maxHungarianUnits'] or defaultHungarianUnits + maxHungarianUnits = data.maxHungarianUnits or defaultHungarianUnits end diff --git a/luaui/Widgets/cmd_dgun_no_ally.lua b/luaui/Widgets/cmd_dgun_no_ally.lua index 14e204d6263..f671259324d 100644 --- a/luaui/Widgets/cmd_dgun_no_ally.lua +++ b/luaui/Widgets/cmd_dgun_no_ally.lua @@ -14,11 +14,11 @@ end function widget:Initialize() - WG['dgunnoally'] = true + WG.dgunnoally = true end function widget:Shutdown() - WG['dgunnoally'] = nil + WG.dgunnoally = nil end function widget:CommandNotify(cmdID, cmdParams, cmdOptions) diff --git a/luaui/Widgets/cmd_dgun_no_ground enemies.lua b/luaui/Widgets/cmd_dgun_no_ground enemies.lua index 8344d901d44..3e94c82f06d 100644 --- a/luaui/Widgets/cmd_dgun_no_ground enemies.lua +++ b/luaui/Widgets/cmd_dgun_no_ground enemies.lua @@ -13,11 +13,11 @@ function widget:GetInfo() end function widget:Initialize() - WG['dgunnoenemy'] = true + WG.dgunnoenemy = true end function widget:Shutdown() - WG['dgunnoenemy'] = nil + WG.dgunnoenemy = nil end local isAirUnit = {} diff --git a/luaui/Widgets/cmd_extractor_snap.lua b/luaui/Widgets/cmd_extractor_snap.lua index 1dea41dc6d5..ec693b8e118 100644 --- a/luaui/Widgets/cmd_extractor_snap.lua +++ b/luaui/Widgets/cmd_extractor_snap.lua @@ -63,9 +63,9 @@ function widget:Initialize() mexBuildings = builder.GetMexBuildings() geoBuildings = builder.GetGeoBuildings() - geoSpots = WG["resource_spot_finder"].geoSpotsList - metalSpots = WG["resource_spot_finder"].metalSpotsList - metalMap = WG["resource_spot_finder"].isMetalMap + geoSpots = WG.resource_spot_finder .geoSpotsList + metalSpots = WG.resource_spot_finder .metalSpotsList + metalMap = WG.resource_spot_finder .isMetalMap end @@ -212,12 +212,12 @@ function widget:Update() local nearestSpot if selectedMex then nearestSpot = shift and - WG["resource_spot_builder"].FindNearestValidSpotForExtractor(x, z, metalSpots, selectedMex) or - WG["resource_spot_finder"].GetClosestMexSpot(x, z) + WG.resource_spot_builder .FindNearestValidSpotForExtractor(x, z, metalSpots, selectedMex) or + WG.resource_spot_finder .GetClosestMexSpot(x, z) else nearestSpot = shift and - WG["resource_spot_builder"].FindNearestValidSpotForExtractor(x, z, geoSpots, selectedGeo) or - WG["resource_spot_finder"].GetClosestGeoSpot(x, z) + WG.resource_spot_builder .FindNearestValidSpotForExtractor(x, z, geoSpots, selectedGeo) or + WG.resource_spot_finder .GetClosestGeoSpot(x, z) end if not nearestSpot then clear() @@ -226,7 +226,7 @@ function widget:Update() buildCmd = {} - local cmd = WG["resource_spot_builder"].PreviewExtractorCommand(pos, buildingId, nearestSpot) + local cmd = WG.resource_spot_builder .PreviewExtractorCommand(pos, buildingId, nearestSpot) if cmd and #cmd > 0 then targetPos = { x = cmd[2], y = cmd[3], z = cmd[4] } WG.ExtractorSnap.position = targetPos -- used by prospector and pregame queue @@ -272,7 +272,7 @@ local function handleBuildMenu(shift) if not shift then Spring.SetActiveCommand(0) end - local grid = WG["gridmenu"] + local grid = WG.gridmenu if not grid or not grid.clearCategory or not grid.getAlwaysReturn or not grid.setCurrentCategory then return end @@ -294,12 +294,12 @@ function widget:MousePress(x, y, button) local alt, ctrl, meta, shift = Spring.GetModKeyState() shift = Spring.GetInvertQueueKey() and (not shift) or shift if selectedMex then - WG['resource_spot_builder'].ApplyPreviewCmds(buildCmd, mexConstructors, shift) + WG.resource_spot_builder .ApplyPreviewCmds(buildCmd, mexConstructors, shift) handleBuildMenu(shift) return true end if selectedGeo then - WG['resource_spot_builder'].ApplyPreviewCmds(buildCmd, geoConstructors, shift) + WG.resource_spot_builder .ApplyPreviewCmds(buildCmd, geoConstructors, shift) handleBuildMenu(shift) return true -- override other mouse presses and handle stuff manually end diff --git a/luaui/Widgets/cmd_factoryqmanager.lua b/luaui/Widgets/cmd_factoryqmanager.lua index 22698e8ddad..212ab507ee9 100644 --- a/luaui/Widgets/cmd_factoryqmanager.lua +++ b/luaui/Widgets/cmd_factoryqmanager.lua @@ -186,7 +186,7 @@ end function widget:ViewResize() vsx, vsy = spGetViewGeometry() - font = WG['fonts'].getFont(1, 1.5) + font = WG.fonts .getFont(1, 1.5) UiUnit = WG.FlowUI.Draw.Unit UiElement = WG.FlowUI.Draw.Element @@ -231,7 +231,7 @@ function RemoveBuildOrders(unitID, buildDefID, count) end function getButtonUnderMouse(mx, my) - local x1 = boxCoords["x"] + local x1 = boxCoords.x if x1 == nil then return end diff --git a/luaui/Widgets/cmd_guard_transport_factory.lua b/luaui/Widgets/cmd_guard_transport_factory.lua index d2f7b3d496e..58534b2e70f 100644 --- a/luaui/Widgets/cmd_guard_transport_factory.lua +++ b/luaui/Widgets/cmd_guard_transport_factory.lua @@ -162,11 +162,11 @@ function widget:Initialize() widgetHandler:RemoveWidget() return end - WG['transportFactoryGuard'] = {} - WG['transportFactoryGuard'].getBlacklistOrderedUnits = function() + WG.transportFactoryGuard = {} + WG.transportFactoryGuard .getBlacklistOrderedUnits = function() return blacklistOrderedUnits end - WG['transportFactoryGuard'].setBlacklistOrderedUnits = function(value) + WG.transportFactoryGuard .setBlacklistOrderedUnits = function(value) blacklistOrderedUnits = value end diff --git a/luaui/Widgets/cmd_line-build_hotkey_ignore.lua b/luaui/Widgets/cmd_line-build_hotkey_ignore.lua index 9f00d0727c1..6691a79014e 100644 --- a/luaui/Widgets/cmd_line-build_hotkey_ignore.lua +++ b/luaui/Widgets/cmd_line-build_hotkey_ignore.lua @@ -17,7 +17,7 @@ function widget:KeyPress(key, mods, isRepeat) if not mods.alt and mods.shift then - if key ~= KEYSYMS['UP'] and key ~= KEYSYMS['DOWN'] and key ~= KEYSYMS['LEFT'] and key ~= KEYSYMS['RIGHT'] then -- Don't ignore arrow keys + if key ~= KEYSYMS.UP and key ~= KEYSYMS.DOWN and key ~= KEYSYMS.LEFT and key ~= KEYSYMS.RIGHT then -- Don't ignore arrow keys local x, y, leftPressed, middlePressed, rightPressed, offscreen = Spring.GetMouseState() if leftPressed then diff --git a/luaui/Widgets/cmd_nanoturrets_assist_priority.lua b/luaui/Widgets/cmd_nanoturrets_assist_priority.lua index 45c4b86b2cc..e109da3c44d 100644 --- a/luaui/Widgets/cmd_nanoturrets_assist_priority.lua +++ b/luaui/Widgets/cmd_nanoturrets_assist_priority.lua @@ -41,7 +41,7 @@ function widget:UnitCreated(unitID, unitDefID, unitTeam, builderID) for _, id in ipairs(unitsNear) do if (nanoDefs[GetUnitDefID(id)] ~= nil) then local commandQueue = GetUnitCommands(id, 10) - if (commandQueue[2] ~= nil and commandQueue[2]["id"] == CMD_FIGHT) or (commandQueue[1] ~= nil and commandQueue[1]["id"] == CMD_FIGHT) or commandQueue[1] == nil then + if (commandQueue[2] ~= nil and commandQueue[2].id == CMD_FIGHT) or (commandQueue[1] ~= nil and commandQueue[1].id == CMD_FIGHT) or commandQueue[1] == nil then -- Echo("giving repair command to " .. id) GiveOrderToUnit(id, CMD_REPAIR, unitID, {}) end diff --git a/luaui/Widgets/cmd_onoff.lua b/luaui/Widgets/cmd_onoff.lua index 0f4c0a30f0e..846ba1df0b4 100644 --- a/luaui/Widgets/cmd_onoff.lua +++ b/luaui/Widgets/cmd_onoff.lua @@ -34,7 +34,7 @@ local function onoff(_, _, args) anyOnOffable = true if state == nil then - local isActive = spGetUnitStates(units[1])["active"] + local isActive = spGetUnitStates(units[1]).active if isActive then state = 0 else state = 1 end end diff --git a/luaui/Widgets/cmd_resolution_switcher.lua b/luaui/Widgets/cmd_resolution_switcher.lua index 34e548afb95..7b84866a981 100644 --- a/luaui/Widgets/cmd_resolution_switcher.lua +++ b/luaui/Widgets/cmd_resolution_switcher.lua @@ -256,17 +256,17 @@ function widget:Initialize() refreshScreenModes() - WG['screenMode'] = { } + WG.screenMode = { } - WG['screenMode'].GetDisplays = function() + WG.screenMode .GetDisplays = function() return displays end - WG['screenMode'].GetScreenModes = function() + WG.screenMode .GetScreenModes = function() return screenModes end - WG['screenMode'].SetScreenMode = function(index) + WG.screenMode .SetScreenMode = function(index) local prevScreenmode = screenModeIndex screenModeIndex = index if screenModeIndex ~= prevScreenmode then diff --git a/luaui/Widgets/cmd_share_unit.lua b/luaui/Widgets/cmd_share_unit.lua index 932b5c04549..2dd6f1b9bbf 100644 --- a/luaui/Widgets/cmd_share_unit.lua +++ b/luaui/Widgets/cmd_share_unit.lua @@ -366,7 +366,7 @@ function widget:CommandsChanged() end function widget:ViewResize(vsx, vsy) - font = WG['fonts'].getFont(2, 1.5) + font = WG.fonts .getFont(2, 1.5) end function widget:Initialize() diff --git a/luaui/Widgets/dbg_ceg_auto_reloader.lua b/luaui/Widgets/dbg_ceg_auto_reloader.lua index 1e0c4215057..800df83b823 100644 --- a/luaui/Widgets/dbg_ceg_auto_reloader.lua +++ b/luaui/Widgets/dbg_ceg_auto_reloader.lua @@ -791,8 +791,8 @@ end local function validateCEG(cegTable, cegName) for spawnername, spawnerTable in pairs(cegTable) do - if type(spawnerTable) == 'table' and spawnerTable['class'] then - local class = spawnerTable['class'] + if type(spawnerTable) == 'table' and spawnerTable.class then + local class = spawnerTable.class if not spawnerDefs[class] then local msg = string.format( diff --git a/luaui/Widgets/dbg_deferred_buffer_visualizer.lua b/luaui/Widgets/dbg_deferred_buffer_visualizer.lua index ed71d8520ff..1368afb7f2b 100644 --- a/luaui/Widgets/dbg_deferred_buffer_visualizer.lua +++ b/luaui/Widgets/dbg_deferred_buffer_visualizer.lua @@ -52,7 +52,7 @@ deferredbuffer_info= ({ ["$model_gbuffer_emittex"] = "for emissive materials (bloom would be the canonical use) New in version 95", ["$model_gbuffer_misctex"] = "for arbitrary shader data New in version 95", ["$model_gbuffer_zvaltex"] = "contains the depth values (z-buffer) of the models in view. ", - ["depthcopy"] = "A copy of the current depth buffer. ", + depthcopy = "A copy of the current depth buffer. ", }) local currentbuffer = 13 -- starts with model_gbuffer_normtex diff --git a/luaui/Widgets/dbg_ffa_startpoints_picker.lua b/luaui/Widgets/dbg_ffa_startpoints_picker.lua index 6e9e5d79e33..cdafb7cfbb5 100644 --- a/luaui/Widgets/dbg_ffa_startpoints_picker.lua +++ b/luaui/Widgets/dbg_ffa_startpoints_picker.lua @@ -655,8 +655,8 @@ local function initializeUI() panelHotkeys.panelWidth = 15.7 * (padding + textSizeText) panelHotkeys.panelHeight = 5.75 * (padding + textSizeText) - padding panelHotkeys.px = vsx * 0.75 - panelHotkeys.panelWidth - if WG['advplayerlist_api'] then - local advPlayerListLeft = WG['advplayerlist_api'].GetPosition()[2] + if WG.advplayerlist_api then + local advPlayerListLeft = WG.advplayerlist_api .GetPosition()[2] panelHotkeys.px = advPlayerListLeft - panelHotkeys.panelWidth - WG.FlowUI.elementMargin end panelHotkeys.py = 0 diff --git a/luaui/Widgets/dbg_profiler_histograms.lua b/luaui/Widgets/dbg_profiler_histograms.lua index 2f5a4cd138c..e13777d94a9 100644 --- a/luaui/Widgets/dbg_profiler_histograms.lua +++ b/luaui/Widgets/dbg_profiler_histograms.lua @@ -100,7 +100,7 @@ local binrez = 0.05 -- half MS resolutions local histograms = {} -- key name, value histogram object local actives = {Sim = true} --actives['Draw'] = true -actives['Update'] = true +actives.Update = true actives['Sim::Script'] = true diff --git a/luaui/Widgets/dbg_unit_csv_export.lua b/luaui/Widgets/dbg_unit_csv_export.lua index 197c3ff37b2..50a3c733b51 100644 --- a/luaui/Widgets/dbg_unit_csv_export.lua +++ b/luaui/Widgets/dbg_unit_csv_export.lua @@ -101,8 +101,8 @@ function widget:Initialize() end end - local inBuildoptions = buildTree(UnitDefNames["armcom"].id, {}) - inBuildoptions = buildTree(UnitDefNames["corcom"].id, inBuildoptions) + local inBuildoptions = buildTree(UnitDefNames.armcom .id, {}) + inBuildoptions = buildTree(UnitDefNames.corcom .id, inBuildoptions) for udid, unitDef in pairs(UnitDefs) do if inBuildoptions[udid] or unitDef.name == 'armcom' or unitDef.name == 'corcom' or unitDef.name == 'legcom' then @@ -116,7 +116,7 @@ function widget:Initialize() --if string.sub(unitDef.name, 1, 3) == 'leg' then -- faction = 'LEGION' --end - if unitDef.modCategories["raptor"] then + if unitDef.modCategories.raptor then faction = 'CHICKS' end if string.find(unitDef.name, "_scav") then @@ -218,10 +218,10 @@ function widget:Initialize() weapName = 'EMP-StarburstLauncher' end else - if WeaponDefs[weapon.weaponDef].damages[Game.armorTypes["vtol"]] > WeaponDefs[weapon.weaponDef].damages[Game.armorTypes["default"] or 0] then - dps = dps + (((WeaponDefs[weapon.weaponDef].damages[Game.armorTypes["vtol"]]*(1/WeaponDefs[weapon.weaponDef].reload)) * WeaponDefs[weapon.weaponDef].salvoSize) * WeaponDefs[weapon.weaponDef].projectiles) + if WeaponDefs[weapon.weaponDef].damages[Game.armorTypes.vtol ] > WeaponDefs[weapon.weaponDef].damages[Game.armorTypes.default or 0] then + dps = dps + (((WeaponDefs[weapon.weaponDef].damages[Game.armorTypes.vtol ]*(1/WeaponDefs[weapon.weaponDef].reload)) * WeaponDefs[weapon.weaponDef].salvoSize) * WeaponDefs[weapon.weaponDef].projectiles) else - dps = dps + (((WeaponDefs[weapon.weaponDef].damages[Game.armorTypes["default"] or 0]*(1/WeaponDefs[weapon.weaponDef].reload)) * WeaponDefs[weapon.weaponDef].salvoSize) * WeaponDefs[weapon.weaponDef].projectiles) + dps = dps + (((WeaponDefs[weapon.weaponDef].damages[Game.armorTypes.default or 0]*(1/WeaponDefs[weapon.weaponDef].reload)) * WeaponDefs[weapon.weaponDef].salvoSize) * WeaponDefs[weapon.weaponDef].projectiles) end end if weaponTable[weapName] then @@ -251,7 +251,7 @@ function widget:Initialize() if unitDef.customParams.unitgroup and unitDef.customParams.unitgroup == 'explo' and unitDef.deathExplosion and WeaponDefNames[unitDef.deathExplosion] then local weapon = WeaponDefs[WeaponDefNames[unitDef.deathExplosion].id] if weapon then - dps = weapon.damages[Game.armorTypes["default"]] + dps = weapon.damages[Game.armorTypes.default ] end end @@ -316,13 +316,13 @@ function widget:Initialize() unitDef.buildSpeed..columnSeparator.. round(unitDef.speed, 0)..columnSeparator.. unitDef.health..columnSeparator.. - ((unitDef.modCategories["phib"] ~= nil or (unitDef.modCategories["canbeuw"] ~= nil and unitDef.modCategories["underwater"] == nil)) and '1' or '')..columnSeparator.. - ((unitDef.modCategories["underwater"] ~= nil) and '1' or '')..columnSeparator.. + ((unitDef.modCategories.phib ~= nil or (unitDef.modCategories.canbeuw ~= nil and unitDef.modCategories.underwater == nil)) and '1' or '')..columnSeparator.. + ((unitDef.modCategories.underwater ~= nil) and '1' or '')..columnSeparator.. (unitDef.canFly and '1' or '')..columnSeparator.. - (unitDef.modCategories["hover"] and '1' or '')..columnSeparator.. - (unitDef.modCategories["ship"] and '1' or '')..columnSeparator.. - (unitDef.modCategories["tank"] and '1' or '')..columnSeparator.. - (unitDef.modCategories["bot"] and '1' or '')..columnSeparator.. + (unitDef.modCategories.hover and '1' or '')..columnSeparator.. + (unitDef.modCategories.ship and '1' or '')..columnSeparator.. + (unitDef.modCategories.tank and '1' or '')..columnSeparator.. + (unitDef.modCategories.bot and '1' or '')..columnSeparator.. ((unitDef.isBuilding or unitDef.isFactory or unitDef.speed==0) and '1' or '')..columnSeparator.. dps..columnSeparator.. weaponRange..columnSeparator.. diff --git a/luaui/Widgets/export_defs.lua b/luaui/Widgets/export_defs.lua index 804c21e84aa..7d7fadc1b28 100644 --- a/luaui/Widgets/export_defs.lua +++ b/luaui/Widgets/export_defs.lua @@ -50,11 +50,11 @@ local function ExportDefs() end -- parse wDefs, a list of weaponDef metatables - tbl["wDefs"] = {} + tbl.wDefs = {} for i, weaponDef in pairs(unitDef.wDefs) do - tbl["wDefs"][weaponDef.id] = {} + tbl.wDefs [weaponDef.id] = {} for field_name, value in weaponDef:pairs() do - tbl["wDefs"][weaponDef.id][field_name] = value + tbl.wDefs [weaponDef.id][field_name] = value end end diff --git a/luaui/Widgets/flowui_atlas_gl4.lua b/luaui/Widgets/flowui_atlas_gl4.lua index 14c34681303..6355a297ec0 100644 --- a/luaui/Widgets/flowui_atlas_gl4.lua +++ b/luaui/Widgets/flowui_atlas_gl4.lua @@ -72,8 +72,8 @@ end function widget:Initialize() makeAtlas() - WG['flowui_atlas'] = atlasID - WG['flowui_atlassedImages'] = atlassedImages + WG.flowui_atlas = atlasID + WG.flowui_atlassedImages = atlassedImages end function widget:Shutdown() diff --git a/luaui/Widgets/flowui_gl4.lua b/luaui/Widgets/flowui_gl4.lua index d245b1e2886..c5717f1268e 100644 --- a/luaui/Widgets/flowui_gl4.lua +++ b/luaui/Widgets/flowui_gl4.lua @@ -659,8 +659,8 @@ function metaElement:NewSlider(o) if debugmode then spEcho("right clicked", obj.name, mx, my, newright, obj.value) end end, hover = function (obj,mx,my) - if obj.tooltip and WG and WG['tooltip'] and WG['tooltip'].ShowTooltip then - WG['tooltip'].ShowTooltip(obj.name, obj.tooltip) -- x/y (optional): display coordinates + if obj.tooltip and WG and WG.tooltip and WG.tooltip .ShowTooltip then + WG.tooltip .ShowTooltip(obj.name, obj.tooltip) -- x/y (optional): display coordinates end end } @@ -1156,7 +1156,7 @@ local function makeunitbuttonarray() right = vsx, }) -- what can my boy build? - local unitDef = UnitDefs[UnitDefNames['armcom'].id] + local unitDef = UnitDefs[UnitDefNames.armcom .id] for k,v in pairs(unitDef.buildOptions) do spEcho(k,v) end @@ -2409,23 +2409,23 @@ function widget:Initialize() - WG['flowui_gl4'] = {} - WG['flowui_gl4'].forwardslider = forwardslider - WG['flowui_gl4'].requestWidgetLayer = requestWidgetLayer + WG.flowui_gl4 = {} + WG.flowui_gl4 .forwardslider = forwardslider + WG.flowui_gl4 .requestWidgetLayer = requestWidgetLayer --WG['flowui_shader'] = rectRoundShader --WG['flowui_draw'] = Draw - font, loadedFontSize = WG['fonts'].getFont(nil, 1.4, 0.35, 1.4) - if WG['buildmenu'] then - if WG['buildmenu'].getGroups then - groups, unitGroup = WG['buildmenu'].getGroups() + font, loadedFontSize = WG.fonts .getFont(nil, 1.4, 0.35, 1.4) + if WG.buildmenu then + if WG.buildmenu .getGroups then + groups, unitGroup = WG.buildmenu .getGroups() end end if atlasID == nil then - atlasID = WG['flowui_atlas'] - atlassedImages = WG['flowui_atlassedImages'] + atlasID = WG.flowui_atlas + atlassedImages = WG.flowui_atlassedImages end --makebuttonarray() @@ -2439,7 +2439,7 @@ function widget:Initialize() end function widget:Shutdown() - WG['flowui_gl4'] = nil + WG.flowui_gl4 = nil if rectRoundShader then rectRoundShader:Finalize() @@ -2485,8 +2485,8 @@ end function widget:DrawScreen() if atlasID == nil then - atlasID = WG['flowui_atlas'] - atlassedImages = WG['flowui_atlassedImages'] + atlasID = WG.flowui_atlas + atlassedImages = WG.flowui_atlassedImages end if elems < 0 then elems = elems+1 diff --git a/luaui/Widgets/gfx_DrawUnitShape_GL4.lua b/luaui/Widgets/gfx_DrawUnitShape_GL4.lua index 429a10b04b0..069c8d654fe 100644 --- a/luaui/Widgets/gfx_DrawUnitShape_GL4.lua +++ b/luaui/Widgets/gfx_DrawUnitShape_GL4.lua @@ -224,10 +224,10 @@ void main() { } ]] -local udefID = UnitDefNames["armcom"].id +local udefID = UnitDefNames.armcom .id -local corcomUnitDefID = UnitDefNames["corcom"].id -local armcomUnitDefID = UnitDefNames["armcom"].id +local corcomUnitDefID = UnitDefNames.corcom .id +local armcomUnitDefID = UnitDefNames.armcom .id local corDrawUnitVBOTable, corDrawUnitShapeVBOTable local armDrawUnitVBOTable, armDrawUnitShapeVBOTable @@ -564,13 +564,13 @@ function widget:Initialize() widget:UnitCreated(unitID) end end - WG['DrawUnitGL4'] = DrawUnitGL4 - WG['DrawUnitShapeGL4'] = DrawUnitShapeGL4 - WG['StopDrawUnitGL4'] = StopDrawUnitGL4 - WG['StopDrawUnitShapeGL4'] = StopDrawUnitShapeGL4 - WG['StopDrawAll'] = StopDrawAll - WG['armDrawUnitShapeVBOTable'] = armDrawUnitShapeVBOTable - WG['corDrawUnitShapeVBOTable'] = corDrawUnitShapeVBOTable + WG.DrawUnitGL4 = DrawUnitGL4 + WG.DrawUnitShapeGL4 = DrawUnitShapeGL4 + WG.StopDrawUnitGL4 = StopDrawUnitGL4 + WG.StopDrawUnitShapeGL4 = StopDrawUnitShapeGL4 + WG.StopDrawAll = StopDrawAll + WG.armDrawUnitShapeVBOTable = armDrawUnitShapeVBOTable + WG.corDrawUnitShapeVBOTable = corDrawUnitShapeVBOTable widgetHandler:RegisterGlobal('DrawUnitGL4', DrawUnitGL4) widgetHandler:RegisterGlobal('DrawUnitShapeGL4', DrawUnitShapeGL4) widgetHandler:RegisterGlobal('StopDrawUnitGL4', StopDrawUnitGL4) @@ -603,13 +603,13 @@ function widget:Shutdown() if unitShader then unitShader:Finalize() end if unitShapeShader then unitShapeShader:Finalize() end - WG['DrawUnitGL4'] = nil - WG['DrawUnitShapeGL4'] = nil - WG['StopDrawUnitGL4'] = nil - WG['StopDrawUnitShapeGL4'] = nil - WG['StopDrawAll'] = nil - WG['armDrawUnitShapeVBOTable'] = nil - WG['corDrawUnitShapeVBOTable'] = nil + WG.DrawUnitGL4 = nil + WG.DrawUnitShapeGL4 = nil + WG.StopDrawUnitGL4 = nil + WG.StopDrawUnitShapeGL4 = nil + WG.StopDrawAll = nil + WG.armDrawUnitShapeVBOTable = nil + WG.corDrawUnitShapeVBOTable = nil widgetHandler:DeregisterGlobal('DrawUnitGL4') widgetHandler:DeregisterGlobal('DrawUnitShapeGL4') widgetHandler:DeregisterGlobal('StopDrawUnitGL4') diff --git a/luaui/Widgets/gfx_HighlightUnit_GL4.lua b/luaui/Widgets/gfx_HighlightUnit_GL4.lua index cbae7037ea5..f52faa257f6 100644 --- a/luaui/Widgets/gfx_HighlightUnit_GL4.lua +++ b/luaui/Widgets/gfx_HighlightUnit_GL4.lua @@ -389,9 +389,9 @@ function widget:Initialize() HighlightUnitGL4(featureID, "featureID", 0.0,0.25,1, 0.2, 0.5, 3.0, 0.0) end end - WG['HighlightUnitGL4'] = HighlightUnitGL4 - WG['StopHighlightUnitGL4'] = StopHighlightUnitGL4 - WG['RefreshHighlightUnitGL4'] = RefreshHighlightUnitGL4 + WG.HighlightUnitGL4 = HighlightUnitGL4 + WG.StopHighlightUnitGL4 = StopHighlightUnitGL4 + WG.RefreshHighlightUnitGL4 = RefreshHighlightUnitGL4 end function widget:Shutdown() @@ -403,9 +403,9 @@ function widget:Shutdown() end if highlightunitShader then highlightunitShader:Finalize() end - WG['HighlightUnitGL4'] = nil - WG['StopHighlightUnitGL4'] = nil - WG['RefreshHighlightUnitGL4'] = nil + WG.HighlightUnitGL4 = nil + WG.StopHighlightUnitGL4 = nil + WG.RefreshHighlightUnitGL4 = nil end function widget:TextCommand(command) diff --git a/luaui/Widgets/gfx_airjets_gl4.lua b/luaui/Widgets/gfx_airjets_gl4.lua index 7ea02e29717..26903627cad 100644 --- a/luaui/Widgets/gfx_airjets_gl4.lua +++ b/luaui/Widgets/gfx_airjets_gl4.lua @@ -507,7 +507,7 @@ end local function RemoveLights(unitID) if lighteffectsEnabled and lights[unitID] then for i,v in pairs(lights[unitID]) do - WG['lighteffects'].removeLight(lights[unitID][i], 3) + WG.lighteffects .removeLight(lights[unitID][i], 3) end lights[unitID] = nil end @@ -650,7 +650,7 @@ function widget:Update(dt) end local prevLighteffectsEnabled = lighteffectsEnabled - lighteffectsEnabled = (enableLights and WG['lighteffects'] ~= nil and WG['lighteffects'].enableThrusters) + lighteffectsEnabled = (enableLights and WG.lighteffects ~= nil and WG.lighteffects .enableThrusters) if lighteffectsEnabled ~= prevLighteffectsEnabled then for _, teamID in ipairs(spGetTeamList()) do local teamUnits = spGetTeamUnitsByDefs(teamID, effectDefIDList) @@ -773,9 +773,9 @@ function widget:Initialize() initGL4() reInitialize() - WG['airjets'] = {} + WG.airjets = {} - WG['airjets'].addAirJet = function (unitID, piecenum, width, length, color3, emitVector) -- for WG external calls + WG.airjets .addAirJet = function (unitID, piecenum, width, length, color3, emitVector) -- for WG external calls local airjetkey = tostring(unitID).."_"..tostring(piecenum) if emitVector == nil then emitVector = {0,0,-1} end pushElementInstance( @@ -795,7 +795,7 @@ function widget:Initialize() return airjetkey end - WG['airjets'].removeAirJet = function (airjetkey) ---- for WG external calls + WG.airjets .removeAirJet = function (airjetkey) ---- for WG external calls return popElementInstance(jetInstanceVBO,airjetkey) end end diff --git a/luaui/Widgets/gfx_bloom_shader_deferred.lua b/luaui/Widgets/gfx_bloom_shader_deferred.lua index 7c42528a7a8..ec75502f326 100644 --- a/luaui/Widgets/gfx_bloom_shader_deferred.lua +++ b/luaui/Widgets/gfx_bloom_shader_deferred.lua @@ -515,18 +515,18 @@ function widget:Initialize() RemoveMe("[BloomShader::Initialize] removing widget, AllowDeferredMapRendering is required") end - WG['bloomdeferred'] = {} - WG['bloomdeferred'].getBrightness = function() + WG.bloomdeferred = {} + WG.bloomdeferred .getBrightness = function() return glowAmplifier end - WG['bloomdeferred'].setBrightness = function(value) + WG.bloomdeferred .setBrightness = function(value) glowAmplifier = value MakeBloomShaders() end - WG['bloomdeferred'].getPreset = function() + WG.bloomdeferred .getPreset = function() return preset end - WG['bloomdeferred'].setPreset = function(value) + WG.bloomdeferred .setPreset = function(value) preset = value MakeBloomShaders() end @@ -544,7 +544,7 @@ function widget:Shutdown() if blurShader ~= nil then blurShader:Finalize() end if combineShader ~= nil then combineShader:Finalize() end end - WG['bloomdeferred'] = nil + WG.bloomdeferred = nil end local function FullScreenQuad() diff --git a/luaui/Widgets/gfx_cas.lua b/luaui/Widgets/gfx_cas.lua index c9e7806baa3..12d80ded65c 100644 --- a/luaui/Widgets/gfx_cas.lua +++ b/luaui/Widgets/gfx_cas.lua @@ -251,11 +251,11 @@ end function widget:DrawScreenEffects() --glCopyToTexture(screenCopyTex, 0, 0, vpx, vpy, vsx, vsy) - if WG['screencopymanager'] and WG['screencopymanager'].GetScreenCopy then - screenCopyTex = WG['screencopymanager'].GetScreenCopy() + if WG.screencopymanager and WG.screencopymanager .GetScreenCopy then + screenCopyTex = WG.screencopymanager .GetScreenCopy() else --glCopyToTexture(screenCopyTex, 0, 0, vpx, vpy, vsx, vsy) - spEcho("Missing Screencopy Manager, exiting", WG['screencopymanager'] ) + spEcho("Missing Screencopy Manager, exiting", WG.screencopymanager ) widgetHandler:RemoveWidget() return false end diff --git a/luaui/Widgets/gfx_darken_map.lua b/luaui/Widgets/gfx_darken_map.lua index 54ddf0d8282..1b4d8782493 100644 --- a/luaui/Widgets/gfx_darken_map.lua +++ b/luaui/Widgets/gfx_darken_map.lua @@ -33,7 +33,7 @@ local camX, camY, camZ = spGetCameraPosition() local camDirX,camDirY,camDirZ = Spring.GetCameraDirection() function widget:Shutdown() - WG['darkenmap'] = nil + WG.darkenmap = nil end @@ -49,11 +49,11 @@ local function mapDarkness(_,_,params) end function widget:Initialize() - WG['darkenmap'] = {} - WG['darkenmap'].getMapDarkness = function() + WG.darkenmap = {} + WG.darkenmap .getMapDarkness = function() return darknessvalue end - WG['darkenmap'].setMapDarkness = function(value) + WG.darkenmap .setMapDarkness = function(value) darknessvalue = tonumber(value) end widgetHandler:AddAction("mapdarkness", mapDarkness, nil, "t") diff --git a/luaui/Widgets/gfx_decals_gl4.lua b/luaui/Widgets/gfx_decals_gl4.lua index 14eca929840..d7b6ad77a50 100644 --- a/luaui/Widgets/gfx_decals_gl4.lua +++ b/luaui/Widgets/gfx_decals_gl4.lua @@ -1144,7 +1144,7 @@ function widget:VisibleExplosion(px, py, pz, weaponID, ownerID) end local UnitScriptDecalsNames = { - ['corkorg'] = { + corkorg = { [1] = { texture = footprintsPath..'f_corkorg_a.png', offsetx = 2, --offset from what the UnitScriptDecal returns @@ -1164,7 +1164,7 @@ local UnitScriptDecalsNames = { } }, - ['armfboy'] = { + armfboy = { [1] = { -- LFOOT texture = footprintsPath..'f_armfboy_a.png', offsetx = -1, --offset from what the UnitScriptDecal returns @@ -1200,7 +1200,7 @@ local UnitScriptDecalsNames = { fadeintime = 5, } }, - ['armwar'] = { + armwar = { [1] = { -- LFOOT texture = footprintsPath..'f_armwar_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1237,7 +1237,7 @@ local UnitScriptDecalsNames = { }, }, - ['armck'] = { + armck = { [1] = { -- LFOOT texture = footprintsPath..'f_armck_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1257,7 +1257,7 @@ local UnitScriptDecalsNames = { }, }, - ['armrock'] = { + armrock = { [1] = { -- LFOOT texture = footprintsPath..'f_armrock_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1276,7 +1276,7 @@ local UnitScriptDecalsNames = { fadeintime = 5, }, }, - ['armham'] = { + armham = { [1] = { -- LFOOT texture = footprintsPath..'f_armham_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1296,7 +1296,7 @@ local UnitScriptDecalsNames = { }, }, - ['armack'] = { + armack = { [1] = { -- LFOOT texture = footprintsPath..'f_armack_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1316,7 +1316,7 @@ local UnitScriptDecalsNames = { }, }, - ['armzeus'] = { + armzeus = { [1] = { -- LFOOT texture = footprintsPath..'f_armzeus_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1336,7 +1336,7 @@ local UnitScriptDecalsNames = { }, }, - ['armmav'] = { + armmav = { [1] = { -- LFOOT texture = footprintsPath..'f_armmav_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1356,7 +1356,7 @@ local UnitScriptDecalsNames = { }, }, - ['armmar'] = { + armmar = { [1] = { -- LFOOT texture = footprintsPath..'f_armmar_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1376,7 +1376,7 @@ local UnitScriptDecalsNames = { }, }, - ['armraz'] = { + armraz = { [1] = { -- LFOOT texture = footprintsPath..'f_armraz_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1396,7 +1396,7 @@ local UnitScriptDecalsNames = { }, }, - ['armvang'] = { + armvang = { [1] = { -- FOOT texture = footprintsPath..'f_armvang_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1434,7 +1434,7 @@ local UnitScriptDecalsNames = { }, }, - ['armbanth'] = { + armbanth = { [1] = { texture = footprintsPath..'f_armbanth_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1454,7 +1454,7 @@ local UnitScriptDecalsNames = { } }, - ['corck'] = { + corck = { [1] = { -- LFOOT texture = footprintsPath..'f_corck_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1474,7 +1474,7 @@ local UnitScriptDecalsNames = { }, }, - ['corstorm'] = { + corstorm = { [1] = { -- LFOOT texture = footprintsPath..'f_corstorm_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1494,7 +1494,7 @@ local UnitScriptDecalsNames = { }, }, - ['corthud'] = { + corthud = { [1] = { texture = footprintsPath..'f_corthud_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1514,7 +1514,7 @@ local UnitScriptDecalsNames = { } }, - ['corack'] = { + corack = { [1] = { texture = footprintsPath..'f_corthud_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1535,7 +1535,7 @@ local UnitScriptDecalsNames = { }, - ['cormando'] = { + cormando = { [1] = { --lfoot texture = footprintsPath..'f_cormando_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1573,7 +1573,7 @@ local UnitScriptDecalsNames = { }, - ['corpyro'] = { + corpyro = { [1] = { -- LFOOT texture = footprintsPath..'f_corpyro_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1592,7 +1592,7 @@ local UnitScriptDecalsNames = { fadeintime = 2, }, }, - ['corhrk'] = { + corhrk = { [1] = { -- LFOOT texture = footprintsPath..'f_corhrk_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1611,7 +1611,7 @@ local UnitScriptDecalsNames = { fadeintime = 2, }, }, - ['corcan'] = { + corcan = { [1] = { -- LFOOT texture = footprintsPath..'f_corcan_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1648,7 +1648,7 @@ local UnitScriptDecalsNames = { }, }, - ['corsumo'] = { + corsumo = { [1] = { -- LFOOT texture = footprintsPath..'f_corsumo_a.png', offsetx = -1, --offset from what the UnitScriptDecal returns @@ -1667,7 +1667,7 @@ local UnitScriptDecalsNames = { fadeintime = 5, }, }, - ['coramph'] = { + coramph = { [1] = { -- LFOOT texture = footprintsPath..'f_coramph_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1686,7 +1686,7 @@ local UnitScriptDecalsNames = { fadeintime = 2, }, }, - ['corcat'] = { + corcat = { [1] = { -- LFOOT texture = footprintsPath..'f_corcat_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1705,7 +1705,7 @@ local UnitScriptDecalsNames = { fadeintime = 2, }, }, - ['corshiva'] = { + corshiva = { [1] = { -- LFOOT texture = footprintsPath..'f_corshiva_a.png', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1724,7 +1724,7 @@ local UnitScriptDecalsNames = { fadeintime = 2, }, }, - ['corjugg'] = { + corjugg = { [1] = { -- LFOOT texture = footprintsPath..'f_corjugg_a.png', offsetx = -1, --offset from what the UnitScriptDecal returns @@ -1744,7 +1744,7 @@ local UnitScriptDecalsNames = { }, }, - ['raptor_land_swarmer_basic_t1_v1'] = { + raptor_land_swarmer_basic_t1_v1 = { [1] = { -- LFOOT texture = footprintsPath..'f_raptor_a.tga', offsetx = 0, --offset from what the UnitScriptDecal returns @@ -1912,20 +1912,20 @@ function widget:Initialize() end end - WG['decalsgl4'] = {} - WG['decalsgl4'].AddDecalGL4 = AddDecal - WG['decalsgl4'].RemoveDecalGL4 = RemoveDecal - WG['decalsgl4'].SetLifeTimeMult = function(value) + WG.decalsgl4 = {} + WG.decalsgl4 .AddDecalGL4 = AddDecal + WG.decalsgl4 .RemoveDecalGL4 = RemoveDecal + WG.decalsgl4 .SetLifeTimeMult = function(value) lifeTimeMult = value end - WG['decalsgl4'].GetActiveDecals = function() return activeDecalData end - WG['decalsgl4'].GetLifeTimeMult = function() return lifeTimeMult end - WG['decalsgl4'].RebuildActiveDecalData = RebuildActiveDecalData + WG.decalsgl4 .GetActiveDecals = function() return activeDecalData end + WG.decalsgl4 .GetLifeTimeMult = function() return lifeTimeMult end + WG.decalsgl4 .RebuildActiveDecalData = RebuildActiveDecalData local vboTableCache = {decalVBO, decalLargeVBO, decalExtraLargeVBO} - WG['decalsgl4'].GetVBOData = function() return vboTableCache, footprintDecalSet end + WG.decalsgl4 .GetVBOData = function() return vboTableCache, footprintDecalSet end - widgetHandler:RegisterGlobal('AddDecalGL4', WG['decalsgl4'].AddDecalGL4) - widgetHandler:RegisterGlobal('RemoveDecalGL4', WG['decalsgl4'].RemoveDecalGL4) + widgetHandler:RegisterGlobal('AddDecalGL4', WG.decalsgl4 .AddDecalGL4) + widgetHandler:RegisterGlobal('RemoveDecalGL4', WG.decalsgl4 .RemoveDecalGL4) widgetHandler:RegisterGlobal('UnitScriptDecal', UnitScriptDecal) --spEcho(string.format("Decals GL4 loaded %d textures in %.3fs",numFiles, Spring.DiffTimers(Spring.GetTimer(), t0))) --spEcho("Trying to access _G[NightModeParams]", _G["NightModeParams"]) @@ -2050,7 +2050,7 @@ end function widget:ShutDown() - WG['decalsgl4'] = nil + WG.decalsgl4 = nil widgetHandler:DeregisterGlobal('AddDecalGL4') widgetHandler:DeregisterGlobal('RemoveDecalGL4') widgetHandler:DeregisterGlobal('UnitScriptDecal') diff --git a/luaui/Widgets/gfx_deferred_rendering_GL4.lua b/luaui/Widgets/gfx_deferred_rendering_GL4.lua index 4570b09e390..d1b1a1cb598 100644 --- a/luaui/Widgets/gfx_deferred_rendering_GL4.lua +++ b/luaui/Widgets/gfx_deferred_rendering_GL4.lua @@ -1167,7 +1167,7 @@ end function widget:Shutdown() -- TODO: delete the VBOs and shaders like a good boy - WG['lightsgl4'] = nil + WG.lightsgl4 = nil widgetHandler:DeregisterGlobal('AddPointLight') widgetHandler:DeregisterGlobal('AddBeamLight') widgetHandler:DeregisterGlobal('AddConeLight') @@ -1237,7 +1237,7 @@ local function eventLightSpawner(eventName, unitID, unitDefID, teamID) if spValidUnitID(unitID) and spGetUnitIsDead(unitID) == false and unitEventLights[eventName] then if unitEventLights[eventName] then -- get the default event if it is defined - local lightList = unitEventLights[eventName][unitDefID] or unitEventLights[eventName]['default'] + local lightList = unitEventLights[eventName][unitDefID] or unitEventLights[eventName].default if lightList then for lightname, lightTable in pairs(lightList) do local visible = lightTable.alwaysVisible @@ -1509,8 +1509,8 @@ local function checkConfigUpdates() local newconfb = VFS.LoadFile('luaui/configs/DeferredLightsGL4WeaponsConfig.lua') if newconfa ~= configCache.confa or newconfb ~= configCache.confb then LoadLightConfig() - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end local allFeatures = spGetAllFeatures() local allFeaturesLen = #allFeatures @@ -1535,13 +1535,13 @@ function widget:Update(dt) local tus = spGetTimerMicros() -- update/handle Cursor Lights! - if WG['allycursors'] and WG['allycursors'].getLights() then + if WG.allycursors and WG.allycursors .getLights() then sec = sec + dt if sec >= 0.25 then - if cursorLightAlpha ~= WG['allycursors'].getLightStrength() or cursorLightRadius ~= WG['allycursors'].getLightRadius() or cursorLightSelfShadowing ~= WG['allycursors'].getLightSelfShadowing() then - cursorLightAlpha = WG['allycursors'].getLightStrength() - cursorLightRadius = WG['allycursors'].getLightRadius() - cursorLightSelfShadowing = WG['allycursors'].getLightSelfShadowing() + if cursorLightAlpha ~= WG.allycursors .getLightStrength() or cursorLightRadius ~= WG.allycursors .getLightRadius() or cursorLightSelfShadowing ~= WG.allycursors .getLightSelfShadowing() then + cursorLightAlpha = WG.allycursors .getLightStrength() + cursorLightRadius = WG.allycursors .getLightRadius() + cursorLightSelfShadowing = WG.allycursors .getLightSelfShadowing() InstanceVBOTable.clearInstanceTable(cursorPointLightVBO) cursorLights = nil end @@ -1549,7 +1549,7 @@ function widget:Update(dt) if not cursorLights then cursorLights = {} end - local cursors, notIdle = WG['allycursors'].getCursors() + local cursors, notIdle = WG.allycursors .getCursors() for playerID, cursor in pairs(cursors) do local teamColor = teamColors[playerID] if teamColor and not cursor[8] and notIdle[playerID] then @@ -1590,7 +1590,7 @@ function widget:Update(dt) params[12] = playerCursorLightBrightness * 0.1 AddLight("PLAYERCURSOR", nil, nil, cursorPointLightVBO, params) else - if cursorPointLightVBO.instanceIDtoIndex["PLAYERCURSOR"] then + if cursorPointLightVBO.instanceIDtoIndex.PLAYERCURSOR then popElementInstance(cursorPointLightVBO, "PLAYERCURSOR") end end @@ -1787,8 +1787,8 @@ function widget:Initialize() for i=1, 1 do AddRandomLight( mathRandom()) end end - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end local allFeatures = spGetAllFeatures() @@ -1797,44 +1797,44 @@ function widget:Initialize() widget:FeatureCreated(allFeatures[i]) end - WG['lightsgl4'] = {} - WG['lightsgl4'].AddPointLight = AddPointLight - WG['lightsgl4'].AddBeamLight = AddBeamLight - WG['lightsgl4'].AddConeLight = AddConeLight - WG['lightsgl4'].AddLight = AddLight - WG['lightsgl4'].RemoveLight = RemoveLight - WG['lightsgl4'].GetLightVBO = GetLightVBO + WG.lightsgl4 = {} + WG.lightsgl4 .AddPointLight = AddPointLight + WG.lightsgl4 .AddBeamLight = AddBeamLight + WG.lightsgl4 .AddConeLight = AddConeLight + WG.lightsgl4 .AddLight = AddLight + WG.lightsgl4 .RemoveLight = RemoveLight + WG.lightsgl4 .GetLightVBO = GetLightVBO - WG['lightsgl4'].IntensityMultiplier = function(value) + WG.lightsgl4 .IntensityMultiplier = function(value) intensityMultiplier = value end - WG['lightsgl4'].RadiusMultiplier = function(value) + WG.lightsgl4 .RadiusMultiplier = function(value) radiusMultiplier = value end - WG['lightsgl4'].ScreenSpaceShadows = function(value) + WG.lightsgl4 .ScreenSpaceShadows = function(value) screenSpaceShadows = value end - WG['lightsgl4'].ShowPlayerCursorLight = function(value) + WG.lightsgl4 .ShowPlayerCursorLight = function(value) showPlayerCursorLight = value -- Remove the player's cursor light on disabling this feature - if not showPlayerCursorLight and cursorPointLightVBO.instanceIDtoIndex["PLAYERCURSOR"] then + if not showPlayerCursorLight and cursorPointLightVBO.instanceIDtoIndex.PLAYERCURSOR then popElementInstance(cursorPointLightVBO, "PLAYERCURSOR") end end - WG['lightsgl4'].PlayerCursorLightRadius = function(value) + WG.lightsgl4 .PlayerCursorLightRadius = function(value) playerCursorLightRadius = value end - WG['lightsgl4'].PlayerCursorLightBrightness = function(value) + WG.lightsgl4 .PlayerCursorLightBrightness = function(value) playerCursorLightBrightness = value end - widgetHandler:RegisterGlobal('AddPointLight', WG['lightsgl4'].AddPointLight) - widgetHandler:RegisterGlobal('AddBeamLight', WG['lightsgl4'].AddBeamLight) - widgetHandler:RegisterGlobal('AddConeLight', WG['lightsgl4'].AddConeLight) - widgetHandler:RegisterGlobal('AddLight', WG['lightsgl4'].AddLight) - widgetHandler:RegisterGlobal('RemoveLight', WG['lightsgl4'].RemoveLight) - widgetHandler:RegisterGlobal('GetLightVBO', WG['lightsgl4'].GetLightVBO) + widgetHandler:RegisterGlobal('AddPointLight', WG.lightsgl4 .AddPointLight) + widgetHandler:RegisterGlobal('AddBeamLight', WG.lightsgl4 .AddBeamLight) + widgetHandler:RegisterGlobal('AddConeLight', WG.lightsgl4 .AddConeLight) + widgetHandler:RegisterGlobal('AddLight', WG.lightsgl4 .AddLight) + widgetHandler:RegisterGlobal('RemoveLight', WG.lightsgl4 .RemoveLight) + widgetHandler:RegisterGlobal('GetLightVBO', WG.lightsgl4 .GetLightVBO) widgetHandler:RegisterGlobal('UnitScriptLight', UnitScriptLight) end diff --git a/luaui/Widgets/gfx_distortion_gl4.lua b/luaui/Widgets/gfx_distortion_gl4.lua index 56d7953bb59..f742d7c8da9 100644 --- a/luaui/Widgets/gfx_distortion_gl4.lua +++ b/luaui/Widgets/gfx_distortion_gl4.lua @@ -814,7 +814,7 @@ end function widget:Shutdown() -- TODO: delete the VBOs and shaders like a good boy - WG['distortionsgl4'] = nil + WG.distortionsgl4 = nil widgetHandler:DeregisterGlobal('AddDistortion') widgetHandler:DeregisterGlobal('RemoveDistortion') @@ -879,7 +879,7 @@ local function eventDistortionSpawner(eventName, unitID, unitDefID, teamID) if spValidUnitID(unitID) and spGetUnitIsDead(unitID) == false and unitEventDistortions[eventName] then if unitEventDistortions[eventName] then -- get the default event if it is defined - local distortionList = unitEventDistortions[eventName][unitDefID] or unitEventDistortions[eventName]['default'] + local distortionList = unitEventDistortions[eventName][unitDefID] or unitEventDistortions[eventName].default if distortionList then for distortionname, distortionTable in pairs(distortionList) do local visible = distortionTable.alwaysVisible @@ -1147,8 +1147,8 @@ local function checkConfigUpdates() local newconfb = VFS.LoadFile('luaui/configs/DistortionGL4WeaponsConfig.lua') if newconfa ~= configCache.confa or newconfb ~= configCache.confb then LoadDistortionConfig() - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end configCache.confa = newconfa configCache.confb = newconfb @@ -1188,7 +1188,7 @@ local function DrawDistortionFunction2(gf) -- For render-to-texture glTexture(5, "$model_gbuffer_difftex") glTexture(6, noisetex3dcube) if shaderConfig.UNIFORMSBUFFERCOPY then - local UniformsBufferCopy = WG['api_unitbufferuniform_copy'].GetUnitUniformBufferCopy() + local UniformsBufferCopy = WG.api_unitbufferuniform_copy .GetUnitUniformBufferCopy() if not UniformsBufferCopy then spEcho("DistortionGL4: UniformsBufferCopy not found") return @@ -1351,29 +1351,29 @@ function widget:Initialize() local success, mapinfo = pcall(VFS.Include,"mapinfo.lua") -- load mapinfo.lua confs - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end for _, featureID in ipairs(spGetAllFeatures()) do widget:FeatureCreated(featureID) end - WG['distortionsgl4'] = {} - WG['distortionsgl4'].AddDistortion = AddDistortion - WG['distortionsgl4'].RemoveDistortion = RemoveDistortion - WG['distortionsgl4'].GetDistortionVBO = GetDistortionVBO + WG.distortionsgl4 = {} + WG.distortionsgl4 .AddDistortion = AddDistortion + WG.distortionsgl4 .RemoveDistortion = RemoveDistortion + WG.distortionsgl4 .GetDistortionVBO = GetDistortionVBO - WG['distortionsgl4'].IntensityMultiplier = function(value) + WG.distortionsgl4 .IntensityMultiplier = function(value) intensityMultiplier = value end - WG['distortionsgl4'].RadiusMultiplier = function(value) + WG.distortionsgl4 .RadiusMultiplier = function(value) radiusMultiplier = value end - widgetHandler:RegisterGlobal('AddDistortion', WG['distortionsgl4'].AddDistortion) - widgetHandler:RegisterGlobal('RemoveDistortion', WG['distortionsgl4'].RemoveDistortion) - widgetHandler:RegisterGlobal('GetDistortionVBO', WG['distortionsgl4'].GetDistortionVBO) + widgetHandler:RegisterGlobal('AddDistortion', WG.distortionsgl4 .AddDistortion) + widgetHandler:RegisterGlobal('RemoveDistortion', WG.distortionsgl4 .RemoveDistortion) + widgetHandler:RegisterGlobal('GetDistortionVBO', WG.distortionsgl4 .GetDistortionVBO) widgetHandler:RegisterGlobal('UnitScriptDistortion', UnitScriptDistortion) end diff --git a/luaui/Widgets/gfx_dof.lua b/luaui/Widgets/gfx_dof.lua index dba0114af9e..72d946f18f4 100644 --- a/luaui/Widgets/gfx_dof.lua +++ b/luaui/Widgets/gfx_dof.lua @@ -318,31 +318,31 @@ end function widget:Initialize() init() - WG['dof'] = {} - WG['dof'].getFocusDepth = function() + WG.dof = {} + WG.dof .getFocusDepth = function() return focusDepth end - WG['dof'].setFocusDepth = function(value) + WG.dof .setFocusDepth = function(value) focusDepth = value end - WG['dof'].getFstop = function() + WG.dof .getFstop = function() return fStop end - WG['dof'].setFstop = function(value) + WG.dof .setFstop = function(value) fStop = value autofocusInFocusMultiplier = fStop/2 end - WG['dof'].getHighQuality = function() + WG.dof .getHighQuality = function() return highQuality end - WG['dof'].setHighQuality = function(value) + WG.dof .setHighQuality = function(value) highQuality = value InitTextures() end - WG['dof'].getAutofocus = function() + WG.dof .getAutofocus = function() return autofocus end - WG['dof'].setAutofocus = function(value) + WG.dof .setAutofocus = function(value) autofocus = value mousefocus = not autofocus end @@ -361,7 +361,7 @@ end function widget:Shutdown() reset() - WG['dof'] = nil + WG.dof = nil end local function FilterCalculation() diff --git a/luaui/Widgets/gfx_glass.lua b/luaui/Widgets/gfx_glass.lua index a2bbbde0df3..5f59a9570d1 100644 --- a/luaui/Widgets/gfx_glass.lua +++ b/luaui/Widgets/gfx_glass.lua @@ -326,11 +326,11 @@ end function widget:DrawScreenEffects() if effectOn then --glCopyToTexture(screenCopyTex, 0, 0, vpx, vpy, vsx, vsy) - if WG['screencopymanager'] and WG['screencopymanager'].GetScreenCopy then - screenCopyTex = WG['screencopymanager'].GetScreenCopy() + if WG.screencopymanager and WG.screencopymanager .GetScreenCopy then + screenCopyTex = WG.screencopymanager .GetScreenCopy() else --glCopyToTexture(screenCopyTex, 0, 0, vpx, vpy, vsx, vsy) - spEcho("Missing Screencopy Manager, exiting", WG['screencopymanager'] ) + spEcho("Missing Screencopy Manager, exiting", WG.screencopymanager ) widgetHandler:RemoveWidget() return false end diff --git a/luaui/Widgets/gfx_guishader.lua b/luaui/Widgets/gfx_guishader.lua index d3d6ec0d1d2..12fb5eb7729 100644 --- a/luaui/Widgets/gfx_guishader.lua +++ b/luaui/Widgets/gfx_guishader.lua @@ -364,7 +364,7 @@ end function widget:Shutdown() DeleteShaders() - WG['guishader'] = nil + WG.guishader = nil widgetHandler:DeregisterGlobal('GuishaderInsertRect') widgetHandler:DeregisterGlobal('GuishaderRemoveRect') end @@ -379,10 +379,10 @@ function widget:DrawScreenEffects() -- This blurs the world underneath UI elemen return end - if WG['screencopymanager'] and WG['screencopymanager'].GetScreenCopy then - screencopy = WG['screencopymanager'].GetScreenCopy() + if WG.screencopymanager and WG.screencopymanager .GetScreenCopy then + screencopy = WG.screencopymanager .GetScreenCopy() else - spEcho("Missing Screencopy Manager, exiting", WG['screencopymanager'] ) + spEcho("Missing Screencopy Manager, exiting", WG.screencopymanager ) widgetHandler:RemoveWidget() return false end @@ -506,14 +506,14 @@ function widget:Initialize() self:UpdateCallIns() - WG['guishader'] = {} - WG['guishader'].InsertDlist = function(dlist, name, force) + WG.guishader = {} + WG.guishader .InsertDlist = function(dlist, name, force) if force or guishaderDlists[name] ~= dlist then guishaderDlists[name] = dlist updateStencilTexture = true end end - WG['guishader'].RemoveDlist = function(name) + WG.guishader .RemoveDlist = function(name) local found = guishaderDlists[name] ~= nil if found then guishaderDlists[name] = nil @@ -521,7 +521,7 @@ function widget:Initialize() end return found end - WG['guishader'].DeleteDlist = function(name) + WG.guishader .DeleteDlist = function(name) local found = guishaderDlists[name] ~= nil if found then deleteDlistQueue[#deleteDlistQueue + 1] = guishaderDlists[name] @@ -530,11 +530,11 @@ function widget:Initialize() end return found end - WG['guishader'].InsertRect = function(left, top, right, bottom, name) + WG.guishader .InsertRect = function(left, top, right, bottom, name) guishaderRects[name] = { left, top, right, bottom } updateStencilTexture = true end - WG['guishader'].RemoveRect = function(name) + WG.guishader .RemoveRect = function(name) local found = guishaderRects[name] ~= nil if found then guishaderRects[name] = nil @@ -542,11 +542,11 @@ function widget:Initialize() end return found end - WG['guishader'].InsertScreenDlist = function(dlist, name) + WG.guishader .InsertScreenDlist = function(dlist, name) guishaderScreenDlists[name] = dlist updateStencilTextureScreen = true end - WG['guishader'].RemoveScreenDlist = function(name) + WG.guishader .RemoveScreenDlist = function(name) local found = guishaderScreenDlists[name] ~= nil if found then guishaderScreenDlists[name] = nil @@ -554,7 +554,7 @@ function widget:Initialize() end return found end - WG['guishader'].DeleteScreenDlist = function(name) + WG.guishader .DeleteScreenDlist = function(name) local found = guishaderScreenDlists[name] ~= nil if found then deleteDlistQueue[#deleteDlistQueue + 1] = guishaderScreenDlists[name] @@ -562,11 +562,11 @@ function widget:Initialize() end return found end - WG['guishader'].InsertScreenRect = function(left, top, right, bottom, name) + WG.guishader .InsertScreenRect = function(left, top, right, bottom, name) guishaderScreenRects[name] = { left, top, right, bottom } updateStencilTextureScreen = true end - WG['guishader'].RemoveScreenRect = function(name) + WG.guishader .RemoveScreenRect = function(name) local found = guishaderScreenRects[name] ~= nil if found then guishaderScreenRects[name] = nil @@ -575,19 +575,19 @@ function widget:Initialize() return found end - WG['guishader'].setScreenBlur = function(value) + WG.guishader .setScreenBlur = function(value) updateStencilTextureScreen = true screenBlur = value end - WG['guishader'].getScreenBlur = function(value) + WG.guishader .getScreenBlur = function(value) return screenBlur end -- will let it draw a given dlist to be rendered on top of screenblur - WG['guishader'].insertRenderDlist = function(value) + WG.guishader .insertRenderDlist = function(value) renderDlists[value] = true end - WG['guishader'].removeRenderDlist = function(value) + WG.guishader .removeRenderDlist = function(value) if renderDlists[value] then renderDlists[value] = nil end @@ -595,8 +595,8 @@ function widget:Initialize() WG.guishader.DrawScreen = DrawScreen -- widgethandler wont call DrawScreen when chobby interface is shown, but it will call this one as exception - widgetHandler:RegisterGlobal('GuishaderInsertRect', WG['guishader'].InsertRect) - widgetHandler:RegisterGlobal('GuishaderRemoveRect', WG['guishader'].RemoveRect) + widgetHandler:RegisterGlobal('GuishaderInsertRect', WG.guishader .InsertRect) + widgetHandler:RegisterGlobal('GuishaderRemoveRect', WG.guishader .RemoveRect) end function widget:RecvLuaMsg(msg, playerID) diff --git a/luaui/Widgets/gfx_limit_idle_fps.lua b/luaui/Widgets/gfx_limit_idle_fps.lua index 996d96c9c2f..25c1f1563b5 100644 --- a/luaui/Widgets/gfx_limit_idle_fps.lua +++ b/luaui/Widgets/gfx_limit_idle_fps.lua @@ -35,7 +35,7 @@ local chobbyInterface = false function widget:Shutdown() Spring.SetConfigInt("VSync", vsyncValueActive) - WG['limitidlefps'] = nil + WG.limitidlefps = nil end function widget:RecvLuaMsg(msg, playerID) @@ -50,11 +50,11 @@ function widget:RecvLuaMsg(msg, playerID) end function widget:Initialize() - WG['limitidlefps'] = {} - WG['limitidlefps'].restrictFps = function() + WG.limitidlefps = {} + WG.limitidlefps .restrictFps = function() return restrictFps end - WG['limitidlefps'].update = function() + WG.limitidlefps .update = function() lastUserInputTime = os.clock() end end diff --git a/luaui/Widgets/gfx_los_colors.lua b/luaui/Widgets/gfx_los_colors.lua index 3d44fff2377..ba6eecc956a 100644 --- a/luaui/Widgets/gfx_los_colors.lua +++ b/luaui/Widgets/gfx_los_colors.lua @@ -139,20 +139,20 @@ function widget:Initialize() widgetHandler:AddAction("losradar", toggleLOSRadars, nil, 'p') widgetHandler:AddAction("loscolor", toggleLOSColors, nil, 'p') - WG['los'] = {} - WG['los'].getColorize = function() + WG.los = {} + WG.los .getColorize = function() return colorize end - WG['los'].setColorize = function(value) + WG.los .setColorize = function(value) colorize = value if not losWithRadarEnabled or not specDetected then refreshLOS() end end - WG['los'].getOpacity = function() + WG.los .getOpacity = function() return opacity end - WG['los'].setOpacity = function(value) + WG.los .setOpacity = function(value) opacity = value if not losWithRadarEnabled or not specDetected then refreshLOS() diff --git a/luaui/Widgets/gfx_map_lights.lua b/luaui/Widgets/gfx_map_lights.lua index 9096cf63fd6..34332908445 100644 --- a/luaui/Widgets/gfx_map_lights.lua +++ b/luaui/Widgets/gfx_map_lights.lua @@ -42,12 +42,12 @@ local maplights = { function widget:Initialize() --spEcho("Loading Maplights") --spEcho(WG, WG['lighteffects'], WG['lighteffects'].createLight,Script.LuaUI("GadgetCreateLight")) - if (WG and WG['lighteffects'] and WG['lighteffects'].createLight) or Script.LuaUI("GadgetCreateLight") then + if (WG and WG.lighteffects and WG.lighteffects .createLight) or Script.LuaUI("GadgetCreateLight") then for _, lightparams in pairs(maplights) do if WG then - lightparams.lightID = WG['lighteffects'].createLight( + lightparams.lightID = WG.lighteffects .createLight( lightparams.lightname, lightparams.pos[1], lightparams.pos[2], @@ -73,9 +73,9 @@ end function widget:Shutdown() for _, lightparams in pairs(maplights) do - if lightparams.lightID and ((WG and WG['lighteffects'] and WG['lighteffects'].removeLight) or Script.LuaUI("GadgetRemoveLight")) then + if lightparams.lightID and ((WG and WG.lighteffects and WG.lighteffects .removeLight) or Script.LuaUI("GadgetRemoveLight")) then if WG then - WG['lighteffects'].removeLight(lightparams.lightID) + WG.lighteffects .removeLight(lightparams.lightID) else Script.LuaUI.GadgetRemoveLight(lightparams.lightID) end diff --git a/luaui/Widgets/gfx_norush_timer_gl4.lua b/luaui/Widgets/gfx_norush_timer_gl4.lua index e1b79b7fe69..cc755d53ff3 100644 --- a/luaui/Widgets/gfx_norush_timer_gl4.lua +++ b/luaui/Widgets/gfx_norush_timer_gl4.lua @@ -78,8 +78,8 @@ function widget:DrawWorldPreUnit() if advMapShading then gl.Texture(0, "$map_gbuffer_zvaltex") else - if WG['screencopymanager'] and WG['screencopymanager'].GetDepthCopy() then - gl.Texture(0, WG['screencopymanager'].GetDepthCopy()) + if WG.screencopymanager and WG.screencopymanager .GetDepthCopy() then + gl.Texture(0, WG.screencopymanager .GetDepthCopy()) else return end diff --git a/luaui/Widgets/gfx_orb_effects_gl4.lua b/luaui/Widgets/gfx_orb_effects_gl4.lua index f4819e22ac2..709d1d5e6e9 100644 --- a/luaui/Widgets/gfx_orb_effects_gl4.lua +++ b/luaui/Widgets/gfx_orb_effects_gl4.lua @@ -180,112 +180,112 @@ local legdeflectorShieldSphere = table.merge(defaults, { }) local UnitEffects = { - ["armjuno"] = { + armjuno = { { class = 'ShieldSphere', options = armjunoShieldSphere }, { class = 'ShieldJitter', options = { life = math.huge, pos = { 0, 72, 0 }, size = 14, precision = 22, repeatEffect = true } }, }, - ["legjuno"] = { + legjuno = { { class = 'ShieldSphere', options = legjunoShieldSphere }, { class = 'ShieldJitter', options = { life = math.huge, pos = { 0, 72, 0 }, size = 14, precision = 22, repeatEffect = true } }, }, - ["corjuno"] = { + corjuno = { { class = 'ShieldSphere', options = corjunoShieldSphere }, { class = 'ShieldJitter', options = { life = math.huge, pos = { 0, 72, 0 }, size = 14, precision = 22, repeatEffect = true } }, }, --// FUSIONS //-------------------------- - ["corafus"] = { + corafus = { { class = 'ShieldSphere', options = corafusShieldSphere }, { class = 'ShieldJitter', options = { layer = -16, life = math.huge, pos = { 0, 60, 0 }, size = 32.5, precision = 22, repeatEffect = true } }, }, - ["corfus"] = { + corfus = { { class = 'ShieldSphere', options = corfusShieldSphere }, { class = 'ShieldJitter', options = { life = math.huge, pos = { 0, 50, 0 }, size = 23.5, precision = 22, repeatEffect = true } }, }, - ["legfus"] = { + legfus = { { class = 'ShieldSphere', options = legfusShieldSphere }, { class = 'ShieldJitter', options = { life = math.huge, pos = { 0, 19, 0 }, size = 23.5, precision = 22, repeatEffect = true } }, }, - ["armafus"] = { + armafus = { { class = 'ShieldSphere', options = armafusShieldSphere }, { class = 'ShieldJitter', options = { layer = -16, life = math.huge, pos = { 0, 60, 0 }, size = 28.5, precision = 22, repeatEffect = true } }, }, - ["legafus"] = { + legafus = { { class = 'ShieldSphere', options = legafusShieldSphere }, { class = 'ShieldJitter', options = { layer = -16, life = math.huge, pos = { 0, 60, 0 }, size = 38.5, precision = 22, repeatEffect = true } }, }, - ["armafust3"] = { + armafust3 = { { class = 'ShieldSphere', options = armafust3ShieldSphere }, { class = 'ShieldJitter', options = { layer = -16, life = math.huge, pos = { 0, 120, 0 }, size = 57, precision = 22, repeatEffect = true } }, }, - ["corafust3"] = { + corafust3 = { { class = 'ShieldSphere', options = corafust3ShieldSphere }, { class = 'ShieldJitter', options = { layer = -16, life = math.huge, pos = { 0, 120, 0 }, size = 65, precision = 22, repeatEffect = true } }, }, - ["legafust3"] = { + legafust3 = { { class = 'ShieldSphere', options = legafust3ShieldSphere }, { class = 'ShieldJitter', options = { layer = -16, life = math.huge, pos = { 0, 120, 0 }, size = 77, precision = 22, repeatEffect = true } }, }, - ["resourcecheat"] = { + resourcecheat = { { class = 'ShieldSphere', options = armafusShieldSphere }, { class = 'ShieldJitter', options = { layer = -16, life = math.huge, pos = { 0, 60, 0 }, size = 28.5, precision = 22, repeatEffect = true } }, }, - ["corgate"] = { + corgate = { { class = 'ShieldJitter', options = { delay = 0, life = math.huge, pos = { 0, 42, 0 }, size = 12, precision = 22, repeatEffect = true , isShiedl } }, { class = 'ShieldSphere', options = corgateShieldSphere }, --{class='ShieldJitter', options={delay=0,life=math.huge, pos={0,42,0.0}, size=555, precision=0, strength= 0.001, repeatEffect=true}}, --{class='ShieldJitter',options={life=math.huge, pos={0,42,0}, size=20, precision=2, repeatEffect=true}}, }, - ["corgatet3"] = { + corgatet3 = { { class = 'ShieldJitter', options = { delay = 0, life = math.huge, pos = { 0, 75, 0 }, size = 18, precision = 22, repeatEffect = true , isShiedl } }, { class = 'ShieldSphere', options = corgatet3ShieldSphere }, --{class='ShieldJitter', options={delay=0,life=math.huge, pos={0,42,0.0}, size=555, precision=0, strength= 0.001, repeatEffect=true}}, --{class='ShieldJitter',options={life=math.huge, pos={0,42,0}, size=20, precision=2, repeatEffect=true}}, }, - ["corfgate"] = { + corfgate = { { class = 'ShieldJitter', options = { delay = 0, life = math.huge, pos = { 0, 42, 0 }, size = 12, precision = 22, repeatEffect = true } }, { class = 'ShieldSphere', options = corgateShieldSphere }, --{class='ShieldJitter', options={delay=0,life=math.huge, pos={0,42,0.0}, size=555, precision=0, strength= 0.001, repeatEffect=true}}, --{class='ShieldJitter',options={life=math.huge, pos={0,42,0}, size=20, precision=2, repeatEffect=true}}, }, - ["armgate"] = { + armgate = { { class = 'ShieldJitter', options = { delay = 0, life = math.huge, pos = { 0, 20, -5 }, size = 15, precision = 22, repeatEffect = true } }, { class = 'ShieldSphere', options = armgateShieldSphere }, --{class='ShieldJitter', options={delay=0,life=math.huge, pos={0,23.5,-5}, size=555, precision=0, strength=0.001, repeatEffect=true}}, }, - ["armgatet3"] = { + armgatet3 = { { class = 'ShieldJitter', options = { delay = 0, life = math.huge, pos = { 0, 37, -5 }, size = 21, precision = 22, repeatEffect = true } }, { class = 'ShieldSphere', options = armgatet3ShieldSphere }, --{class='ShieldJitter', options={delay=0,life=math.huge, pos={0,23.5,-5}, size=555, precision=0, strength=0.001, repeatEffect=true}}, }, - ["leggatet3"] = { + leggatet3 = { { class = 'ShieldJitter', options = { delay = 0, life = math.huge, pos = { 0, 45, 0 }, size = 20, precision = 22, repeatEffect = true } }, { class = 'ShieldSphere', options = leggatet3ShieldSphere }, --{class='ShieldJitter', options={delay=0,life=math.huge, pos={0,23.5,-5}, size=555, precision=0, strength=0.001, repeatEffect=true}}, }, - ["armfgate"] = { + armfgate = { { class = 'ShieldJitter', options = { delay = 0, life = math.huge, pos = { 0, 25, 0 }, size = 15, precision = 22, repeatEffect = true } }, { class = 'ShieldSphere', options = table.merge(armgateShieldSphere, { pos = { 0, 25, 0 } }) }, --{class='ShieldJitter', options={delay=0,life=math.huge, pos={0,25,0}, size=555, precision=0, strength= 0.001, repeatEffect=true}}, }, - ["legdeflector"] = { + legdeflector = { { class = 'ShieldJitter', options = { delay = 0, life = math.huge, pos = { 0, 20, -5 }, size = 15, precision = 22, repeatEffect = true } }, { class = 'ShieldSphere', options = legdeflectorShieldSphere }, --{class='ShieldJitter', options={delay=0,life=math.huge, pos={0,23.5,-5}, size=555, precision=0, strength=0.001, repeatEffect=true}}, }, - ["lootboxbronze"] = { + lootboxbronze = { { class = 'ShieldSphere', options = table.merge(corfusShieldSphere, {pos = { 0, 34, 0 }, size = 10} ) }, { class = 'ShieldJitter', options = { life = math.huge, pos = { 0, 34, 0 }, size = 10.5, precision = 22, repeatEffect = true } }, }, - ["lootboxsilver"] = { + lootboxsilver = { { class = 'ShieldSphere', options = table.merge(corfusShieldSphere, {pos = { 0, 52, 0 }, size = 15} ) }, { class = 'ShieldJitter', options = { life = math.huge, pos = { 0, 52, 0 }, size = 15.5, precision = 22, repeatEffect = true } }, }, - ["lootboxgold"] = { + lootboxgold = { { class = 'ShieldSphere', options = table.merge(corfusShieldSphere, {pos = { 0, 69, 0 }, size = 20} ) }, { class = 'ShieldJitter', options = { life = math.huge, pos = { 0, 69, 0 }, size = 20.5, precision = 22, repeatEffect = true } }, }, - ["lootboxplatinum"] = { + lootboxplatinum = { { class = 'ShieldSphere', options = table.merge(corfusShieldSphere, {pos = { 0, 87, 0 }, size = 25} ) }, { class = 'ShieldJitter', options = { life = math.huge, pos = { 0, 87, 0 }, size = 25.5, precision = 22, repeatEffect = true } }, }, @@ -293,7 +293,7 @@ local UnitEffects = { } local scavEffects = {} -if UnitDefNames['armcom_scav'] then +if UnitDefNames.armcom_scav then for k, effect in pairs(UnitEffects) do scavEffects[k .. '_scav'] = effect if scavEffects[k .. '_scav'].options then @@ -863,8 +863,8 @@ function widget:Initialize() return end initGL4() - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) else spEcho("Unit Tracker API unavailable, exiting Orb GL4") widgetHandler:RemoveWidget() diff --git a/luaui/Widgets/gfx_paralyze_effect.lua b/luaui/Widgets/gfx_paralyze_effect.lua index d65d9da77f1..3fa65e425d4 100644 --- a/luaui/Widgets/gfx_paralyze_effect.lua +++ b/luaui/Widgets/gfx_paralyze_effect.lua @@ -511,14 +511,14 @@ function widget:Initialize() gl.SetUnitBufferUniforms(unitID, {1.01}, 4) end end - WG['DrawParalyzedUnitGL4'] = DrawParalyzedUnitGL4 - WG['StopDrawParalyzedUnitGL4'] = StopDrawParalyzedUnitGL4 + WG.DrawParalyzedUnitGL4 = DrawParalyzedUnitGL4 + WG.StopDrawParalyzedUnitGL4 = StopDrawParalyzedUnitGL4 widgetHandler:RegisterGlobal("UnitParalyzeDamageEffect",UnitParalyzeDamageEffect ) end function widget:Shutdown() - WG['DrawParalyzedUnitGL4'] = nil - WG['StopDrawParalyzedUnitGL4'] = nil + WG.DrawParalyzedUnitGL4 = nil + WG.StopDrawParalyzedUnitGL4 = nil widgetHandler:DeregisterGlobal("UnitParalyzeDamageEffect" ) end diff --git a/luaui/Widgets/gfx_snow.lua b/luaui/Widgets/gfx_snow.lua index ca2cf0d82f2..1388fd8685d 100644 --- a/luaui/Widgets/gfx_snow.lua +++ b/luaui/Widgets/gfx_snow.lua @@ -155,7 +155,7 @@ end function widget:Shutdown() removeSnow() - WG['snow'] = nil + WG.snow = nil end -- creating multiple lists per particleType so we can switch to less particles without causing lag @@ -302,21 +302,21 @@ end function widget:Initialize() widget:ViewResize() - WG['snow'] = {} - WG['snow'].getSnowMap = function() + WG.snow = {} + WG.snow .getSnowMap = function() if enabled or widgetDisabledSnow then return true else return false end end - WG['snow'].setMultiplier = function(value) + WG.snow .setMultiplier = function(value) customParticleMultiplier = value if enabled or widgetDisabledSnow then CreateParticleLists() end end - WG['snow'].setAutoReduce = function(value) + WG.snow .setAutoReduce = function(value) autoReduce = value if autoReduce == false then enabled = true @@ -326,7 +326,7 @@ function widget:Initialize() averageFps = spGetFPS() end end - WG['snow'].setSnowMap = function(value) + WG.snow .setSnowMap = function(value) snowMaps[currentMapname] = value enabled = value if value then diff --git a/luaui/Widgets/gfx_ssao.lua b/luaui/Widgets/gfx_ssao.lua index 36a1506d577..9e21924e3db 100644 --- a/luaui/Widgets/gfx_ssao.lua +++ b/luaui/Widgets/gfx_ssao.lua @@ -458,7 +458,7 @@ local function InitGL() -- ensure stencil is available if shaderConfig.USE_STENCIL == 1 then - local stencilApi = WG['unitstencilapi'] + local stencilApi = WG.unitstencilapi if stencilApi then getStencilTexture = stencilApi.GetUnitStencilTexture unitStencilTexture = getStencilTexture() @@ -591,40 +591,40 @@ function widget:ViewResize() end function widget:Initialize() - WG['ssao'] = {} - WG['ssao'].getPreset = function() + WG.ssao = {} + WG.ssao .getPreset = function() return preset end - WG['ssao'].setPreset = function(value) + WG.ssao .setPreset = function(value) preset = value InitShaderDefines() ActivatePreset(preset) CleanGL() InitGL() end - WG['ssao'].getStrength = function() + WG.ssao .getStrength = function() return shaderConfig.SSAO_ALPHA_POW end - WG['ssao'].setStrength = function(value) + WG.ssao .setStrength = function(value) shaderConfig.SSAO_ALPHA_POW = value CleanGL() InitGL() end - WG['ssao'].getRadius = function() + WG.ssao .getRadius = function() return shaderConfig.SSAO_RADIUS end - WG['ssao'].setRadius = function(value) + WG.ssao .setRadius = function(value) shaderConfig.SSAO_RADIUS = value CleanGL() InitGL() end - if WG['flowui_gl4'] and WG['flowui_gl4'].forwardslider then + if WG.flowui_gl4 and WG.flowui_gl4 .forwardslider then spEcho(" WG[flowui_gl4] detected") - shaderDefinedSlidersLayer, shaderDefinedSlidersWindow = WG['flowui_gl4'].requestWidgetLayer(shaderDefinedSliders) -- this is a window + shaderDefinedSlidersLayer, shaderDefinedSlidersWindow = WG.flowui_gl4 .requestWidgetLayer(shaderDefinedSliders) -- this is a window shaderDefinedSliders.parent = shaderDefinedSlidersWindow - WG['flowui_gl4'].forwardslider(shaderDefinedSliders) + WG.flowui_gl4 .forwardslider(shaderDefinedSliders) end InitGL() diff --git a/luaui/Widgets/gfx_unit_stencil_gl4.lua b/luaui/Widgets/gfx_unit_stencil_gl4.lua index acb74627ba9..85f952d3d0b 100644 --- a/luaui/Widgets/gfx_unit_stencil_gl4.lua +++ b/luaui/Widgets/gfx_unit_stencil_gl4.lua @@ -402,13 +402,13 @@ function widget:Initialize() unitStencilShader = InitDrawPrimitiveAtUnit(shaderConfig, "unitStencils") widget:ViewResize() - WG['unitstencilapi'] = {} - WG['unitstencilapi'].GetUnitStencilTexture = GetUnitStencilTexture - WG['unitstencilapi'].members = {ok = "yes", vsSrc = vsSrc, gsSrc = gsSrc, fsSrc = fsSrc, unitStencilVBO = unitStencilVBO, featureStencilVBO = featureStencilVBO} - widgetHandler:RegisterGlobal('GetUnitStencilTexture', WG['unitstencilapi'].GetUnitStencilTexture) + WG.unitstencilapi = {} + WG.unitstencilapi .GetUnitStencilTexture = GetUnitStencilTexture + WG.unitstencilapi .members = {ok = "yes", vsSrc = vsSrc, gsSrc = gsSrc, fsSrc = fsSrc, unitStencilVBO = unitStencilVBO, featureStencilVBO = featureStencilVBO} + widgetHandler:RegisterGlobal('GetUnitStencilTexture', WG.unitstencilapi .GetUnitStencilTexture) - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - local visibleUnits = WG['unittrackerapi'].visibleUnits + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + local visibleUnits = WG.unittrackerapi .visibleUnits for unitID, unitDefID in pairs(visibleUnits) do widget:VisibleUnitAdded(unitID, unitDefID) end @@ -421,6 +421,6 @@ end function widget:Shutdown() gl.DeleteTexture(unitFeatureStencilTex) unitFeatureStencilTex = nil - WG['unitstencilapi'] = nil + WG.unitstencilapi = nil widgetHandler:DeregisterGlobal('GetUnitStencilTexture') end diff --git a/luaui/Widgets/gfx_volumetric_clouds.lua b/luaui/Widgets/gfx_volumetric_clouds.lua index 67b9223ae3f..2d821346452 100644 --- a/luaui/Widgets/gfx_volumetric_clouds.lua +++ b/luaui/Widgets/gfx_volumetric_clouds.lua @@ -570,11 +570,11 @@ end function widget:Initialize() - WG['clouds'] = {} - WG['clouds'].getOpacity = function() + WG.clouds = {} + WG.clouds .getOpacity = function() return opacityMult end - WG['clouds'].setOpacity = function(value) + WG.clouds .setOpacity = function(value) opacityMult = value init() end diff --git a/luaui/Widgets/gui_advplayerslist.lua b/luaui/Widgets/gui_advplayerslist.lua index 3fcb8d59736..55c7ca13e1f 100644 --- a/luaui/Widgets/gui_advplayerslist.lua +++ b/luaui/Widgets/gui_advplayerslist.lua @@ -147,58 +147,58 @@ local specOffset = 256 -- IMAGES -------------------------------------------------------------------------------- local images = {} -images['imgDir'] = LUAUI_DIRNAME .. "Images/advplayerslist/" -images['imageDirectory'] = ":lc:" .. images['imgDir'] -images['flagsExt'] = '.png' -images['flagHeight'] = 10 +images.imgDir = LUAUI_DIRNAME .. "Images/advplayerslist/" +images.imageDirectory = ":lc:" .. images.imgDir +images.flagsExt = '.png' +images.flagHeight = 10 local pics = { - currentPic = images['imageDirectory'] .. "indicator.dds", - unitsPic = images['imageDirectory'] .. "units.dds", - energyPic = images['imageDirectory'] .. "energy.dds", - metalPic = images['imageDirectory'] .. "metal.dds", - notFirstPic = images['imageDirectory'] .. "notfirst.dds", - pingPic = images['imageDirectory'] .. "ping.dds", - cpuPic = images['imageDirectory'] .. "cpu.dds", - barPic = images['imageDirectory'] .. "bar.png", - pointPic = images['imageDirectory'] .. "point.dds", - pencilPic = images['imageDirectory'] .. "pencil.dds", - eraserPic = images['imageDirectory'] .. "eraser.dds", - lowPic = images['imageDirectory'] .. "low.dds", - arrowPic = images['imageDirectory'] .. "arrow.dds", - takePic = images['imageDirectory'] .. "take.dds", - indentPic = images['imageDirectory'] .. "indent.png", - cameraPic = images['imageDirectory'] .. "camera.dds", - countryPic = images['imageDirectory'] .. "country.dds", - readyTexture = images['imageDirectory'] .. "indicator.dds", - allyPic = images['imageDirectory'] .. "ally.dds", - unallyPic = images['imageDirectory'] .. "unally.dds", - resourcesPic = images['imageDirectory'] .. "res.png", - resbarPic = images['imageDirectory'] .. "resbar.png", - resbarBgPic = images['imageDirectory'] .. "resbarBg.png", - incomePic = images['imageDirectory'] .. "res.png", - barGlowCenterPic = images['imageDirectory'] .. "barglow-center.png", - barGlowEdgePic = images['imageDirectory'] .. "barglow-edge.png", - - chatPic = images['imageDirectory'] .. "chat.dds", - sidePic = images['imageDirectory'] .. "side.dds", - sharePic = images['imageDirectory'] .. "share.dds", - idPic = images['imageDirectory'] .. "id.dds", - tsPic = images['imageDirectory'] .. "ts.dds", - - rank0 = images['imageDirectory'] .. "ranks/1.png", - rank1 = images['imageDirectory'] .. "ranks/2.png", - rank2 = images['imageDirectory'] .. "ranks/3.png", - rank3 = images['imageDirectory'] .. "ranks/4.png", - rank4 = images['imageDirectory'] .. "ranks/5.png", - rank5 = images['imageDirectory'] .. "ranks/6.png", - rank6 = images['imageDirectory'] .. "ranks/7.png", - rank7 = images['imageDirectory'] .. "ranks/8.png", + currentPic = images.imageDirectory .. "indicator.dds", + unitsPic = images.imageDirectory .. "units.dds", + energyPic = images.imageDirectory .. "energy.dds", + metalPic = images.imageDirectory .. "metal.dds", + notFirstPic = images.imageDirectory .. "notfirst.dds", + pingPic = images.imageDirectory .. "ping.dds", + cpuPic = images.imageDirectory .. "cpu.dds", + barPic = images.imageDirectory .. "bar.png", + pointPic = images.imageDirectory .. "point.dds", + pencilPic = images.imageDirectory .. "pencil.dds", + eraserPic = images.imageDirectory .. "eraser.dds", + lowPic = images.imageDirectory .. "low.dds", + arrowPic = images.imageDirectory .. "arrow.dds", + takePic = images.imageDirectory .. "take.dds", + indentPic = images.imageDirectory .. "indent.png", + cameraPic = images.imageDirectory .. "camera.dds", + countryPic = images.imageDirectory .. "country.dds", + readyTexture = images.imageDirectory .. "indicator.dds", + allyPic = images.imageDirectory .. "ally.dds", + unallyPic = images.imageDirectory .. "unally.dds", + resourcesPic = images.imageDirectory .. "res.png", + resbarPic = images.imageDirectory .. "resbar.png", + resbarBgPic = images.imageDirectory .. "resbarBg.png", + incomePic = images.imageDirectory .. "res.png", + barGlowCenterPic = images.imageDirectory .. "barglow-center.png", + barGlowEdgePic = images.imageDirectory .. "barglow-edge.png", + + chatPic = images.imageDirectory .. "chat.dds", + sidePic = images.imageDirectory .. "side.dds", + sharePic = images.imageDirectory .. "share.dds", + idPic = images.imageDirectory .. "id.dds", + tsPic = images.imageDirectory .. "ts.dds", + + rank0 = images.imageDirectory .. "ranks/1.png", + rank1 = images.imageDirectory .. "ranks/2.png", + rank2 = images.imageDirectory .. "ranks/3.png", + rank3 = images.imageDirectory .. "ranks/4.png", + rank4 = images.imageDirectory .. "ranks/5.png", + rank5 = images.imageDirectory .. "ranks/6.png", + rank6 = images.imageDirectory .. "ranks/7.png", + rank7 = images.imageDirectory .. "ranks/8.png", } local rankPics = { - [0] = pics["rank0"], [1] = pics["rank1"], [2] = pics["rank2"], [3] = pics["rank3"], - [4] = pics["rank4"], [5] = pics["rank5"], [6] = pics["rank6"], [7] = pics["rank7"], + [0] = pics.rank0 , [1] = pics.rank1 , [2] = pics.rank2 , [3] = pics.rank3 , + [4] = pics.rank4 , [5] = pics.rank5 , [6] = pics.rank6 , [7] = pics.rank7 , } local countryFlagCache = {} -- country code -> texture path or false @@ -394,7 +394,7 @@ m_indent = { width = 9, position = position, posX = 0, - pic = pics["indentPic"], + pic = pics.indentPic , noPic = true, } position = position + 1 @@ -407,7 +407,7 @@ m_allyID = { width = 17, position = position, posX = 0, - pic = pics["idPic"], + pic = pics.idPic , } position = position + 1 @@ -419,7 +419,7 @@ m_ID = { width = 17, position = position, posX = 0, - pic = pics["idPic"], + pic = pics.idPic , } position = position + 1 @@ -431,7 +431,7 @@ m_playerID = { width = 17, position = position, posX = 0, - pic = pics["idPic"], + pic = pics.idPic , } position = position + 1 @@ -444,7 +444,7 @@ m_rank = { width = 18, position = position, posX = 0, - pic = pics["rank6"], + pic = pics.rank6 , } position = position + 1 @@ -457,7 +457,7 @@ m_country = { width = 20, position = position, posX = 0, - pic = pics["countryPic"], + pic = pics.countryPic , } position = position + 1 @@ -469,7 +469,7 @@ m_side = { width = 18, position = position, posX = 0, - pic = pics["sidePic"], + pic = pics.sidePic , } position = position + 1 @@ -481,7 +481,7 @@ m_skill = { width = 18, position = position, posX = 0, - pic = pics["tsPic"], + pic = pics.tsPic , } position = position + 1 @@ -507,7 +507,7 @@ m_cpuping = { width = 24, position = position, posX = 0, - pic = pics["cpuPic"], + pic = pics.cpuPic , } position = position + 1 @@ -519,7 +519,7 @@ m_resources = { width = 28, position = position, posX = 0, - pic = pics["resourcesPic"], + pic = pics.resourcesPic , picGap = 7, } position = position + 1 @@ -532,7 +532,7 @@ m_income = { width = 28, position = position, posX = 0, - pic = pics["incomePic"], + pic = pics.incomePic , picGap = 7, } position = position + 1 @@ -545,7 +545,7 @@ m_share = { width = 50, position = position, posX = 0, - pic = pics["sharePic"], + pic = pics.sharePic , } position = position + 1 @@ -557,7 +557,7 @@ m_chat = { width = 18, position = position, posX = 0, - pic = pics["chatPic"], + pic = pics.chatPic , } position = position + 1 @@ -571,7 +571,7 @@ m_alliance = { width = 16, position = position, posX = 0, - pic = pics["allyPic"], + pic = pics.allyPic , noPic = false, } @@ -607,7 +607,7 @@ m_point = { m_take = { active = true, default = true, - pic = pics["takePic"], + pic = pics.takePic , } local specsLabelOffset = 0 @@ -968,11 +968,11 @@ function widget:Initialize() rankTeamPlayers() end - WG['advplayerlist_api'] = {} - WG['advplayerlist_api'].GetAlwaysHideSpecs = function() + WG.advplayerlist_api = {} + WG.advplayerlist_api .GetAlwaysHideSpecs = function() return alwaysHideSpecs end - WG['advplayerlist_api'].SetAlwaysHideSpecs = function(value) + WG.advplayerlist_api .SetAlwaysHideSpecs = function(value) alwaysHideSpecs = value if alwaysHideSpecs and specListShow then specListShow = false @@ -981,26 +981,26 @@ function widget:Initialize() CreateLists() end end - WG['advplayerlist_api'].GetScale = function() + WG.advplayerlist_api .GetScale = function() return customScale end - WG['advplayerlist_api'].SetScale = function(value) + WG.advplayerlist_api .SetScale = function(value) customScale = value updateWidgetScale() end - WG['advplayerlist_api'].GetPosition = function() + WG.advplayerlist_api .GetPosition = function() return apiAbsPosition end - WG['advplayerlist_api'].GetAbsoluteResbars = function() + WG.advplayerlist_api .GetAbsoluteResbars = function() return absoluteResbarValues end - WG['advplayerlist_api'].SetAbsoluteResbars = function(value) + WG.advplayerlist_api .SetAbsoluteResbars = function(value) absoluteResbarValues = value end - WG['advplayerlist_api'].GetModuleActive = function(module) + WG.advplayerlist_api .GetModuleActive = function(module) return modules[module].active end - WG['advplayerlist_api'].SetModuleActive = function(value) + WG.advplayerlist_api .SetModuleActive = function(value) for n, module in pairs(modules) do if module.name == value[1] then modules[n].active = value[2] @@ -1046,8 +1046,8 @@ function widget:GameFrame(n) end function widget:Shutdown() - if WG['guishader'] then - WG['guishader'].RemoveDlist('advplayerlist') + if WG.guishader then + WG.guishader .RemoveDlist('advplayerlist') end if mainListBgTex then gl.DeleteTexture(mainListBgTex) @@ -1059,7 +1059,7 @@ function widget:Shutdown() mainListTex = nil mainList2Tex = nil end - WG['advplayerlist_api'] = nil + WG.advplayerlist_api = nil widgetHandler:DeregisterGlobal('ActivityEvent') widgetHandler:DeregisterGlobal('FpsEvent') widgetHandler:DeregisterGlobal('ApmEvent') @@ -1112,9 +1112,9 @@ function SetSidePics() end if teamSide then - sidePics[team] = images['imageDirectory'] .. teamSide .. "_default.png" + sidePics[team] = images.imageDirectory .. teamSide .. "_default.png" else - sidePics[team] = images['imageDirectory'] .. "default.png" + sidePics[team] = images.imageDirectory .. "default.png" end end end @@ -1927,13 +1927,13 @@ function CreateBackground() paddingLeft = 0 end - if forceMainListRefresh or not mainListBgTex or (WG['guishader'] and not BackgroundGuishader) then - if WG['guishader'] then + if forceMainListRefresh or not mainListBgTex or (WG.guishader and not BackgroundGuishader) then + if WG.guishader then BackgroundGuishader = gl_DeleteList(BackgroundGuishader) BackgroundGuishader = gl_CreateList(function() RectRound(absLeft, absBottom, absRight, absTop, elementCorner, mathMin(paddingLeft, paddingTop), mathMin(paddingTop, paddingRight), mathMin(paddingRight, paddingBottom), mathMin(paddingBottom, paddingLeft)) end) - WG['guishader'].InsertDlist(BackgroundGuishader, 'advplayerlist', true) + WG.guishader .InsertDlist(BackgroundGuishader, 'advplayerlist', true) end if mainListTex then gl.DeleteTexture(mainListTex) @@ -2471,23 +2471,23 @@ function DrawTakeSignal(posY) if blink then -- Draws a blinking rectangle if the player of the same team left (/take option) gl_Color(0.7, 0.7, 0.7) - gl_Texture(pics["arrowPic"]) + gl_Texture(pics.arrowPic ) DrawRect(widgetPosX - 14, posY, widgetPosX, posY + 16) gl_Color(1, 1, 1) - gl_Texture(pics["takePic"]) + gl_Texture(pics.takePic ) DrawRect(widgetPosX - 57, posY - 15, widgetPosX - 12, posY + 32) end end function DrawShareButtons(posY, needm, neede) gl_Color(1, 1, 1, 1) - gl_Texture(pics["unitsPic"]) + gl_Texture(pics.unitsPic ) DrawRect(m_share.posX + widgetPosX + (1*playerScale), posY, m_share.posX + widgetPosX + (17*playerScale), posY + (16*playerScale)) - gl_Texture(pics["energyPic"]) + gl_Texture(pics.energyPic ) DrawRect(m_share.posX + widgetPosX + (17*playerScale), posY, m_share.posX + widgetPosX + (33*playerScale), posY + (16*playerScale)) - gl_Texture(pics["metalPic"]) + gl_Texture(pics.metalPic ) DrawRect(m_share.posX + widgetPosX + (33*playerScale), posY, m_share.posX + widgetPosX + (49*playerScale), posY + (16*playerScale)) - gl_Texture(pics["lowPic"]) + gl_Texture(pics.lowPic ) if needm then DrawRect(m_share.posX + widgetPosX + (33*playerScale), posY, m_share.posX + widgetPosX + (49*playerScale), posY + (16*playerScale)) @@ -2501,7 +2501,7 @@ function DrawShareButtons(posY, needm, neede) end function DrawChatButton(posY) - gl_Texture(pics["chatPic"]) + gl_Texture(pics.chatPic ) DrawRect(m_chat.posX + widgetPosX + (1*playerScale), posY, m_chat.posX + widgetPosX + (17*playerScale), posY + (16*playerScale)) end @@ -2529,19 +2529,19 @@ function DrawResources(energy, energyStorage, energyShare, energyConversion, met --gl_Texture(false) --DrawRect(m_resources.posX + widgetPosX + paddingLeft-bordersize, posY + y1Offset+bordersize, m_resources.posX + widgetPosX + paddingLeft + (barWidth * (metalStorage/maxStorage))+bordersize, posY + y2Offset-bordersize) gl_Color(1, 1, 1, 0.18) - gl_Texture(pics["resbarBgPic"]) + gl_Texture(pics.resbarBgPic ) DrawRect(m_resources.posX + widgetPosX + paddingLeft, posY + y1Offset, m_resources.posX + widgetPosX + paddingLeft + (barWidth * (metalStorage/maxStorage)), posY + y2Offset) gl_Color(1, 1, 1, 1) - gl_Texture(pics["resbarPic"]) + gl_Texture(pics.resbarPic ) DrawRect(m_resources.posX + widgetPosX + paddingLeft, posY + y1Offset, m_resources.posX + widgetPosX + paddingLeft + ((barWidth / maxStorage) * metal), posY + y2Offset) if playerScale >= 0.9 and (barWidth / maxStorage) * metal > 0.8 then local glowsize = 10 gl_Color(1, 1, 1.2, 0.08) - gl_Texture(pics["barGlowCenterPic"]) + gl_Texture(pics.barGlowCenterPic ) DrawRect(m_resources.posX + widgetPosX + paddingLeft, posY + y1Offset + glowsize, m_resources.posX + widgetPosX + paddingLeft + ((barWidth / maxStorage) * metal), posY + y2Offset - glowsize) - gl_Texture(pics["barGlowEdgePic"]) + gl_Texture(pics.barGlowEdgePic ) DrawRect(m_resources.posX + widgetPosX + paddingLeft - (glowsize * 1.8), posY + y1Offset + glowsize, m_resources.posX + widgetPosX + paddingLeft, posY + y2Offset - glowsize) DrawRect(m_resources.posX + widgetPosX + paddingLeft + ((barWidth / maxStorage) * metal) + (glowsize * 1.8), posY + y1Offset + glowsize, m_resources.posX + widgetPosX + paddingLeft + ((barWidth / maxStorage) * metal), posY + y2Offset - glowsize) end @@ -2554,7 +2554,7 @@ function DrawResources(energy, energyStorage, energyShare, energyConversion, met m_resources.posX + widgetPosX + paddingLeft + ((barWidth * (metalStorage/maxStorage)) * metalShare) + 0.75 + bordersize, posY + y2Offset - 0.55 - bordersize) gl_Color(1, 0.25, 0.25, 1) - gl_Texture(pics["resbarPic"]) + gl_Texture(pics.resbarPic ) DrawRect(m_resources.posX + widgetPosX + paddingLeft + ((barWidth * (metalStorage/maxStorage)) * metalShare) - 0.75, posY + y1Offset + 0.55, m_resources.posX + widgetPosX + paddingLeft + ((barWidth * (metalStorage/maxStorage)) * metalShare) + 0.75, @@ -2573,19 +2573,19 @@ function DrawResources(energy, energyStorage, energyShare, energyConversion, met --gl_Texture(false) --DrawRect(m_resources.posX + widgetPosX + paddingLeft -bordersize, posY + y1Offset+bordersize, m_resources.posX + widgetPosX + paddingLeft + (barWidth * (energyStorage/maxStorage))+bordersize, posY + y2Offset-bordersize) gl_Color(1, 1, 0, 0.18) - gl_Texture(pics["resbarBgPic"]) + gl_Texture(pics.resbarBgPic ) DrawRect(m_resources.posX + widgetPosX + paddingLeft, posY + y1Offset, m_resources.posX + widgetPosX + paddingLeft + (barWidth * (energyStorage/maxStorage)), posY + y2Offset) gl_Color(1, 1, 0, 1) - gl_Texture(pics["resbarPic"]) + gl_Texture(pics.resbarPic ) DrawRect(m_resources.posX + widgetPosX + paddingLeft, posY + y1Offset, m_resources.posX + widgetPosX + paddingLeft + ((barWidth / maxStorage) * energy), posY + y2Offset) if playerScale >= 0.9 and (barWidth / maxStorage) * energy > 0.8 then local glowsize = 10 gl_Color(1, 1, 0.2, 0.08) - gl_Texture(pics["barGlowCenterPic"]) + gl_Texture(pics.barGlowCenterPic ) DrawRect(m_resources.posX + widgetPosX + paddingLeft, posY + y1Offset + glowsize, m_resources.posX + widgetPosX + paddingLeft + ((barWidth / maxStorage) * energy), posY + y2Offset - glowsize) - gl_Texture(pics["barGlowEdgePic"]) + gl_Texture(pics.barGlowEdgePic ) DrawRect(m_resources.posX + widgetPosX + paddingLeft - (glowsize * 1.8), posY + y1Offset + glowsize, m_resources.posX + widgetPosX + paddingLeft, posY + y2Offset - glowsize) DrawRect(m_resources.posX + widgetPosX + paddingLeft + ((barWidth / maxStorage) * energy) + (glowsize * 1.8), posY + y1Offset + glowsize, m_resources.posX + widgetPosX + paddingLeft + ((barWidth / maxStorage) * energy), posY + y2Offset - glowsize) end @@ -2598,7 +2598,7 @@ function DrawResources(energy, energyStorage, energyShare, energyConversion, met m_resources.posX + widgetPosX + paddingLeft + ((barWidth * (energyStorage/maxStorage)) * energyConversion) + 0.75 + bordersize, posY + y2Offset - 0.55 - bordersize) gl_Color(0.9, 0.9, 0.73, 1) - gl_Texture(pics["resbarPic"]) + gl_Texture(pics.resbarPic ) DrawRect(m_resources.posX + widgetPosX + paddingLeft + ((barWidth * (energyStorage/maxStorage)) * energyConversion) - 0.75, posY + y1Offset + 0.55, m_resources.posX + widgetPosX + paddingLeft + ((barWidth * (energyStorage/maxStorage)) * energyConversion) + 0.75, @@ -2613,7 +2613,7 @@ function DrawResources(energy, energyStorage, energyShare, energyConversion, met m_resources.posX + widgetPosX + paddingLeft + ((barWidth * (energyStorage/maxStorage)) * energyShare) + 0.75 + bordersize, posY + y2Offset - 1.1) gl_Color(1, 0.25, 0.25, 1) - gl_Texture(pics["resbarPic"]) + gl_Texture(pics.resbarPic ) DrawRect(m_resources.posX + widgetPosX + paddingLeft + ((barWidth * (energyStorage/maxStorage)) * energyShare) - 0.75, posY + y1Offset + 0.55, m_resources.posX + widgetPosX + paddingLeft + ((barWidth * (energyStorage/maxStorage)) * energyShare) + 0.75, @@ -2654,7 +2654,7 @@ function DrawSidePic(team, playerID, posY, leader, dark, ai) if leader then gl_Texture(sidePics[team]) -- sets side image (for leaders) else - gl_Texture(pics["notFirstPic"]) -- sets image for not leader of team players + gl_Texture(pics.notFirstPic ) -- sets image for not leader of team players end DrawRect(m_side.posX + widgetPosX + (2*playerScale), posY + (1*playerScale), m_side.posX + widgetPosX + (16*playerScale), posY + (15*playerScale)) -- draws side image gl_Texture(false) @@ -2695,9 +2695,9 @@ end function DrawAlly(posY, team) gl_Color(1, 1, 1, 0.66) if sp.AreTeamsAllied(team, myTeamID) then - gl_Texture(pics["unallyPic"]) + gl_Texture(pics.unallyPic ) else - gl_Texture(pics["allyPic"]) + gl_Texture(pics.allyPic ) end DrawRect(m_alliance.posX + widgetPosX + (3*playerScale), posY + (1*playerScale), m_alliance.posX + widgetPosX + (playerOffset*playerScale), posY + (15*playerScale)) end @@ -2706,7 +2706,7 @@ function DrawCountry(country, posY) if country == nil or country == "??" then return end local cached = countryFlagCache[country] if cached == nil then - local path = images['imgDir'] .. "flags/" .. strUpper(country) .. images['flagsExt'] + local path = images.imgDir .. "flags/" .. strUpper(country) .. images.flagsExt if VFS.FileExists(path) then cached = path else @@ -2717,13 +2717,13 @@ function DrawCountry(country, posY) if cached then gl_Texture(cached) gl_Color(1, 1, 1, 1) - DrawRect(m_country.posX + widgetPosX + (3*playerScale), posY + (8*playerScale) - ((images['flagHeight']/2)*playerScale), m_country.posX + widgetPosX + (17*playerScale), posY + (8*playerScale) + ((images['flagHeight']/2)*playerScale)) + DrawRect(m_country.posX + widgetPosX + (3*playerScale), posY + (8*playerScale) - ((images.flagHeight /2)*playerScale), m_country.posX + widgetPosX + (17*playerScale), posY + (8*playerScale) + ((images.flagHeight /2)*playerScale)) end end function DrawDot(posY) gl_Color(1, 1, 1, 0.70) - gl_Texture(pics["currentPic"]) + gl_Texture(pics.currentPic ) DrawRect(m_indent.posX + widgetPosX - 1, posY + (3*playerScale), m_indent.posX + widgetPosX + (7*playerScale), posY + (11*playerScale)) end @@ -2733,7 +2733,7 @@ function DrawCamera(posY, active) else gl_Color(1, 1, 1, 0.13) end - gl_Texture(pics["cameraPic"]) + gl_Texture(pics.cameraPic ) DrawRect(m_indent.posX + widgetPosX - (1.5*playerScale), posY + (2*playerScale), m_indent.posX + widgetPosX + (9*playerScale), posY + (12.4*playerScale)) end @@ -2766,7 +2766,7 @@ function DrawState(playerID, posX, posY) end end end - gl_Texture(pics["readyTexture"]) + gl_Texture(pics.readyTexture ) DrawRect(posX, posY - (1*playerScale), posX + (16*playerScale), posY + (16*playerScale)) gl_Color(1, 1, 1, 1) end @@ -2990,7 +2990,7 @@ end function DrawPingCpu(pingLvl, cpuLvl, posY, spec, cpu, fps) local fontScale = fontScaleHigh - gl_Texture(pics["pingPic"]) + gl_Texture(pics.pingPic ) local grayvalue if spec then grayvalue = 0.5 + (pingLvl / 20) @@ -3023,7 +3023,7 @@ function DrawPingCpu(pingLvl, cpuLvl, posY, spec, cpu, fps) end else grayvalue = 0.7 + (cpu / 135) - gl_Texture(pics["cpuPic"]) + gl_Texture(pics.cpuPic ) if spec then gl_Color(grayvalue, grayvalue, grayvalue, 0.1 + (0.14 * cpuLvl)) DrawRect(m_cpuping.posX + widgetPosX + (2*specScale), posY + (1*specScale), m_cpuping.posX + widgetPosX + (13*specScale), posY + (14*specScale*fontScale)) @@ -3038,10 +3038,10 @@ end function DrawPoint(posY, pointtime) gl_Color(1, 0, 0, pointtime / pointDuration) - gl_Texture(pics["arrowPic"]) + gl_Texture(pics.arrowPic ) DrawRect(widgetPosX - (18*playerScale), posY, widgetPosX - (2*playerScale), posY + (14*playerScale)) gl_Color(1, 1, 1, pointtime / pointDuration) - gl_Texture(pics["pointPic"]) + gl_Texture(pics.pointPic ) DrawRect(widgetPosX - (33*playerScale), posY - (1*playerScale), widgetPosX - (17*playerScale), posY + (15*playerScale)) gl_Color(1, 1, 1, 1) end @@ -3049,7 +3049,7 @@ end function DrawPencil(posY, time) leftPosX = widgetPosX + widgetWidth gl_Color(1, 1, 1, (time / pencilDuration ) * 0.12) - gl_Texture(pics["pencilPic"]) + gl_Texture(pics.pencilPic ) DrawRect(m_indent.posX + widgetPosX - 3.5, posY + (3*playerScale), m_indent.posX + widgetPosX - 1.5 + (8*playerScale), posY + (14*playerScale)) gl_Color(1, 1, 1, 1) end @@ -3057,7 +3057,7 @@ end function DrawEraser(posY, time) leftPosX = widgetPosX + widgetWidth gl_Color(1, 1, 1, (time / pencilDuration ) * 0.12) - gl_Texture(pics["eraserPic"]) + gl_Texture(pics.eraserPic ) DrawRect(m_indent.posX + widgetPosX -0.5, posY + (3*playerScale), m_indent.posX + widgetPosX + 1.5 + (8*playerScale), posY + (14*playerScale)) gl_Color(1, 1, 1, 1) end @@ -3266,9 +3266,9 @@ function CreateShareSlider() local posY if energyPlayer ~= nil then posY = widgetPosY + widgetHeight - energyPlayer.posY - gl_Texture(pics["barPic"]) + gl_Texture(pics.barPic ) DrawRect(m_share.posX + widgetPosX + (16*playerScale), posY - (3*playerScale), m_share.posX + widgetPosX + (34*playerScale), posY + shareSliderHeight + (18*playerScale)) - gl_Texture(pics["energyPic"]) + gl_Texture(pics.energyPic ) DrawRect(m_share.posX + widgetPosX + (17*playerScale), posY + sliderPosition, m_share.posX + widgetPosX + (33*playerScale), posY + (16*playerScale) + sliderPosition) gl_Texture(false) gl_Color(0.45,0.45,0.45,1) @@ -3276,9 +3276,9 @@ function CreateShareSlider() font:Print("\255\255\255\255"..shareAmount, m_share.posX + widgetPosX - (5*playerScale), posY + (3*playerScale) + sliderPosition, 14, "ocn") elseif metalPlayer ~= nil then posY = widgetPosY + widgetHeight - metalPlayer.posY - gl_Texture(pics["barPic"]) + gl_Texture(pics.barPic ) DrawRect(m_share.posX + widgetPosX + (32*playerScale), posY - 3, m_share.posX + widgetPosX + (50*playerScale), posY + shareSliderHeight + (18*playerScale)) - gl_Texture(pics["metalPic"]) + gl_Texture(pics.metalPic ) DrawRect(m_share.posX + widgetPosX + (33*playerScale), posY + sliderPosition, m_share.posX + widgetPosX + (49*playerScale), posY + (16*playerScale) + sliderPosition) gl_Texture(false) gl_Color(0.45,0.45,0.45,1) @@ -3960,8 +3960,8 @@ function widget:Update(delta) end end - if tipText and WG['tooltip'] then - WG['tooltip'].ShowTooltip('advplayerlist', tipText, nil, nil, tipTextTitle) + if tipText and WG.tooltip then + WG.tooltip .ShowTooltip('advplayerlist', tipText, nil, nil, tipTextTitle) end Spring.SetMouseCursor('cursornormal') end @@ -4039,7 +4039,7 @@ function widget:Update(delta) end -- detect guishader widget being toggled back on - local guishaderNow = WG['guishader'] ~= nil + local guishaderNow = WG.guishader ~= nil if guishaderNow and not guishaderWasActive then BackgroundGuishader = gl_DeleteList(BackgroundGuishader) forceMainListRefresh = true @@ -4099,8 +4099,8 @@ function widget:ViewResize() updateWidgetScale() - font = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2, 1.5, 0.13, 20) + font = WG.fonts .getFont() + font2 = WG.fonts .getFont(2, 1.5, 0.13, 20) local MakeAtlasOnDemand = VFS.Include("LuaUI/Include/AtlasOnDemand.lua") if AdvPlayersListAtlas then diff --git a/luaui/Widgets/gui_advplayerslist_gameinfo.lua b/luaui/Widgets/gui_advplayerslist_gameinfo.lua index e990b14dd67..1795c584fae 100644 --- a/luaui/Widgets/gui_advplayerslist_gameinfo.lua +++ b/luaui/Widgets/gui_advplayerslist_gameinfo.lua @@ -100,14 +100,14 @@ local function drawContent() end local function refreshUiDrawing() - if WG['guishader'] then + if WG.guishader then if guishaderList then guishaderList = glDeleteList(guishaderList) end guishaderList = glCreateList( function() RectRound(left, bottom, right, top, elementCorner, 1,0,0,1) end) - WG['guishader'].InsertDlist(guishaderList, 'displayinfo', true) + WG.guishader .InsertDlist(guishaderList, 'displayinfo', true) end if right-left >= 1 and top-bottom >= 1 then @@ -133,12 +133,12 @@ end local function updatePosition(force) local prevPos = advplayerlistPos - if WG['unittotals'] ~= nil then - advplayerlistPos = WG['unittotals'].GetPosition() - elseif WG['music'] ~= nil then - advplayerlistPos = WG['music'].GetPosition() - elseif WG['advplayerlist_api'] then - advplayerlistPos = WG['advplayerlist_api'].GetPosition() + if WG.unittotals ~= nil then + advplayerlistPos = WG.unittotals .GetPosition() + elseif WG.music ~= nil then + advplayerlistPos = WG.music .GetPosition() + elseif WG.advplayerlist_api then + advplayerlistPos = WG.advplayerlist_api .GetPosition() else local scale = (vsy / 880) * (1 + (Spring.GetConfigFloat("ui_scale", 1) - 1) / 1.25) advplayerlistPos = {0,vsx-(220*scale),0,vsx,scale} @@ -158,8 +158,8 @@ end function widget:Initialize() widget:ViewResize() updatePosition() - WG['displayinfo'] = {} - WG['displayinfo'].GetPosition = function() + WG.displayinfo = {} + WG.displayinfo .GetPosition = function() return {top,left,bottom,right,widgetScale} end Spring.SendCommands("fps 0") @@ -169,8 +169,8 @@ end function widget:Shutdown() - if WG['guishader'] then - WG['guishader'].RemoveDlist('displayinfo') + if WG.guishader then + WG.guishader .RemoveDlist('displayinfo') end for i=1,#drawlist do glDeleteList(drawlist[i]) @@ -187,7 +187,7 @@ function widget:Shutdown() Spring.SendCommands("fps 1") Spring.SendCommands("clock 1") Spring.SendCommands("speed 1") - WG['displayinfo'] = nil + WG.displayinfo = nil end function widget:Update(dt) @@ -224,7 +224,7 @@ end function widget:ViewResize(newX,newY) vsx, vsy = spGetViewGeometry() - font = WG['fonts'].getFont() + font = WG.fonts .getFont() elementCorner = WG.FlowUI.elementCorner RectRound = WG.FlowUI.Draw.RectRound diff --git a/luaui/Widgets/gui_advplayerslist_mascot.lua b/luaui/Widgets/gui_advplayerslist_mascot.lua index 66c7e49fde8..c3cd86b2b66 100644 --- a/luaui/Widgets/gui_advplayerslist_mascot.lua +++ b/luaui/Widgets/gui_advplayerslist_mascot.lua @@ -127,7 +127,7 @@ local xPos = 0 local yPos = 0 local drawSantahat = false -if Spring.Utilities.Gametype.GetCurrentHolidays()["xmas"] then +if Spring.Utilities.Gametype.GetCurrentHolidays().xmas then drawSantahat = true end @@ -155,7 +155,7 @@ local function createList(size) glDeleteList(drawlist[1]) end drawlist[1] = glCreateList( function() - gl.Texture(OPTIONS[currentOption]['body']) + gl.Texture(OPTIONS[currentOption].body ) gl.Color(1,1,1,1) DrawRect(-(size/2), -(size/2), (size/2), (size/2)) gl.Texture(false) @@ -166,11 +166,11 @@ local function createList(size) end drawlist[2] = glCreateList( function() gl.Color(1,1,1,1) - gl.Texture(OPTIONS[currentOption]['head']) - glTranslate(OPTIONS[currentOption]['head_xOffset']*size, OPTIONS[currentOption]['head_yOffset']*size, 0) + gl.Texture(OPTIONS[currentOption].head ) + glTranslate(OPTIONS[currentOption].head_xOffset *size, OPTIONS[currentOption].head_yOffset *size, 0) DrawRect(-(size/2), -(size/2)+(size/14), (size/2), (size/2)+(size/14)) - if drawSantahat and OPTIONS[currentOption]['santahat'] then - gl.Texture(OPTIONS[currentOption]['santahat']) + if drawSantahat and OPTIONS[currentOption].santahat then + gl.Texture(OPTIONS[currentOption].santahat ) DrawRect(-(size/2), -(size/2)+(size/14), (size/2), (size/2)+(size/14)) end gl.Texture(false) @@ -180,11 +180,11 @@ local function createList(size) end drawlist[3] = glCreateList( function() gl.Color(1,1,1,1) - gl.Texture(OPTIONS[currentOption]['headblink']) - glTranslate(OPTIONS[currentOption]['head_xOffset']*size, OPTIONS[currentOption]['head_yOffset']*size, 0) + gl.Texture(OPTIONS[currentOption].headblink ) + glTranslate(OPTIONS[currentOption].head_xOffset *size, OPTIONS[currentOption].head_yOffset *size, 0) DrawRect(-(size/2), -(size/2)+(size/14), (size/2), (size/2)+(size/14)) - if drawSantahat and OPTIONS[currentOption]['santahat'] then - gl.Texture(OPTIONS[currentOption]['santahat']) + if drawSantahat and OPTIONS[currentOption].santahat then + gl.Texture(OPTIONS[currentOption].santahat ) DrawRect(-(size/2), -(size/2)+(size/14), (size/2), (size/2)+(size/14)) end gl.Texture(false) @@ -195,22 +195,22 @@ local parentPos = {} local positionChange = os.clock() function updatePosition(force) local prevPos = parentPos - if WG['displayinfo'] ~= nil then - parentPos = WG['displayinfo'].GetPosition() - elseif WG['unittotals'] ~= nil then - parentPos = WG['unittotals'].GetPosition() - elseif WG['music'] ~= nil then - parentPos = WG['music'].GetPosition() - elseif WG['advplayerlist_api'] ~= nil then - parentPos = WG['advplayerlist_api'].GetPosition() + if WG.displayinfo ~= nil then + parentPos = WG.displayinfo .GetPosition() + elseif WG.unittotals ~= nil then + parentPos = WG.unittotals .GetPosition() + elseif WG.music ~= nil then + parentPos = WG.music .GetPosition() + elseif WG.advplayerlist_api ~= nil then + parentPos = WG.advplayerlist_api .GetPosition() else local scale = (vsy / 880) * (1 + (Spring.GetConfigFloat("ui_scale", 1) - 1) / 1.25) parentPos = {0,vsx-(220*scale),0,vsx,scale} end if parentPos[5] ~= nil then - usedImgSize = OPTIONS[currentOption]['imageSize'] * parentPos[5] - xPos = parentPos[2]+(usedImgSize/2) + (OPTIONS[currentOption]['xOffset'] * parentPos[5]) - yPos = parentPos[1]+(usedImgSize/2) + (OPTIONS[currentOption]['yOffset'] * parentPos[5]) + usedImgSize = OPTIONS[currentOption].imageSize * parentPos[5] + xPos = parentPos[2]+(usedImgSize/2) + (OPTIONS[currentOption].xOffset * parentPos[5]) + yPos = parentPos[1]+(usedImgSize/2) + (OPTIONS[currentOption].yOffset * parentPos[5]) positionChange = os.clock() if (prevPos[1] == nil or prevPos[1] ~= parentPos[1] or prevPos[2] ~= parentPos[2] or prevPos[5] ~= parentPos[5]) or force then @@ -255,10 +255,10 @@ function widget:Update(dt) rot = 14 + (6* mathSin(mathPi*(totalTime/4))) bob = (1.5*mathSin(mathPi*(totalTime/5.5))) - if sec > OPTIONS[currentOption]['blinkTimeout'] then + if sec > OPTIONS[currentOption].blinkTimeout then usedDrawlist = 3 end - if sec > (OPTIONS[currentOption]['blinkTimeout']+OPTIONS[currentOption]['blinkDuration']) then + if sec > (OPTIONS[currentOption].blinkTimeout +OPTIONS[currentOption].blinkDuration ) then sec = 0 usedDrawlist = 2 end diff --git a/luaui/Widgets/gui_advplayerslist_music_new.lua b/luaui/Widgets/gui_advplayerslist_music_new.lua index c618af8a2a7..1fb4bf24dc3 100644 --- a/luaui/Widgets/gui_advplayerslist_music_new.lua +++ b/luaui/Widgets/gui_advplayerslist_music_new.lua @@ -203,14 +203,14 @@ local function ReloadMusicPlaylists() table.append(scavTracks, VFS.DirList(musicDirNew..'/events/scavengers/bossfight', allowedExtensions)) -- April Fools -------------------------------------------------------------------------------------------------------------------- - if (Spring.Utilities.Gametype.GetCurrentHolidays()["aprilfools"] and Spring.GetConfigInt('UseSoundtrackAprilFools', 1) == 1) then + if (Spring.Utilities.Gametype.GetCurrentHolidays().aprilfools and Spring.GetConfigInt('UseSoundtrackAprilFools', 1) == 1) then table.append(eventPeaceTracks, VFS.DirList(musicDirNew..'/events/aprilfools/peace', allowedExtensions)) table.append(eventWarLowTracks, VFS.DirList(musicDirNew..'/events/aprilfools/war', allowedExtensions)) table.append(eventWarHighTracks, VFS.DirList(musicDirNew..'/events/aprilfools/war', allowedExtensions)) table.append(eventWarLowTracks, VFS.DirList(musicDirNew..'/events/aprilfools/warlow', allowedExtensions)) table.append(eventWarHighTracks, VFS.DirList(musicDirNew..'/events/aprilfools/warhigh', allowedExtensions)) table.append(interludeTracks, VFS.DirList(musicDirNew..'/events/aprilfools/interludes', allowedExtensions)) - elseif ((not Spring.Utilities.Gametype.GetCurrentHolidays()["aprilfools"]) and Spring.GetConfigInt('UseSoundtrackAprilFoolsPostEvent', 0) == 1) then + elseif ((not Spring.Utilities.Gametype.GetCurrentHolidays().aprilfools ) and Spring.GetConfigInt('UseSoundtrackAprilFoolsPostEvent', 0) == 1) then table.append(peaceTracksNew, VFS.DirList(musicDirNew..'/events/aprilfools/peace', allowedExtensions)) table.append(warlowTracksNew, VFS.DirList(musicDirNew..'/events/aprilfools/war', allowedExtensions)) table.append(warhighTracksNew, VFS.DirList(musicDirNew..'/events/aprilfools/war', allowedExtensions)) @@ -227,14 +227,14 @@ local function ReloadMusicPlaylists() table.append(bonusTracks, VFS.DirList(musicDirNew..'/events/aprilfools/interludes', allowedExtensions)) -- Halloween -------------------------------------------------------------------------------------------------------------------- - if (Spring.Utilities.Gametype.GetCurrentHolidays()["halloween"] and Spring.GetConfigInt('UseSoundtrackHalloween', 1) == 1) then + if (Spring.Utilities.Gametype.GetCurrentHolidays().halloween and Spring.GetConfigInt('UseSoundtrackHalloween', 1) == 1) then table.append(eventPeaceTracks, VFS.DirList(musicDirNew..'/events/halloween/peace', allowedExtensions)) table.append(eventWarLowTracks, VFS.DirList(musicDirNew..'/events/halloween/war', allowedExtensions)) table.append(eventWarHighTracks, VFS.DirList(musicDirNew..'/events/halloween/war', allowedExtensions)) table.append(eventWarLowTracks, VFS.DirList(musicDirNew..'/events/halloween/warlow', allowedExtensions)) table.append(eventWarHighTracks, VFS.DirList(musicDirNew..'/events/halloween/warhigh', allowedExtensions)) table.append(interludeTracks, VFS.DirList(musicDirNew..'/events/halloween/interludes', allowedExtensions)) - elseif ((not Spring.Utilities.Gametype.GetCurrentHolidays()["halloween"]) and Spring.GetConfigInt('UseSoundtrackHalloweenPostEvent', 0) == 1) then + elseif ((not Spring.Utilities.Gametype.GetCurrentHolidays().halloween ) and Spring.GetConfigInt('UseSoundtrackHalloweenPostEvent', 0) == 1) then table.append(peaceTracksNew, VFS.DirList(musicDirNew..'/events/halloween/peace', allowedExtensions)) table.append(warlowTracksNew, VFS.DirList(musicDirNew..'/events/halloween/war', allowedExtensions)) table.append(warhighTracksNew, VFS.DirList(musicDirNew..'/events/halloween/war', allowedExtensions)) @@ -251,14 +251,14 @@ local function ReloadMusicPlaylists() table.append(bonusTracks, VFS.DirList(musicDirNew..'/events/halloween/interludes', allowedExtensions)) -- Christmas -------------------------------------------------------------------------------------------------------------------- - if (Spring.Utilities.Gametype.GetCurrentHolidays()["xmas"] and Spring.GetConfigInt('UseSoundtrackXmas', 1) == 1) then + if (Spring.Utilities.Gametype.GetCurrentHolidays().xmas and Spring.GetConfigInt('UseSoundtrackXmas', 1) == 1) then table.append(eventPeaceTracks, VFS.DirList(musicDirNew..'/events/xmas/peace', allowedExtensions)) table.append(eventWarLowTracks, VFS.DirList(musicDirNew..'/events/xmas/war', allowedExtensions)) table.append(eventWarHighTracks, VFS.DirList(musicDirNew..'/events/xmas/war', allowedExtensions)) table.append(eventWarLowTracks, VFS.DirList(musicDirNew..'/events/xmas/warlow', allowedExtensions)) table.append(eventWarHighTracks, VFS.DirList(musicDirNew..'/events/xmas/warhigh', allowedExtensions)) table.append(interludeTracks, VFS.DirList(musicDirNew..'/events/xmas/interludes', allowedExtensions)) - elseif ((not Spring.Utilities.Gametype.GetCurrentHolidays()["xmas"]) and Spring.GetConfigInt('UseSoundtrackXmasPostEvent', 0) == 1) then + elseif ((not Spring.Utilities.Gametype.GetCurrentHolidays().xmas ) and Spring.GetConfigInt('UseSoundtrackXmasPostEvent', 0) == 1) then table.append(peaceTracksNew, VFS.DirList(musicDirNew..'/events/xmas/peace', allowedExtensions)) table.append(warlowTracksNew, VFS.DirList(musicDirNew..'/events/xmas/war', allowedExtensions)) table.append(warhighTracksNew, VFS.DirList(musicDirNew..'/events/xmas/war', allowedExtensions)) @@ -718,14 +718,14 @@ local function drawContent() end local function refreshUiDrawing() - if WG['guishader'] then + if WG.guishader then if guishaderList then guishaderList = glDeleteList(guishaderList) end guishaderList = glCreateList( function() RectRound(left, bottom, right, top, elementCorner, 1,0,0,1) end) - WG['guishader'].InsertDlist(guishaderList, 'music', true) + WG.guishader .InsertDlist(guishaderList, 'music', true) end local trackname @@ -737,24 +737,24 @@ local function refreshUiDrawing() --local maxTextWidth = right-buttons['playpause'][3]-textXPadding-textXPadding local maxTextWidth = right-textXPadding-textXPadding - buttons['playpause'] = {left+padding+padding, bottom+padding+heightoffset, left+(widgetHeight*widgetScale), top-padding+heightoffset} - buttons['next'] = {buttons['playpause'][3]+padding, bottom+padding+heightoffset, buttons['playpause'][3]+((widgetHeight*widgetScale)-padding), top-padding+heightoffset} + buttons.playpause = {left+padding+padding, bottom+padding+heightoffset, left+(widgetHeight*widgetScale), top-padding+heightoffset} + buttons.next = {buttons.playpause [3]+padding, bottom+padding+heightoffset, buttons.playpause [3]+((widgetHeight*widgetScale)-padding), top-padding+heightoffset} - buttons['musicvolumeicon'] = {buttons['next'][3]+padding+padding, bottom+padding+heightoffset, buttons['next'][3]+((widgetHeight * widgetScale)), top-padding+heightoffset} + buttons.musicvolumeicon = {buttons.next [3]+padding+padding, bottom+padding+heightoffset, buttons.next [3]+((widgetHeight * widgetScale)), top-padding+heightoffset} --buttons['musicvolumeicon'] = {left+padding+padding, bottom+padding+heightoffset, left+(widgetHeight*widgetScale), top-padding+heightoffset} local sliderKnobWidth = mathFloor((4.5 * widgetScale)+0.5) local endPadding = mathFloor(1 * widgetScale) local maxRight = vsx - endPadding - (sliderKnobWidth / 2) local fixedWidth = padding * 4 + (widgetHeight * widgetScale) - local volumeWidth = mathMax(mathMin(mathFloor((maxRight - buttons['musicvolumeicon'][3] - fixedWidth) / 2), mathFloor(50 * widgetScale)), mathFloor(30 * widgetScale)) + local volumeWidth = mathMax(mathMin(mathFloor((maxRight - buttons.musicvolumeicon [3] - fixedWidth) / 2), mathFloor(50 * widgetScale)), mathFloor(30 * widgetScale)) - buttons['musicvolume'] = {buttons['musicvolumeicon'][3]+padding, bottom+padding+heightoffset, buttons['musicvolumeicon'][3]+padding+volumeWidth, top-padding+heightoffset} - buttons['musicvolume'][5] = mathMax(buttons['musicvolume'][1] + (sliderKnobWidth / 2), mathMin(buttons['musicvolume'][3] - (sliderKnobWidth / 2), buttons['musicvolume'][1] + (buttons['musicvolume'][3] - buttons['musicvolume'][1]) * (getVolumePos(maxMusicVolume/99)))) + buttons.musicvolume = {buttons.musicvolumeicon [3]+padding, bottom+padding+heightoffset, buttons.musicvolumeicon [3]+padding+volumeWidth, top-padding+heightoffset} + buttons.musicvolume [5] = mathMax(buttons.musicvolume [1] + (sliderKnobWidth / 2), mathMin(buttons.musicvolume [3] - (sliderKnobWidth / 2), buttons.musicvolume [1] + (buttons.musicvolume [3] - buttons.musicvolume [1]) * (getVolumePos(maxMusicVolume/99)))) - buttons['volumeicon'] = {buttons['musicvolume'][3]+padding*3, bottom+padding+heightoffset, buttons['musicvolume'][3]+(widgetHeight * widgetScale), top-padding+heightoffset} - buttons['volume'] = {buttons['volumeicon'][3]+padding, bottom+padding+heightoffset, buttons['volumeicon'][3]+padding+volumeWidth, top-padding+heightoffset} - buttons['volume'][5] = mathMax(buttons['volume'][1] + (sliderKnobWidth / 2), mathMin(buttons['volume'][3] - (sliderKnobWidth / 2), buttons['volume'][1] + (buttons['volume'][3] - buttons['volume'][1]) * (getVolumePos(volume/80)))) + buttons.volumeicon = {buttons.musicvolume [3]+padding*3, bottom+padding+heightoffset, buttons.musicvolume [3]+(widgetHeight * widgetScale), top-padding+heightoffset} + buttons.volume = {buttons.volumeicon [3]+padding, bottom+padding+heightoffset, buttons.volumeicon [3]+padding+volumeWidth, top-padding+heightoffset} + buttons.volume [5] = mathMax(buttons.volume [1] + (sliderKnobWidth / 2), mathMin(buttons.volume [3] - (sliderKnobWidth / 2), buttons.volume [1] + (buttons.volume [3] - buttons.volume [1]) * (getVolumePos(volume/80)))) if drawlist[1] ~= nil then for i=1, #drawlist do @@ -779,19 +779,19 @@ local function refreshUiDrawing() end gl.R2tHelper.RenderInRect(uiTex, left, bottom, right, top, drawContent, true) end - if WG['tooltip'] ~= nil and trackname then + if WG.tooltip ~= nil and trackname then if trackname and trackname ~= '' then - WG['tooltip'].AddTooltip('music', {left, bottom, right, top}, trackname, 0.8) + WG.tooltip .AddTooltip('music', {left, bottom, right, top}, trackname, 0.8) else - WG['tooltip'].RemoveTooltip('music') + WG.tooltip .RemoveTooltip('music') end end end local function updatePosition(force) local prevPos = advplayerlistPos - if WG['advplayerlist_api'] ~= nil then - advplayerlistPos = WG['advplayerlist_api'].GetPosition() + if WG.advplayerlist_api ~= nil then + advplayerlistPos = WG.advplayerlist_api .GetPosition() else local scale = (vsy / 880) * (1 + (Spring.GetConfigFloat("ui_scale", 1) - 1) / 1.25) advplayerlistPos = {0,vsx-(220*scale),0,vsx,scale} @@ -815,18 +815,18 @@ function widget:Initialize() widget:ViewResize() --Spring.StopSoundStream() -- only for testing purposes - WG['music'] = {} - WG['music'].GetPosition = function() + WG.music = {} + WG.music .GetPosition = function() if shutdown then return false end updatePosition() return {showGUI and top or bottom,left,bottom,right,widgetScale} end - WG['music'].GetMusicVolume = function() + WG.music .GetMusicVolume = function() return maxMusicVolume end - WG['music'].SetMusicVolume = function(value) + WG.music .SetMusicVolume = function(value) maxMusicVolume = value Spring.SetConfigInt("snd_volmusic", mathMin(99,mathCeil(maxMusicVolume))) -- It took us 2 and half year to realize that the engine is not saving value of a 100 because it's engine default, which is why we're maxing it at 99 if fadeDirection then @@ -834,13 +834,13 @@ function widget:Initialize() end updateDrawing = true end - WG['music'].GetShowGui = function() + WG.music .GetShowGui = function() return showGUI end - WG['music'].SetShowGui = function(value) + WG.music .SetShowGui = function(value) showGUI = value end - WG['music'].getTracksConfig = function(value) + WG.music .getTracksConfig = function(value) local tracksConfig = {} local function sortPlaylist(playlist) @@ -936,7 +936,7 @@ function widget:Initialize() end return tracksConfig end - WG['music'].playTrack = function(track) + WG.music .playTrack = function(track) currentTrack = track Spring.StopSoundStream() Spring.PlaySoundStream(currentTrack, 1) @@ -951,10 +951,10 @@ function widget:Initialize() end updateDrawing = true end - WG['music'].RefreshSettings = function() + WG.music .RefreshSettings = function() interruptionEnabled = Spring.GetConfigInt('UseSoundtrackInterruption', 1) == 1 end - WG['music'].RefreshTrackList = function() + WG.music .RefreshTrackList = function() Spring.StopSoundStream() ReloadMusicPlaylists() playInterlude = false @@ -966,11 +966,11 @@ function widget:Shutdown() shutdown = true Spring.SetConfigInt('music', (playing and 1 or 0)) - if WG['guishader'] then - WG['guishader'].RemoveDlist('music') + if WG.guishader then + WG.guishader .RemoveDlist('music') end - if WG['tooltip'] ~= nil then - WG['tooltip'].RemoveTooltip('music') + if WG.tooltip ~= nil then + WG.tooltip .RemoveTooltip('music') end for i=1,#drawlist do glDeleteList(drawlist[i]) @@ -984,7 +984,7 @@ function widget:Shutdown() gl.DeleteTexture(uiTex) uiTex = nil end - WG['music'] = nil + WG.music = nil end @@ -992,7 +992,7 @@ end function widget:ViewResize(newX,newY) vsx, vsy = spGetViewGeometry() - font = WG['fonts'].getFont() + font = WG.fonts .getFont() bgpadding = WG.FlowUI.elementPadding elementCorner = WG.FlowUI.elementCorner @@ -1071,12 +1071,12 @@ local function mouseEvent(x, y, button, release) draggingSlider = nil end if button == 1 and not release and math_isInRect(x, y, left, bottom, right, top) then - if buttons['playpause'] ~= nil and math_isInRect(x, y, buttons['playpause'][1], buttons['playpause'][2], buttons['playpause'][3], buttons['playpause'][4]) then + if buttons.playpause ~= nil and math_isInRect(x, y, buttons.playpause [1], buttons.playpause [2], buttons.playpause [3], buttons.playpause [4]) then playing = not playing Spring.SetConfigInt('music', (playing and 1 or 0)) Spring.PauseSoundStream() updateDrawing = true - elseif buttons['next'] ~= nil and math_isInRect(x, y, buttons['next'][1], buttons['next'][2], buttons['next'][3], buttons['next'][4]) then + elseif buttons.next ~= nil and math_isInRect(x, y, buttons.next [1], buttons.next [2], buttons.next [3], buttons.next [4]) then playing = true Spring.SetConfigInt('music', (playing and 1 or 0)) playInterlude = false @@ -1153,7 +1153,7 @@ function widget:DrawScreen() local mx, my, mlb = spGetMouseState() prevMouseover = mouseover mouseover = false - if WG['topbar'] and WG['topbar'].showingQuit() then + if WG.topbar and WG.topbar .showingQuit() then mouseover = false else if math_isInRect(mx, my, left, bottom, right, top) then @@ -1169,7 +1169,7 @@ function widget:DrawScreen() showTrackname = not (not mouseover and not draggingSlider and playing and volume > 0 and playedTime < totalTime) -- detect guishader widget being toggled back on - local guishaderNow = WG['guishader'] ~= nil + local guishaderNow = WG.guishader ~= nil if guishaderNow and not guishaderWasActive then guishaderList = glDeleteList(guishaderList) updateDrawing = true diff --git a/luaui/Widgets/gui_advplayerslist_unittotals.lua b/luaui/Widgets/gui_advplayerslist_unittotals.lua index c3a175e7c75..a7767ed34d3 100644 --- a/luaui/Widgets/gui_advplayerslist_unittotals.lua +++ b/luaui/Widgets/gui_advplayerslist_unittotals.lua @@ -86,14 +86,14 @@ local function drawContent() end local function refreshUiDrawing() - if WG['guishader'] then + if WG.guishader then if guishaderList then guishaderList = glDeleteList(guishaderList) end guishaderList = glCreateList( function() RectRound(left, bottom, right, top, elementCorner, 1,0,0,1) end) - WG['guishader'].InsertDlist(guishaderList, 'unittotals', true) + WG.guishader .InsertDlist(guishaderList, 'unittotals', true) end if right-left >= 1 and top-bottom >= 1 then @@ -118,10 +118,10 @@ end local function updatePosition(force) local prevPos = advplayerlistPos - if WG['music'] and WG['music'].GetPosition and WG['music'].GetPosition() then - advplayerlistPos = WG['music'].GetPosition() - elseif WG['advplayerlist_api'] ~= nil then - advplayerlistPos = WG['advplayerlist_api'].GetPosition() + if WG.music and WG.music .GetPosition and WG.music .GetPosition() then + advplayerlistPos = WG.music .GetPosition() + elseif WG.advplayerlist_api ~= nil then + advplayerlistPos = WG.advplayerlist_api .GetPosition() else local scale = (vsy / 880) * (1 + (Spring.GetConfigFloat("ui_scale", 1) - 1) / 1.25) advplayerlistPos = {0,vsx-(220*scale),0,vsx,scale} @@ -139,8 +139,8 @@ end function widget:Initialize() widget:ViewResize() updatePosition() - WG['unittotals'] = {} - WG['unittotals'].GetPosition = function() + WG.unittotals = {} + WG.unittotals .GetPosition = function() return {top,left,bottom,right,widgetScale} end end @@ -150,8 +150,8 @@ function widget:PlayerChanged() end function widget:Shutdown() - if WG['guishader'] then - WG['guishader'].RemoveDlist('unittotals') + if WG.guishader then + WG.guishader .RemoveDlist('unittotals') end for i=1,#drawlist do glDeleteList(drawlist[i]) @@ -163,7 +163,7 @@ function widget:Shutdown() gl.DeleteTexture(uiTex) uiTex = nil end - WG['unittotals'] = nil + WG.unittotals = nil end function widget:Update(dt) @@ -190,7 +190,7 @@ end function widget:ViewResize() vsx, vsy = spGetViewGeometry() - font = WG['fonts'].getFont() + font = WG.fonts .getFont() elementCorner = WG.FlowUI.elementCorner RectRound = WG.FlowUI.Draw.RectRound diff --git a/luaui/Widgets/gui_allySelectedUnits.lua b/luaui/Widgets/gui_allySelectedUnits.lua index 0a14ee62c26..0d8557d5887 100644 --- a/luaui/Widgets/gui_allySelectedUnits.lua +++ b/luaui/Widgets/gui_allySelectedUnits.lua @@ -359,14 +359,14 @@ function widget:Initialize() widgetHandler:RegisterGlobal('selectedUnitsClear', selectedUnitsClear) widgetHandler:RegisterGlobal('selectedUnitsAdd', selectedUnitsAdd) - WG['allyselectedunits'] = {} - WG['allyselectedunits'].getSelectPlayerUnits = function() + WG.allyselectedunits = {} + WG.allyselectedunits .getSelectPlayerUnits = function() return selectPlayerUnits end - WG['allyselectedunits'].setSelectPlayerUnits = function(value) + WG.allyselectedunits .setSelectPlayerUnits = function(value) selectPlayerUnits = value end - WG['allyselectedunits'].getPlayerSelectedUnits = function(playerID) + WG.allyselectedunits .getPlayerSelectedUnits = function(playerID) return playerSelectedUnits[playerID] end end diff --git a/luaui/Widgets/gui_ally_cursors.lua b/luaui/Widgets/gui_ally_cursors.lua index bd9e1ae82fb..83ce871910d 100644 --- a/luaui/Widgets/gui_ally_cursors.lua +++ b/luaui/Widgets/gui_ally_cursors.lua @@ -214,7 +214,7 @@ end function widget:ViewResize() - font = WG['fonts'].getFont(1, 1.5) + font = WG.fonts .getFont(1, 1.5) deleteDlists() end @@ -227,58 +227,58 @@ function widget:Initialize() end updateSpecList(true) - WG['allycursors'] = {} - WG['allycursors'].setLights = function(value) + WG.allycursors = {} + WG.allycursors .setLights = function(value) addLights = value deleteDlists() end - WG['allycursors'].getLights = function() + WG.allycursors .getLights = function() return addLights end - WG['allycursors'].setLightStrength = function(value) + WG.allycursors .setLightStrength = function(value) lightStrengthMult = value end - WG['allycursors'].getLightStrength = function() + WG.allycursors .getLightStrength = function() return lightStrengthMult end - WG['allycursors'].setLightRadius = function(value) + WG.allycursors .setLightRadius = function(value) lightRadiusMult = value end - WG['allycursors'].setLightSelfShadowing = function(value) + WG.allycursors .setLightSelfShadowing = function(value) lightSelfShadowing = value end - WG['allycursors'].getLightRadius = function() + WG.allycursors .getLightRadius = function() return lightRadiusMult end - WG['allycursors'].getLightSelfShadowing = function() + WG.allycursors .getLightSelfShadowing = function() return lightSelfShadowing end - WG['allycursors'].setCursorDot = function(value) + WG.allycursors .setCursorDot = function(value) showCursorDot = value deleteDlists() end - WG['allycursors'].getCursorDot = function() + WG.allycursors .getCursorDot = function() return showCursorDot end - WG['allycursors'].setPlayerNames = function(value) + WG.allycursors .setPlayerNames = function(value) showPlayerName = value deleteDlists() end - WG['allycursors'].getPlayerNames = function() + WG.allycursors .getPlayerNames = function() return showPlayerName end - WG['allycursors'].setSpectatorNames = function(value) + WG.allycursors .setSpectatorNames = function(value) showSpectatorName = value deleteDlists() end - WG['allycursors'].getSpectatorNames = function() + WG.allycursors .getSpectatorNames = function() return showSpectatorName end - WG['allycursors'].getCursors = function() + WG.allycursors .getCursors = function() return cursors, notIdle end - WG['allycursors'].getCursor = function(playerID) + WG.allycursors .getCursor = function(playerID) if not playerID then return nil end @@ -295,7 +295,7 @@ end function widget:Shutdown() widgetHandler:DeregisterGlobal('MouseCursorEvent') deleteDlists() - WG['allycursors'] = nil + WG.allycursors = nil end function widget:PlayerChanged(playerID) @@ -361,7 +361,7 @@ local function createCursorDrawList(playerID, opacityMultiplier) SetTeamColor(teamID, playerID, 1) -- draw player cursor - if not spec and showCursorDot and (not addLights or not WG['lightsgl4']) then + if not spec and showCursorDot and (not addLights or not WG.lightsgl4 ) then glTexture(allyCursor) glBeginEnd(GL.QUADS, DrawGroundquad, wx, wy, wz, quadSize) glTexture(false) diff --git a/luaui/Widgets/gui_attack_aoe.lua b/luaui/Widgets/gui_attack_aoe.lua index a4d07f43c6d..71f98f794f0 100644 --- a/luaui/Widgets/gui_attack_aoe.lua +++ b/luaui/Widgets/gui_attack_aoe.lua @@ -307,9 +307,9 @@ local function GetMouseTargetPosition(weaponType, aimingUnitID) local shouldIgnoreUnit = false if isDgun then - shouldIgnoreUnit = (isAlly and WG['dgunnoally']) or (not isAlly and WG['dgunnoenemy']) + shouldIgnoreUnit = (isAlly and WG.dgunnoally ) or (not isAlly and WG.dgunnoenemy ) else - shouldIgnoreUnit = (isAlly and WG['attacknoally']) + shouldIgnoreUnit = (isAlly and WG.attacknoally ) end if not shouldIgnoreUnit then diff --git a/luaui/Widgets/gui_attackrange_gl4.lua b/luaui/Widgets/gui_attackrange_gl4.lua index 0745faeef43..6e8072f11f4 100644 --- a/luaui/Widgets/gui_attackrange_gl4.lua +++ b/luaui/Widgets/gui_attackrange_gl4.lua @@ -188,8 +188,8 @@ local weaponTypeMap = { 'ground', 'nano', 'AA', 'cannon', 'lrpc' } local unitDefRings = {} --each entry should be a unitdefIDkey to a table: -local vtoldamagetag = Game.armorTypes['vtol'] -local defaultdamagetag = Game.armorTypes['default'] +local vtoldamagetag = Game.armorTypes.vtol +local defaultdamagetag = Game.armorTypes.default -- globals local minimapUtils = VFS.Include("luaui/Include/minimap_utils.lua") @@ -276,7 +276,7 @@ end local function initializeUnitDefRing(unitDefID) local weapons = unitWeapons[unitDefID] - unitDefRings[unitDefID]['rings'] = {} + unitDefRings[unitDefID].rings = {} local weaponCount = #weapons or 0 for weaponNum = 1, #weapons do local weaponDefID = weapons[weaponNum].weaponDef @@ -290,7 +290,7 @@ local function initializeUnitDefRing(unitDefID) local range = weaponDef.range local dps = 0 - local weaponType = unitDefRings[unitDefID]['weapons'][weaponNum] + local weaponType = unitDefRings[unitDefID].weapons [weaponNum] if weaponType ~= nil and weaponType > 0 then local damage = 0 @@ -417,16 +417,16 @@ local function initializeUnitDefRing(unitDefID) isDgun, --16 maxangledif --17 } - unitDefRings[unitDefID]['rings'][weaponNum] = ringParams + unitDefRings[unitDefID].rings [weaponNum] = ringParams end end -- for builders, we need to add a special nano ring def if unitBuilder[unitDefID] then local range = unitBuildDistance[unitDefID] - local color = colorConfig['nano'].color - local fadeparams = colorConfig['nano'].fadeparams - local groupselectionfadescale = colorConfig['nano'].groupselectionfadescale + local color = colorConfig.nano .color + local fadeparams = colorConfig.nano .fadeparams + local groupselectionfadescale = colorConfig.nano .groupselectionfadescale local ringParams = { range, color[1], color[2], color[3], color[4], fadeparams[1], fadeparams[2], fadeparams[3], fadeparams[4], @@ -438,7 +438,7 @@ local function initializeUnitDefRing(unitDefID) 2, 0 } - unitDefRings[unitDefID]['rings'][weaponCount + 1] = ringParams -- weaponCount + 1 is nano + unitDefRings[unitDefID].rings [weaponCount + 1] = ringParams -- weaponCount + 1 is nano end end @@ -685,7 +685,7 @@ local function AddSelectedUnit(unitID, mouseover, newRange) --for weaponNum = 1, #weapons do local addedRings = 0 - local weaponTypes = unitDefRings[unitDefID]['weapons'] + local weaponTypes = unitDefRings[unitDefID].weapons for j, weaponType in pairs(weaponTypes) do local drawIt = true -- we need to check if the unit has on/off weapon states, and only add the one active @@ -718,11 +718,11 @@ local function AddSelectedUnit(unitID, mouseover, newRange) local ringParams = {} if newRange then for i = 2, 17 do -- See line 405. - ringParams[i] = unitDefRings[unitDefID]['rings'][j][i] -- Preserves default range from unitDefs for use with enemy units. + ringParams[i] = unitDefRings[unitDefID].rings [j][i] -- Preserves default range from unitDefs for use with enemy units. end ringParams[1] = newRange[j] else - ringParams = unitDefRings[unitDefID]['rings'][j] + ringParams = unitDefRings[unitDefID].rings [j] end if drawIt and ringParams[1] > 0 then @@ -975,7 +975,7 @@ end local function cycleUnitDisplayHandler(_, _, _, data) local data = data or {} - local direction = data["direction"] + local direction = data.direction cycleUnitDisplay(direction) end @@ -1233,9 +1233,9 @@ function widget:DrawWorld(inMiniMap) end if chobbyInterface or not (selUnitCount > 0 or mouseUnit) then return end - if not Spring.IsGUIHidden() and (not WG['topbar'] or not WG['topbar'].showingQuit()) then + if not Spring.IsGUIHidden() and (not WG.topbar or not WG.topbar .showingQuit()) then -- For PIP minimap, use thicker lines since PIP is larger than engine minimap - local inPip = inMiniMap and WG['minimap'] and WG['minimap'].isDrawingInPip + local inPip = inMiniMap and WG.minimap and WG.minimap .isDrawingInPip if inPip then cameraHeightFactor = 2.5 -- PIP is larger, needs thicker lines else @@ -1269,8 +1269,8 @@ function widget:DrawWorld(inMiniMap) attackRangeShader:SetUniform("fadeDistOffset", colorConfig.outer_fade_height_difference) -- Pass PIP visible area if drawing in PIP minimap - if inMiniMap and WG['minimap'] and WG['minimap'].isDrawingInPip and WG['minimap'].getNormalizedVisibleArea then - local left, right, bottom, top = WG['minimap'].getNormalizedVisibleArea() + if inMiniMap and WG.minimap and WG.minimap .isDrawingInPip and WG.minimap .getNormalizedVisibleArea then + local left, right, bottom, top = WG.minimap .getNormalizedVisibleArea() attackRangeShader:SetUniform("pipVisibleArea", left, right, bottom, top) else attackRangeShader:SetUniform("pipVisibleArea", 0, 1, 0, 1) diff --git a/luaui/Widgets/gui_awards.lua b/luaui/Widgets/gui_awards.lua index 294a6f1d55e..cb8d9140c67 100644 --- a/luaui/Widgets/gui_awards.lua +++ b/luaui/Widgets/gui_awards.lua @@ -183,8 +183,8 @@ local function createBackground() if Background then Background = gl.DeleteList(Background) end - if WG['guishader'] then - WG['guishader'].InsertRect(widgetX, widgetY, widgetX + widgetWidthScaled, widgetY + widgetHeightScaled, 'awards') + if WG.guishader then + WG.guishader .InsertRect(widgetX, widgetY, widgetX + widgetWidthScaled, widgetY + widgetHeightScaled, 'awards') end Background = gl.CreateList(function() @@ -207,9 +207,9 @@ function widget:ViewResize(viewSizeX, viewSizeY) viewScreenX, viewScreenY = spGetViewGeometry() - font = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2) - titleFont = WG['fonts'].getFont(2, 4, 0.2, 1) + font = WG.fonts .getFont() + font2 = WG.fonts .getFont(2) + titleFont = WG.fonts .getFont(2, 4, 0.2, 1) -- fix geometry widgetScale = (0.75 + (viewScreenX * viewScreenY / 7500000)) @@ -310,8 +310,8 @@ function widget:MousePress(x, y, button) and (y < widgetY + mathFloor((50 + 17 + 5)*widgetScale))) then Spring.SendCommands('endgraph 2') - if WG['guishader'] then - WG['guishader'].RemoveRect('awards') + if WG.guishader then + WG.guishader .RemoveRect('awards') end drawAwards = false end @@ -321,8 +321,8 @@ function widget:MousePress(x, y, button) and (x < widgetX + widgetWidthScaled - closeRightX + mathFloor(20*widgetScale) * font:GetTextWidth('X') + mathFloor(5*widgetScale)) and (y > widgetY + widgetHeightScaled - mathFloor((10 + 17 + 5)*widgetScale) and (y < widgetY + widgetHeightScaled - mathFloor((10 - 5)*widgetScale))) then - if WG['guishader'] then - WG['guishader'].RemoveRect('awards') + if WG.guishader then + WG.guishader .RemoveRect('awards') end drawAwards = false end @@ -431,7 +431,7 @@ function widget:Shutdown() if Background then gl.DeleteList(Background) end - if WG['guishader'] then - WG['guishader'].RemoveRect('awards') + if WG.guishader then + WG.guishader .RemoveRect('awards') end end diff --git a/luaui/Widgets/gui_blast_radius.lua b/luaui/Widgets/gui_blast_radius.lua index 88456c730bc..bfd79c4a84d 100644 --- a/luaui/Widgets/gui_blast_radius.lua +++ b/luaui/Widgets/gui_blast_radius.lua @@ -100,7 +100,7 @@ function widget:Initialize() end function widget:ViewResize() - font = WG['fonts'].getFont(1, 1.5) + font = WG.fonts .getFont(1, 1.5) end local selectedUnits = Spring.GetSelectedUnits() diff --git a/luaui/Widgets/gui_build_eta.lua b/luaui/Widgets/gui_build_eta.lua index 7cde0bfaad5..592f33893ed 100644 --- a/luaui/Widgets/gui_build_eta.lua +++ b/luaui/Widgets/gui_build_eta.lua @@ -46,7 +46,7 @@ end function widget:ViewResize() - font = WG['fonts'].getFont(nil, 1.2, 0.2, 20) + font = WG.fonts .getFont(nil, 1.2, 0.2, 20) end local function makeETA(unitID, unitDefID) diff --git a/luaui/Widgets/gui_buildbar.lua b/luaui/Widgets/gui_buildbar.lua index e6c25d74f74..05def3e524e 100644 --- a/luaui/Widgets/gui_buildbar.lua +++ b/luaui/Widgets/gui_buildbar.lua @@ -144,7 +144,7 @@ local sound_queue_rem = 'LuaUI/Sounds/buildbar_rem.wav' ------------------------------------------------------------------------------- local function checkGuishader(force) - if WG['guishader'] and backgroundRect then + if WG.guishader and backgroundRect then if force then if dlistGuishader then dlistGuishader = gl.DeleteList(dlistGuishader) @@ -188,7 +188,7 @@ function widget:ViewResize() UiElement = WG.FlowUI.Draw.Element UiUnit = WG.FlowUI.Draw.Unit - font = WG['fonts'].getFont(2) + font = WG.fonts .getFont(2) iconSizeY = mathFloor((vsy / 19) * (1 + (ui_scale - 1) / 1.5)) iconSizeX = iconSizeY @@ -390,12 +390,12 @@ end ------------------------------------------------------------------------------- function widget:Initialize() - if WG['buildmenu'] then - if WG['buildmenu'].getGroups then - groups, unitGroup = WG['buildmenu'].getGroups() + if WG.buildmenu then + if WG.buildmenu .getGroups then + groups, unitGroup = WG.buildmenu .getGroups() end - if WG['buildmenu'].getOrder then - unitOrder = WG['buildmenu'].getOrder() + if WG.buildmenu .getOrder then + unitOrder = WG.buildmenu .getOrder() -- order buildoptions for uDefID, def in pairs(unitBuildOptions) do @@ -455,9 +455,9 @@ function widget:Shutdown() buildOptionsTex = nil end - if WG['guishader'] then - WG['guishader'].RemoveDlist('buildbar') - WG['guishader'].RemoveDlist('buildbar2') + if WG.guishader then + WG.guishader .RemoveDlist('buildbar') + WG.guishader .RemoveDlist('buildbar2') if dlistGuishader then dlistGuishader = gl.DeleteList(dlistGuishader) end @@ -662,7 +662,7 @@ function widget:Update(dt) myTeamID = spGetMyTeamID() updateFactoryList() end - if WG['topbar'] and WG['topbar'].showingQuit() then + if WG.topbar and WG.topbar .showingQuit() then openedMenu = -1 return false end @@ -675,27 +675,27 @@ function widget:Update(dt) hoveredFac = mouseOverIcon(mx, my) hoveredBOpt = mouseOverSubIcon(mx, my) -- set hover unitdef id for buildmenu so info widget can show it - if WG['info'] then + if WG.info then if hoveredFac >= 0 then if(not setInfoDisplayUnitID or (hoveredBOpt < 0 and setInfoDisplayUnitID ~= facs[hoveredFac + 1].unitID))then Spring.PlaySoundFile(sound_hover, 0.8, 'ui') setInfoDisplayUnitID = facs[hoveredFac + 1].unitID - WG['info'].displayUnitID(setInfoDisplayUnitID) + WG.info .displayUnitID(setInfoDisplayUnitID) end elseif hoveredBOpt >= 0 then if(setInfoDisplayUnitID and setInfoDisplayUnitDefID ~= facs[openedMenu + 1].buildList[hoveredBOpt + 1])then Spring.PlaySoundFile(sound_hover, 0.8, 'ui') setInfoDisplayUnitDefID = facs[openedMenu + 1].buildList[hoveredBOpt + 1] - WG['info'].displayUnitDefID(setInfoDisplayUnitDefID) + WG.info .displayUnitDefID(setInfoDisplayUnitDefID) end else if setInfoDisplayUnitID then setInfoDisplayUnitID = nil - WG['info'].clearDisplayUnitID() + WG.info .clearDisplayUnitID() end if setInfoDisplayUnitDefID then setInfoDisplayUnitDefID = nil - WG['info'].clearDisplayUnitDefID() + WG.info .clearDisplayUnitDefID() end end end @@ -846,7 +846,7 @@ function widget:Update(dt) if factoriesArea then dlists[1] = gl.CreateList(drawBackground) - if WG['guishader'] then + if WG.guishader then if hoveredFac >= 0 then dlists[dlistsCount+1] = gl.CreateList(drawOptionsBackground) @@ -858,12 +858,12 @@ function widget:Update(dt) end) if dlistGuishader2 then - WG['guishader'].RemoveDlist('buildbar2') - WG['guishader'].InsertDlist(dlistGuishader2, 'buildbar2') + WG.guishader .RemoveDlist('buildbar2') + WG.guishader .InsertDlist(dlistGuishader2, 'buildbar2') end else backgroundOptionsRect = nil - WG['guishader'].RemoveDlist('buildbar2') + WG.guishader .RemoveDlist('buildbar2') end end end @@ -1257,14 +1257,14 @@ function widget:DrawScreen() local mx, my, lb, mb, rb, moffscreen = GetMouseState() - if WG['guishader'] then + if WG.guishader then if #dlists == 0 then if dlistGuishader then - WG['guishader'].RemoveDlist('buildbar') + WG.guishader .RemoveDlist('buildbar') end else if dlistGuishader then - WG['guishader'].InsertDlist(dlistGuishader, 'buildbar') + WG.guishader .InsertDlist(dlistGuishader, 'buildbar') end end end @@ -1325,7 +1325,7 @@ function widget:DrawScreen() renderBuildOptions(mx, my, lb, mb, rb, moffscreen) -- Update guishader for build options background only when menu changes - if WG['guishader'] and backgroundOptionsRect and openedMenu >= 0 and lastGuishaderMenu ~= openedMenu then + if WG.guishader and backgroundOptionsRect and openedMenu >= 0 and lastGuishaderMenu ~= openedMenu then if dlistGuishader2 then dlistGuishader2 = gl.DeleteList(dlistGuishader2) end @@ -1333,16 +1333,16 @@ function widget:DrawScreen() RectRound(backgroundOptionsRect[1],backgroundOptionsRect[2],backgroundOptionsRect[3],backgroundOptionsRect[4], elementCorner * ui_scale) end) if dlistGuishader2 then - WG['guishader'].RemoveDlist('buildbar2') - WG['guishader'].InsertDlist(dlistGuishader2, 'buildbar2') + WG.guishader .RemoveDlist('buildbar2') + WG.guishader .InsertDlist(dlistGuishader2, 'buildbar2') end lastGuishaderMenu = openedMenu end else buildoptionsArea = nil backgroundOptionsRect = nil - if WG['guishader'] then - WG['guishader'].RemoveDlist('buildbar2') + if WG.guishader then + WG.guishader .RemoveDlist('buildbar2') end lastGuishaderMenu = -1 end diff --git a/luaui/Widgets/gui_building_grid_gl4.lua b/luaui/Widgets/gui_building_grid_gl4.lua index 4991adcd111..ff938c65a45 100644 --- a/luaui/Widgets/gui_building_grid_gl4.lua +++ b/luaui/Widgets/gui_building_grid_gl4.lua @@ -155,15 +155,15 @@ local function getForceShowUnitDefID() end function widget:Initialize() - WG['buildinggrid'] = {} - WG['buildinggrid'].getOpacity = function() + WG.buildinggrid = {} + WG.buildinggrid .getOpacity = function() return opacity end - WG['buildinggrid'].setOpacity = function(value) + WG.buildinggrid .setOpacity = function(value) opacity = value -- widget needs reloading wholly end - WG['buildinggrid'].setForceShow = function(reason, enabled, unitDefID) + WG.buildinggrid .setForceShow = function(reason, enabled, unitDefID) if enabled then forceShow[reason] = unitDefID else diff --git a/luaui/Widgets/gui_buildmenu.lua b/luaui/Widgets/gui_buildmenu.lua index 58d8f4c0551..60d3971cd93 100644 --- a/luaui/Widgets/gui_buildmenu.lua +++ b/luaui/Widgets/gui_buildmenu.lua @@ -268,7 +268,7 @@ local modKeyMultiplier = { } local function checkGuishader(force) - if WG['guishader'] then + if WG.guishader then if force and dlistGuishader then dlistGuishader = gl.DeleteList(dlistGuishader) end @@ -277,7 +277,7 @@ local function checkGuishader(force) RectRound(backgroundRect[1], backgroundRect[2], backgroundRect[3], backgroundRect[4], elementCorner) end) if selectedBuilderCount > 0 then - WG['guishader'].InsertDlist(dlistGuishader, 'buildmenu') + WG.guishader .InsertDlist(dlistGuishader, 'buildmenu') end end elseif dlistGuishader then @@ -484,10 +484,10 @@ function widget:ViewResize() vsx, vsy = spGetViewGeometry() local outlineMult = math.clamp(1/(vsy/1400), 1, 1.5) - font2 = WG['fonts'].getFont(2) + font2 = WG.fonts .getFont(2) - if WG['minimap'] then - minimapHeight = WG['minimap'].getHeight() + if WG.minimap then + minimapHeight = WG.minimap .getHeight() end local widgetSpaceMargin = WG.FlowUI.elementMargin @@ -519,14 +519,14 @@ function widget:ViewResize() minColls = 4 maxColls = 5 - if WG['minimap'] then - posY = 1 - (WG['minimap'].getHeight() / vsy) - (widgetSpaceMargin/vsy) + if WG.minimap then + posY = 1 - (WG.minimap .getHeight() / vsy) - (widgetSpaceMargin/vsy) if posY > maxPosY then posY = maxPosY end - if WG['ordermenu'] then - local oposX, oposY, owidth, oheight = WG['ordermenu'].getPosition() + if WG.ordermenu then + local oposX, oposY, owidth, oheight = WG.ordermenu .getPosition() if oposY > 0.5 then posY = oposY - oheight - ((widgetSpaceMargin)/vsy) end @@ -660,11 +660,11 @@ function widget:Update(dt) buildmenuShows = true end - if WG['guishader'] and prevBuildmenuShows ~= buildmenuShows and dlistGuishader then + if WG.guishader and prevBuildmenuShows ~= buildmenuShows and dlistGuishader then if buildmenuShows then - WG['guishader'].InsertDlist(dlistGuishader, 'buildmenu') + WG.guishader .InsertDlist(dlistGuishader, 'buildmenu') else - WG['guishader'].RemoveDlist('buildmenu') + WG.guishader .RemoveDlist('buildmenu') end end @@ -672,21 +672,21 @@ function widget:Update(dt) if sec > 0.33 then sec = 0 checkGuishader() - if WG['minimap'] and minimapHeight ~= WG['minimap'].getHeight() then + if WG.minimap and minimapHeight ~= WG.minimap .getHeight() then widget:ViewResize() end if stickToBottom then - if WG['advplayerlist_api'] ~= nil then - local advplayerlistPos = WG['advplayerlist_api'].GetPosition() -- returns {top,left,bottom,right,widgetScale} + if WG.advplayerlist_api ~= nil then + local advplayerlistPos = WG.advplayerlist_api .GetPosition() -- returns {top,left,bottom,right,widgetScale} advplayerlistLeft = advplayerlistPos[2] end end local prevOrdermenuLeft = ordermenuLeft local prevOrdermenuHeight = ordermenuHeight - if WG['ordermenu'] then - local oposX, oposY, owidth, oheight = WG['ordermenu'].getPosition() + if WG.ordermenu then + local oposX, oposY, owidth, oheight = WG.ordermenu .getPosition() ordermenuLeft = math_floor((oposX + owidth) * vsx) ordermenuHeight = oheight end @@ -930,8 +930,8 @@ end function widget:DrawScreen() - if WG['buildmenu'] then - WG['buildmenu'].hoverID = nil + if WG.buildmenu then + WG.buildmenu .hoverID = nil end if not buildmenuShows then @@ -1004,16 +1004,16 @@ function widget:DrawScreen() if preGamestartPlayer or selectedBuilderCount ~= 0 then -- pre process + 'highlight' under the icons local hoveredCellID - if not WG['topbar'] or not WG['topbar'].showingQuit() then + if not WG.topbar or not WG.topbar .showingQuit() then if hovering then for cellRectID, cellRect in pairs(cellRects) do if math_isInRect(x, y, cellRect[1], cellRect[2], cellRect[3], cellRect[4]) then hoveredCellID = cellRectID local uDefID = -cmds[cellRectID].id - WG['buildmenu'].hoverID = uDefID + WG.buildmenu .hoverID = uDefID gl.Color(1, 1, 1, 1) local alt, ctrl, meta, shift = Spring.GetModKeyState() - if WG['tooltip'] and not meta then + if WG.tooltip and not meta then -- when meta: unitstats does the tooltip local text local textColor = "\255\215\255\215" @@ -1026,7 +1026,7 @@ function widget:DrawScreen() if unitMetal_extractor[uDefID] then tooltip = tooltip .. "\n" .. Spring.I18N("ui.buildMenu.areamex_tooltip") end - WG['tooltip'].ShowTooltip('buildmenu', "\255\240\240\240"..tooltip, nil, nil, text) + WG.tooltip .ShowTooltip('buildmenu', "\255\240\240\240"..tooltip, nil, nil, text) end -- highlight --if b and not disableInput then @@ -1053,7 +1053,7 @@ function widget:DrawScreen() -- draw highlight local usedZoom local cellColor - if not WG['topbar'] or not WG['topbar'].showingQuit() then + if not WG.topbar or not WG.topbar .showingQuit() then if math_isInRect(x, y, backgroundRect[1], backgroundRect[2], backgroundRect[3], backgroundRect[4]) then -- paginator buttons @@ -1065,9 +1065,9 @@ function widget:DrawScreen() paginatorHovered = 2 end if paginatorHovered then - if WG['tooltip'] then + if WG.tooltip then local text = "\255\240\240\240" .. (paginatorHovered == 1 and Spring.I18N('ui.buildMenu.previousPage') or Spring.I18N('ui.buildMenu.nextPage')) - WG['tooltip'].ShowTooltip('buildmenu', text) + WG.tooltip .ShowTooltip('buildmenu', text) end RectRound(paginatorRects[paginatorHovered][1] + cellPadding, paginatorRects[paginatorHovered][2] + cellPadding, paginatorRects[paginatorHovered][3] - cellPadding, paginatorRects[paginatorHovered][4] - cellPadding, cellSize * 0.03, 2, 2, 2, 2, { 1, 1, 1, 0 }, { 1, 1, 1, (b and 0.35 or 0.15) }) -- gloss @@ -1282,7 +1282,7 @@ function widget:MousePress(x, y, button) if Spring.IsGUIHidden() then return end - if WG['topbar'] and WG['topbar'].showingQuit() then + if WG.topbar and WG.topbar .showingQuit() then return end @@ -1321,7 +1321,7 @@ function widget:MousePress(x, y, button) local isRepeatMex = unitMetal_extractor[-uDefID] and unitName[-uDefID] == activeCmd local cmd = isRepeatMex and "areamex" or spGetCmdDescIndex(uDefID) if isRepeatMex then - WG['areamex'].setAreaMexType(uDefID) + WG.areamex .setAreaMexType(uDefID) end Spring.SetActiveCommand(cmd, 1, true, false, alt, ctrl, meta, shift) end @@ -1482,7 +1482,7 @@ function widget:Initialize() local blockedUnitsData = unitBlocking.getBlockedUnitDefs() for unitDefID, reasons in pairs(blockedUnitsData) do units.unitRestricted[unitDefID] = next(reasons) ~= nil - units.unitHidden[unitDefID] = reasons["hidden"] ~= nil + units.unitHidden[unitDefID] = reasons.hidden ~= nil end if widgetHandler:IsWidgetKnown("Grid menu") then @@ -1504,93 +1504,93 @@ function widget:Initialize() widget:ViewResize() widget:SelectionChanged(spGetSelectedUnits()) - WG['buildmenu'] = {} - WG['buildmenu'].getGroups = function() + WG.buildmenu = {} + WG.buildmenu .getGroups = function() return groups, units.unitGroup end - WG['buildmenu'].getOrder = function() + WG.buildmenu .getOrder = function() return units.unitOrder end - WG['buildmenu'].getShowPrice = function() + WG.buildmenu .getShowPrice = function() return showPrice end - WG['buildmenu'].setShowPrice = function(value) + WG.buildmenu .setShowPrice = function(value) showPrice = value clear() end - WG['buildmenu'].getAlwaysShow = function() + WG.buildmenu .getAlwaysShow = function() return alwaysShow end - WG['buildmenu'].setAlwaysShow = function(value) + WG.buildmenu .setAlwaysShow = function(value) alwaysShow = value clear() end - WG['buildmenu'].getShowRadarIcon = function() + WG.buildmenu .getShowRadarIcon = function() return showRadarIcon end - WG['buildmenu'].setShowRadarIcon = function(value) + WG.buildmenu .setShowRadarIcon = function(value) showRadarIcon = value clear() end - WG['buildmenu'].getShowGroupIcon = function() + WG.buildmenu .getShowGroupIcon = function() return showGroupIcon end - WG['buildmenu'].setShowGroupIcon = function(value) + WG.buildmenu .setShowGroupIcon = function(value) showGroupIcon = value clear() end - WG['buildmenu'].getDynamicIconsize = function() + WG.buildmenu .getDynamicIconsize = function() return dynamicIconsize end - WG['buildmenu'].setDynamicIconsize = function(value) + WG.buildmenu .setDynamicIconsize = function(value) dynamicIconsize = value clear() end - WG['buildmenu'].getMinColls = function() + WG.buildmenu .getMinColls = function() return minColls end - WG['buildmenu'].setMinColls = function(value) + WG.buildmenu .setMinColls = function(value) minColls = value clear() end - WG['buildmenu'].getMaxColls = function() + WG.buildmenu .getMaxColls = function() return maxColls end - WG['buildmenu'].setMaxColls = function(value) + WG.buildmenu .setMaxColls = function(value) maxColls = value clear() end - WG['buildmenu'].getDefaultColls = function() + WG.buildmenu .getDefaultColls = function() return defaultColls end - WG['buildmenu'].setDefaultColls = function(value) + WG.buildmenu .setDefaultColls = function(value) defaultColls = value clear() end - WG['buildmenu'].getBottomPosition = function() + WG.buildmenu .getBottomPosition = function() return stickToBottom end - WG['buildmenu'].setBottomPosition = function(value) + WG.buildmenu .setBottomPosition = function(value) stickToBottom = value widget:Update(1000) widget:ViewResize() clear() end - WG['buildmenu'].getSize = function() + WG.buildmenu .getSize = function() return posY, posY2 end - WG['buildmenu'].getMaxPosY = function() + WG.buildmenu .getMaxPosY = function() return maxPosY end - WG['buildmenu'].setMaxPosY = function(value) + WG.buildmenu .setMaxPosY = function(value) maxPosY = value clear() end - WG['buildmenu'].reloadBindings = function() + WG.buildmenu .reloadBindings = function() bindBuildUnits(self) end - WG['buildmenu'].getIsShowing = function() + WG.buildmenu .getIsShowing = function() return buildmenuShows end ---@class CostLine @@ -1606,7 +1606,7 @@ function widget:Initialize() ---Override the cost display for a specific unit in the build menu ---@param unitDefID number The unit definition ID to override costs for ---@param costData CostData Cost override configuration table with optional properties - WG['buildmenu'].setCostOverride = function(unitDefID, costData) + WG.buildmenu .setCostOverride = function(unitDefID, costData) if unitDefID and costData then costOverrides[unitDefID] = costData clear() @@ -1615,7 +1615,7 @@ function widget:Initialize() ---Clear cost overrides for a specific unit or all units ---@param unitDefID number? The unit definition ID to clear overrides for. If nil or not provided, clears all cost overrides. - WG['buildmenu'].clearCostOverrides = function(unitDefID) + WG.buildmenu .clearCostOverrides = function(unitDefID) if unitDefID then costOverrides[unitDefID] = nil else @@ -1631,7 +1631,7 @@ end function widget:UnitBlocked(unitDefID, reasons) units.unitRestricted[unitDefID] = next(reasons) ~= nil - units.unitHidden[unitDefID] = reasons["hidden"] ~= nil + units.unitHidden[unitDefID] = reasons.hidden ~= nil if not delayRefresh or delayRefresh < spGetGameSeconds() then delayRefresh = spGetGameSeconds() + 0.5 -- delay so multiple sequential UnitBlocked calls are batched in a single update. end @@ -1639,11 +1639,11 @@ end function widget:Shutdown() clear() - if WG['guishader'] and dlistGuishader then - WG['guishader'].DeleteDlist('buildmenu') + if WG.guishader and dlistGuishader then + WG.guishader .DeleteDlist('buildmenu') dlistGuishader = nil end - WG['buildmenu'] = nil + WG.buildmenu = nil end function widget:GetConfigData() diff --git a/luaui/Widgets/gui_changelog_info.lua b/luaui/Widgets/gui_changelog_info.lua index 3f912049741..f6eecb68ecb 100644 --- a/luaui/Widgets/gui_changelog_info.lua +++ b/luaui/Widgets/gui_changelog_info.lua @@ -83,8 +83,8 @@ function widget:ViewResize() screenX = mathFloor((vsx * centerPosX) - (screenWidth / 2)) screenY = mathFloor((vsy * centerPosY) + (screenHeight / 2)) - font, loadedFontSize = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2) + font, loadedFontSize = WG.fonts .getFont() + font2 = WG.fonts .getFont(2) bgpadding = WG.FlowUI.elementPadding elementCorner = WG.FlowUI.elementCorner @@ -289,7 +289,7 @@ function widget:DrawScreen() -- draw the changelog panel glCallList(changelogList) - if WG['guishader'] then + if WG.guishader then if backgroundGuishader ~= nil then glDeleteList(backgroundGuishader) end @@ -299,7 +299,7 @@ function widget:DrawScreen() -- title RectRound(titleRect[1], titleRect[2], titleRect[3], titleRect[4], elementCorner, 1, 1, 0, 0) end) - WG['guishader'].InsertDlist(backgroundGuishader, 'changelog') + WG.guishader .InsertDlist(backgroundGuishader, 'changelog') dlistcreated = true end showOnceMore = false @@ -330,8 +330,8 @@ function widget:DrawScreen() end end end - elseif dlistcreated and WG['guishader'] then - WG['guishader'].RemoveDlist('changelog') + elseif dlistcreated and WG.guishader then + WG.guishader .RemoveDlist('changelog') dlistcreated = nil end end @@ -427,8 +427,8 @@ function widget:Initialize() widget:ViewResize() if changelogFile then - WG['changelog'] = {} - WG['changelog'].toggle = function(state) + WG.changelog = {} + WG.changelog .toggle = function(state) if state ~= nil then show = state else @@ -441,10 +441,10 @@ function widget:Initialize() end end end - WG['changelog'].isvisible = function() + WG.changelog .isvisible = function() return show end - WG['changelog'].haschanges = function() + WG.changelog .haschanges = function() return lastviewedHash ~= changelogFileHash and lastviewedChangelogLength < changelogFileLength end @@ -480,8 +480,8 @@ function widget:Shutdown() glDeleteList(changelogList) changelogList = nil end - if WG['guishader'] then - WG['guishader'].RemoveDlist('changelog') + if WG.guishader then + WG.guishader .RemoveDlist('changelog') end if backgroundGuishader ~= nil then glDeleteList(backgroundGuishader) diff --git a/luaui/Widgets/gui_chat.lua b/luaui/Widgets/gui_chat.lua index f00b0706c85..7bfc1192a31 100644 --- a/luaui/Widgets/gui_chat.lua +++ b/luaui/Widgets/gui_chat.lua @@ -785,9 +785,9 @@ local function cancelChatInput() inputHistoryCurrent = #inputHistory autocompleteText = nil autocompleteWords = {} - if WG['guishader'] then - WG['guishader'].RemoveRect('chatinput') - WG['guishader'].RemoveRect('chatinputautocomplete') + if WG.guishader then + WG.guishader .RemoveRect('chatinput') + WG.guishader .RemoveRect('chatinputautocomplete') end Spring.SDLStopTextInput() widgetHandler.textOwner = nil -- non handler = true: widgetHandler:DisownText() @@ -1359,8 +1359,8 @@ function widget:Update(dt) end -- add settings option commands - if not addedOptionsList and WG['options'] and WG['options'].getOptionsList then - local optionsList = WG['options'].getOptionsList() + if not addedOptionsList and WG.options and WG.options .getOptionsList then + local optionsList = WG.options .getOptionsList() if optionsList and #optionsList > 0 then addedOptionsList = true for i, option in ipairs(optionsList) do @@ -1402,7 +1402,7 @@ function widget:Update(dt) end local chatlogHeightDiff = historyMode and floor(vsy*(scrollingPosY-posY)) or 0 - if WG['topbar'] and WG['topbar'].showingQuit() then + if WG.topbar and WG.topbar .showingQuit() then historyMode = false setCurrentChatLine(#chatLines) elseif math_isInRect(x, y, activationArea[1], activationArea[2], activationArea[3], activationArea[4]) then @@ -1479,8 +1479,8 @@ drawChatInput = function() local inputAlpha = mathMin(0.36, ui_opacity*0.66) local x2 = math.max(textPosX+lineHeight+floor(usedFont:GetTextWidth(inputText..(autocompleteText and autocompleteText or '')) * inputFontSize), floor(activationArea[1]+((activationArea[3]-activationArea[1])/3))) UiElement(activationArea[1], activationArea[2]+chatlogHeightDiff-distance-inputHeight, x2, activationArea[2]+chatlogHeightDiff-distance, nil,nil,nil,nil, nil,nil,nil,nil, inputAlpha) - if WG['guishader'] then - WG['guishader'].InsertRect(activationArea[1], activationArea[2]+chatlogHeightDiff-distance-inputHeight, x2, activationArea[2]+chatlogHeightDiff-distance, 'chatinput') + if WG.guishader then + WG.guishader .InsertRect(activationArea[1], activationArea[2]+chatlogHeightDiff-distance-inputHeight, x2, activationArea[2]+chatlogHeightDiff-distance, 'chatinput') end -- button background @@ -1590,8 +1590,8 @@ drawChatInput = function() local height = (autocLineHeight * mathMin(allowMultiAutocompleteMax, #autocompleteWords-1) + leftOffset) + (#autocompleteWords > allowMultiAutocompleteMax+1 and autocLineHeight or 0) glColor(0,0,0,inputAlpha) RectRound(xPos-leftOffset, yPos-height, x2-elementMargin, yPos, elementCorner*0.6, 0,0,1,1) - if WG['guishader'] then - WG['guishader'].InsertRect(xPos-leftOffset, yPos-height, x2-elementPadding, yPos, 'chatinputautocomplete') + if WG.guishader then + WG.guishader .InsertRect(xPos-leftOffset, yPos-height, x2-elementPadding, yPos, 'chatinputautocomplete') end local addHeight = floor((inputFontSize*scale) * 1.35) - autocLineHeight for i, word in ipairs(autocompleteWords) do @@ -1613,8 +1613,8 @@ drawChatInput = function() end end else - if WG['guishader'] then - WG['guishader'].RemoveRect('chatinputautocomplete') + if WG.guishader then + WG.guishader .RemoveRect('chatinputautocomplete') end end @@ -1804,9 +1804,9 @@ drawTextInput = function() glColor(1,1,1,0.075) RectRound(inputButtonRect[1], inputButtonRect[2], inputButtonRect[3], inputButtonRect[4], elementCorner*0.6, 1,0,0,1) end - elseif WG['guishader'] then - WG['guishader'].RemoveRect('chatinput') - WG['guishader'].RemoveRect('chatinputautocomplete') + elseif WG.guishader then + WG.guishader .RemoveRect('chatinput') + WG.guishader .RemoveRect('chatinputautocomplete') textInputDlist = glDeleteList(textInputDlist) end end @@ -1819,8 +1819,8 @@ function widget:DrawScreen() local _, ctrl, _, _ = Spring.GetModKeyState() local x,y,b = spGetMouseState() local chatlogHeightDiff = historyMode and floor(vsy*(scrollingPosY-posY)) or 0 - if hovering and WG['guishader'] then - WG['guishader'].RemoveRect('chat') + if hovering and WG.guishader then + WG.guishader .RemoveRect('chat') end -- draw chat input @@ -1834,8 +1834,8 @@ function widget:DrawScreen() hovering = true if historyMode then UiElement(activationArea[1], activationArea[2]+chatlogHeightDiff, activationArea[3], activationArea[4]) - if WG['guishader'] then - WG['guishader'].InsertRect(activationArea[1], activationArea[2]+chatlogHeightDiff, activationArea[3], activationArea[4], 'chat') + if WG.guishader then + WG.guishader .InsertRect(activationArea[1], activationArea[2]+chatlogHeightDiff, activationArea[3], activationArea[4], 'chat') end -- player name background @@ -2116,8 +2116,8 @@ function widget:TextInput(char) -- if it isnt working: chobby probably hijacked cursorBlinkTimer = 0 autocomplete(inputText) updateTextInputDlist = true - if WG['limitidlefps'] and WG['limitidlefps'].update then - WG['limitidlefps'].update() + if WG.limitidlefps and WG.limitidlefps .update then + WG.limitidlefps .update() end return true end @@ -2539,9 +2539,9 @@ function widget:ViewResize() usedFontSize = charSize*widgetScale*fontsizeMult usedConsoleFontSize = usedFontSize*consoleFontSizeMult - font = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2, 1.2, 0.13, 20) - font3 = WG['fonts'].getFont(3) + font = WG.fonts .getFont() + font2 = WG.fonts .getFont(2, 1.2, 0.13, 20) + font3 = WG.fonts .getFont(3) -- get longest player name and calc its width if not font or not longestPlayername then @@ -2568,8 +2568,8 @@ function widget:ViewResize() backgroundPadding = elementPadding + floor(lineHeight*0.5) local posY2 = 0.94 - if WG['topbar'] ~= nil then - topbarArea = WG['topbar'].GetPosition() + if WG.topbar ~= nil then + topbarArea = WG.topbar .GetPosition() posY2 = floor(topbarArea[2] - elementMargin)/vsy posX = topbarArea[1]/vsx scrollingPosY = floor(topbarArea[2] - elementMargin - backgroundPadding - backgroundPadding - (lineHeight*maxLinesScroll)) / vsy @@ -2724,80 +2724,80 @@ function widget:Initialize() Spring.SendCommands("console 0") - WG['chat'] = {} - WG['chat'].isInputActive = function() + WG.chat = {} + WG.chat .isInputActive = function() return showTextInput end - WG['chat'].getInputButton = function() + WG.chat .getInputButton = function() return inputButton end - WG['chat'].setHide = function(value) + WG.chat .setHide = function(value) hide = value end - WG['chat'].getHide = function() + WG.chat .getHide = function() return hide end - WG['chat'].setChatInputHistory = function(value) + WG.chat .setChatInputHistory = function(value) showHistoryWhenChatInput = value end - WG['chat'].getChatInputHistory = function() + WG.chat .getChatInputHistory = function() return showHistoryWhenChatInput end - WG['chat'].setInputButton = function(value) + WG.chat .setInputButton = function(value) inputButton = value end - WG['chat'].getHandleInput = function() + WG.chat .getHandleInput = function() return handleTextInput end - WG['chat'].setHandleInput = function(value) + WG.chat .setHandleInput = function(value) handleTextInput = value if not handleTextInput then cancelChatInput() end Spring.SDLStartTextInput() -- because: touch chobby's text edit field once and widget:TextInput is gone for the game, so we make sure its started! end - WG['chat'].getChatVolume = function() + WG.chat .getChatVolume = function() return sndChatFileVolume end - WG['chat'].setChatVolume = function(value) + WG.chat .setChatVolume = function(value) sndChatFileVolume = value end - WG['chat'].getBackgroundOpacity = function() + WG.chat .getBackgroundOpacity = function() return backgroundOpacity end - WG['chat'].setBackgroundOpacity = function(value) + WG.chat .setBackgroundOpacity = function(value) backgroundOpacity = value end - WG['chat'].getMaxLines = function() + WG.chat .getMaxLines = function() return maxLines end - WG['chat'].setMaxLines = function(value) + WG.chat .setMaxLines = function(value) maxLines = value widget:ViewResize() end - WG['chat'].getMaxConsoleLines = function() + WG.chat .getMaxConsoleLines = function() return maxLines end - WG['chat'].setMaxConsoleLines = function(value) + WG.chat .setMaxConsoleLines = function(value) maxConsoleLines = value widget:ViewResize() end - WG['chat'].getFontsize = function() + WG.chat .getFontsize = function() return fontsizeMult end - WG['chat'].setFontsize = function(value) + WG.chat .setFontsize = function(value) fontsizeMult = value widget:ViewResize() end - WG['chat'].addChatLine = function(gameFrame, lineType, name, nameText, text, orgLineID, ignore, chatLineID) + WG.chat .addChatLine = function(gameFrame, lineType, name, nameText, text, orgLineID, ignore, chatLineID) addChatLine(gameFrame, lineType, name, nameText, text, orgLineID, ignore, chatLineID, true) end - WG['chat'].addChatProcessor = function(id, func) + WG.chat .addChatProcessor = function(id, func) if type(func) == 'function' then chatProcessors[id] = func end end - WG['chat'].removeChatProcessor = function(id) + WG.chat .removeChatProcessor = function(id) chatProcessors[id] = nil end @@ -2824,11 +2824,11 @@ end function widget:Shutdown() clearDisplayLists() -- console/chat displaylists glDeleteList(textInputDlist) - WG['chat'] = nil - if WG['guishader'] then - WG['guishader'].RemoveRect('chat') - WG['guishader'].RemoveRect('chatinput') - WG['guishader'].RemoveRect('chatinputautocomplete') + WG.chat = nil + if WG.guishader then + WG.guishader .RemoveRect('chat') + WG.guishader .RemoveRect('chatinput') + WG.guishader .RemoveRect('chatinputautocomplete') end if uiTex then gl.DeleteTexture(uiTex) diff --git a/luaui/Widgets/gui_clearmapmarks.lua b/luaui/Widgets/gui_clearmapmarks.lua index 3226ded3480..99f111319d3 100644 --- a/luaui/Widgets/gui_clearmapmarks.lua +++ b/luaui/Widgets/gui_clearmapmarks.lua @@ -60,18 +60,18 @@ local function createList(size) DrawRect(-usedImgSize, 0, 0, usedImgSize) gl.Texture(false) end) - if WG['tooltip'] ~= nil then - WG['tooltip'].AddTooltip('clearmapmarks', {xPos-usedImgSize, yPos, xPos, yPos+usedImgSize}, Spring.I18N('ui.clearMapmarks.tooltipctrl'), nil, Spring.I18N('ui.clearMapmarks.tooltip')) + if WG.tooltip ~= nil then + WG.tooltip .AddTooltip('clearmapmarks', {xPos-usedImgSize, yPos, xPos, yPos+usedImgSize}, Spring.I18N('ui.clearMapmarks.tooltipctrl'), nil, Spring.I18N('ui.clearMapmarks.tooltip')) end end local function updatePosition(force) - if WG['advplayerlist_api'] ~= nil then + if WG.advplayerlist_api ~= nil then local vsx, vsy = Spring.GetViewGeometry() local margin = WG.FlowUI.elementPadding xPos = vsx - margin local prevPos = advplayerlistPos - advplayerlistPos = WG['advplayerlist_api'].GetPosition() -- returns {top,left,bottom,right,widgetScale} + advplayerlistPos = WG.advplayerlist_api .GetPosition() -- returns {top,left,bottom,right,widgetScale} usedImgSize = math.floor(iconSize * advplayerlistPos[5]) --xPos = advplayerlistPos[2] + margin + usedImgSize yPos = advplayerlistPos[3] diff --git a/luaui/Widgets/gui_com_nametags.lua b/luaui/Widgets/gui_com_nametags.lua index b1bce758a7b..3b3df3bbd0a 100644 --- a/luaui/Widgets/gui_com_nametags.lua +++ b/luaui/Widgets/gui_com_nametags.lua @@ -158,8 +158,8 @@ for unitDefID, defs in pairs(UnitDefs) do end local sameTeamColors = false -if WG['playercolorpalette'] ~= nil and WG['playercolorpalette'].getSameTeamColors ~= nil then - sameTeamColors = WG['playercolorpalette'].getSameTeamColors() +if WG.playercolorpalette ~= nil and WG.playercolorpalette .getSameTeamColors ~= nil then + sameTeamColors = WG.playercolorpalette .getSameTeamColors() end -------------------------------------------------------------------------------- @@ -412,7 +412,7 @@ function widget:Update(dt) -- Check color palette changes less frequently (every 0.5 seconds instead of every frame) if colorCheckSec > 0.5 then colorCheckSec = 0 - local playerColorPalette = WG['playercolorpalette'] + local playerColorPalette = WG.playercolorpalette if playerColorPalette ~= nil then local getSameTeamColors = playerColorPalette.getSameTeamColors if getSameTeamColors and sameTeamColors ~= getSameTeamColors() then diff --git a/luaui/Widgets/gui_commands_fx.lua b/luaui/Widgets/gui_commands_fx.lua index efdec8bb55e..c7bdbcdfc23 100644 --- a/luaui/Widgets/gui_commands_fx.lua +++ b/luaui/Widgets/gui_commands_fx.lua @@ -454,36 +454,36 @@ function widget:Initialize() resetEnabledTeams() - WG['commandsfx'] = {} - WG['commandsfx'].getOpacity = function() + WG.commandsfx = {} + WG.commandsfx .getOpacity = function() return opacity end - WG['commandsfx'].setOpacity = function(value) + WG.commandsfx .setOpacity = function(value) opacity = value end - WG['commandsfx'].getDuration = function() + WG.commandsfx .getDuration = function() return duration end - WG['commandsfx'].setDuration = function(value) + WG.commandsfx .setDuration = function(value) duration = value end - WG['commandsfx'].getFilterAI = function() + WG.commandsfx .getFilterAI = function() return filterAIteams end - WG['commandsfx'].setFilterAI = function(value) + WG.commandsfx .setFilterAI = function(value) filterAIteams = value resetEnabledTeams() end - WG['commandsfx'].getUseTeamColors = function() + WG.commandsfx .getUseTeamColors = function() return useTeamColors end - WG['commandsfx'].setUseTeamColors = function(value) + WG.commandsfx .setUseTeamColors = function(value) useTeamColors = value end - WG['commandsfx'].setUseTeamColorsWhenSpec = function() + WG.commandsfx .setUseTeamColorsWhenSpec = function() return useTeamColorsWhenSpec end - WG['commandsfx'].setUseTeamColorsWhenSpec = function(value) + WG.commandsfx .setUseTeamColorsWhenSpec = function(value) useTeamColorsWhenSpec = value end diff --git a/luaui/Widgets/gui_converter_usage.lua b/luaui/Widgets/gui_converter_usage.lua index ef664e6f2a4..ac05bdcddc8 100644 --- a/luaui/Widgets/gui_converter_usage.lua +++ b/luaui/Widgets/gui_converter_usage.lua @@ -52,8 +52,8 @@ local converterUse local formatOptions = { showSign = true } local function updateUI() - if WG['topbar'] then - local freeArea = WG['topbar'].GetFreeArea() + if WG.topbar then + local freeArea = WG.topbar .GetFreeArea() widgetScale = freeArea[5] area[1] = freeArea[1] area[2] = freeArea[2] @@ -64,8 +64,8 @@ local function updateUI() area[4] = freeArea[4] end if dlistGuishader ~= nil then - if WG['guishader'] then - WG['guishader'].RemoveDlist('converter_usage') + if WG.guishader then + WG.guishader .RemoveDlist('converter_usage') end glDeleteList(dlistGuishader) end @@ -84,8 +84,8 @@ local function updateUI() dlistCU = glCreateList(function() UiElement(area[1], area[2], area[3], area[4], 0, 0, 1, 1) - if WG['guishader'] then - WG['guishader'].InsertDlist(dlistGuishader, 'converter_usage') + if WG.guishader then + WG.guishader .InsertDlist(dlistGuishader, 'converter_usage') end --Some coloring and tooltip text @@ -116,8 +116,8 @@ local function updateUI() font2:Print("\255\240\255\240" .. string.formatSI(mConverted, formatOptions), area[3] -(fontSize * 0.42), area[2] + 0.8 * ((area[4] - area[2]) / 4) - (fontSize / 5), fontSize, 'or') font2:End() - if WG['tooltip'] ~= nil then - WG['tooltip'].AddTooltip('converter_usage', area, tooltipText, nil, tooltipTitle) + if WG.tooltip ~= nil then + WG.tooltip .AddTooltip('converter_usage', area, tooltipText, nil, tooltipTitle) end end) end @@ -145,15 +145,15 @@ end function widget:Shutdown() if dlistGuishader ~= nil then - if WG['guishader'] then - WG['guishader'].RemoveDlist('converter_usage') + if WG.guishader then + WG.guishader .RemoveDlist('converter_usage') end glDeleteList(dlistGuishader) end if dlistCU ~= nil then glDeleteList(dlistCU) end - WG['converter_usage'] = nil + WG.converter_usage = nil end function widget:ViewResize() @@ -162,14 +162,14 @@ function widget:ViewResize() RectRound = WG.FlowUI.Draw.RectRound UiElement = WG.FlowUI.Draw.Element - font2 = WG['fonts'].getFont(2) + font2 = WG.fonts .getFont(2) end function widget:Initialize() widget:ViewResize() - WG['converter_usage'] = {} - WG['converter_usage'].GetPosition = function() + WG.converter_usage = {} + WG.converter_usage .GetPosition = function() return area end end @@ -213,8 +213,8 @@ function widget:Update(dt) -- Dont draw if there are no converters if dlistGuishader ~= nil then - if WG['guishader'] then - WG['guishader'].RemoveDlist('converter_usage') + if WG.guishader then + WG.guishader .RemoveDlist('converter_usage') end dlistGuishader = glDeleteList(dlistGuishader) end diff --git a/luaui/Widgets/gui_cursor.lua b/luaui/Widgets/gui_cursor.lua index 158dcb0e62d..6779b40ff76 100644 --- a/luaui/Widgets/gui_cursor.lua +++ b/luaui/Widgets/gui_cursor.lua @@ -18,10 +18,10 @@ end local mathAbs = math.abs local Settings = {} -Settings['cursorSet'] = 'icexuick' -Settings['cursorSize'] = 100 -Settings['sizeMult'] = Spring.GetConfigFloat('cursorsize', 1) -Settings['version'] = 6 -- just so it wont restore configdata on load if it differs format +Settings.cursorSet = 'icexuick' +Settings.cursorSize = 100 +Settings.sizeMult = Spring.GetConfigFloat('cursorsize', 1) +Settings.version = 6 -- just so it wont restore configdata on load if it differs format local force = true local autoCursorSize @@ -52,39 +52,39 @@ end function widget:ViewResize() local ssx,ssy = Spring.GetScreenGeometry() -- doesnt change when you unplug external display autoCursorSize = 100 * (0.6 + (ssx*ssy / 10000000)) * Spring.GetConfigFloat('cursorsize', 1) - SetCursor(Settings['cursorSet']) + SetCursor(Settings.cursorSet ) end function widget:Initialize() force = true widget:ViewResize() - WG['cursors'] = {} - WG['cursors'].getcursor = function() - return Settings['cursorSet'] + WG.cursors = {} + WG.cursors .getcursor = function() + return Settings.cursorSet end - WG['cursors'].getcursorsets = function() + WG.cursors .getcursorsets = function() local sets = {} for i, y in pairs(cursorSets) do sets[#sets+1] = i end return sets end - WG['cursors'].setcursor = function(value) + WG.cursors .setcursor = function(value) force = true SetCursor(value) end - WG['cursors'].getsizemult = function() + WG.cursors .getsizemult = function() return Spring.GetConfigFloat('cursorsize', 1) end - WG['cursors'].setsizemult = function(value) + WG.cursors .setsizemult = function(value) Spring.SetConfigFloat('cursorsize', value) widget:ViewResize() end end function widget:Shutdown() - WG['cursors'] = nil + WG.cursors = nil local file = VFS.LoadFile("cmdcolors.txt") if file then Spring.LoadCmdColorsConfig(file) @@ -95,10 +95,10 @@ end -- load cursors function SetCursor(cursorSet) --Spring.Echo(autoCursorSize..' '..cursorSets[cursorSet][NearestValue(cursorSets[cursorSet], autoCursorSize)]) - local oldSetName = Settings['cursorSet']..'_'..Settings['cursorSize'] - Settings['cursorSet'] = cursorSet - Settings['cursorSize'] = cursorSets[cursorSet][NearestValue(cursorSets[cursorSet], autoCursorSize)] - local cursorDir = cursorSet..'_'..Settings['cursorSize'] + local oldSetName = Settings.cursorSet ..'_'..Settings.cursorSize + Settings.cursorSet = cursorSet + Settings.cursorSize = cursorSets[cursorSet][NearestValue(cursorSets[cursorSet], autoCursorSize)] + local cursorDir = cursorSet..'_'..Settings.cursorSize if cursorDir ~= oldSetName or force then force = false local cursorNames = { @@ -137,7 +137,7 @@ function SetCursor(cursorSet) end -- Hide metal extractor circles on non-metal maps - if WG["resource_spot_finder"] and (not WG["resource_spot_finder"].isMetalMap) then + if WG.resource_spot_finder and (not WG.resource_spot_finder .isMetalMap) then Spring.LoadCmdColorsConfig('rangeExtract 1.0 0.3 0.3 0.0') end end @@ -153,6 +153,6 @@ function widget:SetConfigData(data) Spring.SetConfigFloat('cursorsize', data.sizeMult) end Settings = data - Settings['sizeMult'] = Spring.GetConfigFloat('cursorsize', 1) + Settings.sizeMult = Spring.GetConfigFloat('cursorsize', 1) end end diff --git a/luaui/Widgets/gui_defenserange_gl4.lua b/luaui/Widgets/gui_defenserange_gl4.lua index b2b19849ffb..83762104176 100644 --- a/luaui/Widgets/gui_defenserange_gl4.lua +++ b/luaui/Widgets/gui_defenserange_gl4.lua @@ -196,11 +196,11 @@ for udid, ud in pairs(UnitDefs) do end -local vtoldamagetag = Game.armorTypes['vtol'] -local defaultdamagetag = Game.armorTypes['default'] +local vtoldamagetag = Game.armorTypes.vtol +local defaultdamagetag = Game.armorTypes.default local function initializeUnitDefRing(unitDefID) - unitDefRings[unitDefID]['rings'] = {} + unitDefRings[unitDefID].rings = {} local weapons = unitWeapons[unitDefID] for weaponNum = 1, #weapons do local weaponDef = weapons[weaponNum] @@ -208,7 +208,7 @@ local function initializeUnitDefRing(unitDefID) local weaponDef = WeaponDefs[weaponDefID] local range = weaponDef.range - local weaponType = unitDefRings[unitDefID]['weapons'][weaponNum] + local weaponType = unitDefRings[unitDefID].weapons [weaponNum] --spEcho(weaponType) if weaponType ~= nil then if weaponType == 'nuke' then -- antinuke @@ -239,7 +239,7 @@ local function initializeUnitDefRing(unitDefID) isCylinder, weaponDef.heightBoostFactor or 0, weaponDef.heightMod or 0 } - unitDefRings[unitDefID]['rings'][weaponNum] = ringParams + unitDefRings[unitDefID].rings [weaponNum] = ringParams end end end @@ -247,119 +247,119 @@ end local function initUnitList() local unitDefRingsNames = { -- ARMADA - ['armclaw'] = { weapons = { 'ground' } }, - ['armllt'] = { weapons = { 'ground' } }, - ['armbeamer'] = { weapons = { 'ground' } }, - ['armhlt'] = { weapons = { 'ground' } }, - ['armguard'] = { weapons = { 'cannon'} }, - ['armrl'] = { weapons = { 'air' } }, --light aa - ['armferret'] = { weapons = { 'air' } }, - ['armcir'] = { weapons = { 'air' } }, --chainsaw - ['armdl'] = { weapons = { 'ground' } }, --depthcharge - ['armjuno'] = { weapons = { 'ground' } }, - ['armtl'] = { weapons = { 'ground' } }, --torp launcher - ['armfhlt'] = { weapons = { 'ground' } }, --floating hlt - ['armnavaldefturret'] = { weapons = { 'ground' } }, --cauterizer - ['armanavaldefturret'] = { weapons = { 'ground' } }, --liquifier - ['armfrt'] = { weapons = { 'air' } }, --floating rocket laucher - ['armfflak'] = { weapons = { 'air' } }, --floating flak AA - ['armatl'] = { weapons = { 'ground' } }, --adv torpedo launcher - ['armkraken'] = { weapons = { 'cannon' } }, --adv torpedo launcher - - ['armamb'] = { weapons = { 'cannon' } }, --ambusher 'cannon' - ['armpb'] = { weapons = { 'ground' } }, --pitbull 'cannon' - ['armanni'] = { weapons = { 'ground' } }, - ['armflak'] = { weapons = { 'air' } }, - ['armmercury'] = { weapons = { 'air' } }, - ['armemp'] = { weapons = { 'ground' } }, - ['armamd'] = { weapons = { 'nuke' } }, --antinuke - - ['armbrtha'] = { weapons = { 'lrpc' } }, - ['armvulc'] = { weapons = { 'lrpc' } }, + armclaw = { weapons = { 'ground' } }, + armllt = { weapons = { 'ground' } }, + armbeamer = { weapons = { 'ground' } }, + armhlt = { weapons = { 'ground' } }, + armguard = { weapons = { 'cannon'} }, + armrl = { weapons = { 'air' } }, --light aa + armferret = { weapons = { 'air' } }, + armcir = { weapons = { 'air' } }, --chainsaw + armdl = { weapons = { 'ground' } }, --depthcharge + armjuno = { weapons = { 'ground' } }, + armtl = { weapons = { 'ground' } }, --torp launcher + armfhlt = { weapons = { 'ground' } }, --floating hlt + armnavaldefturret = { weapons = { 'ground' } }, --cauterizer + armanavaldefturret = { weapons = { 'ground' } }, --liquifier + armfrt = { weapons = { 'air' } }, --floating rocket laucher + armfflak = { weapons = { 'air' } }, --floating flak AA + armatl = { weapons = { 'ground' } }, --adv torpedo launcher + armkraken = { weapons = { 'cannon' } }, --adv torpedo launcher + + armamb = { weapons = { 'cannon' } }, --ambusher 'cannon' + armpb = { weapons = { 'ground' } }, --pitbull 'cannon' + armanni = { weapons = { 'ground' } }, + armflak = { weapons = { 'air' } }, + armmercury = { weapons = { 'air' } }, + armemp = { weapons = { 'ground' } }, + armamd = { weapons = { 'nuke' } }, --antinuke + + armbrtha = { weapons = { 'lrpc' } }, + armvulc = { weapons = { 'lrpc' } }, -- CORTEX - ['cormaw'] = { weapons = { 'ground' } }, - ['corexp'] = { weapons = { 'ground'} }, - ['cormexp'] = { weapons = { 'ground','ground' } }, - ['corllt'] = { weapons = { 'ground' } }, - ['corhllt'] = { weapons = { 'ground' } }, - ['corhlt'] = { weapons = { 'ground' } }, - ['corpun'] = { weapons = { 'cannon'} }, - ['corrl'] = { weapons = { 'air' } }, - ['cormadsam'] = { weapons = { 'air' } }, - ['corerad'] = { weapons = { 'air' } }, - ['cordl'] = { weapons = { 'ground' } }, - ['corjuno'] = { weapons = { 'ground' } }, - - ['corfhlt'] = { weapons = { 'ground' } }, --floating hlt - ['cornavaldefturret'] = { weapons = { 'ground' } }, --cyclops - ['coranavaldefturret'] = { weapons = { 'ground' } }, --orthrus - ['cortl'] = { weapons = { 'ground' } }, --torp launcher - ['coratl'] = { weapons = { 'ground' } }, --T2 torp launcher - ['corfrt'] = { weapons = { 'air' } }, --floating rocket laucher - ['corenaa'] = { weapons = { 'air' } }, --floating flak AA - ['corfdoom'] = { weapons = { [1] = 'cannon' } }, - - ['cortoast'] = { weapons = { 'cannon' } }, - ['corvipe'] = { weapons = { 'ground' } }, - ['cordoom'] = { weapons = { 'ground', 'ground', 'ground'} }, - ['corflak'] = { weapons = { 'air' } }, - ['corscreamer'] = { weapons = { 'air' } }, - ['cortron'] = { weapons = { 'cannon' } }, - ['corfmd'] = { weapons = { 'nuke' } }, - ['corint'] = { weapons = { 'lrpc' } }, - ['corbuzz'] = { weapons = { 'lrpc' } }, + cormaw = { weapons = { 'ground' } }, + corexp = { weapons = { 'ground'} }, + cormexp = { weapons = { 'ground','ground' } }, + corllt = { weapons = { 'ground' } }, + corhllt = { weapons = { 'ground' } }, + corhlt = { weapons = { 'ground' } }, + corpun = { weapons = { 'cannon'} }, + corrl = { weapons = { 'air' } }, + cormadsam = { weapons = { 'air' } }, + corerad = { weapons = { 'air' } }, + cordl = { weapons = { 'ground' } }, + corjuno = { weapons = { 'ground' } }, + + corfhlt = { weapons = { 'ground' } }, --floating hlt + cornavaldefturret = { weapons = { 'ground' } }, --cyclops + coranavaldefturret = { weapons = { 'ground' } }, --orthrus + cortl = { weapons = { 'ground' } }, --torp launcher + coratl = { weapons = { 'ground' } }, --T2 torp launcher + corfrt = { weapons = { 'air' } }, --floating rocket laucher + corenaa = { weapons = { 'air' } }, --floating flak AA + corfdoom = { weapons = { [1] = 'cannon' } }, + + cortoast = { weapons = { 'cannon' } }, + corvipe = { weapons = { 'ground' } }, + cordoom = { weapons = { 'ground', 'ground', 'ground'} }, + corflak = { weapons = { 'air' } }, + corscreamer = { weapons = { 'air' } }, + cortron = { weapons = { 'cannon' } }, + corfmd = { weapons = { 'nuke' } }, + corint = { weapons = { 'lrpc' } }, + corbuzz = { weapons = { 'lrpc' } }, -- LEGION - ['legabm'] = { weapons = { 'nuke' } }, --antinuke - ['legrampart'] = { weapons = { 'nuke', 'ground' } }, --rampart - ['leglht'] = { weapons = { 'ground' } }, --llt - ['legtl'] = { weapons = { 'ground' } }, --torpedo launcher - ['legcluster'] = { weapons = { 'cannon' } }, --short range arty T1 - ['legacluster'] = { weapons = { 'cannon' } }, --T2 arty - ['legdtr'] = { weapons = { 'ground' } }, --dragons jaw - ['leghive'] = { weapons = { 'ground' } }, --Drone-defense - ['legfhive'] = { weapons = { 'ground' } }, --Drone-defense - ['legmg'] = { weapons = { 'ground' } }, --ground-AA MG defense - ['legfmg'] = { weapons = { 'ground' } }, --cyclops - ['legnavaldefturret'] = { weapons = { 'ground' } }, --cyclops - ['leganavaldefturret'] = { weapons = { 'ground' } }, --Ionia - ['legbombard'] = { weapons = { 'ground' } }, --Grenadier defense - ['legbastion'] = { weapons = { 'ground' } }, --T2 Heatray Tower - ['legrl'] = { weapons = { 'air' } }, --T1 AA - ['leglupara'] = { weapons = { 'air' } }, --T1.5 AA - ['legrhapsis'] = { weapons = { 'air' } }, --T1.5 AA - ['legflak'] = { weapons = { 'air' } }, --T2 AA FLAK - ['leglraa'] = { weapons = { 'air' } }, --T2 LR-AA - ['legperdition'] = { weapons = { 'cannon' } }, --T2 LR-AA - ['legapopupdef'] = { weapons = { 'ground' } }, --popup riot/minigun turret - ['leganavaltorpturret'] = { weapons = { 'ground' } }, --torpedo launcher - - ['legstarfall'] = { weapons = { 'lrpc' } }, - ['leglrpc'] = { weapons = { 'lrpc' } }, + legabm = { weapons = { 'nuke' } }, --antinuke + legrampart = { weapons = { 'nuke', 'ground' } }, --rampart + leglht = { weapons = { 'ground' } }, --llt + legtl = { weapons = { 'ground' } }, --torpedo launcher + legcluster = { weapons = { 'cannon' } }, --short range arty T1 + legacluster = { weapons = { 'cannon' } }, --T2 arty + legdtr = { weapons = { 'ground' } }, --dragons jaw + leghive = { weapons = { 'ground' } }, --Drone-defense + legfhive = { weapons = { 'ground' } }, --Drone-defense + legmg = { weapons = { 'ground' } }, --ground-AA MG defense + legfmg = { weapons = { 'ground' } }, --cyclops + legnavaldefturret = { weapons = { 'ground' } }, --cyclops + leganavaldefturret = { weapons = { 'ground' } }, --Ionia + legbombard = { weapons = { 'ground' } }, --Grenadier defense + legbastion = { weapons = { 'ground' } }, --T2 Heatray Tower + legrl = { weapons = { 'air' } }, --T1 AA + leglupara = { weapons = { 'air' } }, --T1.5 AA + legrhapsis = { weapons = { 'air' } }, --T1.5 AA + legflak = { weapons = { 'air' } }, --T2 AA FLAK + leglraa = { weapons = { 'air' } }, --T2 LR-AA + legperdition = { weapons = { 'cannon' } }, --T2 LR-AA + legapopupdef = { weapons = { 'ground' } }, --popup riot/minigun turret + leganavaltorpturret = { weapons = { 'ground' } }, --torpedo launcher + + legstarfall = { weapons = { 'lrpc' } }, + leglrpc = { weapons = { 'lrpc' } }, -- MOBILE ANTINUKES - ['armscab'] = { weapons = { 'nuke' } }, - ['armcarry'] = { weapons = { 'nuke' } }, - ['cormabm'] = { weapons = { 'nuke' } }, - ['corcarry'] = { weapons = { 'nuke' } }, - ['legavantinuke'] = { weapons = { 'nuke' } }, - ['armantiship'] = { weapons = { 'nuke' } }, - ['corantiship'] = { weapons = { 'nuke' } }, - ['leganavyantinukecarrier'] = { weapons = { 'nuke' } }, -- NOTE: drone weapon shown in attack ranges + armscab = { weapons = { 'nuke' } }, + armcarry = { weapons = { 'nuke' } }, + cormabm = { weapons = { 'nuke' } }, + corcarry = { weapons = { 'nuke' } }, + legavantinuke = { weapons = { 'nuke' } }, + armantiship = { weapons = { 'nuke' } }, + corantiship = { weapons = { 'nuke' } }, + leganavyantinukecarrier = { weapons = { 'nuke' } }, -- NOTE: drone weapon shown in attack ranges -- SCAVENGERS - ['scavbeacon_t1_scav'] = { weapons = { 'ground' } }, - ['scavbeacon_t2_scav'] = { weapons = { 'ground' } }, - ['scavbeacon_t3_scav'] = { weapons = { 'ground' } }, - ['scavbeacon_t4_scav'] = { weapons = { 'ground' } }, + scavbeacon_t1_scav = { weapons = { 'ground' } }, + scavbeacon_t2_scav = { weapons = { 'ground' } }, + scavbeacon_t3_scav = { weapons = { 'ground' } }, + scavbeacon_t4_scav = { weapons = { 'ground' } }, - ['armannit3'] = { weapons = { 'ground' } }, - ['armminivulc'] = { weapons = { 'ground' } }, + armannit3 = { weapons = { 'ground' } }, + armminivulc = { weapons = { 'ground' } }, - ['cordoomt3'] = { weapons = { 'ground' } }, - ['corhllllt'] = { weapons = { 'ground' } }, - ['corminibuzz'] = { weapons = { 'ground' } } + cordoomt3 = { weapons = { 'ground' } }, + corhllllt = { weapons = { 'ground' } }, + corminibuzz = { weapons = { 'ground' } } } -- convert unitname -> unitDefID unitDefRings = {} @@ -468,8 +468,8 @@ function widget:TextCommand(command) enabled = true end if rangetype == 'ground' then - buttonConfig[ally]['ground']=enabled - buttonConfig[ally]['cannon']=enabled + buttonConfig[ally].ground =enabled + buttonConfig[ally].cannon =enabled else buttonConfig[ally][rangetype]=enabled end @@ -586,22 +586,22 @@ function widget:Initialize() return end - WG['defrange'] = {} + WG.defrange = {} for _,ae in ipairs({'ally','enemy'}) do local Ae = string.upper(string.sub(ae, 1, 1)) .. string.sub(ae, 2) for _,wt in ipairs({'ground','air','nuke'}) do local Wt = string.upper(string.sub(wt, 1, 1)) .. string.sub(wt, 2) - WG['defrange']['get'..Ae..Wt] = function() return buttonConfig[ae][wt] end - WG['defrange']['set'..Ae..Wt] = function(value) + WG.defrange ['get'..Ae..Wt] = function() return buttonConfig[ae][wt] end + WG.defrange ['set'..Ae..Wt] = function(value) if wt == 'ground' then - buttonConfig[ae]['ground'] = value - buttonConfig[ae]['lrpc'] = value + buttonConfig[ae].ground = value + buttonConfig[ae].lrpc = value else buttonConfig[ae][wt] = value end spEcho(string.format("Defense Range GL4 Setting %s%s to %s",Ae,Wt, value and 'on' or 'off')) - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end end end @@ -611,8 +611,8 @@ function widget:Initialize() --spEcho("# of allyteams = ", #allyteamlist) numallyteams = #allyteamlist - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end end @@ -637,7 +637,7 @@ local function UnitDetected(unitID, unitDefID, unitTeam, noUpload) --for weaponNum = 1, #weapons do local addedrings = 0 - for i, weaponType in pairs(unitDefRings[unitDefID]['weapons']) do + for i, weaponType in pairs(unitDefRings[unitDefID].weapons ) do local allystring = alliedUnit and "ally" or "enemy" -- We want to continue to maintain ally lists, because these ally lists will be if buttonConfig[allystring][weaponType] or (colorConfig.drawAllyCategoryBuildQueue and (allystring == "ally")) then @@ -645,7 +645,7 @@ local function UnitDetected(unitID, unitDefID, unitTeam, noUpload) --local weaponType = unitDefRings[unitDefID]['weapons'][weaponNum] local weaponID = i - local ringParams = unitDefRings[unitDefID]['rings'][i] + local ringParams = unitDefRings[unitDefID].rings [i] local x, y, z, mpx, mpy, mpz, apx, apy, apz = spGetUnitPosition(unitID, true, true) local wpx, wpy, wpz, wdx, wdy, wdz = Spring.GetUnitWeaponVectors(unitID, weaponID) --spEcho("Defranges: unitID", unitID,x,y,z,"weaponID", weaponID, "y", y, "mpy", mpy,"wpy", wpy) @@ -721,7 +721,7 @@ function widget:VisibleUnitsChanged(extVisibleUnits, extNumVisibleUnits) end local function checkEnemyUnitConfirmedDead(unitID, defense) - local x, y, z = defense["posx"], defense["posy"], defense["posz"] + local x, y, z = defense.posx , defense.posy , defense.posz local _, losState, _ = spGetPositionLosState(x, y, z) --spEcho("checkEnemyUnitConfirmedDead",unitID, losState, spGetUnitDefID(unitID), Spring.GetUnitIsDead(unitID)) if losState then -- visible @@ -819,8 +819,8 @@ function widget:PlayerChanged(playerID) if reinit then myAllyTeam = nowmyAllyTeam -- only update if we reinit --spEcho("DefenseRange GL4 allyteam change detected, reinitializing") - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end else --spEcho("No change needed", numallyteams, myAllyTeam) @@ -902,7 +902,7 @@ function widget:Update(dt) local defense = defenses[unitID] scanned = scanned + 1 if defense.allied == false then - local x, y, z = defense["posx"], defense["posy"], defense["posz"] + local x, y, z = defense.posx , defense.posy , defense.posz local _, losState, _ = spGetPositionLosState(x, y, z) --spEcho("removal",unitID, losState) if losState then @@ -924,7 +924,7 @@ function widget:Update(dt) if rings then -- find out which VBO to remove from: local allystring = 'ally' - for i, weaponType in ipairs(rings['weapons']) do + for i, weaponType in ipairs(rings.weapons ) do buildDrawOverride[weaponType] = false for j,allyenemy in ipairs(allyenemypairs) do -- remove from all local vaokey = allyenemy .. weaponType @@ -955,14 +955,14 @@ function widget:Update(dt) if coords and coords[1] and coords[2] and coords[3] then local bpx, bpy, bpz = Spring.Pos2BuildPos(buildUnitDefID, coords[1], coords[2], coords[3]) local allystring = 'ally' - for i, weaponType in pairs(unitDefRings[buildUnitDefID]['weapons']) do + for i, weaponType in pairs(unitDefRings[buildUnitDefID].weapons ) do local allystring = "ally" buildDrawOverride[weaponType] = true -- allow rings if either normal ally-rings are on, OR build-queue preview is explicitly enabled if buttonConfig[allystring][weaponType] or colorConfig.drawAllyCategoryBuildQueue then - local ringParams = unitDefRings[buildUnitDefID]['rings'][i] + local ringParams = unitDefRings[buildUnitDefID].rings [i] if ringParams then cacheTable[1] = bpx cacheTable[2] = ringParams[18] @@ -1056,7 +1056,7 @@ function widget:DrawWorld() if chobbyInterface then return end - if not Spring.IsGUIHidden() and (not WG['topbar'] or not WG['topbar'].showingQuit()) then + if not Spring.IsGUIHidden() and (not WG.topbar or not WG.topbar .showingQuit()) then cameraHeightFactor = GetCameraHeightFactor() * 0.5 + 0.5 glTexture(0, "$heightmap") glTexture(1, "$info") @@ -1126,14 +1126,14 @@ end --SAVE / LOAD CONFIG FILE function widget:GetConfigData() local data = {} - data["enabled"] = buttonConfig + data.enabled = buttonConfig return data end function widget:SetConfigData(data) if data ~= nil then - if data["enabled"] ~= nil then - local newconfig = data["enabled"] + if data.enabled ~= nil then + local newconfig = data.enabled local configstr = "" for allyenemy, weapontypes in pairs(newconfig) do for wt, enabledstate in pairs(weapontypes) do diff --git a/luaui/Widgets/gui_easyFacing.lua b/luaui/Widgets/gui_easyFacing.lua index c9d90339f15..9385a520ee5 100644 --- a/luaui/Widgets/gui_easyFacing.lua +++ b/luaui/Widgets/gui_easyFacing.lua @@ -295,8 +295,8 @@ function widget:Initialize() maybeRemoveSelf() end - WG['easyfacing'] = {} - WG['easyfacing'].setForceShow = function(reason, enabled, unitDefID) + WG.easyfacing = {} + WG.easyfacing .setForceShow = function(reason, enabled, unitDefID) if enabled then forceShow[reason] = unitDefID else @@ -306,7 +306,7 @@ function widget:Initialize() end function widget:Shutdown() - WG['easyfacing'] = nil + WG.easyfacing = nil end function widget:Update() diff --git a/luaui/Widgets/gui_ecostats.lua b/luaui/Widgets/gui_ecostats.lua index 17641ec6a88..ced4393b4f7 100644 --- a/luaui/Widgets/gui_ecostats.lua +++ b/luaui/Widgets/gui_ecostats.lua @@ -350,8 +350,8 @@ local function updateButtons() widgetPosY = vsy - widgetHeight end - if cfgSticktotopbar and WG['topbar'] ~= nil then - local topbarArea = WG['topbar'].GetPosition() + if cfgSticktotopbar and WG.topbar ~= nil then + local topbarArea = WG.topbar .GetPosition() if not topbarShowButtons then topbarArea[2] = topbarArea[4] end @@ -535,8 +535,8 @@ local function setAllyData(allyID) allyData[index] = nil local key = eco.ecoKey[allyID] or ('ecostats_' .. allyID) guishaderRects[key] = nil - if WG['guishader'] and guishaderRectsDlists[key] then - WG['guishader'].DeleteDlist(key) + if WG.guishader and guishaderRectsDlists[key] then + WG.guishader .DeleteDlist(key) guishaderRectsDlists[key] = nil end end @@ -646,17 +646,17 @@ function widget:Initialize() gamestarted = true end - WG['ecostats'] = {} - WG['ecostats'].getShowText = function() + WG.ecostats = {} + WG.ecostats .getShowText = function() return cfgResText end - WG['ecostats'].setShowText = function(value) + WG.ecostats .setShowText = function(value) cfgResText = value end - WG['ecostats'].getReclaim = function() + WG.ecostats .getReclaim = function() return cfgTrackReclaim end - WG['ecostats'].setReclaim = function(value) + WG.ecostats .setReclaim = function(value) cfgTrackReclaim = value end @@ -665,29 +665,29 @@ function widget:Initialize() end local function removeGuiShaderRects() - if WG['guishader'] then + if WG.guishader then for _, data in pairs(allyData) do local aID = data.aID if isTeamReal(aID) and (aID == spGetMyAllyTeamID() or inSpecMode) and aID ~= gaiaAllyID then local key = eco.ecoKey[aID] or ('ecostats_' .. aID) - WG['guishader'].DeleteDlist(key) + WG.guishader .DeleteDlist(key) guishaderRectsDlists[key] = nil guishaderRects[key] = nil end end end - if WG['tooltip'] ~= nil then + if WG.tooltip ~= nil then for _, data in pairs(allyData) do local aID = data.aID if isTeamReal(aID) and (aID == spGetMyAllyTeamID() or inSpecMode) and (aID ~= gaiaAllyID) then local key = eco.ecoKey[aID] or ('ecostats_' .. aID) if tooltipAreas[key] ~= nil then - WG['tooltip'].RemoveTooltip(key) + WG.tooltip .RemoveTooltip(key) tooltipAreas[key] = nil local teams = Spring.GetTeamList(aID) for _, tID in ipairs(teams) do - WG['tooltip'].RemoveTooltip(eco.ecoTeamKey[tID] or ('ecostats_team_' .. tID)) + WG.tooltip .RemoveTooltip(eco.ecoTeamKey[tID] or ('ecostats_team_' .. tID)) end end end @@ -705,7 +705,7 @@ function widget:Shutdown() glDeleteTexture(uiTex) uiTex = nil end - WG['ecostats'] = nil + WG.ecostats = nil end local areaRect = {} @@ -769,7 +769,7 @@ local function makeTeamCompositionList() end end, true) end - if WG['guishader'] then + if WG.guishader then for id, rect in pairs(guishaderRects) do if guishaderRectsDlists[id] then gl.DeleteList(guishaderRectsDlists[id]) @@ -778,7 +778,7 @@ local function makeTeamCompositionList() guishaderRectsDlists[id] = gl.CreateList(function() RectRound(r1, r2, r3, r4, r5, 1, 0, 0, 1) end) - WG['guishader'].InsertDlist(guishaderRectsDlists[id], id) + WG.guishader .InsertDlist(guishaderRectsDlists[id], id) end end end @@ -1005,14 +1005,14 @@ local function DrawBackground(posY, allyID, teamWidth) local areaX1 = widgetPosX + (widgetWidth / 12) local areaKey = areaX1 * 1000000000 + y1 * 1000000 + (widgetPosX + widgetWidth) * 1000 + y2 - if WG['tooltip'] ~= nil and (tooltipAreas[key] == nil or tooltipAreas[key] ~= areaKey or refreshCaptions) then + if WG.tooltip ~= nil and (tooltipAreas[key] == nil or tooltipAreas[key] ~= areaKey or refreshCaptions) then refreshCaptions = false if not cachedTooltipText then cachedTooltipText = Spring.I18N('ui.teamEconomy.tooltip') cachedTooltipTitle = Spring.I18N('ui.teamEconomy.tooltipTitle') end bgArea[1], bgArea[2], bgArea[3], bgArea[4] = areaX1, y1, widgetPosX + widgetWidth, y2 - WG['tooltip'].AddTooltip(key, bgArea, cachedTooltipText, nil, cachedTooltipTitle) + WG.tooltip .AddTooltip(key, bgArea, cachedTooltipText, nil, cachedTooltipTitle) tooltipAreas[key] = areaKey end end @@ -1088,9 +1088,9 @@ local function DrawTeamCompositionTeam(hOffset, vOffset, r, g, b, a, small, mous btn.y2 = y2 btn.pID = tID end - if WG['tooltip'] then + if WG.tooltip then tctArea[1], tctArea[2], tctArea[3], tctArea[4] = x1, y1, x2, y2 - WG['tooltip'].AddTooltip(eco.ecoTeamKey[tID], tctArea, teamData[tID].leaderName) + WG.tooltip .AddTooltip(eco.ecoTeamKey[tID], tctArea, teamData[tID].leaderName) end tctColorBot[1], tctColorBot[2], tctColorBot[3] = r * 0.75, g * 0.75, b * 0.75 @@ -1269,7 +1269,7 @@ function widget:PlayerChanged(playerID) removeGuiShaderRects() end end - if myFullview and not singleTeams and WG['playercolorpalette'] ~= nil and WG['playercolorpalette'].getSameTeamColors() then + if myFullview and not singleTeams and WG.playercolorpalette ~= nil and WG.playercolorpalette .getSameTeamColors() then if myTeamID ~= spGetMyTeamID() then UpdateAllTeams() refreshTeamCompositionList = true @@ -1412,7 +1412,7 @@ function widget:ViewResize() RectRound = WG.FlowUI.Draw.RectRound UiElement = WG.FlowUI.Draw.Element - font = WG['fonts'].getFont() + font = WG.fonts .getFont() Reinit() end @@ -1471,16 +1471,16 @@ function widget:Update(dt) end local prevTopbarShowButtons = topbarShowButtons - topbarShowButtons = WG['topbar'] and WG['topbar'].getShowButtons() - if topbarShowButtons ~= prevTopbarShowButtons or not prevTopbar and (WG['topbar'] ~= nil) or prevTopbar ~= (WG['topbar'] ~= nil) then + topbarShowButtons = WG.topbar and WG.topbar .getShowButtons() + if topbarShowButtons ~= prevTopbarShowButtons or not prevTopbar and (WG.topbar ~= nil) or prevTopbar ~= (WG.topbar ~= nil) then Reinit() lastBarsUpdate = 0 lastTextListUpdate = 0 end - prevTopbar = WG['topbar'] ~= nil and true or false + prevTopbar = WG.topbar ~= nil and true or false -- detect guishader widget being toggled back on - local guishaderNow = WG['guishader'] ~= nil + local guishaderNow = WG.guishader ~= nil if guishaderNow and not guishaderWasActive then guishaderRectsDlists = {} refreshTeamCompositionList = true diff --git a/luaui/Widgets/gui_enemy_spotter.lua b/luaui/Widgets/gui_enemy_spotter.lua index 64cd1e79fac..f3848d41395 100644 --- a/luaui/Widgets/gui_enemy_spotter.lua +++ b/luaui/Widgets/gui_enemy_spotter.lua @@ -152,8 +152,8 @@ local function init() return false end - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) else Spring.Echo("Enemy spotter needs unittrackerapi to work!") widgetHandler:RemoveWidget() @@ -165,7 +165,7 @@ end function widget:PlayerChanged(playerID) myAllyTeamID = Spring.GetMyAllyTeamID() - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end function widget:Initialize() @@ -174,25 +174,25 @@ function widget:Initialize() return end if not init() then return end - WG['enemyspotter'] = {} - WG['enemyspotter'].getOpacity = function() + WG.enemyspotter = {} + WG.enemyspotter .getOpacity = function() return opacity end - WG['enemyspotter'].setOpacity = function(value) + WG.enemyspotter .setOpacity = function(value) opacity = value init() end - WG['enemyspotter'].getSkipOwnTeam = function() + WG.enemyspotter .getSkipOwnTeam = function() return skipOwnTeam end - WG['enemyspotter'].setSkipOwnTeam = function(value) + WG.enemyspotter .setSkipOwnTeam = function(value) skipOwnTeam = value init() end end function widget:Shutdown() - WG['enemyspotter'] = nil + WG.enemyspotter = nil end function widget:GetConfigData(data) diff --git a/luaui/Widgets/gui_factionpicker.lua b/luaui/Widgets/gui_factionpicker.lua index 36524bdf866..5c59fd15735 100644 --- a/luaui/Widgets/gui_factionpicker.lua +++ b/luaui/Widgets/gui_factionpicker.lua @@ -131,13 +131,13 @@ local function drawFactionpicker() -- faction name font2:Print((disabled and "\255\170\170\170" or "\255\255\255\255") .. Spring.I18N('units.factions.' .. factions[i].faction), factionRect[i][1] + ((factionRect[i][3] - factionRect[i][1]) * 0.5), factionRect[i][2] + ((factionRect[i][4] - factionRect[i][2]) * 0.22) - (fontSize * 0.5), fontSize * 0.96, "co") - if WG['tooltip'] ~= nil then + if WG.tooltip ~= nil then local text = Spring.I18N('ui.factionPicker.factions.'..factions[i].faction) local tooltip = '' - local maxWidth = WG['tooltip'].getFontsize() * 80 + local maxWidth = WG.tooltip .getFontsize() * 80 local textLines, numLines = font2:WrapText(text, maxWidth) tooltip = tooltip..string.gsub(textLines, '[\n]', '\n')..'\n' - WG['tooltip'].AddTooltip('factionpicker_'..i, { factionRect[i][1] + bgpadding, factionRect[i][2] + bgpadding, factionRect[i][3], factionRect[i][4] }, tooltip, nil, Spring.I18N('units.factions.' .. factions[i].faction)) + WG.tooltip .AddTooltip('factionpicker_'..i, { factionRect[i][1] + bgpadding, factionRect[i][2] + bgpadding, factionRect[i][3], factionRect[i][4] }, tooltip, nil, Spring.I18N('units.factions.' .. factions[i].faction)) end end font2:End() @@ -167,12 +167,12 @@ function widget:ViewResize() height = mathFloor(height * vsy) / vsy local buildmenuBottomPos - if WG['buildmenu'] then - buildmenuBottomPos = WG['buildmenu'].getBottomPosition() + if WG.buildmenu then + buildmenuBottomPos = WG.buildmenu .getBottomPosition() end local outlineMult = math.clamp(1/(vsy/1400), 1, 1.5) - font2 = WG['fonts'].getFont(2) + font2 = WG.fonts .getFont(2) local widgetSpaceMargin = WG.FlowUI.elementMargin bgpadding = WG.FlowUI.elementPadding @@ -181,8 +181,8 @@ function widget:ViewResize() UiElement = WG.FlowUI.Draw.Element UiUnit = WG.FlowUI.Draw.Unit - if WG['minimap'] then - minimapHeight = WG['minimap'].getHeight() + if WG.minimap then + minimapHeight = WG.minimap .getHeight() end if stickToBottom then @@ -192,11 +192,11 @@ function widget:ViewResize() if buildmenuBottomPos then posX = 0 posY = height + height + (widgetSpaceMargin / vsy) - elseif WG['buildmenu'] then - local posY2, _ = WG['buildmenu'].getSize() + elseif WG.buildmenu then + local posY2, _ = WG.buildmenu .getSize() posY2 = posY2 + (widgetSpaceMargin / vsy) posY = posY2 + height - if WG['minimap'] then + if WG.minimap then posY = 1 - (minimapHeight / vsy) - (widgetSpaceMargin / vsy) end posX = 0 @@ -236,8 +236,8 @@ function widget:Initialize() end end - if WG['ordermenu'] then - stickToBottom = WG['ordermenu'].getBottomPosition() + if WG.ordermenu then + stickToBottom = WG.ordermenu .getBottomPosition() end widget:ViewResize() @@ -257,9 +257,9 @@ function widget:Shutdown() factionpickerTex = nil end - if WG['tooltip'] ~= nil then + if WG.tooltip ~= nil then for i, faction in pairs(factions) do - WG['tooltip'].RemoveTooltip('factionpicker_'..i) + WG.tooltip .RemoveTooltip('factionpicker_'..i) end end end @@ -275,13 +275,13 @@ function widget:Update(dt) sec = 0 checkGuishader() - if WG['minimap'] and minimapHeight ~= WG['minimap'].getHeight() then + if WG.minimap and minimapHeight ~= WG.minimap .getHeight() then widget:ViewResize() doUpdate = true end - if WG['ordermenu'] and stickToBottom ~= WG['ordermenu'].getBottomPosition() then - stickToBottom = WG['ordermenu'].getBottomPosition() + if WG.ordermenu and stickToBottom ~= WG.ordermenu .getBottomPosition() then + stickToBottom = WG.ordermenu .getBottomPosition() widget:ViewResize() doUpdate = true end @@ -290,7 +290,7 @@ end function widget:DrawScreen() local x, y, b = Spring.GetMouseState() - if not WG['topbar'] or not WG['topbar'].showingQuit() then + if not WG.topbar or not WG.topbar .showingQuit() then if math_isInRect(x, y, backgroundRect[1], backgroundRect[2], backgroundRect[3], backgroundRect[4]) then Spring.SetMouseCursor('cursornormal') end @@ -301,8 +301,8 @@ function widget:DrawScreen() doUpdate = true end - if dlistGuishader and WG['guishader'] then - WG['guishader'].InsertDlist(dlistGuishader, 'factionpicker') + if dlistGuishader and WG.guishader then + WG.guishader .InsertDlist(dlistGuishader, 'factionpicker') end if not factionpickerBgTex then diff --git a/luaui/Widgets/gui_flanking_icons.lua b/luaui/Widgets/gui_flanking_icons.lua index 474ec5c9ce6..a31c80bb7fe 100644 --- a/luaui/Widgets/gui_flanking_icons.lua +++ b/luaui/Widgets/gui_flanking_icons.lua @@ -116,8 +116,8 @@ end local function init() InstanceVBOTable.clearInstanceTable(flankingVBO) - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - local visibleUnits = WG['unittrackerapi'].visibleUnits + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + local visibleUnits = WG.unittrackerapi .visibleUnits for unitID, unitDefID in pairs(visibleUnits) do widget:VisibleUnitAdded(unitID, unitDefID, spGetUnitTeam(unitID), true) end diff --git a/luaui/Widgets/gui_flowui.lua b/luaui/Widgets/gui_flowui.lua index bcd28bb51bd..25b678184ca 100644 --- a/luaui/Widgets/gui_flowui.lua +++ b/luaui/Widgets/gui_flowui.lua @@ -35,13 +35,13 @@ WG.FlowUI.tileSize = WG.FlowUI.tileScale -- Guishader display list lifecycle helpers WG.FlowUI.guishaderCheckDlist = function(currentDlist, name, drawFn, force) - if WG['guishader'] then + if WG.guishader then if force and currentDlist then currentDlist = gl.DeleteList(currentDlist) end if not currentDlist then currentDlist = gl.CreateList(drawFn) - WG['guishader'].InsertDlist(currentDlist, name) + WG.guishader .InsertDlist(currentDlist, name) end return currentDlist elseif currentDlist then @@ -51,8 +51,8 @@ WG.FlowUI.guishaderCheckDlist = function(currentDlist, name, drawFn, force) end WG.FlowUI.guishaderRemoveDlist = function(currentDlist, name) - if WG['guishader'] then - WG['guishader'].RemoveDlist(name) + if WG.guishader then + WG.guishader .RemoveDlist(name) end if currentDlist then gl.DeleteList(currentDlist) @@ -61,8 +61,8 @@ WG.FlowUI.guishaderRemoveDlist = function(currentDlist, name) end WG.FlowUI.guishaderDeleteDlist = function(name) - if WG['guishader'] then - WG['guishader'].DeleteDlist(name) + if WG.guishader then + WG.guishader .DeleteDlist(name) end end diff --git a/luaui/Widgets/gui_fonthandler.lua b/luaui/Widgets/gui_fonthandler.lua index 41e6a9ad3c9..9126a1141b2 100644 --- a/luaui/Widgets/gui_fonthandler.lua +++ b/luaui/Widgets/gui_fonthandler.lua @@ -86,8 +86,8 @@ function widget:Initialize() vsx,vsy = spGetViewGeometry() widget:ViewResize(vsx, vsy, true) - WG['fonts'] = {} - WG['fonts'].getFont = function(file, size, outlineSize, outlineStrength) + WG.fonts = {} + WG.fonts .getFont = function(file, size, outlineSize, outlineStrength) if not file or file == 1 then file = defaultFont elseif file == 2 then diff --git a/luaui/Widgets/gui_game_type_info.lua b/luaui/Widgets/gui_game_type_info.lua index 6b6db1e9ceb..118cba82a9b 100644 --- a/luaui/Widgets/gui_game_type_info.lua +++ b/luaui/Widgets/gui_game_type_info.lua @@ -49,7 +49,7 @@ function widget:ViewResize() vsx, vsy = spGetViewGeometry() widgetScale = (0.80 + (vsx * vsy / 6000000)) - font = WG['fonts'].getFont(1, 1.5) + font = WG.fonts .getFont(1, 1.5) if messages[1] then messages[1].x = widgetScale * 60 diff --git a/luaui/Widgets/gui_gameinfo.lua b/luaui/Widgets/gui_gameinfo.lua index cfed5c047a5..c0f10958aa9 100644 --- a/luaui/Widgets/gui_gameinfo.lua +++ b/luaui/Widgets/gui_gameinfo.lua @@ -199,8 +199,8 @@ function widget:ViewResize() screenX = mathFloor((vsx * 0.5) - (screenWidth / 2)) screenY = mathFloor((vsy * 0.5) + (screenHeight / 2)) - font, loadedFontSize = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2) + font, loadedFontSize = WG.fonts .getFont() + font2 = WG.fonts .getFont(2) elementCorner = WG.FlowUI.elementCorner @@ -329,7 +329,7 @@ function widget:DrawScreen() if show or showOnceMore then -- draw the panel glCallList(mainDList) - if WG['guishader'] then + if WG.guishader then if backgroundGuishader then backgroundGuishader = glDeleteList(backgroundGuishader) end @@ -339,7 +339,7 @@ function widget:DrawScreen() -- title RectRound(titleRect[1], titleRect[2], titleRect[3], titleRect[4], elementCorner, 1, 1, 0, 0) end) - WG['guishader'].InsertDlist(backgroundGuishader, 'gameinfo') + WG.guishader .InsertDlist(backgroundGuishader, 'gameinfo') end showOnceMore = false @@ -350,8 +350,8 @@ function widget:DrawScreen() else if backgroundGuishader then - if WG['guishader'] then - WG['guishader'].RemoveDlist('gameinfo') + if WG.guishader then + WG.guishader .RemoveDlist('gameinfo') end backgroundGuishader = glDeleteList(backgroundGuishader) end @@ -407,8 +407,8 @@ end function toggle() local newShow = not show - if newShow and WG['topbar'] then - WG['topbar'].hideWindows() + if newShow and WG.topbar then + WG.topbar .hideWindows() end show = newShow @@ -501,18 +501,18 @@ function widget:Initialize() widgetHandler:AddAction("customgameinfo", toggle, nil, 'p') widgetHandler:AddAction("customgameinfo_close", closeInfoHandler, nil, 'p') - WG['gameinfo'] = {} - WG['gameinfo'].toggle = function(state) + WG.gameinfo = {} + WG.gameinfo .toggle = function(state) local newShow = state if newShow == nil then newShow = not show end - if newShow and WG['topbar'] then - WG['topbar'].hideWindows() + if newShow and WG.topbar then + WG.topbar .hideWindows() end show = newShow end - WG['gameinfo'].isvisible = function() + WG.gameinfo .isvisible = function() return show end @@ -527,8 +527,8 @@ function widget:Shutdown() glDeleteList(mainDList) mainDList = nil end - if WG['guishader'] then - WG['guishader'].RemoveDlist('gameinfo') + if WG.guishader then + WG.guishader .RemoveDlist('gameinfo') end if backgroundGuishader then glDeleteList(backgroundGuishader) diff --git a/luaui/Widgets/gui_gridmenu.lua b/luaui/Widgets/gui_gridmenu.lua index db3f7d52a82..2f41bbc9376 100644 --- a/luaui/Widgets/gui_gridmenu.lua +++ b/luaui/Widgets/gui_gridmenu.lua @@ -357,7 +357,7 @@ local function resetHovered() rect.opts.hovered = false end - WG["buildmenu"].hoverID = nil + WG.buildmenu .hoverID = nil labBuildModeRect.opts.hovered = false nextBuilderRect.opts.hovered = false backRect.opts.hovered = false @@ -391,8 +391,8 @@ end local function setHoveredRectTooltip(rect, text, title, clicked) setHoveredRect(rect, clicked) - if WG["tooltip"] then - WG["tooltip"].ShowTooltip("buildmenu", text, nil, nil, title) + if WG.tooltip then + WG.tooltip .ShowTooltip("buildmenu", text, nil, nil, title) end end @@ -476,7 +476,7 @@ local function updateHoverState() end setHoveredRectTooltip(cellRect, "\255\240\240\240" .. tooltip, text, left or right) - WG["buildmenu"].hoverID = uDefID + WG.buildmenu .hoverID = uDefID return end @@ -1016,9 +1016,9 @@ end local function pickBlueprint(uDefID) local isRepeatMex = unitMetal_extractor[uDefID] and -uDefID == activeCmd - local cmd = (WG["areamex"] and isRepeatMex and "areamex") or spGetCmdDescIndex(-uDefID) - if isRepeatMex and WG["areamex"] then - WG["areamex"].setAreaMexType(-uDefID) + local cmd = (WG.areamex and isRepeatMex and "areamex") or spGetCmdDescIndex(-uDefID) + if isRepeatMex and WG.areamex then + WG.areamex .setAreaMexType(-uDefID) end setActiveCommand(cmd) end @@ -1297,7 +1297,7 @@ function widget:Initialize() local blockedUnitsData = unitBlocking.getBlockedUnitDefs() for unitDefID, reasons in pairs(blockedUnitsData) do units.unitRestricted[unitDefID] = next(reasons) ~= nil - units.unitHidden[unitDefID] = reasons["hidden"] ~= nil + units.unitHidden[unitDefID] = reasons.hidden ~= nil end if widgetHandler:IsWidgetKnown("Build menu") then @@ -1310,8 +1310,8 @@ function widget:Initialize() isSpec = Spring.GetSpectatingState() isPregame = Spring.GetGameFrame() == 0 and not isSpec - WG["gridmenu"] = {} - WG["buildmenu"] = {} + WG.gridmenu = {} + WG.buildmenu = {} doUpdateClock = os.clock() @@ -1350,94 +1350,94 @@ function widget:Initialize() widget:SelectionChanged(Spring.GetSelectedUnits()) end - WG["gridmenu"].getAlwaysReturn = function() + WG.gridmenu .getAlwaysReturn = function() return alwaysReturn end - WG["gridmenu"].setAlwaysReturn = function(value) + WG.gridmenu .setAlwaysReturn = function(value) alwaysReturn = value end - WG["gridmenu"].getAutoSelectFirst = function() + WG.gridmenu .getAutoSelectFirst = function() return autoSelectFirst end - WG["gridmenu"].setAutoSelectFirst = function(value) + WG.gridmenu .setAutoSelectFirst = function(value) autoSelectFirst = value end - WG["gridmenu"].getUseLabBuildMode = function() + WG.gridmenu .getUseLabBuildMode = function() return useLabBuildMode end - WG["gridmenu"].setUseLabBuildMode = function(value) + WG.gridmenu .setUseLabBuildMode = function(value) useLabBuildMode = value updateGrid() end - WG["gridmenu"].setCurrentCategory = function(category) + WG.gridmenu .setCurrentCategory = function(category) setCurrentCategory(category) end - WG["gridmenu"].clearCategory = function() + WG.gridmenu .clearCategory = function() clearCategory() end - WG["gridmenu"].getCtrlKeyModifier = function() + WG.gridmenu .getCtrlKeyModifier = function() return modKeyMultiplier.keyPress.ctrl end - WG["gridmenu"].setCtrlKeyModifier = function(value) + WG.gridmenu .setCtrlKeyModifier = function(value) modKeyMultiplier.keyPress.ctrl = value end - WG["gridmenu"].getShiftKeyModifier = function() + WG.gridmenu .getShiftKeyModifier = function() return modKeyMultiplier.keyPress.shift end - WG["gridmenu"].setShiftKeyModifier = function(value) + WG.gridmenu .setShiftKeyModifier = function(value) modKeyMultiplier.keyPress.shift = value end - WG["buildmenu"].getGroups = function() + WG.buildmenu .getGroups = function() return groups, units.unitGroup end - WG["buildmenu"].getOrder = function() + WG.buildmenu .getOrder = function() return units.unitOrder end - WG["buildmenu"].getShowPrice = function() + WG.buildmenu .getShowPrice = function() return showPrice end - WG["buildmenu"].setShowPrice = function(value) + WG.buildmenu .setShowPrice = function(value) showPrice = value updateGrid() end - WG["buildmenu"].getAlwaysShow = function() + WG.buildmenu .getAlwaysShow = function() return alwaysShow end - WG["buildmenu"].setAlwaysShow = function(value) + WG.buildmenu .setAlwaysShow = function(value) alwaysShow = value refreshCommands() end - WG["buildmenu"].getShowRadarIcon = function() + WG.buildmenu .getShowRadarIcon = function() return showRadarIcon end - WG["buildmenu"].setShowRadarIcon = function(value) + WG.buildmenu .setShowRadarIcon = function(value) showRadarIcon = value updateGrid() end - WG["buildmenu"].getShowGroupIcon = function() + WG.buildmenu .getShowGroupIcon = function() return showGroupIcon end - WG["buildmenu"].setShowGroupIcon = function(value) + WG.buildmenu .setShowGroupIcon = function(value) showGroupIcon = value updateGrid() end - WG["buildmenu"].getBottomPosition = function() + WG.buildmenu .getBottomPosition = function() return stickToBottom end - WG["buildmenu"].setBottomPosition = function(value) + WG.buildmenu .setBottomPosition = function(value) stickToBottom = value widget:ViewResize() end - WG["buildmenu"].getSize = function() + WG.buildmenu .getSize = function() return backgroundRect.y, backgroundRect.yEnd end - WG["buildmenu"].reloadBindings = function() + WG.buildmenu .reloadBindings = function() reloadBindings() refreshCommands() end - WG["buildmenu"].getIsShowing = function() + WG.buildmenu .getIsShowing = function() return buildmenuShows end ---@class CostLine @@ -1453,7 +1453,7 @@ function widget:Initialize() ---Override the cost display for a specific unit in the grid menu ---@param unitDefID number The unit definition ID to override costs for ---@param costData CostData Cost override configuration table with optional properties - WG["gridmenu"].setCostOverride = function(unitDefID, costData) + WG.gridmenu .setCostOverride = function(unitDefID, costData) if unitDefID and costData then costOverrides[unitDefID] = costData redraw = true @@ -1463,7 +1463,7 @@ function widget:Initialize() ---Clear cost overrides for a specific unit or all units ---@param unitDefID number? The unit definition ID to clear overrides for. If nil or not provided, clears all cost overrides. - WG["gridmenu"].clearCostOverrides = function(unitDefID) + WG.gridmenu .clearCostOverrides = function(unitDefID) if unitDefID then costOverrides[unitDefID] = nil else @@ -1480,7 +1480,7 @@ function widget:Initialize() local blockedUnitsData = unitBlocking.getBlockedUnitDefs() for unitDefID, reasons in pairs(blockedUnitsData) do units.unitRestricted[unitDefID] = next(reasons) ~= nil - units.unitHidden[unitDefID] = reasons["hidden"] ~= nil + units.unitHidden[unitDefID] = reasons.hidden ~= nil end end @@ -1489,7 +1489,7 @@ end ------------------------------------------------------------------------------- local function checkGuishader(force) - if WG["guishader"] then + if WG.guishader then if force and dlistGuishader then dlistGuishader = gl.DeleteList(dlistGuishader) end @@ -1498,7 +1498,7 @@ local function checkGuishader(force) RectRound(backgroundRect.x, backgroundRect.y, backgroundRect.xEnd, backgroundRect.yEnd, elementCorner) end) if activeBuilder then - WG["guishader"].InsertDlist(dlistGuishader, "buildmenu") + WG.guishader .InsertDlist(dlistGuishader, "buildmenu") end end elseif dlistGuishader then @@ -1528,7 +1528,7 @@ function widget:ViewResize() activeAreaMargin = math_ceil(bgpadding * CONFIG.activeAreaMargin) - font2 = WG['fonts'].getFont(2) + font2 = WG.fonts .getFont(2) for i, rectOpts in ipairs(defaultCategoryOpts) do defaultCategoryOpts[i].nameHeight = font2:GetTextHeight(rectOpts.name) @@ -1537,8 +1537,8 @@ function widget:ViewResize() backRect.opts.keyTextHeight = font2:GetTextHeight(backRect.opts.name) - if WG["minimap"] then - minimapHeight = WG["minimap"].getHeight() + if WG.minimap then + minimapHeight = WG.minimap .getHeight() end -- if stick to bottom we know cells are 2 row by 6 column @@ -1601,8 +1601,8 @@ function widget:ViewResize() local posY = math_floor(posYEnd + ((0.74 * vsx) * width)) / vsy local posX = 0 - if WG["ordermenu"] and not WG["ordermenu"].getBottomPosition() then - local _, oposY, _, oheight = WG["ordermenu"].getPosition() + if WG.ordermenu and not WG.ordermenu .getBottomPosition() then + local _, oposY, _, oheight = WG.ordermenu .getPosition() if posY > oposY then posY = (oposY - oheight - (widgetSpaceMargin / vsy)) end @@ -1714,7 +1714,7 @@ function widget:Update(dt) delayRefresh = nil end checkGuishader() - if WG["minimap"] and minimapHeight ~= WG["minimap"].getHeight() then + if WG.minimap and minimapHeight ~= WG.minimap .getHeight() then widget:ViewResize() if not isPregame then @@ -1723,8 +1723,8 @@ function widget:Update(dt) end local prevOrdermenuLeft = ordermenuLeft local prevOrdermenuHeight = ordermenuHeight - if WG["ordermenu"] then - local oposX, _, owidth, oheight = WG["ordermenu"].getPosition() + if WG.ordermenu then + local oposX, _, owidth, oheight = WG.ordermenu .getPosition() ordermenuLeft = math_floor((oposX + owidth) * vsx) ordermenuHeight = oheight end @@ -1756,11 +1756,11 @@ function widget:Update(dt) buildmenuShows = true end - if WG['guishader'] and prevBuildmenuShows ~= buildmenuShows and dlistGuishader then + if WG.guishader and prevBuildmenuShows ~= buildmenuShows and dlistGuishader then if buildmenuShows then - WG['guishader'].InsertDlist(dlistGuishader, 'buildmenu') + WG.guishader .InsertDlist(dlistGuishader, 'buildmenu') else - WG['guishader'].RemoveDlist('buildmenu') + WG.guishader .RemoveDlist('buildmenu') end end @@ -2516,7 +2516,7 @@ function widget:MousePress(x, y, button) if Spring.IsGUIHidden() then return end - if WG["topbar"] and WG["topbar"].showingQuit() then + if WG.topbar and WG.topbar .showingQuit() then return end @@ -2673,7 +2673,7 @@ local function checkGuishaderBuilders() elementCorner ) end) - WG["guishader"].InsertDlist(dlistGuishaderBuilders, "buildmenubuilders") + WG.guishader .InsertDlist(dlistGuishaderBuilders, "buildmenubuilders") dlistGuishaderBuildersNext = gl.CreateList(function() RectRound( nextBuilderRect.x, @@ -2683,12 +2683,12 @@ local function checkGuishaderBuilders() elementCorner * 0.5 ) end) - WG["guishader"].InsertDlist(dlistGuishaderBuildersNext, "buildmenubuildersnext") + WG.guishader .InsertDlist(dlistGuishaderBuildersNext, "buildmenubuildersnext") end elseif dlistGuishaderBuilders then prevSelectedBuildersCount = 0 - WG["guishader"].DeleteDlist("buildmenubuilders") - WG["guishader"].DeleteDlist("buildmenubuildersNext") + WG.guishader .DeleteDlist("buildmenubuilders") + WG.guishader .DeleteDlist("buildmenubuildersNext") dlistGuishaderBuilders = nil dlistGuishaderBuildersNext = nil end @@ -2700,20 +2700,20 @@ end function widget:DrawScreen() if not (activeBuilder or alwaysShow) then - if WG["guishader"] and dlistGuishader then + if WG.guishader and dlistGuishader then if dlistGuishader then - WG["guishader"].RemoveDlist("buildmenu") + WG.guishader .RemoveDlist("buildmenu") end if dlistGuishaderBuilders then - WG["guishader"].RemoveDlist("buildmenubuilders") - WG["guishader"].RemoveDlist("buildmenubuildersnext") + WG.guishader .RemoveDlist("buildmenubuilders") + WG.guishader .RemoveDlist("buildmenubuildersnext") end end else - if WG["guishader"] then + if WG.guishader then if dlistGuishader then - WG["guishader"].InsertDlist(dlistGuishader, "buildmenu") + WG.guishader .InsertDlist(dlistGuishader, "buildmenu") end checkGuishaderBuilders() end @@ -2874,7 +2874,7 @@ function widget:SelectionChanged(newSel) if alwaysShow then refreshCommands() else - WG["buildmenu"].hoverID = nil + WG.buildmenu .hoverID = nil end return @@ -2900,7 +2900,7 @@ function widget:SelectionChanged(newSel) if alwaysShow then refreshCommands() else - WG["buildmenu"].hoverID = nil + WG.buildmenu .hoverID = nil end return @@ -2983,7 +2983,7 @@ end function widget:UnitBlocked(unitDefID, reasons) units.unitRestricted[unitDefID] = next(reasons) ~= nil - units.unitHidden[unitDefID] = reasons["hidden"] ~= nil + units.unitHidden[unitDefID] = reasons.hidden ~= nil if not delayRefresh or delayRefresh < Spring.GetGameSeconds() then delayRefresh = Spring.GetGameSeconds() + 0.5 -- delay so multiple sequential UnitBlocked calls are batched in a single update. end @@ -2998,11 +2998,11 @@ function widget:Shutdown() gl.DeleteTexture(buildmenuTex) buildmenuTex = nil end - if WG["guishader"] and dlistGuishader then - WG["guishader"].DeleteDlist("buildmenu") - WG["guishader"].DeleteDlist("buildmenubuilders") - WG["guishader"].DeleteDlist("buildmenubuildersnext") + if WG.guishader and dlistGuishader then + WG.guishader .DeleteDlist("buildmenu") + WG.guishader .DeleteDlist("buildmenubuilders") + WG.guishader .DeleteDlist("buildmenubuildersnext") dlistGuishader = nil end - WG["buildmenu"] = nil + WG.buildmenu = nil end diff --git a/luaui/Widgets/gui_ground_ao_plates_features_gl4.lua b/luaui/Widgets/gui_ground_ao_plates_features_gl4.lua index d39581bfcd9..0cea8e0ca6f 100644 --- a/luaui/Widgets/gui_ground_ao_plates_features_gl4.lua +++ b/luaui/Widgets/gui_ground_ao_plates_features_gl4.lua @@ -189,7 +189,7 @@ function widget:Initialize() end makeAtlas() --if true then return end - local knownheaps3os = {['arm3x3'] = 1} + local knownheaps3os = {arm3x3 = 1} for id , featureDefID in pairs(FeatureDefs) do local FD = FeatureDefs[id] if FD.modelname and (string.find(FD.modelname:lower(), "_dead", nil, true) or string.find(FD.name, "_heap", nil, true) ) then -- todo TREES! diff --git a/luaui/Widgets/gui_ground_ao_plates_gl4.lua b/luaui/Widgets/gui_ground_ao_plates_gl4.lua index 454c65bd8d9..8fcb04b0995 100644 --- a/luaui/Widgets/gui_ground_ao_plates_gl4.lua +++ b/luaui/Widgets/gui_ground_ao_plates_gl4.lua @@ -144,8 +144,8 @@ function widget:Initialize() end -- Add all units - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end end diff --git a/luaui/Widgets/gui_healthbars_gl4.lua b/luaui/Widgets/gui_healthbars_gl4.lua index 357678dc832..e5792bad90f 100644 --- a/luaui/Widgets/gui_healthbars_gl4.lua +++ b/luaui/Widgets/gui_healthbars_gl4.lua @@ -354,7 +354,7 @@ for barname, bt in pairs(barTypeMap) do cache[15] = bt.maxcolor[3] cache[16] = bt.maxcolor[4] - bt['cache'] = cache + bt.cache = cache end @@ -956,19 +956,19 @@ function widget:Initialize() widgetHandler:RemoveWidget() return end - WG['healthbars'] = {} - WG['healthbars'].getScale = function() + WG.healthbars = {} + WG.healthbars .getScale = function() return barScale end - WG['healthbars'].setScale = function(value) + WG.healthbars .setScale = function(value) barScale = value init() initfeaturebars() end - WG['healthbars'].getHeight = function() + WG.healthbars .getHeight = function() return barHeight end - WG['healthbars'].setHeight = function(value) + WG.healthbars .setHeight = function(value) barHeight = value shaderSourceCache.shaderConfig.BARHEIGHT = barHeight shaderSourceCache.shaderConfig.BARCORNER = 0.06 + (shaderConfig.BARHEIGHT / 9) @@ -976,18 +976,18 @@ function widget:Initialize() init() initfeaturebars() end - WG['healthbars'].getVariableSizes = function() + WG.healthbars .getVariableSizes = function() return variableBarSizes end - WG['healthbars'].setVariableSizes = function(value) + WG.healthbars .setVariableSizes = function(value) variableBarSizes = value init() initfeaturebars() end - WG['healthbars'].getDrawWhenGuiHidden = function() + WG.healthbars .getDrawWhenGuiHidden = function() return drawWhenGuiHidden end - WG['healthbars'].setDrawWhenGuiHidden = function(value) + WG.healthbars .setDrawWhenGuiHidden = function(value) drawWhenGuiHidden = value end diff --git a/luaui/Widgets/gui_idle_builders.lua b/luaui/Widgets/gui_idle_builders.lua index b24a6deb83b..24ef4fc1c13 100644 --- a/luaui/Widgets/gui_idle_builders.lua +++ b/luaui/Widgets/gui_idle_builders.lua @@ -428,8 +428,8 @@ end local function checkUnitGroupsPos(isViewresize) - if WG['unitgroups'] then - local px, py, sx, sy = WG['unitgroups'].getPosition() + if WG.unitgroups then + local px, py, sx, sy = WG.unitgroups .getPosition() local oldPosX, oldPosY = posX, posY posY = py / vsy posX = (sx + widgetSpaceMargin) / vsx @@ -440,8 +440,8 @@ local function checkUnitGroupsPos(isViewresize) doUpdateForce = true end else - if buildmenuBottomPosition and not buildmenuAlwaysShow and WG['buildmenu'] and WG['info'] then - if (not selectedUnits[1] or not WG['buildmenu'].getIsShowing()) and (posX > 0 or not WG['info'].getIsShowing()) then + if buildmenuBottomPosition and not buildmenuAlwaysShow and WG.buildmenu and WG.info then + if (not selectedUnits[1] or not WG.buildmenu .getIsShowing()) and (posX > 0 or not WG.info .getIsShowing()) then if posY ~= 0 then posY = 0 if not isViewresize then @@ -469,8 +469,8 @@ function widget:ViewResize() height = setHeight * uiScale local outlineMult = math.clamp(1/(vsy/1400), 1, 1.5) - font2 = WG['fonts'].getFont() - font = WG['fonts'].getFont(2) + font2 = WG.fonts .getFont() + font = WG.fonts .getFont(2) elementCorner = WG.FlowUI.elementCorner backgroundPadding = WG.FlowUI.elementPadding @@ -480,14 +480,14 @@ function widget:ViewResize() UiElement = WG.FlowUI.Draw.Element UiUnit = WG.FlowUI.Draw.Unit - if WG['buildmenu'] then - buildmenuBottomPosition = WG['buildmenu'].getBottomPosition() - buildmenuIsShowing = WG['buildmenu'].getIsShowing() + if WG.buildmenu then + buildmenuBottomPosition = WG.buildmenu .getBottomPosition() + buildmenuIsShowing = WG.buildmenu .getIsShowing() end local omPosX, omPosY, omWidth, omHeight = 0, 0, 0, 0 - if WG['ordermenu'] then - omPosX, omPosY, omWidth, omHeight = WG['ordermenu'].getPosition() + if WG.ordermenu then + omPosX, omPosY, omWidth, omHeight = WG.ordermenu .getPosition() end ordermenuPosY = omPosY @@ -505,7 +505,7 @@ function widget:ViewResize() if buildmenuBottomPosition and not buildmenuAlwaysShow then buildmenuShowingPosY = posY - if (not selectedUnits[1] or not WG['buildmenu'].getIsShowing()) then + if (not selectedUnits[1] or not WG.buildmenu .getIsShowing()) then posY = 0 end end @@ -516,8 +516,8 @@ function widget:ViewResize() iconSize = floor((height * vsy) - (posY-height > 0 and backgroundPadding or 0)) usedHeight = iconSize + (posY-height > 0 and backgroundPadding or 0) - if WG['unitgroups'] then - local px, py, sx, sy = WG['unitgroups'].getPosition() + if WG.unitgroups then + local px, py, sx, sy = WG.unitgroups .getPosition() local oldPosX, oldPosY = posX, posY posY = py / vsy posX = (sx + widgetSpaceMargin) / vsx @@ -549,13 +549,13 @@ function widget:Initialize() initializeGameFrame = spGetGameFrame() widget:ViewResize() widget:PlayerChanged() - WG['idlebuilders'] = {} - WG['idlebuilders'].getPosition = function() + WG.idlebuilders = {} + WG.idlebuilders .getPosition = function() return posX, posY, backgroundRect and backgroundRect[3] or posX, backgroundRect and backgroundRect[4] or posY + usedHeight end - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end end @@ -571,11 +571,11 @@ function widget:Shutdown() gl.DeleteTexture(uiTex) uiTex = nil end - if WG['guishader'] then + if WG.guishader then WG.FlowUI.guishaderDeleteDlist('idlebuilders') dlistGuishader = nil end - WG['idlebuilders'] = nil + WG.idlebuilders = nil end @@ -592,7 +592,7 @@ local function Update() return end - if WG['topbar'] and WG['topbar'].showingQuit() then + if WG.topbar and WG.topbar .showingQuit() then return end local now = Spring.GetTimer() @@ -627,8 +627,8 @@ local function Update() end end end - if WG['tooltip'] then - WG['tooltip'].ShowTooltip('idlebuilders', tooltipAddition, nil, nil, tooltipTitle) + if WG.tooltip then + WG.tooltip .ShowTooltip('idlebuilders', tooltipAddition, nil, nil, tooltipTitle) end Spring.SetMouseCursor('cursornormal') @@ -643,15 +643,15 @@ local function Update() if sec > 0.33 then sec = 0 - if WG['buildmenu'] then - if buildmenuBottomPosition ~= WG['buildmenu'].getBottomPosition() or buildmenuIsShowing ~= WG['buildmenu'].getIsShowing() then + if WG.buildmenu then + if buildmenuBottomPosition ~= WG.buildmenu .getBottomPosition() or buildmenuIsShowing ~= WG.buildmenu .getIsShowing() then widget:ViewResize() doUpdate = true end end - if WG['ordermenu'] then + if WG.ordermenu then local prevOrdermenuPosY = ordermenuPosY - ordermenuPosY = select(2, WG['ordermenu'].getPosition()) + ordermenuPosY = select(2, WG.ordermenu .getPosition()) if ordermenuPosY ~= prevOrdermenuPosY then widget:ViewResize() doUpdate = true @@ -661,7 +661,7 @@ local function Update() doUpdate = true -- TODO: find a way to detect changes and only doUpdate then -- detect guishader toggle: force refresh when it comes back on - local guishaderActive = WG['guishader'] ~= nil + local guishaderActive = WG.guishader ~= nil if guishaderActive and not guishaderWasActive then checkGuishader(true) end diff --git a/luaui/Widgets/gui_info.lua b/luaui/Widgets/gui_info.lua index 6780e29054d..fbc3a333719 100644 --- a/luaui/Widgets/gui_info.lua +++ b/luaui/Widgets/gui_info.lua @@ -188,8 +188,8 @@ local function refreshUnitInfo() end if unitDef.name == 'armdl' or unitDef.name == 'cordl' or unitDef.name == 'armlance' or unitDef.name == 'cortitan' - or (unitDef.minWaterDepth > 0 or unitDef.modCategories['ship']) then - if not (unitDef.modCategories['hover'] or (unitDef.modCategories['mobile'] and unitDef.modCategories['canbeuw'])) then + or (unitDef.minWaterDepth > 0 or unitDef.modCategories.ship ) then + if not (unitDef.modCategories.hover or (unitDef.modCategories.mobile and unitDef.modCategories.canbeuw )) then isWaterUnit[unitDefID] = true end end @@ -410,7 +410,7 @@ local function refreshUnitInfo() calculateLaserDPS(weaponDef, weaponDef.damages[0]) elseif weaponDef.customParams.cluster then -- Bullets that shoot other, smaller bullets calculateClusterDPS(weaponDef, weaponDef.damages[0]) - elseif weapons[i].onlyTargets['vtol'] ~= nil then + elseif weapons[i].onlyTargets.vtol ~= nil then calculateWeaponDPS(weaponDef, weaponDef.damages[armorIndex.vtol]) --Damage to air category else calculateWeaponDPS(weaponDef, weaponDef.damages[0]) --Damage to default armor category @@ -468,7 +468,7 @@ local function refreshUnitInfo() local defDmg - if weapons[1].onlyTargets['vtol'] ~= nil then --if main weapon isn't dedicated aa, then all weapons calculate using default armor category + if weapons[1].onlyTargets.vtol ~= nil then --if main weapon isn't dedicated aa, then all weapons calculate using default armor category defDmg = weaponDef.damages[armorIndex.vtol] else defDmg = weaponDef.damages[0] @@ -513,7 +513,7 @@ local function refreshUnitInfo() local defDmg - if weapons[1].onlyTargets['vtol'] ~= nil then --if main weapon isn't dedicated aa, then all weapons calculate using default armor category + if weapons[1].onlyTargets.vtol ~= nil then --if main weapon isn't dedicated aa, then all weapons calculate using default armor category defDmg = weaponDef.damages[armorIndex.vtol] else defDmg = weaponDef.damages[0] @@ -525,7 +525,7 @@ local function refreshUnitInfo() end end end - if weapons[i].onlyTargets['vtol'] ~= nil then + if weapons[i].onlyTargets.vtol ~= nil then unitDefInfo[unitDefID].isAaUnit = true end end @@ -533,7 +533,7 @@ local function refreshUnitInfo() if unitDef.customParams.unitgroup and unitDef.customParams.unitgroup == 'explo' and unitDef.deathExplosion and WeaponDefNames[unitDef.deathExplosion] then local weapon = WeaponDefs[WeaponDefNames[unitDef.deathExplosion].id] if weapon then - local dmg = weapon.damages[Game.armorTypes["default"]] + local dmg = weapon.damages[Game.armorTypes.default ] unitDefInfo[unitDefID].mindps = dmg unitDefInfo[unitDefID].maxdps = dmg unitDefInfo[unitDefID].reloadTime = nil @@ -669,8 +669,8 @@ function widget:ViewResize() checkGuishader(true) - font, loadedFontSize = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2) + font, loadedFontSize = WG.fonts .getFont() + font2 = WG.fonts .getFont(2) end function GetColor(colormap, slider) @@ -713,58 +713,58 @@ function widget:Initialize() widget:ViewResize() - WG['info'] = {} - WG['info'].getShowBuilderBuildlist = function() + WG.info = {} + WG.info .getShowBuilderBuildlist = function() return showBuilderBuildlist end - WG['info'].setShowBuilderBuildlist = function(value) + WG.info .setShowBuilderBuildlist = function(value) showBuilderBuildlist = value end - WG['info'].getDisplayMapPosition = function() + WG.info .getDisplayMapPosition = function() return displayMapPosition end - WG['info'].setDisplayMapPosition = function(value) + WG.info .setDisplayMapPosition = function(value) displayMapPosition = value end - WG['info'].getAlwaysShow = function() + WG.info .getAlwaysShow = function() return alwaysShow end - WG['info'].setAlwaysShow = function(value) + WG.info .setAlwaysShow = function(value) alwaysShow = value end - WG['info'].displayUnitID = function(unitID) + WG.info .displayUnitID = function(unitID) cfgDisplayUnitID = unitID end - WG['info'].clearDisplayUnitID = function() + WG.info .clearDisplayUnitID = function() cfgDisplayUnitID = nil end - WG['info'].displayUnitDefID = function(unitDefID) + WG.info .displayUnitDefID = function(unitDefID) cfgDisplayUnitDefID = unitDefID end - WG['info'].clearDisplayUnitDefID = function() + WG.info .clearDisplayUnitDefID = function() cfgDisplayUnitDefID = nil end - WG['info'].getPosition = function() + WG.info .getPosition = function() return width, height end - WG['info'].getIsShowing = function() + WG.info .getIsShowing = function() return infoShows end - WG['info'].setCustomHover = function(hType, hData) + WG.info .setCustomHover = function(hType, hData) -- Allow external widgets to supply custom hover info (e.g., PIP window) customHoverType = hType customHoverData = hData end - WG['info'].clearCustomHover = function() + WG.info .clearCustomHover = function() customHoverType = nil customHoverData = nil end - if WG['buildmenu'] then - if WG['buildmenu'].getGroups then - groups, unitGroup = WG['buildmenu'].getGroups() + if WG.buildmenu then + if WG.buildmenu .getGroups then + groups, unitGroup = WG.buildmenu .getGroups() end - if WG['buildmenu'].getOrder then - unitOrder = WG['buildmenu'].getOrder() + if WG.buildmenu .getOrder then + unitOrder = WG.buildmenu .getOrder() -- order buildoptions for uDefID, def in pairs(unitDefInfo) do @@ -790,8 +790,8 @@ function widget:Initialize() Spring.SetDrawSelectionInfo(false) -- disables springs default display of selected units count Spring.SendCommands("tooltip 0") - if WG['rankicons'] then - rankTextures = WG['rankicons'].getRankTextures() + if WG.rankicons then + rankTextures = WG.rankicons .getRankTextures() end bfcolormap = {} @@ -810,7 +810,7 @@ function widget:Shutdown() if infoTex then gl.DeleteTexture(infoTex) end - if WG['guishader'] and dlistGuishader then + if WG.guishader and dlistGuishader then WG.FlowUI.guishaderDeleteDlist('info') dlistGuishader = nil end @@ -828,7 +828,7 @@ function widget:Update(dt) if not alwaysShow and ((cameraPanMode and not doUpdate) or mouseOffScreen) and not isPregame then if SelectedUnitsCount == 0 then if dlistGuishader then - WG['guishader'].DeleteDlist('info') + WG.guishader .DeleteDlist('info') dlistGuishader = nil end end @@ -847,8 +847,8 @@ function widget:Update(dt) if sec2 > 0.5 then sec2 = 0 - if not rankTextures and WG['rankicons'] then - rankTextures = WG['rankicons'].getRankTextures() + if not rankTextures and WG.rankicons then + rankTextures = WG.rankicons .getRankTextures() end local _, _, mapMinWater, _ = Spring.GetGroundExtremes() @@ -1280,9 +1280,9 @@ local function drawUnitInfo() if displayUnitID then exp = spGetUnitExperience(displayUnitID) - if exp and exp > 0.009 and WG['rankicons'] and rankTextures then + if exp and exp > 0.009 and WG.rankicons and rankTextures then if displayUnitID then - local rank = WG['rankicons'].getRank(displayUnitDefID, exp) + local rank = WG.rankicons .getRank(displayUnitDefID, exp) if rankTextures[rank] then local rankIconSize = math_floor((height * vsy * 0.24) + 0.5) local rankIconMarginX = math_floor((height * vsy * 0.015) + 0.5) @@ -1313,7 +1313,7 @@ local function drawUnitInfo() local unitNameColor = tooltipTitleColor if SelectedUnitsCount > 0 then - if displayMode ~= 'unitdef' or (WG['buildmenu'] and (activeCmdID and activeCmdID < 0 and (not WG['buildmenu'].hoverID or (-activeCmdID == WG['buildmenu'].hoverID)))) then + if displayMode ~= 'unitdef' or (WG.buildmenu and (activeCmdID and activeCmdID < 0 and (not WG.buildmenu .hoverID or (-activeCmdID == WG.buildmenu .hoverID)))) then unitNameColor = '\255\125\255\125' end end @@ -1355,7 +1355,7 @@ local function drawUnitInfo() -- custom unit info area customInfoArea = { math_floor(backgroundRect[3] - width - bgpadding), math_floor(backgroundRect[2]), math_floor(backgroundRect[3] - bgpadding), math_floor(backgroundRect[2] + height) } - if displayMode ~= 'unitdef' or not showBuilderBuildlist or not unitDefInfo[displayUnitDefID].buildOptions or (not (WG['buildmenu'] and WG['buildmenu'].hoverID)) then + if displayMode ~= 'unitdef' or not showBuilderBuildlist or not unitDefInfo[displayUnitDefID].buildOptions or (not (WG.buildmenu and WG.buildmenu .hoverID)) then RectRound(customInfoArea[1], customInfoArea[2], customInfoArea[3], customInfoArea[4], elementCorner*0.66, 1, 0, 0, 0, { 0.8, 0.8, 0.8, 0.07 }, { 0.8, 0.8, 0.8, 0.1 }) end @@ -2132,7 +2132,7 @@ function widget:DrawScreen() if (not alwaysShow and (cameraPanMode or mouseOffScreen) and SelectedUnitsCount == 0 and not isPregame) then if dlistGuishader then - WG['guishader'].DeleteDlist('info') + WG.guishader .DeleteDlist('info') dlistGuishader = nil end return @@ -2182,7 +2182,7 @@ function widget:DrawScreen() gl.R2tHelper.BlendTexRect(infoTex, backgroundRect[1], backgroundRect[2], backgroundRect[3], backgroundRect[4], true) end elseif dlistGuishader then - WG['guishader'].DeleteDlist('info') + WG.guishader .DeleteDlist('info') dlistGuishader = nil end @@ -2234,7 +2234,7 @@ function widget:DrawScreen() end end - if WG['tooltip'] then + if WG.tooltip then local statsIndent = ' ' local stats = '' --local cells = cellHovered and { [cellHovered] = selectionCells[cellHovered] } or selectionCells @@ -2253,7 +2253,7 @@ function widget:DrawScreen() text = selectionHowto end - WG['tooltip'].ShowTooltip('info', text, nil, nil, textTitle) + WG.tooltip .ShowTooltip('info', text, nil, nil, textTitle) end end @@ -2297,8 +2297,8 @@ function widget:DrawScreen() end end elseif displayMode == 'unit' then - if WG['unitstats'] and WG['unitstats'].showUnit then - WG['unitstats'].showUnit(displayUnitID) + if WG.unitstats and WG.unitstats .showUnit then + WG.unitstats .showUnit(displayUnitID) end end end @@ -2313,7 +2313,7 @@ function checkChanges() if customHoverType and customHoverData then hoverType = customHoverType hoverData = customHoverData - elseif WG['guiPip'] and WG['guiPip'].IsAbove and WG['guiPip'].IsAbove(x, y) then + elseif WG.guiPip and WG.guiPip .IsAbove and WG.guiPip .IsAbove(x, y) then -- PIP window is above the cursor, don't detect anything below it hoverType = nil hoverData = nil @@ -2338,9 +2338,9 @@ function checkChanges() end -- buildmenu unitdef - if WG['buildmenu'] and WG['buildmenu'].hoverID then + if WG.buildmenu and WG.buildmenu .hoverID then displayMode = 'unitdef' - displayUnitDefID = WG['buildmenu'].hoverID + displayUnitDefID = WG.buildmenu .hoverID elseif cfgDisplayUnitDefID then displayMode = 'unitdef' displayUnitDefID = cfgDisplayUnitDefID diff --git a/luaui/Widgets/gui_infolos.lua b/luaui/Widgets/gui_infolos.lua index 9c02858285b..4df4f359b66 100644 --- a/luaui/Widgets/gui_infolos.lua +++ b/luaui/Widgets/gui_infolos.lua @@ -210,9 +210,9 @@ function widget:Initialize() fullScreenQuadVAO = InstanceVBOTable.MakeTexRectVAO()-- -1, -1, 1, 0, 0,0,1, 0.5 - WG['infolosapi'] = {} - WG['infolosapi'].GetInfoLOSTexture = GetInfoLOSTexture - widgetHandler:RegisterGlobal('GetInfoLOSTexture', WG['infolosapi'].GetInfoLOSTexture) + WG.infolosapi = {} + WG.infolosapi .GetInfoLOSTexture = GetInfoLOSTexture + widgetHandler:RegisterGlobal('GetInfoLOSTexture', WG.infolosapi .GetInfoLOSTexture) end @@ -221,7 +221,7 @@ function widget:Shutdown() gl.DeleteTexture(tex) end infoTextures = {} - WG['infolosapi'] = nil + WG.infolosapi = nil widgetHandler:DeregisterGlobal('GetInfoLOSTexture') end diff --git a/luaui/Widgets/gui_keybind_info.lua b/luaui/Widgets/gui_keybind_info.lua index 6d87fcd7e3b..bc342a354ff 100644 --- a/luaui/Widgets/gui_keybind_info.lua +++ b/luaui/Widgets/gui_keybind_info.lua @@ -313,8 +313,8 @@ function widget:ViewResize() screenX = mathFloor((vsx * centerPosX) - (screenWidth / 2)) screenY = mathFloor((vsy * centerPosY) + (screenHeight / 2)) - font = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2) + font = WG.fonts .getFont() + font2 = WG.fonts .getFont(2) elementCorner = WG.FlowUI.elementCorner @@ -350,7 +350,7 @@ function widget:DrawScreen() if show or showOnceMore then gl.Texture(false) -- some other widget left it on glCallList(keybinds) - if WG['guishader'] then + if WG.guishader then if backgroundGuishader ~= nil then glDeleteList(backgroundGuishader) end @@ -362,7 +362,7 @@ function widget:DrawScreen() RectRound(tabrect[1], tabrect[2], tabrect[3], tabrect[4], elementCorner, 1, 1, 0, 0) end end) - WG['guishader'].InsertDlist(backgroundGuishader, 'keybindinfo') + WG.guishader .InsertDlist(backgroundGuishader, 'keybindinfo') end showOnceMore = false @@ -371,8 +371,8 @@ function widget:DrawScreen() Spring.SetMouseCursor('cursornormal') end else - if WG['guishader'] then - WG['guishader'].DeleteDlist('keybindinfo') + if WG.guishader then + WG.guishader .DeleteDlist('keybindinfo') end end end @@ -423,18 +423,18 @@ end function widget:Initialize() refreshText() - WG['keybinds'] = {} - WG['keybinds'].toggle = function(state) + WG.keybinds = {} + WG.keybinds .toggle = function(state) if state ~= nil then show = state else show = not show end end - WG['keybinds'].isvisible = function() + WG.keybinds .isvisible = function() return show end - WG['keybinds'].reloadBindings = function() + WG.keybinds .reloadBindings = function() refreshText() doUpdate = true end @@ -446,8 +446,8 @@ function widget:Shutdown() glDeleteList(keybinds) keybinds = nil end - if WG['guishader'] then - WG['guishader'].RemoveDlist('keybindinfo') + if WG.guishader then + WG.guishader .RemoveDlist('keybindinfo') end if backgroundGuishader ~= nil then glDeleteList(backgroundGuishader) diff --git a/luaui/Widgets/gui_language.lua b/luaui/Widgets/gui_language.lua index 6490c77f06d..47d6e6aeb98 100644 --- a/luaui/Widgets/gui_language.lua +++ b/luaui/Widgets/gui_language.lua @@ -33,9 +33,9 @@ function widget:Initialize() widgetHandler:RegisterGlobal('GadgetMessageProxy', getMessageProxy) - WG['language'] = {} + WG.language = {} - WG['language'].setLanguage = function(language) + WG.language .setLanguage = function(language) Spring.SetConfigString('language', language) Spring.I18N.setLanguage(language) @@ -44,7 +44,7 @@ function widget:Initialize() end end - WG['language'].setEnglishUnitNames = function(value) + WG.language .setEnglishUnitNames = function(value) Spring.SetConfigInt("language_english_unit_names", value and 1 or 0) if Script.LuaUI('LanguageChanged') then @@ -54,5 +54,5 @@ function widget:Initialize() end function widget:Shutdown() - WG['lang'] = nil + WG.lang = nil end diff --git a/luaui/Widgets/gui_los_view_gl4.lua b/luaui/Widgets/gui_los_view_gl4.lua index bc3a82ad9e7..da3d28b831a 100644 --- a/luaui/Widgets/gui_los_view_gl4.lua +++ b/luaui/Widgets/gui_los_view_gl4.lua @@ -85,7 +85,7 @@ function widget:Initialize() widgetHandler:RemoveWidget() return end - if not WG['infolosapi'] then + if not WG.infolosapi then spEcho("Los View GL4: Missing InfoLOS API") widgetHandler:RemoveWidget() return @@ -112,7 +112,7 @@ function widget:DrawPreDecals() gl.Texture(0, "$map_gbuffer_zvaltex") gl.Texture(1, "$model_gbuffer_zvaltex") gl.Texture(2, ScreenCopyTexture) - gl.Texture(3, WG['infolosapi'].GetInfoLOSTexture(currentAllyTeam)) + gl.Texture(3, WG.infolosapi .GetInfoLOSTexture(currentAllyTeam)) gl.Blending(GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA) gl.Culling(false) -- ffs gl.DepthTest(false) diff --git a/luaui/Widgets/gui_mapinfo.lua b/luaui/Widgets/gui_mapinfo.lua index 32119b9897c..fea2edcd654 100644 --- a/luaui/Widgets/gui_mapinfo.lua +++ b/luaui/Widgets/gui_mapinfo.lua @@ -59,7 +59,7 @@ local success, mapinfo = pcall(VFS.Include,"mapinfo.lua") -- load mapinfo.lua co function widget:ViewResize() vsx,vsy = spGetViewGeometry() - font = WG['fonts'].getFont() + font = WG.fonts .getFont() for opacity, list in pairs(mapinfoList) do glDeleteList(list) diff --git a/luaui/Widgets/gui_mapmarks_fx.lua b/luaui/Widgets/gui_mapmarks_fx.lua index b948a158db8..107cf94f9d9 100644 --- a/luaui/Widgets/gui_mapmarks_fx.lua +++ b/luaui/Widgets/gui_mapmarks_fx.lua @@ -161,7 +161,7 @@ end function widget:ViewResize() vsx,vsy = spGetViewGeometry() - font = WG['fonts'].getFont(1, 1.5) + font = WG.fonts .getFont(1, 1.5) end diff --git a/luaui/Widgets/gui_messages.lua b/luaui/Widgets/gui_messages.lua index 43a59ad0990..0ae9e5d46f7 100644 --- a/luaui/Widgets/gui_messages.lua +++ b/luaui/Widgets/gui_messages.lua @@ -58,17 +58,17 @@ function widget:ViewResize() widgetScale = (((vsx+vsy) / 2000) * 0.55) * (0.95+(ui_scale-1)/1.5) lineMaxWidth = lineMaxWidth * widgetScale - font = WG['fonts'].getFont() + font = WG.fonts .getFont() - if WG['buildmenu'] then - buildmenuBottomPosition = WG['buildmenu'].getBottomPosition() + if WG.buildmenu then + buildmenuBottomPosition = WG.buildmenu .getBottomPosition() end posY = 0.16 if buildmenuBottomPosition then posY = 0.21 - if WG['ordermenu'] then - local oposX, oposY, owidth, oheight = WG['ordermenu'].getPosition() + if WG.ordermenu then + local oposX, oposY, owidth, oheight = WG.ordermenu .getPosition() if oposY > 0.5 then posY = 0.16 end @@ -162,8 +162,8 @@ end function widget:Initialize() widget:ViewResize() widgetHandler:RegisterGlobal('GadgetAddMessage', addMessage) - WG['messages'] = {} - WG['messages'].addMessage = function(text) + WG.messages = {} + WG.messages .addMessage = function(text) addMessage(text) end end @@ -177,9 +177,9 @@ function widget:Update(dt) if hideSpecChat ~= tonumber(Spring.GetConfigInt("HideSpecChat", 0) or 0) == 1 then hideSpecChat = tonumber(Spring.GetConfigInt("HideSpecChat", 0) or 0) == 1 end - if WG['buildmenu'] and WG['buildmenu'].getBottomPosition then + if WG.buildmenu and WG.buildmenu .getBottomPosition then local prevbuildmenuBottomPos = buildmenuBottomPos - buildmenuBottomPos = WG['buildmenu'].getBottomPosition() + buildmenuBottomPos = WG.buildmenu .getBottomPosition() if buildmenuBottomPos ~= prevbuildmenuBottomPos then widget:ViewResize() end @@ -247,7 +247,7 @@ function widget:DrawScreen() end function widget:Shutdown() - WG['messages'] = nil + WG.messages = nil for i, _ in ipairs(messageLines) do if messageLines[i].displaylist then glDeleteList(messageLines[i].displaylist) diff --git a/luaui/Widgets/gui_metalspots.lua b/luaui/Widgets/gui_metalspots.lua index 0219eb42828..372afe6bda1 100644 --- a/luaui/Widgets/gui_metalspots.lua +++ b/luaui/Widgets/gui_metalspots.lua @@ -429,11 +429,11 @@ function widget:Initialize() widgetHandler:RemoveWidget() return end - if not WG['resource_spot_finder'].metalSpotsList then + if not WG.resource_spot_finder .metalSpotsList then spEcho(" This widget requires the 'Metalspot Finder' widget to run.") widgetHandler:RemoveWidget() end - if WG['resource_spot_finder'].isMetalMap then + if WG.resource_spot_finder .isMetalMap then -- no need for this widget on metal maps widgetHandler:RemoveWidget() end @@ -460,7 +460,7 @@ function widget:Initialize() if not initGL4() then return end - local mSpots = WG['resource_spot_finder'].metalSpotsList + local mSpots = WG.resource_spot_finder .metalSpotsList if not mSpots then return end InitializeAtlas(mSpots) InitializeSpots(mSpots) diff --git a/luaui/Widgets/gui_minimap.lua b/luaui/Widgets/gui_minimap.lua index 01bceb91e67..e0261dd2321 100644 --- a/luaui/Widgets/gui_minimap.lua +++ b/luaui/Widgets/gui_minimap.lua @@ -100,8 +100,8 @@ function widget:ViewResize() UiElement = WG.FlowUI.Draw.Element elementMargin = WG.FlowUI.elementMargin - if WG['topbar'] ~= nil then - local topbarArea = WG['topbar'].GetPosition() + if WG.topbar ~= nil then + local topbarArea = WG.topbar .GetPosition() maxAllowedWidth = (topbarArea[1] - elementMargin - elementPadding) / vsx end @@ -139,26 +139,26 @@ function widget:Initialize() end _, _, _, _, minimized, maximized = Spring.GetMiniMapGeometry() - WG['minimap'] = {} - WG['minimap'].getHeight = function() + WG.minimap = {} + WG.minimap .getHeight = function() return usedHeight + elementPadding end - WG['minimap'].getMaxHeight = function() + WG.minimap .getMaxHeight = function() return mathFloor(maxAllowedHeight * vsy), maxAllowedHeight end - WG['minimap'].setMaxHeight = function(value) + WG.minimap .setMaxHeight = function(value) Spring.SetConfigFloat("MinimapMaxHeight", value) maxAllowedHeight = value widget:ViewResize() end - WG['minimap'].getLeftClickMove = function() + WG.minimap .getLeftClickMove = function() return leftClickMove end - WG['minimap'].setLeftClickMove = function(value) + WG.minimap .setLeftClickMove = function(value) leftClickMove = value Spring.SetConfigInt("MinimapLeftClickMove", value and 1 or 0) end - WG['minimap'].setBaseIconScale = function(value) + WG.minimap .setBaseIconScale = function(value) baseMinimapIconScale = value end end @@ -267,8 +267,8 @@ function widget:DrawScreen() end if st.name == "ov" then -- overview camera - if dlistGuishader and WG['guishader'] then - WG['guishader'].RemoveDlist('minimap') + if dlistGuishader and WG.guishader then + WG.guishader .RemoveDlist('minimap') dlistGuishader = gl.DeleteList(dlistGuishader) end wasOverview = true @@ -281,8 +281,8 @@ function widget:DrawScreen() end - if dlistGuishader and WG['guishader'] then - WG['guishader'].InsertDlist(dlistGuishader, 'minimap') + if dlistGuishader and WG.guishader then + WG.guishader .InsertDlist(dlistGuishader, 'minimap') end if not uiBgTex and backgroundRect[3]-backgroundRect[1] >= 1 and backgroundRect[4]-backgroundRect[2] >= 1 then uiBgTex = gl.CreateTexture(mathFloor(backgroundRect[3]-backgroundRect[1]), mathFloor(backgroundRect[4]-backgroundRect[2]), { diff --git a/luaui/Widgets/gui_options.lua b/luaui/Widgets/gui_options.lua index 1f86d08723d..239d7fe198f 100644 --- a/luaui/Widgets/gui_options.lua +++ b/luaui/Widgets/gui_options.lua @@ -358,9 +358,9 @@ function widget:ViewResize() UiSelector = WG.FlowUI.Draw.Selector UiSelectHighlight = WG.FlowUI.Draw.SelectHighlight - font = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2) - font3 = WG['fonts'].getFont(2, 1.6) + font = WG.fonts .getFont() + font2 = WG.fonts .getFont(2) + font3 = WG.fonts .getFont(2, 1.6) local newFontfileScale = (0.5 + (vsx * vsy / 5700000)) if fontfileScale ~= newFontfileScale then @@ -424,8 +424,8 @@ function widget:TextInput(char) -- if it isnt working: chobby probably hijacked end cursorBlinkTimer = 0 updateTextInputDlist = true - if WG['limitidlefps'] and WG['limitidlefps'].update then - WG['limitidlefps'].update() + if WG.limitidlefps and WG.limitidlefps .update then + WG.limitidlefps .update() end applyFilter() @@ -446,13 +446,13 @@ end local function cancelChatInput() local doReinit = inputText ~= '' backgroundGuishader = glDeleteList(backgroundGuishader) - if WG['guishader'] then - WG['guishader'].RemoveDlist('options') - WG['guishader'].RemoveRect('optionsinput') + if WG.guishader then + WG.guishader .RemoveDlist('options') + WG.guishader .RemoveRect('optionsinput') if selectOptionsList then - WG['guishader'].RemoveScreenRect('options_select') - WG['guishader'].RemoveScreenRect('options_select_options') - WG['guishader'].removeRenderDlist(selectOptionsList) + WG.guishader .RemoveScreenRect('options_select') + WG.guishader .RemoveScreenRect('options_select_options') + WG.guishader .removeRenderDlist(selectOptionsList) end end if selectOptionsList then @@ -504,8 +504,8 @@ function updateInputDlist() local x2 = math.max(textPosX+lineHeight+floor(usedFont:GetTextWidth(inputText) * inputFontSize), floor(activationArea[1]+((activationArea[3]-activationArea[1])/5))) chatInputArea = { activationArea[1], activationArea[2]+chatlogHeightDiff-distance-inputHeight, x2, activationArea[2]+chatlogHeightDiff-distance } UiElement(chatInputArea[1], chatInputArea[2], chatInputArea[3], chatInputArea[4], 0,0,nil,nil, 0,nil,nil,nil, WG.FlowUI.clampedOpacity) - if WG['guishader'] then - WG['guishader'].InsertRect(activationArea[1], activationArea[2]+chatlogHeightDiff-distance-inputHeight, x2, activationArea[2]+chatlogHeightDiff-distance, 'optionsinput') + if WG.guishader then + WG.guishader .InsertRect(activationArea[1], activationArea[2]+chatlogHeightDiff-distance-inputHeight, x2, activationArea[2]+chatlogHeightDiff-distance, 'optionsinput') end -- button background @@ -655,7 +655,7 @@ function DrawWindow() titleRect = { math.floor((screenX + screenWidth) - ((font2:GetTextWidth(title) * titleFontSize) + (titleFontSize * 1.5))), screenY, screenX + screenWidth, math.floor(screenY + (titleFontSize * 1.7)) } -- title drawing - RectRound(titleRect[1], titleRect[2], titleRect[3], titleRect[4], elementCorner, 1, 1, 0, 0, WG['guishader'] and { 0, 0, 0, 0.8 } or { 0, 0, 0, 0.85 }, WG['guishader'] and { 0.05, 0.05, 0.05, 0.8 } or { 0.05, 0.05, 0.05, 0.85 }) + RectRound(titleRect[1], titleRect[2], titleRect[3], titleRect[4], elementCorner, 1, 1, 0, 0, WG.guishader and { 0, 0, 0, 0.8 } or { 0, 0, 0, 0.85 }, WG.guishader and { 0.05, 0.05, 0.05, 0.8 } or { 0.05, 0.05, 0.05, 0.85 }) RectRound(titleRect[1] + groupMargin, titleRect[4] - groupMargin - ((titleRect[4] - titleRect[2]) * 0.5), titleRect[3] - groupMargin, titleRect[4] - groupMargin, elementCorner * 0.66, 1, 1, 0, 0, { 1, 0.95, 0.85, 0.03 }, { 1, 0.95, 0.85, 0.15 }) font2:Begin() @@ -676,7 +676,7 @@ function DrawWindow() if devMode or devUI or group.id ~= 'dev' then xpos = groupRect[id][3] if currentGroupTab == nil or currentGroupTab ~= group.id then - RectRound(groupRect[id][1], groupRect[id][2], groupRect[id][3], groupRect[id][4], elementCorner, 1, 1, 0, 0, WG['guishader'] and { 0, 0, 0, 0.8 } or { 0, 0, 0, 0.85 }, WG['guishader'] and { 0.05, 0.05, 0.05, 0.8 } or { 0.05, 0.05, 0.05, 0.85 }) + RectRound(groupRect[id][1], groupRect[id][2], groupRect[id][3], groupRect[id][4], elementCorner, 1, 1, 0, 0, WG.guishader and { 0, 0, 0, 0.8 } or { 0, 0, 0, 0.85 }, WG.guishader and { 0.05, 0.05, 0.05, 0.8 } or { 0.05, 0.05, 0.05, 0.85 }) RectRound(groupRect[id][1] + groupMargin, groupRect[id][2], groupRect[id][3] - groupMargin, groupRect[id][4] - groupMargin, elementCorner * 0.66, 1, 1, 0, 0, { 0.6, 0.47, 0.24, 0.2 }, { 0.88, 0.68, 0.33, 0.2 }) RectRound(groupRect[id][1] + groupMargin+groupPadding, groupRect[id][2], groupRect[id][3] - groupMargin-groupPadding, groupRect[id][4] - groupMargin-groupPadding, elementCorner * 0.5, 1, 1, 0, 0, { 0,0,0, 0.13 }, { 0,0,0, 0.13 }) @@ -692,7 +692,7 @@ function DrawWindow() font2:Print(group.name, groupRect[id][1] + ((groupRect[id][3] - groupRect[id][1]) / 2), screenY + (9 * widgetScale), tabFontSize, "con") font2:End() else - RectRound(groupRect[id][1], groupRect[id][2], groupRect[id][3], groupRect[id][4], elementCorner, 1, 1, 0, 0, WG['guishader'] and { 0, 0, 0, 0.8 } or { 0, 0, 0, 0.85 }, WG['guishader'] and { 0.05, 0.05, 0.05, 0.8 } or { 0.05, 0.05, 0.05, 0.85 }) + RectRound(groupRect[id][1], groupRect[id][2], groupRect[id][3], groupRect[id][4], elementCorner, 1, 1, 0, 0, WG.guishader and { 0, 0, 0, 0.8 } or { 0, 0, 0, 0.85 }, WG.guishader and { 0.05, 0.05, 0.05, 0.8 } or { 0.05, 0.05, 0.05, 0.85 }) RectRound(groupRect[id][1] + groupMargin, groupRect[id][2] - bgpadding, groupRect[id][3] - groupMargin, groupRect[id][4] - groupMargin, elementCorner * 0.8, 1, 1, 0, 0, { 0.7, 0.7, 0.7, 0.15 }, { 0.8, 0.8, 0.8, 0.15 }) font2:Begin() @@ -1108,7 +1108,7 @@ function widget:Update(dt) cachedMuteOffscreen = Spring.GetConfigInt("muteOffscreen", 0) == 1 -- detect guishader toggle: force refresh when it comes back on - local guishaderActive = WG['guishader'] ~= nil + local guishaderActive = WG.guishader ~= nil if guishaderActive and not guishaderWasActive then if backgroundGuishader then backgroundGuishader = glDeleteList(backgroundGuishader) @@ -1147,8 +1147,8 @@ function widget:Update(dt) options[getOptionByID('sndvolmaster')].value = tonumber(Spring.GetConfigInt("snd_volmaster", 40) or 40) -- update value because other widgets can adjust this too end if getOptionByID('sndvolmusic') then - if WG['music'] and WG['music'].GetMusicVolume then - options[getOptionByID('sndvolmusic')].value = WG['music'].GetMusicVolume() + if WG.music and WG.music .GetMusicVolume then + options[getOptionByID('sndvolmusic')].value = WG.music .GetMusicVolume() else options[getOptionByID('sndvolmusic')].value = tonumber(Spring.GetConfigInt("snd_volmusic", 50) or 50) end @@ -1223,7 +1223,7 @@ local lastPauseCheckClock = os_clock() local canPauseGame = (isSinglePlayer or isReplay) and pauseGameWhenSingleplayer local function checkQuitscreen() if not canPauseGame then return end - quitscreen = (WG['topbar'] and WG['topbar'].showingQuit() or false) + quitscreen = (WG.topbar and WG.topbar .showingQuit() or false) if prevQuitscreen ~= quitscreen then if quitscreen and isClientPaused and not showToggledOff then skipUnpauseOnHide = true @@ -1266,10 +1266,10 @@ function widget:DrawScreen() end if not showSelectOptions and selectOptionsList then - if WG['guishader'] then - WG['guishader'].RemoveScreenRect('options_select') - WG['guishader'].RemoveScreenRect('options_select_options') - WG['guishader'].removeRenderDlist(selectOptionsList) + if WG.guishader then + WG.guishader .RemoveScreenRect('options_select') + WG.guishader .RemoveScreenRect('options_select_options') + WG.guishader .removeRenderDlist(selectOptionsList) end selectOptionsList = glDeleteList(selectOptionsList) end @@ -1299,7 +1299,7 @@ function widget:DrawScreen() -- draw the options panel glCallList(windowList) - if WG['guishader'] then + if WG.guishader then if not backgroundGuishader then backgroundGuishader = glCreateList(function() -- background @@ -1322,7 +1322,7 @@ function widget:DrawScreen() guishaderedTabs = false end end) - WG['guishader'].InsertDlist(backgroundGuishader, 'options') + WG.guishader .InsertDlist(backgroundGuishader, 'options') end end showOnceMore = false @@ -1364,7 +1364,7 @@ function widget:DrawScreen() if options[i].onclick == nil then RectRound(o[1], o[2], o[3], o[4], 1, 2, 2, 2, 2, { 0.5, 0.5, 0.5, 0.22 }, { 1, 1, 1, 0.22 }) end - if WG['tooltip'] ~= nil and options[i].type == 'slider' then + if WG.tooltip ~= nil and options[i].type == 'slider' then local value = options[i].value if options[i].steps then value = NearestValue(options[i].steps, value) @@ -1374,7 +1374,7 @@ function widget:DrawScreen() value = string.format("%." .. string.len(string.sub('' .. options[i].step, 3)) .. "f", value) -- do rounding via a string because floats show rounding errors at times end end - WG['tooltip'].ShowTooltip('options_showvalue', value) + WG.tooltip .ShowTooltip('options_showvalue', value) tooltipShowing = true end end @@ -1413,7 +1413,7 @@ function widget:DrawScreen() end end if showTooltip then - desc = font:WrapText(desc, WG['tooltip'].getFontsize() * 90) + desc = font:WrapText(desc, WG.tooltip .getFontsize() * 90) WG.tooltip.ShowTooltip('options_description', desc)--, nil, nil, optionColor..options[i].name) end end @@ -1454,15 +1454,15 @@ function widget:DrawScreen() maxWidth = math.max(maxWidth, font:GetTextWidth(option .. ' ') * fontSize) end if selectOptionsList then - if WG['guishader'] then - WG['guishader'].removeRenderDlist(selectOptionsList) + if WG.guishader then + WG.guishader .removeRenderDlist(selectOptionsList) end glDeleteList(selectOptionsList) end selectOptionsList = glCreateList(function() local borderSize = math.max(1, math.floor(vsy / 900)) RectRound(optionButtons[showSelectOptions][1] - borderSize, yPos - oHeight - oPadding - borderSize, optionButtons[showSelectOptions][1] + maxWidth + borderSize, optionButtons[showSelectOptions][2] + borderSize, (optionButtons[showSelectOptions][4] - optionButtons[showSelectOptions][2]) * 0.1, 1, 1, 1, 1, { 0, 0, 0, 0.25 }, { 0, 0, 0, 0.25 }) - RectRound(optionButtons[showSelectOptions][1], yPos - oHeight - oPadding, optionButtons[showSelectOptions][1] + maxWidth, optionButtons[showSelectOptions][2], (optionButtons[showSelectOptions][4] - optionButtons[showSelectOptions][2]) * 0.1, 1, 1, 1, 1, { 0.3, 0.3, 0.3, WG['guishader'] and 0.84 or 0.94 }, { 0.35, 0.35, 0.35, WG['guishader'] and 0.84 or 0.94 }) + RectRound(optionButtons[showSelectOptions][1], yPos - oHeight - oPadding, optionButtons[showSelectOptions][1] + maxWidth, optionButtons[showSelectOptions][2], (optionButtons[showSelectOptions][4] - optionButtons[showSelectOptions][2]) * 0.1, 1, 1, 1, 1, { 0.3, 0.3, 0.3, WG.guishader and 0.84 or 0.94 }, { 0.35, 0.35, 0.35, WG.guishader and 0.84 or 0.94 }) UiSelector(optionButtons[showSelectOptions][1], optionButtons[showSelectOptions][2], optionButtons[showSelectOptions][3], optionButtons[showSelectOptions][4]) local i = 0 @@ -1491,10 +1491,10 @@ function widget:DrawScreen() end end end) - if WG['guishader'] then - WG['guishader'].InsertScreenRect(optionButtons[showSelectOptions][1], optionButtons[showSelectOptions][2], optionButtons[showSelectOptions][3], optionButtons[showSelectOptions][4], 'options_select') - WG['guishader'].InsertScreenRect(optionButtons[showSelectOptions][1], yPos - oHeight - oPadding, optionButtons[showSelectOptions][1] + maxWidth, optionButtons[showSelectOptions][2], 'options_select_options') - WG['guishader'].insertRenderDlist(selectOptionsList) + if WG.guishader then + WG.guishader .InsertScreenRect(optionButtons[showSelectOptions][1], optionButtons[showSelectOptions][2], optionButtons[showSelectOptions][3], optionButtons[showSelectOptions][4], 'options_select') + WG.guishader .InsertScreenRect(optionButtons[showSelectOptions][1], yPos - oHeight - oPadding, optionButtons[showSelectOptions][1] + maxWidth, optionButtons[showSelectOptions][2], 'options_select_options') + WG.guishader .insertRenderDlist(selectOptionsList) else glCallList(selectOptionsList) end @@ -1509,19 +1509,19 @@ function widget:DrawScreen() if textInputDlist then glCallList(textInputDlist) drawChatInputCursor() - elseif WG['guishader'] then - WG['guishader'].RemoveRect('optionsinput') + elseif WG.guishader then + WG.guishader .RemoveRect('optionsinput') textInputDlist = glDeleteList(textInputDlist) end end else - if WG['guishader'] then + if WG.guishader then if backgroundGuishader then - WG['guishader'].RemoveDlist('options') + WG.guishader .RemoveDlist('options') backgroundGuishader = glDeleteList(backgroundGuishader) end if textInputDlist then - WG['guishader'].RemoveRect('optionsinput') + WG.guishader .RemoveRect('optionsinput') textInputDlist = glDeleteList(textInputDlist) end end @@ -2366,8 +2366,8 @@ function init() custom = {}, } - local screenModes = WG['screenMode'] and WG['screenMode'].GetScreenModes() or {} - local displays = WG['screenMode'] and WG['screenMode'].GetDisplays() or {} + local screenModes = WG.screenMode and WG.screenMode .GetScreenModes() or {} + local displays = WG.screenMode and WG.screenMode .GetDisplays() or {} local currentDisplay = 1 local v_sx, v_sy, v_px, v_py = Spring.GetViewGeometry() @@ -2590,8 +2590,8 @@ function init() onchange = function(i, value) Spring.SetConfigInt('SelectedScreenMode', value) - if WG['screenMode'] then - WG['screenMode'].SetScreenMode(value+screenmodeOffset) + if WG.screenMode then + WG.screenMode .SetScreenMode(value+screenmodeOffset) currentDisplay = 1 local v_sx, v_sy, v_px, v_py = Spring.GetViewGeometry() for index, display in ipairs(displays) do @@ -2786,10 +2786,10 @@ function init() saveOptionValue('SSAO', 'ssao', 'setStrength', { 'strength' }, value) end, }, - { id = "ssao_quality", group = "gfx", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.ssao_quality'), type = "select", options = { Spring.I18N('ui.settings.option.select_low'), Spring.I18N('ui.settings.option.select_medium'), Spring.I18N('ui.settings.option.select_high')}, value = (WG['ssao'] ~= nil and WG['ssao'].getPreset() or 2), description = Spring.I18N('ui.settings.option.ssao_quality_descr'), + { id = "ssao_quality", group = "gfx", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.ssao_quality'), type = "select", options = { Spring.I18N('ui.settings.option.select_low'), Spring.I18N('ui.settings.option.select_medium'), Spring.I18N('ui.settings.option.select_high')}, value = (WG.ssao ~= nil and WG.ssao .getPreset() or 2), description = Spring.I18N('ui.settings.option.ssao_quality_descr'), onload = function(i) - if widgetHandler.configData["SSAO"] ~= nil and widgetHandler.configData["SSAO"].preset ~= nil then - options[getOptionByID('ssao_quality')].value = widgetHandler.configData["SSAO"].preset + if widgetHandler.configData.SSAO ~= nil and widgetHandler.configData.SSAO .preset ~= nil then + options[getOptionByID('ssao_quality')].value = widgetHandler.configData.SSAO .preset end end, onchange = function(i, value) @@ -2806,7 +2806,7 @@ function init() saveOptionValue('Bloom Shader Deferred', 'bloomdeferred', 'setBrightness', { 'glowAmplifier' }, value) end, }, - { id = "bloomdeferred_quality", group = "gfx", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.bloomdeferred_quality'), type = "select", options = { Spring.I18N('ui.settings.option.select_low'), Spring.I18N('ui.settings.option.select_medium'), Spring.I18N('ui.settings.option.select_high')}, value = (WG['bloomdeferred'] ~= nil and WG['bloomdeferred'].getPreset() or 2), description = Spring.I18N('ui.settings.option.bloomdeferred_quality_descr'), + { id = "bloomdeferred_quality", group = "gfx", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.bloomdeferred_quality'), type = "select", options = { Spring.I18N('ui.settings.option.select_low'), Spring.I18N('ui.settings.option.select_medium'), Spring.I18N('ui.settings.option.select_high')}, value = (WG.bloomdeferred ~= nil and WG.bloomdeferred .getPreset() or 2), description = Spring.I18N('ui.settings.option.bloomdeferred_quality_descr'), onload = function(i) if widgetHandler.configData["Bloom Shader Deferred"] ~= nil and widgetHandler.configData["Bloom Shader Deferred"].preset ~= nil then options[getOptionByID('bloomdeferred_quality')].value = widgetHandler.configData["Bloom Shader Deferred"].preset @@ -2893,7 +2893,7 @@ function init() end, }, - { id = "losopacity", group = "gfx", category = types.advanced, name = Spring.I18N('ui.settings.option.lineofsight')..widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.losopacity'), type = "slider", min = 0.01, max = 1, step = 0.01, value = (WG['los'] ~= nil and WG['los'].getOpacity ~= nil and WG['los'].getOpacity()) or 1, description = '', + { id = "losopacity", group = "gfx", category = types.advanced, name = Spring.I18N('ui.settings.option.lineofsight')..widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.losopacity'), type = "slider", min = 0.01, max = 1, step = 0.01, value = (WG.los ~= nil and WG.los .getOpacity ~= nil and WG.los .getOpacity()) or 1, description = '', onload = function(i) loadWidgetData("LOS colors", "losopacity", { 'opacity' }) end, @@ -3106,7 +3106,7 @@ function init() -- Spring.SetConfigInt("snd_volunitreply", value) -- end, --}, - { id = "console_chatvolume", group = "sound", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.console_chatvolume'), type = "slider", min = 0, max = 1, step = 0.01, value = (WG['chat'] ~= nil and WG['chat'].getChatVolume() or 0), description = Spring.I18N('ui.settings.option.console_chatvolume_descr'), + { id = "console_chatvolume", group = "sound", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.console_chatvolume'), type = "slider", min = 0, max = 1, step = 0.01, value = (WG.chat ~= nil and WG.chat .getChatVolume() or 0), description = Spring.I18N('ui.settings.option.console_chatvolume_descr'), onload = function(i) loadWidgetData("Chat", "console_chatvolume", { 'sndChatFileVolume' }) end, @@ -3114,7 +3114,7 @@ function init() saveOptionValue('Chat', 'chat', 'setChatVolume', { 'sndChatFileVolume' }, value) end, }, - { id = "mapmarkvolume", group = "sound", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.console_mapmarkvolume'), type = "slider", min = 0, max = 1, step = 0.01, value = (WG['mapmarkping'] ~= nil and WG['mapmarkping'].getMapmarkVolume() or 0.6), description = Spring.I18N('ui.settings.option.console_mapmarkvolume_descr'), + { id = "mapmarkvolume", group = "sound", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.console_mapmarkvolume'), type = "slider", min = 0, max = 1, step = 0.01, value = (WG.mapmarkping ~= nil and WG.mapmarkping .getMapmarkVolume() or 0.6), description = Spring.I18N('ui.settings.option.console_mapmarkvolume_descr'), onload = function(i) loadWidgetData("Chat", "mapmarkvolume", { 'volume' }) end, @@ -3126,8 +3126,8 @@ function init() onload = function(i) end, onchange = function(i, value) - if WG['music'] and WG['music'].SetMusicVolume then - WG['music'].SetMusicVolume(value) + if WG.music and WG.music .SetMusicVolume then + WG.music .SetMusicVolume(value) else Spring.SetConfigInt("snd_volmusic", value) end @@ -3169,8 +3169,8 @@ function init() { id = "soundtrackNew", group = "sound", category = types.basic, name = Spring.I18N('ui.settings.option.soundtracknew'), type = "bool", value = Spring.GetConfigInt('UseSoundtrackNew', 1) == 1, description = Spring.I18N('ui.settings.option.soundtracknew_descr'), onchange = function(i, value) Spring.SetConfigInt('UseSoundtrackNew', value and 1 or 0) - if WG['music'] and WG['music'].RefreshTrackList then - WG['music'].RefreshTrackList() + if WG.music and WG.music .RefreshTrackList then + WG.music .RefreshTrackList() init() end end @@ -3178,8 +3178,8 @@ function init() { id = "soundtrackRaptors", group = "sound", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.soundtrackraptors'), type = "bool", value = Spring.GetConfigInt('UseSoundtrackRaptors', 0) == 1, description = Spring.I18N('ui.settings.option.soundtrackraptors_descr'), onchange = function(i, value) Spring.SetConfigInt('UseSoundtrackRaptors', value and 1 or 0) - if WG['music'] and WG['music'].RefreshTrackList then - WG['music'].RefreshTrackList() + if WG.music and WG.music .RefreshTrackList then + WG.music .RefreshTrackList() init() end end @@ -3187,8 +3187,8 @@ function init() { id = "soundtrackScavengers", group = "sound", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.soundtrackscavengers'), type = "bool", value = Spring.GetConfigInt('UseSoundtrackScavengers', 0) == 1, description = Spring.I18N('ui.settings.option.soundtrackscavengers_descr'), onchange = function(i, value) Spring.SetConfigInt('UseSoundtrackScavengers', value and 1 or 0) - if WG['music'] and WG['music'].RefreshTrackList then - WG['music'].RefreshTrackList() + if WG.music and WG.music .RefreshTrackList then + WG.music .RefreshTrackList() init() end end @@ -3196,8 +3196,8 @@ function init() { id = "soundtrackAprilFools", group = "sound", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.soundtrackaprilfools'), type = "bool", value = Spring.GetConfigInt('UseSoundtrackAprilFools', 1) == 1, description = Spring.I18N('ui.settings.option.soundtrackaprilfools_descr'), onchange = function(i, value) Spring.SetConfigInt('UseSoundtrackAprilFools', value and 1 or 0) - if WG['music'] and WG['music'].RefreshTrackList then - WG['music'].RefreshTrackList() + if WG.music and WG.music .RefreshTrackList then + WG.music .RefreshTrackList() init() end end @@ -3205,8 +3205,8 @@ function init() { id = "soundtrackAprilFoolsPostEvent", group = "sound", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.soundtrackaprilfoolspostevent'), type = "bool", value = Spring.GetConfigInt('UseSoundtrackAprilFoolsPostEvent', 0) == 1, description = Spring.I18N('ui.settings.option.soundtrackaprilfoolspostevent_descr'), onchange = function(i, value) Spring.SetConfigInt('UseSoundtrackAprilFoolsPostEvent', value and 1 or 0) - if WG['music'] and WG['music'].RefreshTrackList then - WG['music'].RefreshTrackList() + if WG.music and WG.music .RefreshTrackList then + WG.music .RefreshTrackList() init() end end @@ -3214,8 +3214,8 @@ function init() { id = "soundtrackHalloween", group = "sound", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.soundtrackhalloween'), type = "bool", value = Spring.GetConfigInt('UseSoundtrackHalloween', 1) == 1, description = Spring.I18N('ui.settings.option.soundtrackhalloween_descr'), onchange = function(i, value) Spring.SetConfigInt('UseSoundtrackHalloween', value and 1 or 0) - if WG['music'] and WG['music'].RefreshTrackList then - WG['music'].RefreshTrackList() + if WG.music and WG.music .RefreshTrackList then + WG.music .RefreshTrackList() init() end end @@ -3223,8 +3223,8 @@ function init() { id = "soundtrackHalloweenPostEvent", group = "sound", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.soundtrackhalloweenpostevent'), type = "bool", value = Spring.GetConfigInt('UseSoundtrackHalloweenPostEvent', 0) == 1, description = Spring.I18N('ui.settings.option.soundtrackhalloweenpostevent_descr'), onchange = function(i, value) Spring.SetConfigInt('UseSoundtrackHalloweenPostEvent', value and 1 or 0) - if WG['music'] and WG['music'].RefreshTrackList then - WG['music'].RefreshTrackList() + if WG.music and WG.music .RefreshTrackList then + WG.music .RefreshTrackList() init() end end @@ -3232,8 +3232,8 @@ function init() { id = "soundtrackXmas", group = "sound", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.soundtrackxmas'), type = "bool", value = Spring.GetConfigInt('UseSoundtrackXmas', 1) == 1, description = Spring.I18N('ui.settings.option.soundtrackxmas_descr'), onchange = function(i, value) Spring.SetConfigInt('UseSoundtrackXmas', value and 1 or 0) - if WG['music'] and WG['music'].RefreshTrackList then - WG['music'].RefreshTrackList() + if WG.music and WG.music .RefreshTrackList then + WG.music .RefreshTrackList() init() end end @@ -3241,8 +3241,8 @@ function init() { id = "soundtrackXmasPostEvent", group = "sound", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.soundtrackxmaspostevent'), type = "bool", value = Spring.GetConfigInt('UseSoundtrackXmasPostEvent', 0) == 1, description = Spring.I18N('ui.settings.option.soundtrackxmaspostevent_descr'), onchange = function(i, value) Spring.SetConfigInt('UseSoundtrackXmasPostEvent', value and 1 or 0) - if WG['music'] and WG['music'].RefreshTrackList then - WG['music'].RefreshTrackList() + if WG.music and WG.music .RefreshTrackList then + WG.music .RefreshTrackList() init() end end @@ -3250,8 +3250,8 @@ function init() { id = "soundtrackCustom", group = "sound", category = types.advanced, name = Spring.I18N('ui.settings.option.soundtrackcustom'), type = "bool", value = Spring.GetConfigInt('UseSoundtrackCustom', 1) == 1, description = Spring.I18N('ui.settings.option.soundtrackcustom_descr'), onchange = function(i, value) Spring.SetConfigInt('UseSoundtrackCustom', value and 1 or 0) - if WG['music'] and WG['music'].RefreshTrackList then - WG['music'].RefreshTrackList() + if WG.music and WG.music .RefreshTrackList then + WG.music .RefreshTrackList() init() end end @@ -3259,16 +3259,16 @@ function init() { id = "soundtrackInterruption", group = "sound", category = types.basic, name = Spring.I18N('ui.settings.option.soundtrackinterruption'), type = "bool", value = Spring.GetConfigInt('UseSoundtrackInterruption', 1) == 1, description = Spring.I18N('ui.settings.option.soundtrackinterruption_descr'), onchange = function(i, value) Spring.SetConfigInt('UseSoundtrackInterruption', value and 1 or 0) - if WG['music'] and WG['music'].RefreshSettings then - WG['music'].RefreshSettings() + if WG.music and WG.music .RefreshSettings then + WG.music .RefreshSettings() end end }, { id = "soundtrackFades", group = "sound", category = types.basic, name = Spring.I18N('ui.settings.option.soundtrackfades'), type = "bool", value = Spring.GetConfigInt('UseSoundtrackFades', 1) == 1, description = Spring.I18N('ui.settings.option.soundtrackfades_descr'), onchange = function(i, value) Spring.SetConfigInt('UseSoundtrackFades', value and 1 or 0) - if WG['music'] and WG['music'].RefreshSettings then - WG['music'].RefreshSettings() + if WG.music and WG.music .RefreshSettings then + WG.music .RefreshSettings() end end }, @@ -3284,7 +3284,7 @@ function init() end, onchange = function(i, value) Spring.SetConfigString("voiceset", options[i].options[options[i].value]) - if widgetHandler.orderList["Notifications"] ~= nil then + if widgetHandler.orderList.Notifications ~= nil then widgetHandler:DisableWidget("Notifications") widgetHandler:EnableWidget("Notifications") init() @@ -3300,7 +3300,7 @@ function init() -- saveOptionValue('Notifications', 'notifications', 'setTutorial', { 'tutorialMode' }, value) -- end, --}, - { id = "notifications_messages", group = "notif", name = Spring.I18N('ui.settings.option.notifications_messages'), category = types.basic, type = "bool", value = (WG['notifications'] ~= nil and WG['notifications'].getMessages()), description = Spring.I18N('ui.settings.option.notifications_messages_descr'), + { id = "notifications_messages", group = "notif", name = Spring.I18N('ui.settings.option.notifications_messages'), category = types.basic, type = "bool", value = (WG.notifications ~= nil and WG.notifications .getMessages()), description = Spring.I18N('ui.settings.option.notifications_messages_descr'), onload = function(i) loadWidgetData("Notifications", "notifications_messages", { 'displayMessages' }) end, @@ -3308,7 +3308,7 @@ function init() saveOptionValue('Notifications', 'notifications', 'setMessages', { 'displayMessages' }, value) end, }, - { id = "notifications_spoken", group = "notif", name = Spring.I18N('ui.settings.option.notifications_spoken'), category = types.basic, type = "bool", value = (WG['notifications'] ~= nil and WG['notifications'].getSpoken()), description = Spring.I18N('ui.settings.option.notifications_spoken_descr'), + { id = "notifications_spoken", group = "notif", name = Spring.I18N('ui.settings.option.notifications_spoken'), category = types.basic, type = "bool", value = (WG.notifications ~= nil and WG.notifications .getSpoken()), description = Spring.I18N('ui.settings.option.notifications_spoken_descr'), onload = function(i) loadWidgetData("Notifications", "notifications_spoken", { 'spoken' }) end, @@ -3369,8 +3369,8 @@ function init() end, onchange = function(_, value) Spring.SetConfigString("KeyboardLayout", keyLayouts.layouts[value]) - if WG['bar_hotkeys'] and WG['bar_hotkeys'].reloadBindings then - WG['bar_hotkeys'].reloadBindings() + if WG.bar_hotkeys and WG.bar_hotkeys .reloadBindings then + WG.bar_hotkeys .reloadBindings() end end, }, @@ -3400,7 +3400,7 @@ function init() return end - local isCustom = keyLayouts.keybindingPresets["Custom"] == keyFile + local isCustom = keyLayouts.keybindingPresets.Custom == keyFile if isCustom and not VFS.FileExists(keyFile) then Spring.SendCommands("keysave " .. keyFile) @@ -3424,8 +3424,8 @@ function init() widgetHandler:EnableWidget('Build menu') end - if WG['bar_hotkeys'] and WG['bar_hotkeys'].reloadBindings then - WG['bar_hotkeys'].reloadBindings() + if WG.bar_hotkeys and WG.bar_hotkeys .reloadBindings then + WG.bar_hotkeys .reloadBindings() end init() end, @@ -3443,21 +3443,21 @@ function init() init() end, }, - { id = "gridmenu_alwaysreturn", group = "control", category = types.advanced, name = Spring.I18N('ui.settings.option.gridmenu_alwaysreturn'), type = "bool", value = (WG['gridmenu'] ~= nil and WG['gridmenu'].getAlwaysReturn ~= nil and WG['gridmenu'].getAlwaysReturn()), description = Spring.I18N('ui.settings.option.gridmenu_alwaysreturn_descr'), + { id = "gridmenu_alwaysreturn", group = "control", category = types.advanced, name = Spring.I18N('ui.settings.option.gridmenu_alwaysreturn'), type = "bool", value = (WG.gridmenu ~= nil and WG.gridmenu .getAlwaysReturn ~= nil and WG.gridmenu .getAlwaysReturn()), description = Spring.I18N('ui.settings.option.gridmenu_alwaysreturn_descr'), onload = function() end, onchange = function(_, value) saveOptionValue('Grid menu', 'gridmenu', 'setAlwaysReturn', { 'alwaysReturn' }, value) end, }, - { id = "gridmenu_autoselectfirst", group = "control", category = types.advanced, name = Spring.I18N('ui.settings.option.gridmenu_autoselectfirst'), type = "bool", value = (WG['gridmenu'] ~= nil and WG['gridmenu'].getAutoSelectFirst ~= nil and WG['gridmenu'].getAutoSelectFirst()), description = Spring.I18N('ui.settings.option.gridmenu_autoselectfirst_descr'), + { id = "gridmenu_autoselectfirst", group = "control", category = types.advanced, name = Spring.I18N('ui.settings.option.gridmenu_autoselectfirst'), type = "bool", value = (WG.gridmenu ~= nil and WG.gridmenu .getAutoSelectFirst ~= nil and WG.gridmenu .getAutoSelectFirst()), description = Spring.I18N('ui.settings.option.gridmenu_autoselectfirst_descr'), onload = function() end, onchange = function(_, value) saveOptionValue('Grid menu', 'gridmenu', 'setAutoSelectFirst', { 'autoSelectFirst' }, value) end, }, - { id = "gridmenu_labbuildmode", group = "control", category = types.advanced, name = Spring.I18N('ui.settings.option.gridmenu_labbuildmode'), type = "bool", value = (WG['gridmenu'] ~= nil and WG['gridmenu'].getUseLabBuildMode ~= nil and WG['gridmenu'].getUseLabBuildMode()), description = Spring.I18N('ui.settings.option.gridmenu_labbuildmode_descr'), + { id = "gridmenu_labbuildmode", group = "control", category = types.advanced, name = Spring.I18N('ui.settings.option.gridmenu_labbuildmode'), type = "bool", value = (WG.gridmenu ~= nil and WG.gridmenu .getUseLabBuildMode ~= nil and WG.gridmenu .getUseLabBuildMode()), description = Spring.I18N('ui.settings.option.gridmenu_labbuildmode_descr'), onload = function() end, onchange = function(_, value) @@ -3465,14 +3465,14 @@ function init() end, }, - { id = "gridmenu_ctrlkeymodifier", group = "control", category = types.advanced, name = Spring.I18N('ui.settings.option.gridmenu_ctrlkeymodifier'), type = "slider", min = -20, max = 100, step = 1, value = (WG['gridmenu'] ~= nil and WG['gridmenu'].getCtrlKeyModifier ~= nil and WG['gridmenu'].getCtrlKeyModifier()), description = Spring.I18N('ui.settings.option.gridmenu_ctrlkeymodifier_descr'), + { id = "gridmenu_ctrlkeymodifier", group = "control", category = types.advanced, name = Spring.I18N('ui.settings.option.gridmenu_ctrlkeymodifier'), type = "slider", min = -20, max = 100, step = 1, value = (WG.gridmenu ~= nil and WG.gridmenu .getCtrlKeyModifier ~= nil and WG.gridmenu .getCtrlKeyModifier()), description = Spring.I18N('ui.settings.option.gridmenu_ctrlkeymodifier_descr'), onload = function() end, onchange = function(_, value) saveOptionValue('Grid menu', 'gridmenu', 'setCtrlKeyModifier', { 'ctrlKeyModifier' }, value) end, }, - { id = "gridmenu_shiftkeymodifier", group = "control", category = types.advanced, name = Spring.I18N('ui.settings.option.gridmenu_shiftkeymodifier'), type = "slider", min = -20, max = 100, step = 1, value = (WG['gridmenu'] ~= nil and WG['gridmenu'].getShiftKeyModifier ~= nil and WG['gridmenu'].getShiftKeyModifier()), description = Spring.I18N('ui.settings.option.gridmenu_shiftkeymodifier_descr'), + { id = "gridmenu_shiftkeymodifier", group = "control", category = types.advanced, name = Spring.I18N('ui.settings.option.gridmenu_shiftkeymodifier'), type = "slider", min = -20, max = 100, step = 1, value = (WG.gridmenu ~= nil and WG.gridmenu .getShiftKeyModifier ~= nil and WG.gridmenu .getShiftKeyModifier()), description = Spring.I18N('ui.settings.option.gridmenu_shiftkeymodifier_descr'), onload = function() end, onchange = function(_, value) @@ -3493,18 +3493,18 @@ function init() }, { id = "setcamera_bugfix", group = "control", category = types.advanced, name = Spring.I18N('ui.settings.option.setcamera_bugfix'), type = "bool", value = true, description = Spring.I18N('ui.settings.option.setcamera_bugfix_descr'), onload = function(i) - WG['setcamera_bugfix'] = true + WG.setcamera_bugfix = true end, onchange = function(i, value) - WG['setcamera_bugfix'] = value + WG.setcamera_bugfix = value end, }, { id = "cursorsize", group = "control", category = types.basic, name = Spring.I18N('ui.settings.option.cursorsize'), type = "slider", min = 0.3, max = 1.7, step = 0.1, value = 1, description = Spring.I18N('ui.settings.option.cursorsize_descr'), onload = function(i) end, onchange = function(i, value) - if WG['cursors'] then - WG['cursors'].setsizemult(value) + if WG.cursors then + WG.cursors .setsizemult(value) end end, }, @@ -3711,7 +3711,7 @@ function init() end, }, - { id = "allyselunits_select", group = "control", category = types.advanced, name = widgetOptionColor .. " " ..Spring.I18N('ui.settings.option.allyselunits_select'), type = "bool", value = (WG['allyselectedunits'] ~= nil and WG['allyselectedunits'].getSelectPlayerUnits()), description = Spring.I18N('ui.settings.option.allyselunits_select_descr'), + { id = "allyselunits_select", group = "control", category = types.advanced, name = widgetOptionColor .. " " ..Spring.I18N('ui.settings.option.allyselunits_select'), type = "bool", value = (WG.allyselectedunits ~= nil and WG.allyselectedunits .getSelectPlayerUnits()), description = Spring.I18N('ui.settings.option.allyselunits_select_descr'), onload = function(i) loadWidgetData("Ally Selected Units", "allyselunits_select", { 'selectPlayerUnits' }) end, @@ -3752,8 +3752,8 @@ function init() { id = "language", group = "ui", category = types.basic, name = Spring.I18N('ui.settings.option.language'), type = "select", options = languageNames, value = languageCodes[Spring.I18N.getLocale()], onchange = function(i, value) local language = languageCodes[value] - WG['language'].setLanguage(language) - if widgetHandler.orderList["Notifications"] ~= nil then + WG.language .setLanguage(language) + if widgetHandler.orderList.Notifications ~= nil then widgetHandler:DisableWidget("Notifications") widgetHandler:EnableWidget("Notifications") init() @@ -3762,7 +3762,7 @@ function init() }, { id = "language_english_unit_names", group = "ui", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.language_english_unit_names'), type = "bool", value = Spring.GetConfigInt("language_english_unit_names", 0) == 1, onchange = function(i, value) - WG['language'].setEnglishUnitNames(value) + WG.language .setEnglishUnitNames(value) end, }, { id = "uiscale", group = "ui", category = types.basic, name = Spring.I18N('ui.settings.option.interface') .. widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.uiscale'), type = "slider", min = 0.8, max = 1.3, step = 0.01, value = Spring.GetConfigFloat("ui_scale", 1), description = '', @@ -3829,8 +3829,8 @@ function init() { id = "minimapleftclick", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.minimapleftclick'), type = "bool", value = Spring.GetConfigInt("MinimapLeftClickMove", 1) == 1, description = Spring.I18N('ui.settings.option.minimapleftclick_descr'), onchange = function(i, value) Spring.SetConfigInt("MinimapLeftClickMove", value and 1 or 0) - if WG['minimap'] and WG['minimap'].setLeftClickMove then - WG['minimap'].setLeftClickMove(value) + if WG.minimap and WG.minimap .setLeftClickMove then + WG.minimap .setLeftClickMove(value) end end, }, @@ -3840,8 +3840,8 @@ function init() onchange = function(i, value) Spring.SetConfigFloat("MinimapIconScale", value) Spring.SendCommands("minimap unitsize " .. value) -- spring wont remember what you set with '/minimap iconssize #' - if WG['minimap'] and WG['minimap'].setBaseIconScale then - WG['minimap'].setBaseIconScale(value) + if WG.minimap and WG.minimap .setBaseIconScale then + WG.minimap .setBaseIconScale(value) end end, }, @@ -3859,7 +3859,7 @@ function init() end end, onchange = function(i, value) - if WG['minimaprotationmanager'] ~= nil and WG['minimaprotationmanager'].setMode ~= nil then + if WG.minimaprotationmanager ~= nil and WG.minimaprotationmanager .setMode ~= nil then saveOptionValue("Minimap Rotation Manager", "minimaprotationmanager", "setMode", { 'mode' }, value) else widgetHandler:EnableWidget("Minimap Rotation Manager") -- Widget has auto sync @@ -3902,13 +3902,13 @@ function init() -- }, { id = "pip_engine_fallback_threshold", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.pip_engine_fallback_threshold'), type = "slider", min = 1500, max = 5000, step = 100, value = 4000, description = Spring.I18N('ui.settings.option.pip_engine_fallback_threshold_descr'), onload = function(i) - if WG['minimap'] and WG['minimap'].getEngineMinimapFallbackThreshold then - options[getOptionByID('pip_engine_fallback_threshold')].value = WG['minimap'].getEngineMinimapFallbackThreshold() + if WG.minimap and WG.minimap .getEngineMinimapFallbackThreshold then + options[getOptionByID('pip_engine_fallback_threshold')].value = WG.minimap .getEngineMinimapFallbackThreshold() end end, onchange = function(i, value) - if WG['minimap'] and WG['minimap'].setEngineMinimapFallbackThreshold then - WG['minimap'].setEngineMinimapFallbackThreshold(value) + if WG.minimap and WG.minimap .setEngineMinimapFallbackThreshold then + WG.minimap .setEngineMinimapFallbackThreshold(value) end end, }, @@ -3917,7 +3917,7 @@ function init() { id = "pip", group = "ui", category = types.advanced, widget = "Picture-in-Picture", name = Spring.I18N('ui.settings.option.pip'), type = "bool", value = GetWidgetToggleValue("Picture-in-Picture"), description = Spring.I18N('ui.settings.option.pip_descr') }, { id = "pip2", group = "ui", category = types.advanced, widget = "Picture-in-Picture 2", name = Spring.I18N('ui.settings.option.pip2'), type = "bool", value = GetWidgetToggleValue("Picture-in-Picture 2"), description = Spring.I18N('ui.settings.option.pip2_descr') }, - { id = "buildmenu_bottom", group = "ui", category = types.basic, name = Spring.I18N('ui.settings.option.buildmenu') ..widgetOptionColor.. " " .. Spring.I18N('ui.settings.option.buildmenu_bottom'), type = "bool", value = (WG['buildmenu'] ~= nil and WG['buildmenu'].getBottomPosition ~= nil and WG['buildmenu'].getBottomPosition()), description = Spring.I18N('ui.settings.option.buildmenu_bottom_descr'), + { id = "buildmenu_bottom", group = "ui", category = types.basic, name = Spring.I18N('ui.settings.option.buildmenu') ..widgetOptionColor.. " " .. Spring.I18N('ui.settings.option.buildmenu_bottom'), type = "bool", value = (WG.buildmenu ~= nil and WG.buildmenu .getBottomPosition ~= nil and WG.buildmenu .getBottomPosition()), description = Spring.I18N('ui.settings.option.buildmenu_bottom_descr'), onload = function(i) end, onchange = function(i, value) @@ -3933,7 +3933,7 @@ function init() saveOptionValue('Build menu', 'buildmenu', 'setMaxPosY', { 'maxPosY' }, value) end, }, - { id = "buildmenu_alwaysshow", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.buildmenu_alwaysshow'), type = "bool", value = (WG['buildmenu'] ~= nil and WG['buildmenu'].getAlwaysShow ~= nil and WG['buildmenu'].getAlwaysShow()), description = Spring.I18N('ui.settings.option.buildmenu_alwaysshow_descr'), + { id = "buildmenu_alwaysshow", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.buildmenu_alwaysshow'), type = "bool", value = (WG.buildmenu ~= nil and WG.buildmenu .getAlwaysShow ~= nil and WG.buildmenu .getAlwaysShow()), description = Spring.I18N('ui.settings.option.buildmenu_alwaysshow_descr'), onload = function(i) end, onchange = function(i, value) @@ -3941,7 +3941,7 @@ function init() saveOptionValue('Grid menu', 'buildmenu', 'setAlwaysShow', { 'alwaysShow' }, value) end, }, - { id = "buildmenu_prices", group = "ui", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.buildmenu_prices'), type = "bool", value = (WG['buildmenu'] ~= nil and WG['buildmenu'].getShowPrice ~= nil and WG['buildmenu'].getShowPrice()), description = Spring.I18N('ui.settings.option.buildmenu_prices_descr'), + { id = "buildmenu_prices", group = "ui", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.buildmenu_prices'), type = "bool", value = (WG.buildmenu ~= nil and WG.buildmenu .getShowPrice ~= nil and WG.buildmenu .getShowPrice()), description = Spring.I18N('ui.settings.option.buildmenu_prices_descr'), onload = function(i) end, onchange = function(i, value) @@ -3949,7 +3949,7 @@ function init() saveOptionValue('Grid menu', 'buildmenu', 'setShowPrice', { 'showPrice' }, value) end, }, - { id = "buildmenu_groupicon", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.buildmenu_groupicon'), type = "bool", value = (WG['buildmenu'] ~= nil and WG['buildmenu'].getShowGroupIcon ~= nil and WG['buildmenu'].getShowGroupIcon()), description = Spring.I18N('ui.settings.option.buildmenu_groupicon_descr'), + { id = "buildmenu_groupicon", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.buildmenu_groupicon'), type = "bool", value = (WG.buildmenu ~= nil and WG.buildmenu .getShowGroupIcon ~= nil and WG.buildmenu .getShowGroupIcon()), description = Spring.I18N('ui.settings.option.buildmenu_groupicon_descr'), onload = function(i) end, onchange = function(i, value) @@ -3957,7 +3957,7 @@ function init() saveOptionValue('Grid menu', 'buildmenu', 'setShowGroupIcon', { 'showGroupIcon' }, value) end, }, - { id = "buildmenu_radaricon", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.buildmenu_radaricon'), type = "bool", value = (WG['buildmenu'] ~= nil and WG['buildmenu'].getShowRadarIcon ~= nil and WG['buildmenu'].getShowRadarIcon()), description = Spring.I18N('ui.settings.option.buildmenu_radaricon_descr'), + { id = "buildmenu_radaricon", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.buildmenu_radaricon'), type = "bool", value = (WG.buildmenu ~= nil and WG.buildmenu .getShowRadarIcon ~= nil and WG.buildmenu .getShowRadarIcon()), description = Spring.I18N('ui.settings.option.buildmenu_radaricon_descr'), onload = function(i) end, onchange = function(i, value) @@ -3966,7 +3966,7 @@ function init() end, }, - { id = "ordermenu_bottompos", group = "ui", category = types.basic, name = Spring.I18N('ui.settings.option.ordermenu')..widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.ordermenu_bottompos'), type = "bool", value = (WG['ordermenu'] ~= nil and WG['ordermenu'].getBottomPosition ~= nil and WG['ordermenu'].getBottomPosition()), description = Spring.I18N('ui.settings.option.ordermenu_bottompos_descr'), + { id = "ordermenu_bottompos", group = "ui", category = types.basic, name = Spring.I18N('ui.settings.option.ordermenu')..widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.ordermenu_bottompos'), type = "bool", value = (WG.ordermenu ~= nil and WG.ordermenu .getBottomPosition ~= nil and WG.ordermenu .getBottomPosition()), description = Spring.I18N('ui.settings.option.ordermenu_bottompos_descr'), onload = function(i) end, onchange = function(i, value) @@ -3981,14 +3981,14 @@ function init() saveOptionValue('Order menu', 'ordermenu', 'setColorize', { 'colorize' }, value) end, }, - { id = "ordermenu_alwaysshow", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.ordermenu_alwaysshow'), type = "bool", value = (WG['ordermenu'] ~= nil and WG['ordermenu'].getAlwaysShow ~= nil and WG['ordermenu'].getAlwaysShow()), description = Spring.I18N('ui.settings.option.ordermenu_alwaysshow_descr'), + { id = "ordermenu_alwaysshow", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.ordermenu_alwaysshow'), type = "bool", value = (WG.ordermenu ~= nil and WG.ordermenu .getAlwaysShow ~= nil and WG.ordermenu .getAlwaysShow()), description = Spring.I18N('ui.settings.option.ordermenu_alwaysshow_descr'), onload = function(i) end, onchange = function(i, value) saveOptionValue('Order menu', 'ordermenu', 'setAlwaysShow', { 'alwaysShow' }, value) end, }, - { id = "ordermenu_hideset", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.ordermenu_hideset'), type = "bool", value = (WG['ordermenu'] ~= nil and WG['ordermenu'].getDisabledCmd ~= nil and WG['ordermenu'].getDisabledCmd('Move')), description = Spring.I18N('ui.settings.option.ordermenu_hideset_descr'), + { id = "ordermenu_hideset", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.ordermenu_hideset'), type = "bool", value = (WG.ordermenu ~= nil and WG.ordermenu .getDisabledCmd ~= nil and WG.ordermenu .getDisabledCmd('Move')), description = Spring.I18N('ui.settings.option.ordermenu_hideset_descr'), onload = function(i) end, onchange = function(i, value) @@ -3999,21 +3999,21 @@ function init() end, }, - { id = "info_buildlist", group = "ui", category = types.advanced, name = Spring.I18N('ui.settings.option.info') .. widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.info_buildlist'), type = "bool", value = (WG['info'] and WG['info'].getShowBuilderBuildlist ~= nil and WG['info'].getShowBuilderBuildlist()), description = Spring.I18N('ui.settings.option.info_buildlist_descr'), + { id = "info_buildlist", group = "ui", category = types.advanced, name = Spring.I18N('ui.settings.option.info') .. widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.info_buildlist'), type = "bool", value = (WG.info and WG.info .getShowBuilderBuildlist ~= nil and WG.info .getShowBuilderBuildlist()), description = Spring.I18N('ui.settings.option.info_buildlist_descr'), onload = function(i) end, onchange = function(i, value) saveOptionValue('Info', 'info', 'setShowBuilderBuildlist', { 'showBuilderBuildlist' }, value) end, }, - { id = "info_mappos", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.info_mappos'), type = "bool", value = (WG['info'] and WG['info'].getDisplayMapPosition ~= nil and WG['info'].getDisplayMapPosition()), description = Spring.I18N('ui.settings.option.info_mappos_descr'), + { id = "info_mappos", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.info_mappos'), type = "bool", value = (WG.info and WG.info .getDisplayMapPosition ~= nil and WG.info .getDisplayMapPosition()), description = Spring.I18N('ui.settings.option.info_mappos_descr'), onload = function(i) end, onchange = function(i, value) saveOptionValue('Info', 'info', 'setDisplayMapPosition', { 'displayMapPosition' }, value) end, }, - { id = "info_alwaysshow", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.info_alwaysshow'), type = "bool", value = (WG['info'] ~= nil and WG['info'].getAlwaysShow ~= nil and WG['info'].getAlwaysShow()), + { id = "info_alwaysshow", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.info_alwaysshow'), type = "bool", value = (WG.info ~= nil and WG.info .getAlwaysShow ~= nil and WG.info .getAlwaysShow()), onload = function(i) end, onchange = function(i, value) @@ -4134,7 +4134,7 @@ function init() end, }, { id = "unittotals", group = "ui", category = types.advanced, widget = "AdvPlayersList Unit Totals", name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.unittotals'), type = "bool", value = GetWidgetToggleValue("AdvPlayersList Unit Totals"), description = Spring.I18N('ui.settings.option.unittotals_descr') }, - { id = "musicplayer", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. widgetOptionColor .. Spring.I18N('ui.settings.option.musicplayer'), type = "bool", value = (WG['music'] ~= nil and WG['music'].GetShowGui() or false), description = Spring.I18N('ui.settings.option.musicplayer_descr'), + { id = "musicplayer", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. widgetOptionColor .. Spring.I18N('ui.settings.option.musicplayer'), type = "bool", value = (WG.music ~= nil and WG.music .GetShowGui() or false), description = Spring.I18N('ui.settings.option.musicplayer_descr'), onload = function(i) loadWidgetData("AdvPlayersList Music Player New", "musicplayer", { 'showGUI' }) end, @@ -4144,7 +4144,7 @@ function init() }, { id = "mascot", group = "ui", category = types.advanced, widget = "AdvPlayersList Mascot", name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.mascot'), type = "bool", value = GetWidgetToggleValue("AdvPlayersList Mascot"), description = Spring.I18N('ui.settings.option.mascot_descr') }, - { id = "displayselectedname", group = "ui", category = types.advanced, name = Spring.I18N('ui.settings.option.displayselectedname'), type = "bool", value = (WG['playertv'] ~= nil and WG['playertv'].GetAlwaysDisplayName() or false), description = Spring.I18N('ui.settings.option.displayselectedname_descr'), + { id = "displayselectedname", group = "ui", category = types.advanced, name = Spring.I18N('ui.settings.option.displayselectedname'), type = "bool", value = (WG.playertv ~= nil and WG.playertv .GetAlwaysDisplayName() or false), description = Spring.I18N('ui.settings.option.displayselectedname_descr'), onload = function(i) loadWidgetData("Player-TV", "displayselectedname", { 'alwaysDisplayName' }) end, @@ -4153,7 +4153,7 @@ function init() end, }, - { id = "console_fontsize", group = "ui", category = types.basic, name = Spring.I18N('ui.settings.option.console') .. " " .. widgetOptionColor .. Spring.I18N('ui.settings.option.console_fontsize'), type = "slider", min = 0.92, max = 1.12, step = 0.02, value = (WG['chat'] ~= nil and WG['chat'].getFontsize() or 1), description = '', + { id = "console_fontsize", group = "ui", category = types.basic, name = Spring.I18N('ui.settings.option.console') .. " " .. widgetOptionColor .. Spring.I18N('ui.settings.option.console_fontsize'), type = "slider", min = 0.92, max = 1.12, step = 0.02, value = (WG.chat ~= nil and WG.chat .getFontsize() or 1), description = '', onload = function(i) loadWidgetData("Chat", "console_fontsize", { 'fontsizeMult' }) end, @@ -4161,7 +4161,7 @@ function init() saveOptionValue('Chat', 'chat', 'setFontsize', { 'fontsizeMult' }, value) end, }, - { id = "console_backgroundopacity", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.console_backgroundopacity'), type = "slider", min = 0, max = 0.45, step = 0.01, value = (WG['chat'] ~= nil and WG['chat'].getBackgroundOpacity() or 0), description = Spring.I18N('ui.settings.option.console_backgroundopacity_descr'), + { id = "console_backgroundopacity", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.console_backgroundopacity'), type = "slider", min = 0, max = 0.45, step = 0.01, value = (WG.chat ~= nil and WG.chat .getBackgroundOpacity() or 0), description = Spring.I18N('ui.settings.option.console_backgroundopacity_descr'), onload = function(i) loadWidgetData("Chat", "console_backgroundopacity", { 'chatBackgroundOpacity' }) end, @@ -4183,7 +4183,7 @@ function init() Spring.SetConfigInt("HideSpecChatPlayer", value and 1 or 0) end, }, - { id = "console_hide", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.console_hide'), type = "bool", value = (WG['chat'] ~= nil and WG['chat'].getHide() or false), description = Spring.I18N('ui.settings.option.console_hide_descr'), + { id = "console_hide", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.console_hide'), type = "bool", value = (WG.chat ~= nil and WG.chat .getHide() or false), description = Spring.I18N('ui.settings.option.console_hide_descr'), onload = function(i) loadWidgetData("Chat", "console_hide", { 'hide' }) end, @@ -4191,7 +4191,7 @@ function init() saveOptionValue('Chat', 'chat', 'setHide', { 'hide' }, value) end, }, - { id = "console_maxlines", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.console_maxlines'), type = "slider", min = 3, max = 7, step = 1, value = (WG['chat'] ~= nil and WG['chat'].getMaxLines() or 5), description = '', + { id = "console_maxlines", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.console_maxlines'), type = "slider", min = 3, max = 7, step = 1, value = (WG.chat ~= nil and WG.chat .getMaxLines() or 5), description = '', onload = function(i) loadWidgetData("Chat", "console_maxlines", { 'maxLines' }) end, @@ -4199,7 +4199,7 @@ function init() saveOptionValue('Chat', 'chat', 'setMaxLines', { 'maxLines' }, value) end, }, - { id = "console_maxconsolelines", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.console_maxconsolelines'), type = "slider", min = 2, max = 12, step = 1, value = (WG['chat'] ~= nil and WG['chat'].getMaxConsoleLines() or 2), description = '', + { id = "console_maxconsolelines", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.console_maxconsolelines'), type = "slider", min = 2, max = 12, step = 1, value = (WG.chat ~= nil and WG.chat .getMaxConsoleLines() or 2), description = '', onload = function(i) loadWidgetData("Chat", "console_maxconsolelines", { 'maxConsoleLines' }) end, @@ -4233,7 +4233,7 @@ function init() end, }, - { id = "topbar_hidebuttons", group = "ui", category = types.advanced, name = Spring.I18N('ui.settings.option.topbar')..widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.topbar_hidebuttons'), type = "bool", value = (WG['topbar'] ~= nil and WG['topbar'].getAutoHideButtons() or 0), + { id = "topbar_hidebuttons", group = "ui", category = types.advanced, name = Spring.I18N('ui.settings.option.topbar')..widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.topbar_hidebuttons'), type = "bool", value = (WG.topbar ~= nil and WG.topbar .getAutoHideButtons() or 0), onload = function(i) loadWidgetData("Top Bar", "topbar_hidebuttons", { 'autoHideButtons' }) end, @@ -4416,7 +4416,7 @@ function init() { id = "label_ui_info", group = "ui", name = Spring.I18N('ui.settings.option.label_info'), category = types.basic }, { id = "label_ui_info_spacer", group = "ui", category = types.basic }, - { id = "metalspots_values", group = "ui", category = types.advanced, name = Spring.I18N('ui.settings.option.metalspots')..widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.metalspots_values'), type = "bool", value = (WG['metalspots'] ~= nil and WG['metalspots'].getShowValue()), description = Spring.I18N('ui.settings.option.metalspots_values_descr'), + { id = "metalspots_values", group = "ui", category = types.advanced, name = Spring.I18N('ui.settings.option.metalspots')..widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.metalspots_values'), type = "bool", value = (WG.metalspots ~= nil and WG.metalspots .getShowValue()), description = Spring.I18N('ui.settings.option.metalspots_values_descr'), onload = function(i) loadWidgetData("Metalspots", "metalspots_values", { 'showValues' }) end, @@ -4446,7 +4446,7 @@ function init() saveOptionValue('Health Bars GL4', 'healthbars', 'setScale', { 'barScale' }, value) end, }, - { id = "healthbarsheight", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.healthbarsheight'), type = "slider", min = 0.7, max = 2, step = 0.1, value = (WG['healthbar'] ~= nil and WG['healthbar'].getHeight() or 0.9), description = '', + { id = "healthbarsheight", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.healthbarsheight'), type = "slider", min = 0.7, max = 2, step = 0.1, value = (WG.healthbar ~= nil and WG.healthbar .getHeight() or 0.9), description = '', onload = function(i) loadWidgetData("Health Bars GL4", "healthbarsheight", { 'barHeight' }) end, @@ -4456,7 +4456,7 @@ function init() widgetHandler:EnableWidget("Health Bars GL4") end, }, - { id = "healthbarsvariable", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.healthbarsvariable'), type = "bool", value = (WG['healthbar'] ~= nil and WG['healthbar'].getVariableSizes()), description = Spring.I18N('ui.settings.option.healthbarsvariable_descr'), + { id = "healthbarsvariable", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.healthbarsvariable'), type = "bool", value = (WG.healthbar ~= nil and WG.healthbar .getVariableSizes()), description = Spring.I18N('ui.settings.option.healthbarsvariable_descr'), onload = function(i) loadWidgetData("Health Bars GL4", "healthbarsvariable", { "variableBarSizes" }) end, @@ -4464,7 +4464,7 @@ function init() saveOptionValue("Health Bars GL4", "healthbars", "setVariableSizes", { "variableBarSizes" }, value) end, }, - { id = "healthbarswhenguihidden", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.healthbarswhenguihidden'), type = "bool", value = (WG['healthbar'] ~= nil and WG['healthbar'].getDrawWhenGuiHidden()), description = Spring.I18N('ui.settings.option.healthbarswhenguihidden_descr'), + { id = "healthbarswhenguihidden", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.healthbarswhenguihidden'), type = "bool", value = (WG.healthbar ~= nil and WG.healthbar .getDrawWhenGuiHidden()), description = Spring.I18N('ui.settings.option.healthbarswhenguihidden_descr'), onload = function(i) loadWidgetData("Health Bars GL4", "healthbarswhenguihidden", { "drawWhenGuiHidden" }) end, @@ -4473,14 +4473,14 @@ function init() end, }, { id = "rankicons", group = "ui", category = types.advanced, widget = "Rank Icons GL4", name = Spring.I18N('ui.settings.option.rankicons'), type = "bool", value = GetWidgetToggleValue("Rank Icons GL4"), description = Spring.I18N('ui.settings.option.rankicons_descr') }, - { id = "rankicons_distance", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.rankicons_distance'), type = "slider", min = 0.1, max = 1.5, step = 0.05, value = (WG['rankicons'] ~= nil and WG['rankicons'].getDrawDistance ~= nil and WG['rankicons'].getDrawDistance()), description = '', + { id = "rankicons_distance", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.rankicons_distance'), type = "slider", min = 0.1, max = 1.5, step = 0.05, value = (WG.rankicons ~= nil and WG.rankicons .getDrawDistance ~= nil and WG.rankicons .getDrawDistance()), description = '', onload = function(i) end, onchange = function(i, value) saveOptionValue('Rank Icons', 'rankicons', 'setDrawDistance', { 'distanceMult' }, value) end, }, - { id = "rankicons_scale", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.rankicons_scale'), type = "slider", min = 0.5, max = 2, step = 0.1, value = (WG['rankicons'] ~= nil and WG['rankicons'].getScale ~= nil and WG['rankicons'].getScale()), description = '', + { id = "rankicons_scale", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.rankicons_scale'), type = "slider", min = 0.5, max = 2, step = 0.1, value = (WG.rankicons ~= nil and WG.rankicons .getScale ~= nil and WG.rankicons .getScale()), description = '', onload = function(i) end, onchange = function(i, value) @@ -4648,7 +4648,7 @@ function init() }, { id = "buildinggrid", group = "ui", category = types.basic, widget = "Building Grid GL4", name = Spring.I18N('ui.settings.option.buildinggrid'), type = "bool", value = GetWidgetToggleValue("Building Grid GL4"), description = Spring.I18N('ui.settings.option.buildinggrid_descr') }, - { id = "buildinggridopacity", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.buildinggridopacity'), type = "slider", min = 0.3, max = 1, step = 0.05, value = (WG['buildinggrid'] ~= nil and WG['buildinggrid'].getOpacity ~= nil and WG['buildinggrid'].getOpacity()) or 1, description = '', + { id = "buildinggridopacity", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.buildinggridopacity'), type = "slider", min = 0.3, max = 1, step = 0.05, value = (WG.buildinggrid ~= nil and WG.buildinggrid .getOpacity ~= nil and WG.buildinggrid .getOpacity()) or 1, description = '', onload = function(i) loadWidgetData("Building Grid GL4", "buildinggridopacity", { 'opacity' }) end, @@ -4671,7 +4671,7 @@ function init() -- Radar range rings: { id = "radarrange", group = "ui", category = types.advanced, widget = "Sensor Ranges Radar", name = Spring.I18N('ui.settings.option.radarrange'), type = "bool", value = GetWidgetToggleValue("Sensor Ranges Radar"), description = Spring.I18N('ui.settings.option.radarrange_descr') }, - { id = "radarrangeopacity", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.radarrangeopacity'), type = "slider", min = 0.01, max = 0.33, step = 0.01, value = (WG['radarrange'] ~= nil and WG['radarrange'].getOpacity ~= nil and WG['radarrange'].getOpacity()) or 0.08, description = '', + { id = "radarrangeopacity", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.radarrangeopacity'), type = "slider", min = 0.01, max = 0.33, step = 0.01, value = (WG.radarrange ~= nil and WG.radarrange .getOpacity ~= nil and WG.radarrange .getOpacity()) or 0.08, description = '', onload = function(i) loadWidgetData("Sensor Ranges Radar", "radarrangeopacity", { 'opacity' }) end, @@ -4682,7 +4682,7 @@ function init() -- Sonar range { id = "sonarrange", group = "ui", category = types.advanced, widget = "Sensor Ranges Sonar", name = Spring.I18N('ui.settings.option.sonarrange'), type = "bool", value = GetWidgetToggleValue("Sensor Ranges Sonar"), description = Spring.I18N('ui.settings.option.sonarrange_descr') }, - { id = "sonarrangeopacity", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.sonarrangeopacity'), type = "slider", min = 0.01, max = 0.33, step = 0.01, value = (WG['sonarrange'] ~= nil and WG['sonarrange'].getOpacity ~= nil and WG['sonarrange'].getOpacity()) or 0.08, description = '', + { id = "sonarrangeopacity", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.sonarrangeopacity'), type = "slider", min = 0.01, max = 0.33, step = 0.01, value = (WG.sonarrange ~= nil and WG.sonarrange .getOpacity ~= nil and WG.sonarrange .getOpacity()) or 0.08, description = '', onload = function(i) loadWidgetData("Sensor Ranges Sonar", "sonarrangeopacity", { 'opacity' }) end, @@ -4693,7 +4693,7 @@ function init() -- Jammer range { id = "jammerrange", group = "ui", category = types.advanced, widget = "Sensor Ranges Jammer", name = Spring.I18N('ui.settings.option.jammerrange'), type = "bool", value = GetWidgetToggleValue("Sensor Ranges Jammer"), description = Spring.I18N('ui.settings.option.jammerrange_descr') }, - { id = "jammerrangeopacity", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.jammerrangeopacity'), type = "slider", min = 0.01, max = 0.66, step = 0.01, value = (WG['jammerrange'] ~= nil and WG['jammerrange'].getOpacity ~= nil and WG['jammerrange'].getOpacity()) or 0.08, description = '', + { id = "jammerrangeopacity", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.jammerrangeopacity'), type = "slider", min = 0.01, max = 0.66, step = 0.01, value = (WG.jammerrange ~= nil and WG.jammerrange .getOpacity ~= nil and WG.jammerrange .getOpacity()) or 0.08, description = '', onload = function(i) loadWidgetData("Sensor Ranges Jammer", "jammerrangeopacity", { 'opacity' }) end, @@ -4704,7 +4704,7 @@ function init() -- LOS Range: { id = "losrange", group = "ui", category = types.advanced, widget = "Sensor Ranges LOS", name = Spring.I18N('ui.settings.option.losrange'), type = "bool", value = GetWidgetToggleValue("Sensor Ranges LOS"), description = Spring.I18N('ui.settings.option.losrange_descr') }, - { id = "losrangeopacity", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.losrangeopacity'), type = "slider", min = 0.01, max = 0.33, step = 0.01, value = (WG['losrange'] ~= nil and WG['losrange'].getOpacity ~= nil and WG['losrange'].getOpacity()) or 0.08, description = '', + { id = "losrangeopacity", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.losrangeopacity'), type = "slider", min = 0.01, max = 0.33, step = 0.01, value = (WG.losrange ~= nil and WG.losrange .getOpacity ~= nil and WG.losrange .getOpacity()) or 0.08, description = '', onload = function(i) loadWidgetData("Sensor Ranges LOS", "losrangeopacity", { 'opacity' }) end, @@ -4712,7 +4712,7 @@ function init() saveOptionValue('Sensor Ranges LOS', 'losrange', 'setOpacity', { 'opacity' }, value) end, }, - { id = "losrangeteamcolors", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.losrangeteamcolors'), type = "bool", value = (WG['losrange'] ~= nil and WG['losrange'].getUseTeamColors ~= nil and WG['losrange'].getUseTeamColors()), description = '', + { id = "losrangeteamcolors", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.losrangeteamcolors'), type = "bool", value = (WG.losrange ~= nil and WG.losrange .getUseTeamColors ~= nil and WG.losrange .getUseTeamColors()), description = '', onload = function(i) loadWidgetData("Sensor Ranges LOS", "losrangeteamcolors", { 'useteamcolors' }) end, @@ -4722,7 +4722,7 @@ function init() }, { id = "attackrange", group = "ui", category = types.basic, widget = "Attack Range GL4", name = Spring.I18N('ui.settings.option.attackrange'), type = "bool", value = GetWidgetToggleValue("Attack Range GL4"), description = Spring.I18N('ui.settings.option.attackrange_descr') }, - { id = "attackrange_shiftonly", category = types.dev, group = "ui", name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.attackrange_shiftonly'), type = "bool", value = (WG['attackrange'] ~= nil and WG['attackrange'].getShiftOnly ~= nil and WG['attackrange'].getShiftOnly()), description = Spring.I18N('ui.settings.option.attackrange_shiftonly_descr'), + { id = "attackrange_shiftonly", category = types.dev, group = "ui", name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.attackrange_shiftonly'), type = "bool", value = (WG.attackrange ~= nil and WG.attackrange .getShiftOnly ~= nil and WG.attackrange .getShiftOnly()), description = Spring.I18N('ui.settings.option.attackrange_shiftonly_descr'), onload = function(i) loadWidgetData("Attack Range GL4", "attackrange_shiftonly", { 'shift_only' }) end, @@ -4730,7 +4730,7 @@ function init() saveOptionValue('Attack Range GL4', 'attackrange', 'setShiftOnly', { 'shift_only' }, value) end, }, - { id = "attackrange_cursorunitrange", category = types.dev, group = "ui", name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.attackrange_cursorunitrange'), type = "bool", value = (WG['attackrange'] ~= nil and WG['attackrange'].getCursorUnitRange ~= nil and WG['attackrange'].getCursorUnitRange()), description = Spring.I18N('ui.settings.option.attackrange_cursorunitrange_descr'), + { id = "attackrange_cursorunitrange", category = types.dev, group = "ui", name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.attackrange_cursorunitrange'), type = "bool", value = (WG.attackrange ~= nil and WG.attackrange .getCursorUnitRange ~= nil and WG.attackrange .getCursorUnitRange()), description = Spring.I18N('ui.settings.option.attackrange_cursorunitrange_descr'), onload = function(i) loadWidgetData("Attack Range GL4", "attackrange_cursorunitrange", { 'cursor_unit_range' }) end, @@ -4738,7 +4738,7 @@ function init() saveOptionValue('Attack Range GL4', 'attackrange', 'setCursorUnitRange', { 'cursor_unit_range' }, value) end, }, - { id = "attackrange_numrangesmult", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.attackrange_numrangesmult'), type = "slider", min = 0.3, max = 1, step = 0.1, value = (WG['attackrange'] ~= nil and WG['attackrange'].getOpacity ~= nil and WG['attackrange'].getNumRangesMult()) or 1, description = Spring.I18N('ui.settings.option.attackrange_numrangesmult_descr'), + { id = "attackrange_numrangesmult", group = "ui", category = types.dev, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.attackrange_numrangesmult'), type = "slider", min = 0.3, max = 1, step = 0.1, value = (WG.attackrange ~= nil and WG.attackrange .getOpacity ~= nil and WG.attackrange .getNumRangesMult()) or 1, description = Spring.I18N('ui.settings.option.attackrange_numrangesmult_descr'), onload = function(i) loadWidgetData("Attack Range GL4", "attackrange_numrangesmult", { 'selectionDisableThresholdMult' }) end, @@ -4749,7 +4749,7 @@ function init() { id = "defrange", group = "ui", category = types.basic, widget = "Defense Range GL4", name = Spring.I18N('ui.settings.option.defrange'), type = "bool", value = GetWidgetToggleValue("Defense Range GL4"), description = Spring.I18N('ui.settings.option.defrange_descr') }, - { id = "defrange_allyair", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_allyair'), type = "bool", value = (WG['defrange'] ~= nil and WG['defrange'].getAllyAir ~= nil and WG['defrange'].getAllyAir()), description = Spring.I18N('ui.settings.option.defrange_allyair_descr'), + { id = "defrange_allyair", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_allyair'), type = "bool", value = (WG.defrange ~= nil and WG.defrange .getAllyAir ~= nil and WG.defrange .getAllyAir()), description = Spring.I18N('ui.settings.option.defrange_allyair_descr'), onload = function(i) loadWidgetData("Defense Range GL4", "defrange_allyair", { 'enabled', 'ally', 'air' }) end, @@ -4758,7 +4758,7 @@ function init() saveOptionValue('Defense Range GL4', 'defrange', 'setAllyAir', { 'enabled', 'ally', 'air' }, value) end, }, - { id = "defrange_allyground", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_allyground'), type = "bool", value = (WG['defrange'] ~= nil and WG['defrange'].getAllyGround ~= nil and WG['defrange'].getAllyGround()), description = Spring.I18N('ui.settings.option.defrange_allyground_descr'), + { id = "defrange_allyground", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_allyground'), type = "bool", value = (WG.defrange ~= nil and WG.defrange .getAllyGround ~= nil and WG.defrange .getAllyGround()), description = Spring.I18N('ui.settings.option.defrange_allyground_descr'), onload = function(i) loadWidgetData("Defense Range GL4", "defrange_allyground", { 'enabled', 'ally', 'ground' }) loadWidgetData("Defense Range GL4", "defrange_allycannon", { 'enabled', 'ally', 'cannon' }) @@ -4769,7 +4769,7 @@ function init() saveOptionValue('Defense Range GL4', 'defrange', 'setAllyGround', { 'enabled', 'ally', 'cannon' }, value) end, }, - { id = "defrange_allynuke", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_allynuke'), type = "bool", value = (WG['defrange'] ~= nil and WG['defrange'].getAllyNuke ~= nil and WG['defrange'].getAllyNuke()), description = Spring.I18N('ui.settings.option.defrange_allynuke_descr'), + { id = "defrange_allynuke", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_allynuke'), type = "bool", value = (WG.defrange ~= nil and WG.defrange .getAllyNuke ~= nil and WG.defrange .getAllyNuke()), description = Spring.I18N('ui.settings.option.defrange_allynuke_descr'), onload = function(i) loadWidgetData("Defense Range GL4", "defrange_allynuke", { 'enabled', 'ally', 'nuke' }) end, @@ -4778,7 +4778,7 @@ function init() saveOptionValue('Defense Range GL4', 'defrange', 'setAllyNuke', { 'enabled', 'ally', 'nuke' }, value) end, }, - { id = "defrange_allylrpc", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_allylrpc'), type = "bool", value = (WG['defrange'] ~= nil and WG['defrange'].getAllyLRPC ~= nil and WG['defrange'].getAllyLRPC()), description = Spring.I18N('ui.settings.option.defrange_allylrpc_descr'), + { id = "defrange_allylrpc", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_allylrpc'), type = "bool", value = (WG.defrange ~= nil and WG.defrange .getAllyLRPC ~= nil and WG.defrange .getAllyLRPC()), description = Spring.I18N('ui.settings.option.defrange_allylrpc_descr'), onload = function(i) loadWidgetData("Defense Range GL4", "defrange_allylrpc", { 'enabled', 'ally', 'lrpc' }) end, @@ -4787,7 +4787,7 @@ function init() saveOptionValue('Defense Range GL4', 'defrange', 'setAllyLRPC', { 'enabled', 'ally', 'lrpc' }, value) end, }, - { id = "defrange_enemyair", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_enemyair'), type = "bool", value = (WG['defrange'] ~= nil and WG['defrange'].getEnemyAir ~= nil and WG['defrange'].getEnemyAir()), description = Spring.I18N('ui.settings.option.defrange_enemyair_descr'), + { id = "defrange_enemyair", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_enemyair'), type = "bool", value = (WG.defrange ~= nil and WG.defrange .getEnemyAir ~= nil and WG.defrange .getEnemyAir()), description = Spring.I18N('ui.settings.option.defrange_enemyair_descr'), onload = function(i) loadWidgetData("Defense Range GL4", "defrange_enemyair", { 'enabled', 'enemy', 'air' }) end, @@ -4796,7 +4796,7 @@ function init() saveOptionValue('Defense Range GL4', 'defrange', 'setEnemyAir', { 'enabled', 'enemy', 'air' }, value) end, }, - { id = "defrange_enemyground", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_enemyground'), type = "bool", value = (WG['defrange'] ~= nil and WG['defrange'].getEnemyGround ~= nil and WG['defrange'].getEnemyGround()), description = Spring.I18N('ui.settings.option.defrange_enemyground_descr'), + { id = "defrange_enemyground", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_enemyground'), type = "bool", value = (WG.defrange ~= nil and WG.defrange .getEnemyGround ~= nil and WG.defrange .getEnemyGround()), description = Spring.I18N('ui.settings.option.defrange_enemyground_descr'), onload = function(i) loadWidgetData("Defense Range GL4", "defrange_enemyground", { 'enabled', 'enemy', 'ground' }) loadWidgetData("Defense Range GL4", "defrange_enemyground", { 'enabled', 'enemy', 'cannon' }) @@ -4807,7 +4807,7 @@ function init() saveOptionValue('Defense Range GL4', 'defrange', 'setEnemyGround', { 'enabled', 'enemy', 'cannon' }, value) end, }, - { id = "defrange_enemynuke", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_enemynuke'), type = "bool", value = (WG['defrange'] ~= nil and WG['defrange'].getEnemyNuke ~= nil and WG['defrange'].getEnemyNuke()), description = Spring.I18N('ui.settings.option.defrange_enemynuke_descr'), + { id = "defrange_enemynuke", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_enemynuke'), type = "bool", value = (WG.defrange ~= nil and WG.defrange .getEnemyNuke ~= nil and WG.defrange .getEnemyNuke()), description = Spring.I18N('ui.settings.option.defrange_enemynuke_descr'), onload = function(i) loadWidgetData("Defense Range GL4", "defrange_enemynuke", { 'enabled', 'enemy', 'nuke' }) end, @@ -4816,7 +4816,7 @@ function init() saveOptionValue('Defense Range GL4', 'defrange', 'setEnemyNuke', { 'enabled', 'enemy', 'nuke' }, value) end, }, - { id = "defrange_enemylrpc", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_enemylrpc'), type = "bool", value = (WG['defrange'] ~= nil and WG['defrange'].getEnemyLRPC ~= nil and WG['defrange'].getEnemyLRPC()), description = Spring.I18N('ui.settings.option.defrange_enemylrpc_descr'), + { id = "defrange_enemylrpc", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.defrange_enemylrpc'), type = "bool", value = (WG.defrange ~= nil and WG.defrange .getEnemyLRPC ~= nil and WG.defrange .getEnemyLRPC()), description = Spring.I18N('ui.settings.option.defrange_enemylrpc_descr'), onload = function(i) loadWidgetData("Defense Range GL4", "defrange_enemylrpc", { 'enabled', 'enemy', 'lrpc' }) end, @@ -4832,7 +4832,7 @@ function init() { id = "label_ui_spectator_spacer", group = "ui", category = types.basic }, { id = "spectator_hud", group = "ui", category = types.basic, widget = "Spectator HUD", name = Spring.I18N('ui.settings.option.spectator_hud'), type = "bool", value = GetWidgetToggleValue("Spectator HUD"), description = Spring.I18N('ui.settings.option.spectator_hud_descr') }, - { id = "spectator_hud_size", group = "ui", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.spectator_hud_size'), type = "slider", min = 0.1, max = 2, step = 0.1, value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getWidgetSize ~= nil and WG['spectator_hud'].getWidgetSize()) or 0.8, description = '', + { id = "spectator_hud_size", group = "ui", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.spectator_hud_size'), type = "slider", min = 0.1, max = 2, step = 0.1, value = (WG.spectator_hud ~= nil and WG.spectator_hud .getWidgetSize ~= nil and WG.spectator_hud .getWidgetSize()) or 0.8, description = '', onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_size", { 'widgetScale' }) end, @@ -4841,7 +4841,7 @@ function init() end, }, - { id = "spectator_hud_config", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.spectator_hud_config'), type = "select", options = spectatorHUDConfigOptions, value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getConfig ~= nil and WG['spectator_hud'].getConfig()) or 1, description = Spring.I18N('ui.settings.option.spectator_hud_config_descr'), + { id = "spectator_hud_config", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.spectator_hud_config'), type = "select", options = spectatorHUDConfigOptions, value = (WG.spectator_hud ~= nil and WG.spectator_hud .getConfig ~= nil and WG.spectator_hud .getConfig()) or 1, description = Spring.I18N('ui.settings.option.spectator_hud_config_descr'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_config", { 'config' }) end, @@ -4851,7 +4851,7 @@ function init() end, }, - { id = "spectator_hud_metric_metalIncome", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.metalIncome_title'), type = "bool", value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getMetricEnabled~= nil and WG['spectator_hud'].getMetricEnabled('metalIncome')) or 1, description = Spring.I18N('ui.spectator_hud.metalIncome_tooltip'), + { id = "spectator_hud_metric_metalIncome", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.metalIncome_title'), type = "bool", value = (WG.spectator_hud ~= nil and WG.spectator_hud .getMetricEnabled~= nil and WG.spectator_hud .getMetricEnabled('metalIncome')) or 1, description = Spring.I18N('ui.spectator_hud.metalIncome_tooltip'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_metric_metalIncome", { 'metricsEnabled', 'metalIncome' }) end, @@ -4859,7 +4859,7 @@ function init() saveOptionValue('Spectator HUD', 'spectator_hud', 'setMetricEnabled', { 'metricsEnabled', 'metalIncome' }, value, { 'metalIncome', value }) end, }, - { id = "spectator_hud_metric_energyIncome", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.energyIncome_title'), type = "bool", value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getMetricEnabled~= nil and WG['spectator_hud'].getMetricEnabled('energyIncome')) or 1, description = Spring.I18N('ui.spectator_hud.energyIncome_tooltip'), + { id = "spectator_hud_metric_energyIncome", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.energyIncome_title'), type = "bool", value = (WG.spectator_hud ~= nil and WG.spectator_hud .getMetricEnabled~= nil and WG.spectator_hud .getMetricEnabled('energyIncome')) or 1, description = Spring.I18N('ui.spectator_hud.energyIncome_tooltip'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_metric_energyIncome", { 'metricsEnabled', 'energyIncome' }) end, @@ -4867,7 +4867,7 @@ function init() saveOptionValue('Spectator HUD', 'spectator_hud', 'setMetricEnabled', { 'metricsEnabled', 'energyIncome' }, value, { 'energyIncome', value }) end, }, - { id = "spectator_hud_metric_buildPower", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.buildPower_title'), type = "bool", value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getMetricEnabled~= nil and WG['spectator_hud'].getMetricEnabled('buildPower')) or 1, description = Spring.I18N('ui.spectator_hud.buildPower_tooltip'), + { id = "spectator_hud_metric_buildPower", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.buildPower_title'), type = "bool", value = (WG.spectator_hud ~= nil and WG.spectator_hud .getMetricEnabled~= nil and WG.spectator_hud .getMetricEnabled('buildPower')) or 1, description = Spring.I18N('ui.spectator_hud.buildPower_tooltip'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_metric_buildPower", { 'metricsEnabled', 'buildPower' }) end, @@ -4875,7 +4875,7 @@ function init() saveOptionValue('Spectator HUD', 'spectator_hud', 'setMetricEnabled', { 'metricsEnabled', 'buildPower' }, value, { 'buildPower', value }) end, }, - { id = "spectator_hud_metric_metalProduced", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.metalProduced_title'), type = "bool", value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getMetricEnabled~= nil and WG['spectator_hud'].getMetricEnabled('metalProduced')) or 1, description = Spring.I18N('ui.spectator_hud.metalProduced_tooltip'), + { id = "spectator_hud_metric_metalProduced", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.metalProduced_title'), type = "bool", value = (WG.spectator_hud ~= nil and WG.spectator_hud .getMetricEnabled~= nil and WG.spectator_hud .getMetricEnabled('metalProduced')) or 1, description = Spring.I18N('ui.spectator_hud.metalProduced_tooltip'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_metric_metalProduced", { 'metricsEnabled', 'metalProduced' }) end, @@ -4883,7 +4883,7 @@ function init() saveOptionValue('Spectator HUD', 'spectator_hud', 'setMetricEnabled', { 'metricsEnabled', 'metalProduced' }, value, { 'metalProduced', value }) end, }, - { id = "spectator_hud_metric_energyProduced", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.energyProduced_title'), type = "bool", value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getMetricEnabled~= nil and WG['spectator_hud'].getMetricEnabled('energyProduced')) or 1, description = Spring.I18N('ui.spectator_hud.energyProduced_tooltip'), + { id = "spectator_hud_metric_energyProduced", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.energyProduced_title'), type = "bool", value = (WG.spectator_hud ~= nil and WG.spectator_hud .getMetricEnabled~= nil and WG.spectator_hud .getMetricEnabled('energyProduced')) or 1, description = Spring.I18N('ui.spectator_hud.energyProduced_tooltip'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_metric_energyProduced", { 'metricsEnabled', 'energyProduced' }) end, @@ -4891,7 +4891,7 @@ function init() saveOptionValue('Spectator HUD', 'spectator_hud', 'setMetricEnabled', { 'metricsEnabled', 'energyProduced' }, value, { 'energyProduced', value }) end, }, - { id = "spectator_hud_metric_metalExcess", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.metalExcess_title'), type = "bool", value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getMetricEnabled~= nil and WG['spectator_hud'].getMetricEnabled('metalExcess')) or 1, description = Spring.I18N('ui.spectator_hud.metalExcess_tooltip'), + { id = "spectator_hud_metric_metalExcess", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.metalExcess_title'), type = "bool", value = (WG.spectator_hud ~= nil and WG.spectator_hud .getMetricEnabled~= nil and WG.spectator_hud .getMetricEnabled('metalExcess')) or 1, description = Spring.I18N('ui.spectator_hud.metalExcess_tooltip'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_metric_metalExcess", { 'metricsEnabled', 'metalExcess' }) end, @@ -4899,7 +4899,7 @@ function init() saveOptionValue('Spectator HUD', 'spectator_hud', 'setMetricEnabled', { 'metricsEnabled', 'metalExcess' }, value, { 'metalExcess', value }) end, }, - { id = "spectator_hud_metric_energyExcess", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.energyExcess_title'), type = "bool", value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getMetricEnabled~= nil and WG['spectator_hud'].getMetricEnabled('energyExcess')) or 1, description = Spring.I18N('ui.spectator_hud.energyExcess_tooltip'), + { id = "spectator_hud_metric_energyExcess", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.energyExcess_title'), type = "bool", value = (WG.spectator_hud ~= nil and WG.spectator_hud .getMetricEnabled~= nil and WG.spectator_hud .getMetricEnabled('energyExcess')) or 1, description = Spring.I18N('ui.spectator_hud.energyExcess_tooltip'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_metric_energyExcess", { 'metricsEnabled', 'energyExcess' }) end, @@ -4907,7 +4907,7 @@ function init() saveOptionValue('Spectator HUD', 'spectator_hud', 'setMetricEnabled', { 'metricsEnabled', 'energyExcess' }, value, { 'energyExcess', value }) end, }, - { id = "spectator_hud_metric_armyValue", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.armyValue_title'), type = "bool", value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getMetricEnabled~= nil and WG['spectator_hud'].getMetricEnabled('armyValue')) or 1, description = Spring.I18N('ui.spectator_hud.armyValue_tooltip'), + { id = "spectator_hud_metric_armyValue", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.armyValue_title'), type = "bool", value = (WG.spectator_hud ~= nil and WG.spectator_hud .getMetricEnabled~= nil and WG.spectator_hud .getMetricEnabled('armyValue')) or 1, description = Spring.I18N('ui.spectator_hud.armyValue_tooltip'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_metric_armyValue", { 'metricsEnabled', 'armyValue' }) end, @@ -4915,7 +4915,7 @@ function init() saveOptionValue('Spectator HUD', 'spectator_hud', 'setMetricEnabled', { 'metricsEnabled', 'armyValue' }, value, { 'armyValue', value }) end, }, - { id = "spectator_hud_metric_defenseValue", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.defenseValue_title'), type = "bool", value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getMetricEnabled~= nil and WG['spectator_hud'].getMetricEnabled('defenseValue')) or 1, description = Spring.I18N('ui.spectator_hud.defenseValue_tooltip'), + { id = "spectator_hud_metric_defenseValue", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.defenseValue_title'), type = "bool", value = (WG.spectator_hud ~= nil and WG.spectator_hud .getMetricEnabled~= nil and WG.spectator_hud .getMetricEnabled('defenseValue')) or 1, description = Spring.I18N('ui.spectator_hud.defenseValue_tooltip'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_metric_defenseValue", { 'metricsEnabled', 'defenseValue' }) end, @@ -4923,7 +4923,7 @@ function init() saveOptionValue('Spectator HUD', 'spectator_hud', 'setMetricEnabled', { 'metricsEnabled', 'defenseValue' }, value, { 'defenseValue', value }) end, }, - { id = "spectator_hud_metric_utilityValue", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.utilityValue_title'), type = "bool", value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getMetricEnabled~= nil and WG['spectator_hud'].getMetricEnabled('utilityValue')) or 1, description = Spring.I18N('ui.spectator_hud.utilityValue_tooltip'), + { id = "spectator_hud_metric_utilityValue", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.utilityValue_title'), type = "bool", value = (WG.spectator_hud ~= nil and WG.spectator_hud .getMetricEnabled~= nil and WG.spectator_hud .getMetricEnabled('utilityValue')) or 1, description = Spring.I18N('ui.spectator_hud.utilityValue_tooltip'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_metric_utilityValue", { 'metricsEnabled', 'utilityValue' }) end, @@ -4931,7 +4931,7 @@ function init() saveOptionValue('Spectator HUD', 'spectator_hud', 'setMetricEnabled', { 'metricsEnabled', 'utilityValue' }, value, { 'utilityValue', value }) end, }, - { id = "spectator_hud_metric_economyValue", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.economyValue_title'), type = "bool", value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getMetricEnabled~= nil and WG['spectator_hud'].getMetricEnabled('economyValue')) or 1, description = Spring.I18N('ui.spectator_hud.economyValue_tooltip'), + { id = "spectator_hud_metric_economyValue", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.economyValue_title'), type = "bool", value = (WG.spectator_hud ~= nil and WG.spectator_hud .getMetricEnabled~= nil and WG.spectator_hud .getMetricEnabled('economyValue')) or 1, description = Spring.I18N('ui.spectator_hud.economyValue_tooltip'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_metric_economyValue", { 'metricsEnabled', 'economyValue' }) end, @@ -4939,7 +4939,7 @@ function init() saveOptionValue('Spectator HUD', 'spectator_hud', 'setMetricEnabled', { 'metricsEnabled', 'economyValue' }, value, { 'economyValue', value }) end, }, - { id = "spectator_hud_metric_damageDealt", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.damageDealt_title'), type = "bool", value = (WG['spectator_hud'] ~= nil and WG['spectator_hud'].getMetricEnabled~= nil and WG['spectator_hud'].getMetricEnabled('damageDealt')) or 1, description = Spring.I18N('ui.spectator_hud.damageDealt_tooltip'), + { id = "spectator_hud_metric_damageDealt", group = "ui", category = types.advanced, name = widgetOptionColor .. " " .. Spring.I18N('ui.spectator_hud.damageDealt_title'), type = "bool", value = (WG.spectator_hud ~= nil and WG.spectator_hud .getMetricEnabled~= nil and WG.spectator_hud .getMetricEnabled('damageDealt')) or 1, description = Spring.I18N('ui.spectator_hud.damageDealt_tooltip'), onload = function(i) loadWidgetData("Spectator HUD", "spectator_hud_metric_damageDealt", { 'metricsEnabled', 'damageDealt' }) end, @@ -5071,9 +5071,9 @@ function init() name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.builderpriority_nanos'), type = "bool", value = ( - WG['builderpriority'] ~= nil - and WG['builderpriority'].getLowPriorityNanos ~= nil - and WG['builderpriority'].getLowPriorityNanos() + WG.builderpriority ~= nil + and WG.builderpriority .getLowPriorityNanos ~= nil + and WG.builderpriority .getLowPriorityNanos() ), description = Spring.I18N('ui.settings.option.builderpriority_nanos_descr'), onload = function(i) @@ -5091,9 +5091,9 @@ function init() name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.builderpriority_cons'), type = "bool", value = ( - WG['builderpriority'] ~= nil - and WG['builderpriority'].getLowPriorityCons ~= nil - and WG['builderpriority'].getLowPriorityCons() + WG.builderpriority ~= nil + and WG.builderpriority .getLowPriorityCons ~= nil + and WG.builderpriority .getLowPriorityCons() ), description = Spring.I18N('ui.settings.option.builderpriority_cons_descr'), onload = function(i) @@ -5111,9 +5111,9 @@ function init() name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.builderpriority_labs'), type = "bool", value = ( - WG['builderpriority'] ~= nil - and WG['builderpriority'].getLowPriorityLabs ~= nil - and WG['builderpriority'].getLowPriorityLabs() + WG.builderpriority ~= nil + and WG.builderpriority .getLowPriorityLabs ~= nil + and WG.builderpriority .getLowPriorityLabs() ), description = Spring.I18N('ui.settings.option.builderpriority_labs_descr'), onload = function(i) @@ -5133,19 +5133,19 @@ function init() category = types.basic, name = "Ferry ignores units with manual orders", type = "bool", - value = (WG['transportFactoryGuard'] ~= nil and WG['transportFactoryGuard'].getBlacklistOrderedUnits ~= nil and WG['transportFactoryGuard'].getBlacklistOrderedUnits()), + value = (WG.transportFactoryGuard ~= nil and WG.transportFactoryGuard .getBlacklistOrderedUnits ~= nil and WG.transportFactoryGuard .getBlacklistOrderedUnits()), description = "If enabled, transports guarding factories will not transport units that were given explicit orders during construction to their move waypoint.", onload = function(i) loadWidgetData("Transport Factory Guard", "blacklistOrderedUnits", { 'blacklistOrderedUnits' }) end, onchange = function(_, value) - if widgetHandler.configData["transportFactoryGuard"] == nil then - widgetHandler.configData["transportFactoryGuard"] = {} + if widgetHandler.configData.transportFactoryGuard == nil then + widgetHandler.configData.transportFactoryGuard = {} end widgetHandler.configData["Auto Group"].immediate = value saveOptionValue('Transport Factory Guard', 'transportFactoryGuard', 'setBlacklistOrderedUnits', { 'blacklistOrderedUnits' }, value) - if WG['transportFactoryGuard'] and WG['transportFactoryGuard'].setBlacklistOrderedUnits then - WG['transportFactoryGuard'].setBlacklistOrderedUnits(value) + if WG.transportFactoryGuard and WG.transportFactoryGuard .setBlacklistOrderedUnits then + WG.transportFactoryGuard .setBlacklistOrderedUnits(value) end end, }, @@ -5159,7 +5159,7 @@ function init() { id = "unitreclaimer", group = "game", category = types.basic, widget = "Specific Unit Reclaimer", name = Spring.I18N('ui.settings.option.unitreclaimer'), type = "bool", value = GetWidgetToggleValue("Specific Unit Reclaimer"), description = Spring.I18N('ui.settings.option.unitreclaimer_descr') }, - { id = "autogroup_immediate", group = "game", category = types.basic, name = Spring.I18N('ui.settings.option.autogroup_immediate'), type = "bool", value = (WG['autogroup'] ~= nil and WG['autogroup'].getImmediate ~= nil and WG['autogroup'].getImmediate()), description = Spring.I18N('ui.settings.option.autogroup_immediate_descr'), + { id = "autogroup_immediate", group = "game", category = types.basic, name = Spring.I18N('ui.settings.option.autogroup_immediate'), type = "bool", value = (WG.autogroup ~= nil and WG.autogroup .getImmediate ~= nil and WG.autogroup .getImmediate()), description = Spring.I18N('ui.settings.option.autogroup_immediate_descr'), onload = function(i) loadWidgetData("Auto Group", "autogroup_immediate", { 'immediate' }) end, @@ -5172,7 +5172,7 @@ function init() end, }, - { id = "autogroup_persist", group = "game", category = types.basic, name = Spring.I18N('ui.settings.option.autogroup_persist'), type = "bool", value = (WG['autogroup'] ~= nil and WG['autogroup'].getPersist ~= nil and WG['autogroup'].getPersist()), description = Spring.I18N('ui.settings.option.autogroup_persist_descr'), + { id = "autogroup_persist", group = "game", category = types.basic, name = Spring.I18N('ui.settings.option.autogroup_persist'), type = "bool", value = (WG.autogroup ~= nil and WG.autogroup .getPersist ~= nil and WG.autogroup .getPersist()), description = Spring.I18N('ui.settings.option.autogroup_persist_descr'), onload = function(i) loadWidgetData("Auto Group", "autogroup_persist", { 'persist' }) end, @@ -5383,7 +5383,7 @@ function init() { id = "language_dev", group = "dev", category = types.dev, name = Spring.I18N('ui.settings.option.language'), type = "select", options = devLanguageNames, value = devLanguageCodes[Spring.I18N.getLocale()], onchange = function(i, value) local devLanguage = devLanguageCodes[value] - WG['language'].setLanguage(devLanguage) + WG.language .setLanguage(devLanguage) end }, { id = "font", group = "dev", category = types.dev, name = Spring.I18N('ui.settings.option.font'), type = "select", options = {}, value = 1, description = Spring.I18N('ui.settings.option.font_descr'), @@ -6465,21 +6465,21 @@ function init() options[getOptionByID('spectator_hud_metric_damageDealt')] = nil end - if not Spring.Utilities.Gametype.GetCurrentHolidays()["aprilfools"] then + if not Spring.Utilities.Gametype.GetCurrentHolidays().aprilfools then options[getOptionByID('soundtrackAprilFools')] = nil Spring.SetConfigInt("UseSoundtrackAprilFools", 1) else options[getOptionByID('soundtrackAprilFoolsPostEvent')] = nil end - if not Spring.Utilities.Gametype.GetCurrentHolidays()["halloween"] then + if not Spring.Utilities.Gametype.GetCurrentHolidays().halloween then options[getOptionByID('soundtrackHalloween')] = nil Spring.SetConfigInt("UseSoundtrackHalloween", 1) else options[getOptionByID('soundtrackHalloweenPostEvent')] = nil end - if not Spring.Utilities.Gametype.GetCurrentHolidays()["xmas"] then + if not Spring.Utilities.Gametype.GetCurrentHolidays().xmas then options[getOptionByID('soundtrackXmas')] = nil Spring.SetConfigInt("UseSoundtrackXmas", 1) else @@ -6699,8 +6699,8 @@ function init() -- add music tracks options local trackList - if WG['music'] ~= nil then - trackList = WG['music'].getTracksConfig() + if WG.music ~= nil then + trackList = WG.music .getTracksConfig() end if type(trackList) == 'table' then @@ -6725,8 +6725,8 @@ function init() count = count + 1 newOptions[count] = { id="music_track_"..count, group="sound", basic=true, name=widgetOptionColor.." "..v[2], type="click",--..'\n'..v[4], onclick = function() - if WG['music'] ~= nil and WG['music'].playTrack then - WG['music'].playTrack(v[3]) + if WG.music ~= nil and WG.music .playTrack then + WG.music .playTrack(v[3]) end end, } @@ -6775,10 +6775,10 @@ function init() -- add sound notification widget sound toggle options local notificationList - if WG['notifications'] ~= nil then - notificationList = WG['notifications'].getNotificationList() - elseif widgetHandler.configData["Notifications"] ~= nil and widgetHandler.configData["Notifications"].notificationList ~= nil then - notificationList = widgetHandler.configData["Notifications"].notificationList + if WG.notifications ~= nil then + notificationList = WG.notifications .getNotificationList() + elseif widgetHandler.configData.Notifications ~= nil and widgetHandler.configData.Notifications .notificationList ~= nil then + notificationList = widgetHandler.configData.Notifications .notificationList end if type(notificationList) == 'table' then local newOptions = {} @@ -6797,8 +6797,8 @@ function init() saveOptionValue('Notifications', 'notifications', 'setNotification' .. v[1], { 'notificationList' }, value) end, onclick = function() - if WG['notifications'] ~= nil and WG['notifications'].playNotification then - WG['notifications'].playNotification(v[1]) + if WG.notifications ~= nil and WG.notifications .playNotification then + WG.notifications .playNotification(v[1]) end end, } @@ -6811,25 +6811,25 @@ function init() -- add auto cloak toggles local defaultUnitdefConfig = { -- copy pasted defaults from the widget - [UnitDefNames["armdecom"] and UnitDefNames["armdecom"].id or -1] = false, - [UnitDefNames["cordecom"] and UnitDefNames["cordecom"].id or -1] = false, - [UnitDefNames["armferret"] and UnitDefNames["armferret"].id or -1] = false, - [UnitDefNames["armamb"] and UnitDefNames["armamb"].id or -1] = false, - [UnitDefNames["armpb"] and UnitDefNames["armpb"].id or -1] = false, - [UnitDefNames["armsnipe"] and UnitDefNames["armsnipe"].id or -1] = false, - [UnitDefNames["corsktl"] and UnitDefNames["corsktl"].id or -1] = false, - [UnitDefNames["armgremlin"] and UnitDefNames["armgremlin"].id or -1] = true, - [UnitDefNames["armamex"] and UnitDefNames["armamex"].id or -1] = true, - [UnitDefNames["armshockwave"] and UnitDefNames["armshockwave"].id or -1] = true, - [UnitDefNames["armckfus"] and UnitDefNames["armckfus"].id or -1] = true, - [UnitDefNames["armspy"] and UnitDefNames["armspy"].id or -1] = true, - [UnitDefNames["corspy"] and UnitDefNames["corspy"].id or -1] = true, - [UnitDefNames["corphantom"] and UnitDefNames["corphantom"].id or -1] = true, - [UnitDefNames["legaspy"] and UnitDefNames["legaspy"].id or -1] = true, + [UnitDefNames.armdecom and UnitDefNames.armdecom .id or -1] = false, + [UnitDefNames.cordecom and UnitDefNames.cordecom .id or -1] = false, + [UnitDefNames.armferret and UnitDefNames.armferret .id or -1] = false, + [UnitDefNames.armamb and UnitDefNames.armamb .id or -1] = false, + [UnitDefNames.armpb and UnitDefNames.armpb .id or -1] = false, + [UnitDefNames.armsnipe and UnitDefNames.armsnipe .id or -1] = false, + [UnitDefNames.corsktl and UnitDefNames.corsktl .id or -1] = false, + [UnitDefNames.armgremlin and UnitDefNames.armgremlin .id or -1] = true, + [UnitDefNames.armamex and UnitDefNames.armamex .id or -1] = true, + [UnitDefNames.armshockwave and UnitDefNames.armshockwave .id or -1] = true, + [UnitDefNames.armckfus and UnitDefNames.armckfus .id or -1] = true, + [UnitDefNames.armspy and UnitDefNames.armspy .id or -1] = true, + [UnitDefNames.corspy and UnitDefNames.corspy .id or -1] = true, + [UnitDefNames.corphantom and UnitDefNames.corphantom .id or -1] = true, + [UnitDefNames.legaspy and UnitDefNames.legaspy .id or -1] = true, } local unitdefConfig = {} - if WG['autocloak'] ~= nil then - unitdefConfig = WG['autocloak'].getUnitdefConfig() + if WG.autocloak ~= nil then + unitdefConfig = WG.autocloak .getUnitdefConfig() elseif widgetHandler.configData["Auto Cloak Units"] ~= nil and widgetHandler.configData["Auto Cloak Units"].unitdefConfig ~= nil then for unitName, value in pairs(widgetHandler.configData["Auto Cloak Units"].unitdefConfig) do if UnitDefNames[unitName] then @@ -6865,15 +6865,15 @@ function init() end -- cursors - if WG['cursors'] == nil then + if WG.cursors == nil then options[getOptionByID('cursor')] = nil options[getOptionByID('cursorsize')] = nil else local cursorsets = {} local cursor = 1 local cursoroption - cursorsets = WG['cursors'].getcursorsets() - local cursorname = WG['cursors'].getcursor() + cursorsets = WG.cursors .getcursorsets() + local cursorname = WG.cursors .getcursor() for i, c in pairs(cursorsets) do if c == cursorname then cursor = i @@ -6884,29 +6884,29 @@ function init() options[getOptionByID('cursor')].options = cursorsets options[getOptionByID('cursor')].value = cursor end - if WG['cursors'].getsizemult then - options[getOptionByID('cursorsize')].value = WG['cursors'].getsizemult() + if WG.cursors .getsizemult then + options[getOptionByID('cursorsize')].value = WG.cursors .getsizemult() else options[getOptionByID('cursorsize')] = nil end end - if WG['smartselect'] == nil then + if WG.smartselect == nil then options[getOptionByID('smartselect_includebuildings')] = nil options[getOptionByID('smartselect_includebuilders')] = nil options[getOptionByID('smartselect_includeantinuke')] = nil options[getOptionByID('smartselect_includeradar')] = nil options[getOptionByID('smartselect_includejammer')] = nil else - options[getOptionByID('smartselect_includebuildings')].value = WG['smartselect'].getIncludeBuildings() - options[getOptionByID('smartselect_includebuilders')].value = WG['smartselect'].getIncludeBuilders() - options[getOptionByID('smartselect_includeantinuke')].value = WG['smartselect'].getIncludeAntinuke() - options[getOptionByID('smartselect_includeradar')].value = WG['smartselect'].getIncludeRadar() - options[getOptionByID('smartselect_includejammer')].value = WG['smartselect'].getIncludeJammer() + options[getOptionByID('smartselect_includebuildings')].value = WG.smartselect .getIncludeBuildings() + options[getOptionByID('smartselect_includebuilders')].value = WG.smartselect .getIncludeBuilders() + options[getOptionByID('smartselect_includeantinuke')].value = WG.smartselect .getIncludeAntinuke() + options[getOptionByID('smartselect_includeradar')].value = WG.smartselect .getIncludeRadar() + options[getOptionByID('smartselect_includejammer')].value = WG.smartselect .getIncludeJammer() end - if WG['snow'] ~= nil and WG['snow'].getSnowMap ~= nil then - options[getOptionByID('snowmap')].value = WG['snow'].getSnowMap() + if WG.snow ~= nil and WG.snow .getSnowMap ~= nil then + options[getOptionByID('snowmap')].value = WG.snow .getSnowMap() end -- not sure if needed: remove vsync option when its done by monitor (freesync/gsync) -> config value is set as 'x' @@ -6920,7 +6920,7 @@ function init() options[id].onchange(id, options[id].value) end - if WG['playercolorpalette'] == nil or WG['playercolorpalette'].getSameTeamColors == nil then + if WG.playercolorpalette == nil or WG.playercolorpalette .getSameTeamColors == nil then options[getOptionByID('sameteamcolors')] = nil end @@ -6965,8 +6965,8 @@ function init() options[#options+1] = { id = "label_custom_widgets_spacer", group = "custom", category = types.basic } end local desc = data.desc or '' - if desc ~= '' and WG['tooltip'] then - local maxWidth = WG['tooltip'].getFontsize() * 90 + if desc ~= '' and WG.tooltip then + local maxWidth = WG.tooltip .getFontsize() * 90 local textLines, numLines = font:WrapText(desc, maxWidth) desc = string.gsub(textLines, '[\n]', '\n') end @@ -7091,8 +7091,8 @@ end local function optionsCmd(_, _, params) local newShow = not show - if newShow and WG['topbar'] then - WG['topbar'].hideWindows() + if newShow and WG.topbar then + WG.topbar .hideWindows() end show = newShow if showTextInput then @@ -7169,10 +7169,10 @@ function widget:Initialize() if widgetHandler:IsWidgetKnown("Fog Volumes Old GL4") then widgetHandler:DisableWidget("Fog Volumes Old GL4") end - if widgetHandler.orderList["FlowUI"] and widgetHandler.orderList["FlowUI"] < 0.5 then + if widgetHandler.orderList.FlowUI and widgetHandler.orderList.FlowUI < 0.5 then widgetHandler:EnableWidget("FlowUI") end - if widgetHandler.orderList["Language"] and widgetHandler.orderList["Language"] < 0.5 then + if widgetHandler.orderList.Language and widgetHandler.orderList.Language < 0.5 then widgetHandler:EnableWidget("Language") end @@ -7304,14 +7304,14 @@ function widget:Initialize() Spring.SendCommands("minimap unitsize " .. (Spring.GetConfigFloat("MinimapIconScale", 3.5))) -- spring wont remember what you set with '/minimap iconssize #' - WG['options'] = {} - WG['options'].toggle = function(state) + WG.options = {} + WG.options .toggle = function(state) local newShow = state if newShow == nil then newShow = not show end - if newShow and WG['topbar'] then - WG['topbar'].hideWindows() + if newShow and WG.topbar then + WG.topbar .hideWindows() end show = newShow if showTextInput then @@ -7323,25 +7323,25 @@ function widget:Initialize() end end end - WG['options'].getOptionsList = function() + WG.options .getOptionsList = function() local optionList = {} for i, option in pairs(options) do optionList[#optionList+1] = option.id end return optionList end - WG['options'].isvisible = function() + WG.options .isvisible = function() return show end - WG['options'].getOptionValue = function(option) + WG.options .getOptionValue = function(option) if getOptionByID(option) then return options[getOptionByID(option)].value end end - WG['options'].getCameraSmoothness = function() + WG.options .getCameraSmoothness = function() return cameraTransitionTime end - WG['options'].disallowEsc = function() + WG.options .disallowEsc = function() if showSelectOptions then --or draggingSlider then return true @@ -7349,7 +7349,7 @@ function widget:Initialize() return false end end - WG['options'].addOptions = function(newOptions) + WG.options .addOptions = function(newOptions) for _, option in ipairs(newOptions) do option.group = "custom" customOptions[#customOptions+1] = option @@ -7357,7 +7357,7 @@ function widget:Initialize() init() end - WG['options'].removeOptions = function(names) + WG.options .removeOptions = function(names) for _, name in ipairs(names) do for i, option in pairs(customOptions) do if option.id == name then @@ -7369,13 +7369,13 @@ function widget:Initialize() init() end - WG['options'].addOption = function(option) - return WG['options'].addOptions({ option }) + WG.options .addOption = function(option) + return WG.options .addOptions({ option }) end - WG['options'].removeOption = function(name) - return WG['options'].removeOptions({ name }) + WG.options .removeOption = function(name) + return WG.options .removeOptions({ name }) end - WG['options'].applyOptionValue = function(option, value) + WG.options .applyOptionValue = function(option, value) local optionID = getOptionByID(option) if not optionID then Spring.Echo("Options widget: applyOptionValue: option '" .. option .. "' not found") @@ -7402,13 +7402,13 @@ function widget:Shutdown() gl.DeleteFont(fontOption[i]) end end - if WG['guishader'] then - WG['guishader'].RemoveDlist('options') - WG['guishader'].RemoveRect('optionsinput') - WG['guishader'].RemoveScreenRect('options_select') - WG['guishader'].RemoveScreenRect('options_select_options') + if WG.guishader then + WG.guishader .RemoveDlist('options') + WG.guishader .RemoveRect('optionsinput') + WG.guishader .RemoveScreenRect('options_select') + WG.guishader .RemoveScreenRect('options_select_options') if selectOptionsList then - WG['guishader'].removeRenderDlist(selectOptionsList) + WG.guishader .removeRenderDlist(selectOptionsList) end end if selectOptionsList then @@ -7416,7 +7416,7 @@ function widget:Shutdown() end glDeleteList(consoleCmdDlist) glDeleteList(textInputDlist) - WG['options'] = nil + WG.options = nil resetUserVolume() Spring.SendCommands("grabinput 0") diff --git a/luaui/Widgets/gui_ordermenu.lua b/luaui/Widgets/gui_ordermenu.lua index 8587fbdf7cd..7eccdac38c3 100644 --- a/luaui/Widgets/gui_ordermenu.lua +++ b/luaui/Widgets/gui_ordermenu.lua @@ -204,7 +204,7 @@ for unitDefID, unitDef in pairs(UnitDefs) do end local function checkGuiShader(force) - if WG['guishader'] then + if WG.guishader then if force and displayListGuiShader then displayListGuiShader = gl.DeleteList(displayListGuiShader) end @@ -476,11 +476,11 @@ function widget:ViewResize() width = mathFloor(width * vsx) / vsx height = mathFloor(height * vsy) / vsy - if WG['buildmenu'] then - buildmenuBottomPosition = WG['buildmenu'].getBottomPosition() + if WG.buildmenu then + buildmenuBottomPosition = WG.buildmenu .getBottomPosition() end - font = WG['fonts'].getFont(2) + font = WG.fonts .getFont(2) elementCorner = WG.FlowUI.elementCorner backgroundPadding = WG.FlowUI.elementPadding @@ -492,8 +492,8 @@ function widget:ViewResize() widgetSpaceMargin = WG.FlowUI.elementMargin - if WG['minimap'] then - minimapHeight = WG['minimap'].getHeight() + if WG.minimap then + minimapHeight = WG.minimap .getHeight() end if stickToBottom then posY = height @@ -502,11 +502,11 @@ function widget:ViewResize() if buildmenuBottomPosition then posX = 0 posY = height + height + (widgetSpaceMargin/vsy) - elseif WG['buildmenu'] then - local posY2, _ = WG['buildmenu'].getSize() + elseif WG.buildmenu then + local posY2, _ = WG.buildmenu .getSize() posY2 = posY2 + (widgetSpaceMargin/vsy) posY = posY2 + height - if WG['minimap'] then + if WG.minimap then posY = 1 - (minimapHeight / vsy) - (widgetSpaceMargin/vsy) end posX = 0 @@ -554,30 +554,30 @@ function widget:Initialize() widget:ViewResize() widget:SelectionChanged(spGetSelectedUnits()) - WG['ordermenu'] = {} - WG['ordermenu'].getPosition = function() + WG.ordermenu = {} + WG.ordermenu .getPosition = function() return posX, posY, width, height end - WG['ordermenu'].reloadBindings = reloadBindings - WG['ordermenu'].setBottomPosition = function(value) + WG.ordermenu .reloadBindings = reloadBindings + WG.ordermenu .setBottomPosition = function(value) stickToBottom = value doUpdate = true widget:ViewResize() end - WG['ordermenu'].getAlwaysShow = function() + WG.ordermenu .getAlwaysShow = function() return alwaysShow end - WG['ordermenu'].setAlwaysShow = function(value) + WG.ordermenu .setAlwaysShow = function(value) alwaysShow = value doUpdate = true end - WG['ordermenu'].getBottomPosition = function() + WG.ordermenu .getBottomPosition = function() return stickToBottom end - WG['ordermenu'].getDisabledCmd = function(cmd) + WG.ordermenu .getDisabledCmd = function(cmd) return disabledCommand[cmd] end - WG['ordermenu'].setDisabledCmd = function(params) + WG.ordermenu .setDisabledCmd = function(params) if params[2] then disabledCommand[params[1]] = true else @@ -585,24 +585,24 @@ function widget:Initialize() end doUpdate = true end - WG['ordermenu'].getColorize = function() + WG.ordermenu .getColorize = function() return colorize end - WG['ordermenu'].setColorize = function(value) + WG.ordermenu .setColorize = function(value) doUpdate = true colorize = value if colorize > 1 then colorize = 1 end end - WG['ordermenu'].getIsShowing = function() + WG.ordermenu .getIsShowing = function() return ordermenuShows end end function widget:Shutdown() - if WG['guishader'] and displayListGuiShader then - WG['guishader'].DeleteDlist('ordermenu') + if WG.guishader and displayListGuiShader then + WG.guishader .DeleteDlist('ordermenu') displayListGuiShader = nil end if displayListOrders then @@ -616,7 +616,7 @@ function widget:Shutdown() gl.DeleteTexture(ordermenuTex) ordermenuTex = nil end - WG['ordermenu'] = nil + WG.ordermenu = nil end local buildmenuBottomPos = false @@ -629,15 +629,15 @@ function widget:Update(dt) sec = 0 checkGuiShader() - if WG['buildmenu'] and WG['buildmenu'].getBottomPosition then + if WG.buildmenu and WG.buildmenu .getBottomPosition then local prevbuildmenuBottomPos = buildmenuBottomPos - buildmenuBottomPos = WG['buildmenu'].getBottomPosition() + buildmenuBottomPos = WG.buildmenu .getBottomPosition() if buildmenuBottomPos ~= prevbuildmenuBottomPos then widget:ViewResize() end end - if WG['minimap'] and minimapHeight ~= WG['minimap'].getHeight() then + if WG.minimap and minimapHeight ~= WG.minimap .getHeight() then widget:ViewResize() setupCellGrid(true) doUpdate = true @@ -659,7 +659,7 @@ function widget:Update(dt) doUpdate = true end - if (WG['guishader'] and not displayListGuiShader) or (#commands == 0 and (not alwaysShow or spGetGameFrame() == 0)) then + if (WG.guishader and not displayListGuiShader) or (#commands == 0 and (not alwaysShow or spGetGameFrame() == 0)) then ordermenuShows = false else ordermenuShows = true @@ -716,7 +716,7 @@ local function drawCell(cell, zoom) color1 = { 0.66, 0.66, 0.66, math_clamp(uiOpacity, 0.75, 0.95) } -- bottom color2 = { 1, 1, 1, math_clamp(uiOpacity, 0.75, 0.95) } -- top else - if WG['guishader'] then + if WG.guishader then color1 = (isStateCommand[cmd.id]) and { 0.5, 0.5, 0.5, math_clamp(uiOpacity/1.5, 0.35, 0.55) } or { 0.6, 0.6, 0.6, math_clamp(uiOpacity/1.5, 0.35, 0.55) } color1[4] = math_clamp(uiOpacity-0.3, 0, 0.35) color2 = { 1,1,1, math_clamp(uiOpacity-0.3, 0, 0.35) } @@ -902,14 +902,14 @@ end function widget:DrawScreen() local x, y = Spring.GetMouseState() local cellHovered - if not WG['topbar'] or not WG['topbar'].showingQuit() then + if not WG.topbar or not WG.topbar .showingQuit() then if math_isInRect(x, y, backgroundRect[1], backgroundRect[2], backgroundRect[3], backgroundRect[4]) then Spring.SetMouseCursor('cursornormal') for cell = 1, #cellRects do if commands[cell] then if math_isInRect(x, y, cellRects[cell][1], cellRects[cell][2], cellRects[cell][3], cellRects[cell][4]) then local cmd = commands[cell] - if WG['tooltip'] then + if WG.tooltip then local tooltipKey = cmd.action .. '_tooltip' local tooltip = getCachedTranslation('ui.orderMenu.' .. tooltipKey) @@ -935,7 +935,7 @@ function widget:DrawScreen() else title = getCachedTranslation('ui.orderMenu.' .. cmd.action) end - WG['tooltip'].ShowTooltip('ordermenu', tooltip, nil, nil, title) + WG.tooltip .ShowTooltip('ordermenu', tooltip, nil, nil, title) end end cellHovered = cell @@ -976,13 +976,13 @@ function widget:DrawScreen() end if #commands == 0 and (not alwaysShow or spGetGameFrame() == 0) then -- dont show pregame because factions interface is shown - if displayListGuiShader and WG['guishader'] then - WG['guishader'].RemoveDlist('ordermenu') + if displayListGuiShader and WG.guishader then + WG.guishader .RemoveDlist('ordermenu') end doUpdate = nil else - if displayListGuiShader and WG['guishader'] then - WG['guishader'].InsertDlist(displayListGuiShader, 'ordermenu') + if displayListGuiShader and WG.guishader then + WG.guishader .InsertDlist(displayListGuiShader, 'ordermenu') end if doUpdate and displayListOrders then displayListOrders = gl.DeleteList(displayListOrders) @@ -1021,7 +1021,7 @@ function widget:DrawScreen() if #commands >0 then -- draw highlight on top of button - if not WG['topbar'] or not WG['topbar'].showingQuit() then + if not WG.topbar or not WG.topbar .showingQuit() then if commands and cellHovered then local cell = cellHovered if cellRects[cell] and cellRects[cell][4] then diff --git a/luaui/Widgets/gui_pausescreen.lua b/luaui/Widgets/gui_pausescreen.lua index 874ccbb6e00..354bae6ee22 100644 --- a/luaui/Widgets/gui_pausescreen.lua +++ b/luaui/Widgets/gui_pausescreen.lua @@ -319,7 +319,7 @@ function widget:DrawScreenEffects() if spIsGUIHidden() then return end - if shaderProgram and showPauseScreen and WG['screencopymanager'] and WG['screencopymanager'].GetScreenCopy then + if shaderProgram and showPauseScreen and WG.screencopymanager and WG.screencopymanager .GetScreenCopy then glCopyToTexture(screencopy, 0, 0, vpx, vpy, vsx, vsy) --screencopy = WG['screencopymanager'].GetScreenCopy() -- cant get this method to work glTexture(0, screencopy) diff --git a/luaui/Widgets/gui_pip.lua b/luaui/Widgets/gui_pip.lua index 889fbc13940..13451a78435 100644 --- a/luaui/Widgets/gui_pip.lua +++ b/luaui/Widgets/gui_pip.lua @@ -4123,7 +4123,7 @@ local function RecoverInvalidAnimationState() end local function UpdateGuishaderBlur() - if WG['guishader'] then + if WG.guishader then -- Determine the correct bounds based on mode local blurL, blurB, blurR, blurT if isMinimapMode and miscState.minimapMinimized then @@ -4149,7 +4149,7 @@ local function UpdateGuishaderBlur() end -- Use InsertDlist for rounded corner blur support - if WG['guishader'].InsertDlist then + if WG.guishader .InsertDlist then -- Clean up old dlist ourselves before creating new one if render.guishaderDlist then gl.DeleteList(render.guishaderDlist) @@ -4160,10 +4160,10 @@ local function UpdateGuishaderBlur() render.RectRound(blurL, blurB, blurR, blurT, render.elementCorner) end) -- Use force=true to ensure immediate stencil texture update - WG['guishader'].InsertDlist(render.guishaderDlist, 'pip'..pipNumber, true) - elseif WG['guishader'].InsertRect then + WG.guishader .InsertDlist(render.guishaderDlist, 'pip'..pipNumber, true) + elseif WG.guishader .InsertRect then -- Fallback to InsertRect if InsertDlist not available - WG['guishader'].InsertRect(blurL, blurB, blurR, blurT, 'pip'..pipNumber) + WG.guishader .InsertRect(blurL, blurB, blurR, blurT, 'pip'..pipNumber) end end end @@ -6900,8 +6900,8 @@ local function IssueCommandAtPoint(cmdID, wx, wz, usingRMB, forceQueue, radius) else -- Build command - check if it's an extractor/geo that needs spot snapping local buildDefID = -cmdID - local resourceSpotFinder = WG["resource_spot_finder"] - local resourceSpotBuilder = WG["resource_spot_builder"] + local resourceSpotFinder = WG.resource_spot_finder + local resourceSpotBuilder = WG.resource_spot_builder if resourceSpotFinder and resourceSpotBuilder then local mexBuildings = resourceSpotBuilder.GetMexBuildings() @@ -7062,60 +7062,60 @@ end -- may have overwritten our WG['minimap'] registration due to widget layer ordering). local function RegisterMinimapWGAPI() if not isMinimapMode then return end - WG['minimap'] = {} - WG['minimap'].getHeight = function() + WG.minimap = {} + WG.minimap .getHeight = function() if miscState.minimapMinimized then return 0 end local padding = WG.FlowUI and WG.FlowUI.elementPadding or 5 return (render.dim.t - render.dim.b) + padding end - WG['minimap'].getMaxHeight = function() + WG.minimap .getMaxHeight = function() return math.floor(config.minimapModeMaxHeight * render.vsy), config.minimapModeMaxHeight end - WG['minimap'].setMaxHeight = function(value) + WG.minimap .setMaxHeight = function(value) Spring.SetConfigFloat("MinimapMaxHeight", value) config.minimapModeMaxHeight = value widget:ViewResize() end - WG['minimap'].getLeftClickMove = function() + WG.minimap .getLeftClickMove = function() return config.leftButtonPansCamera end - WG['minimap'].setLeftClickMove = function(value) + WG.minimap .setLeftClickMove = function(value) config.leftButtonPansCamera = value Spring.SetConfigInt("MinimapLeftClickMove", value and 1 or 0) end - WG['minimap'].isPipMinimapActive = function() + WG.minimap .isPipMinimapActive = function() return true end - WG['minimap'].isDrawingInPip = false - WG['minimap'].getScreenBounds = function() + WG.minimap .isDrawingInPip = false + WG.minimap .getScreenBounds = function() return render.dim.l, render.dim.b, render.dim.r, render.dim.t end - WG['minimap'].getVisibleWorldArea = function() + WG.minimap .getVisibleWorldArea = function() return render.world.l, render.world.r, render.world.b, render.world.t end - WG['minimap'].getRotation = function() + WG.minimap .getRotation = function() return render.minimapRotation or 0 end - WG['minimap'].getNormalizedVisibleArea = function() + WG.minimap .getNormalizedVisibleArea = function() local normVisLeft = render.world.l / mapInfo.mapSizeX local normVisRight = render.world.r / mapInfo.mapSizeX local normVisBottom = render.world.b / mapInfo.mapSizeZ local normVisTop = render.world.t / mapInfo.mapSizeZ return normVisLeft, normVisRight, normVisBottom, normVisTop end - WG['minimap'].getZoomLevel = function() + WG.minimap .getZoomLevel = function() return mapInfo.mapSizeX / (render.world.r - render.world.l) end - WG['minimap'].getShowSpectatorPings = function() + WG.minimap .getShowSpectatorPings = function() return config.showSpectatorPings end - WG['minimap'].setShowSpectatorPings = function(value) + WG.minimap .setShowSpectatorPings = function(value) config.showSpectatorPings = value end - WG['minimap'].getEngineMinimapFallback = function() + WG.minimap .getEngineMinimapFallback = function() return config.engineMinimapFallback end - WG['minimap'].setEngineMinimapFallback = function(value) + WG.minimap .setEngineMinimapFallback = function(value) config.engineMinimapFallback = value if not value and miscState.engineMinimapActive then -- Turning off fallback while engine minimap is showing: restore icon scale and re-minimize @@ -7130,19 +7130,19 @@ local function RegisterMinimapWGAPI() pipR2T.unitsNeedsUpdate = true end end - WG['minimap'].getEngineMinimapFallbackThreshold = function() + WG.minimap .getEngineMinimapFallbackThreshold = function() return config.engineMinimapFallbackThreshold end - WG['minimap'].setEngineMinimapFallbackThreshold = function(value) + WG.minimap .setEngineMinimapFallbackThreshold = function(value) config.engineMinimapFallbackThreshold = value end - WG['minimap'].getEngineMinimapExplosionOverlay = function() + WG.minimap .getEngineMinimapExplosionOverlay = function() return config.engineMinimapExplosionOverlay end - WG['minimap'].setEngineMinimapExplosionOverlay = function(value) + WG.minimap .setEngineMinimapExplosionOverlay = function(value) config.engineMinimapExplosionOverlay = value end - WG['minimap'].setBaseIconScale = function(value) + WG.minimap .setBaseIconScale = function(value) if miscState.engineMinimapActive then miscState.baseMinimapIconScale = value end @@ -7751,7 +7751,7 @@ end function widget:ViewResize() - font = WG['fonts'].getFont(2) + font = WG.fonts .getFont(2) local oldVsx, oldVsy = render.vsx, render.vsy render.vsx, render.vsy = Spring.GetViewGeometry() @@ -7785,8 +7785,8 @@ function widget:ViewResize() local maxHeight = config.minimapModeMaxHeight -- Dynamically determine max width from topbar position (like gui_minimap does) local effectiveMaxWidth = config.minimapModeMaxWidth - if WG['topbar'] and WG['topbar'].GetPosition then - local topbarArea = WG['topbar'].GetPosition() + if WG.topbar and WG.topbar .GetPosition then + local topbarArea = WG.topbar .GetPosition() if topbarArea and topbarArea[1] then local margin = WG.FlowUI and (WG.FlowUI.elementMargin + WG.FlowUI.elementPadding) or 10 effectiveMaxWidth = (topbarArea[1] - margin) / render.vsx @@ -8282,11 +8282,11 @@ function widget:Shutdown() end -- Remove guishader blur - if WG['guishader'] then - if WG['guishader'].RemoveDlist then - WG['guishader'].RemoveDlist('pip'..pipNumber) - elseif WG['guishader'].RemoveRect then - WG['guishader'].RemoveRect('pip'..pipNumber) + if WG.guishader then + if WG.guishader .RemoveDlist then + WG.guishader .RemoveDlist('pip'..pipNumber) + elseif WG.guishader .RemoveRect then + WG.guishader .RemoveRect('pip'..pipNumber) end end -- Clean up guishader dlist @@ -8317,7 +8317,7 @@ function widget:Shutdown() Spring.SetConfigInt("MiniMapDrawPings", miscState.oldMinimapDrawPings) end -- Re-enable the gui_minimap widget if it exists - if widgetHandler.knownWidgets and widgetHandler.knownWidgets["Minimap"] then + if widgetHandler.knownWidgets and widgetHandler.knownWidgets.Minimap then widgetHandler:EnableWidget("Minimap") end end @@ -8338,7 +8338,7 @@ function widget:Shutdown() WG['pip'..pipNumber] = nil if isMinimapMode then WG.pip_minimap = nil - WG['minimap'] = nil + WG.minimap = nil end for i = 1, #buttons do @@ -8861,7 +8861,7 @@ local function DrawCommandQueuesOverlay(cachedSelectedUnits) -- Show only selected units (or tracked player's selected units) if interactionState.trackingPlayerID then -- Get tracked player's selected units — write directly into pool to avoid table alloc - local playerSelections = WG['allyselectedunits'] and WG['allyselectedunits'].getPlayerSelectedUnits(interactionState.trackingPlayerID) + local playerSelections = WG.allyselectedunits and WG.allyselectedunits .getPlayerSelectedUnits(interactionState.trackingPlayerID) if playerSelections then for unitID, _ in pairs(playerSelections) do unitCount = unitCount + 1 @@ -9070,8 +9070,8 @@ local function DrawBuildPreview(mx, my, iconRadiusZoomDistMult) -- Handle Area Mex command preview if activeCmdID == CMD_AREA_MEX then local wx, wz = PipToWorldCoords(mx, my) - local metalSpots = WG["resource_spot_finder"] and WG["resource_spot_finder"].metalSpotsList - local metalMap = WG["resource_spot_finder"] and WG["resource_spot_finder"].isMetalMap + local metalSpots = WG.resource_spot_finder and WG.resource_spot_finder .metalSpotsList + local metalMap = WG.resource_spot_finder and WG.resource_spot_finder .isMetalMap if metalSpots and not metalMap then -- Draw circle showing area @@ -9092,12 +9092,12 @@ local function DrawBuildPreview(mx, my, iconRadiusZoomDistMult) glFunc.Color(1, 1, 1, 1) -- Draw preview icons for all spots in area - local mexBuildings = WG["resource_spot_builder"] and WG["resource_spot_builder"].GetMexBuildings() + local mexBuildings = WG.resource_spot_builder and WG.resource_spot_builder .GetMexBuildings() if mexBuildings then if not frameSel then frameSel = Spring.GetSelectedUnits() end local selectedUnits = frameSel - local mexConstructors = WG["resource_spot_builder"] and WG["resource_spot_builder"].GetMexConstructors() - local selectedMex = WG["resource_spot_builder"] and WG["resource_spot_builder"].GetBestExtractorFromBuilders(selectedUnits, mexConstructors, mexBuildings) + local mexConstructors = WG.resource_spot_builder and WG.resource_spot_builder .GetMexConstructors() + local selectedMex = WG.resource_spot_builder and WG.resource_spot_builder .GetBestExtractorFromBuilders(selectedUnits, mexConstructors, mexBuildings) if selectedMex then local buildIcon = cache.unitIcon[selectedMex] @@ -9135,22 +9135,22 @@ local function DrawBuildPreview(mx, my, iconRadiusZoomDistMult) local wy = spFunc.GetGroundHeight(wx, wz) -- Check if this is a mex/geo that needs spot snapping - local mexBuildings = WG["resource_spot_builder"] and WG["resource_spot_builder"].GetMexBuildings() - local geoBuildings = WG["resource_spot_builder"] and WG["resource_spot_builder"].GetGeoBuildings() + local mexBuildings = WG.resource_spot_builder and WG.resource_spot_builder .GetMexBuildings() + local geoBuildings = WG.resource_spot_builder and WG.resource_spot_builder .GetGeoBuildings() local isMex = mexBuildings and mexBuildings[buildDefID] local isGeo = geoBuildings and geoBuildings[buildDefID] - local metalMap = WG["resource_spot_finder"] and WG["resource_spot_finder"].isMetalMap + local metalMap = WG.resource_spot_finder and WG.resource_spot_finder .isMetalMap - if isMex and not metalMap and WG["resource_spot_finder"] and WG["resource_spot_builder"] then - local metalSpots = WG["resource_spot_finder"].metalSpotsList - local nearestSpot = WG["resource_spot_builder"].FindNearestValidSpotForExtractor(wx, wz, metalSpots, buildDefID) + if isMex and not metalMap and WG.resource_spot_finder and WG.resource_spot_builder then + local metalSpots = WG.resource_spot_finder .metalSpotsList + local nearestSpot = WG.resource_spot_builder .FindNearestValidSpotForExtractor(wx, wz, metalSpots, buildDefID) if nearestSpot then wx, wz = nearestSpot.x, nearestSpot.z wy = nearestSpot.y end - elseif isGeo and WG["resource_spot_finder"] and WG["resource_spot_builder"] then - local geoSpots = WG["resource_spot_finder"].geoSpotsList - local nearestSpot = WG["resource_spot_builder"].FindNearestValidSpotForExtractor(wx, wz, geoSpots, buildDefID) + elseif isGeo and WG.resource_spot_finder and WG.resource_spot_builder then + local geoSpots = WG.resource_spot_finder .geoSpotsList + local nearestSpot = WG.resource_spot_builder .FindNearestValidSpotForExtractor(wx, wz, geoSpots, buildDefID) if nearestSpot then wx, wz = nearestSpot.x, nearestSpot.z wy = nearestSpot.y @@ -9291,7 +9291,7 @@ local function DrawQueuedBuilds(iconRadiusZoomDistMult, cachedSelectedUnits) local selectedUnits local selectedCount = 0 if interactionState.trackingPlayerID then - local playerSelections = WG['allyselectedunits'] and WG['allyselectedunits'].getPlayerSelectedUnits(interactionState.trackingPlayerID) + local playerSelections = WG.allyselectedunits and WG.allyselectedunits .getPlayerSelectedUnits(interactionState.trackingPlayerID) if playerSelections then -- Convert set to array (reuse cachedSelectedUnits table to avoid alloc) selectedUnits = cachedSelectedUnits or {} @@ -10947,7 +10947,7 @@ local function DrawUnitsAndFeatures(cachedSelectedUnits) -- Pre-fetch player selections once (avoids per-unit WG lookup) local playerSelections = nil if interactionState.trackingPlayerID then - playerSelections = WG['allyselectedunits'] and WG['allyselectedunits'].getPlayerSelectedUnits(interactionState.trackingPlayerID) + playerSelections = WG.allyselectedunits and WG.allyselectedunits .getPlayerSelectedUnits(interactionState.trackingPlayerID) if not playerSelections then playerSelections = {} end -- empty table signals "use tracking mode" to DrawUnit end @@ -11257,7 +11257,7 @@ local function DrawUnitsAndFeatures(cachedSelectedUnits) -- Build selection set for GL4 icon rendering (reuse pool table to avoid per-frame allocation) local selectedSet if interactionState.trackingPlayerID then - selectedSet = WG['allyselectedunits'] and WG['allyselectedunits'].getPlayerSelectedUnits(interactionState.trackingPlayerID) + selectedSet = WG.allyselectedunits and WG.allyselectedunits .getPlayerSelectedUnits(interactionState.trackingPlayerID) else local selUnits2 = cachedSelectedUnits or Spring.GetSelectedUnits() local set = pools.selectedSet @@ -11548,8 +11548,8 @@ local function DrawUnitsAndFeatures(cachedSelectedUnits) end -- Draw ally cursors - if WG['allycursors'] and WG['allycursors'].getCursor and interactionState.trackingPlayerID then - local cursor, isNotIdle = WG['allycursors'].getCursor(interactionState.trackingPlayerID) + if WG.allycursors and WG.allycursors .getCursor and interactionState.trackingPlayerID then + local cursor, isNotIdle = WG.allycursors .getCursor(interactionState.trackingPlayerID) if cursor and isNotIdle then local wx, wz = cursor[1], cursor[3] local cx, cy = WorldToPipCoords(wx, wz) @@ -12288,8 +12288,8 @@ local function DrawBuildCursorWithRotation() else wx, wz = worldTraceX, worldTraceZ end - local metalSpots = WG["resource_spot_finder"] and WG["resource_spot_finder"].metalSpotsList - local metalMap = WG["resource_spot_finder"] and WG["resource_spot_finder"].isMetalMap + local metalSpots = WG.resource_spot_finder and WG.resource_spot_finder .metalSpotsList + local metalMap = WG.resource_spot_finder and WG.resource_spot_finder .isMetalMap if metalSpots and not metalMap then -- Apply rotation transform @@ -12320,12 +12320,12 @@ local function DrawBuildCursorWithRotation() glFunc.Color(1, 1, 1, 1) -- Draw preview icons for all spots in area - local mexBuildings = WG["resource_spot_builder"] and WG["resource_spot_builder"].GetMexBuildings() + local mexBuildings = WG.resource_spot_builder and WG.resource_spot_builder .GetMexBuildings() if mexBuildings then if not frameSel then frameSel = Spring.GetSelectedUnits() end local selectedUnits = frameSel - local mexConstructors = WG["resource_spot_builder"] and WG["resource_spot_builder"].GetMexConstructors() - local selectedMex = WG["resource_spot_builder"] and WG["resource_spot_builder"].GetBestExtractorFromBuilders(selectedUnits, mexConstructors, mexBuildings) + local mexConstructors = WG.resource_spot_builder and WG.resource_spot_builder .GetMexConstructors() + local selectedMex = WG.resource_spot_builder and WG.resource_spot_builder .GetBestExtractorFromBuilders(selectedUnits, mexConstructors, mexBuildings) if selectedMex then local buildIcon = cache.unitIcon[selectedMex] @@ -12403,22 +12403,22 @@ local function DrawBuildCursorWithRotation() local wy = spFunc.GetGroundHeight(wx, wz) -- Snap mex/geo to nearest resource spot, otherwise snap to build grid - local mexBuildings = WG["resource_spot_builder"] and WG["resource_spot_builder"].GetMexBuildings() - local geoBuildings = WG["resource_spot_builder"] and WG["resource_spot_builder"].GetGeoBuildings() + local mexBuildings = WG.resource_spot_builder and WG.resource_spot_builder .GetMexBuildings() + local geoBuildings = WG.resource_spot_builder and WG.resource_spot_builder .GetGeoBuildings() local isMex = mexBuildings and mexBuildings[buildDefID] local isGeo = geoBuildings and geoBuildings[buildDefID] - local metalMap = WG["resource_spot_finder"] and WG["resource_spot_finder"].isMetalMap + local metalMap = WG.resource_spot_finder and WG.resource_spot_finder .isMetalMap - if isMex and not metalMap and WG["resource_spot_finder"] and WG["resource_spot_builder"] then - local metalSpots = WG["resource_spot_finder"].metalSpotsList - local nearestSpot = WG["resource_spot_builder"].FindNearestValidSpotForExtractor(wx, wz, metalSpots, buildDefID) + if isMex and not metalMap and WG.resource_spot_finder and WG.resource_spot_builder then + local metalSpots = WG.resource_spot_finder .metalSpotsList + local nearestSpot = WG.resource_spot_builder .FindNearestValidSpotForExtractor(wx, wz, metalSpots, buildDefID) if nearestSpot then wx, wz = nearestSpot.x, nearestSpot.z wy = nearestSpot.y end - elseif isGeo and WG["resource_spot_finder"] and WG["resource_spot_builder"] then - local geoSpots = WG["resource_spot_finder"].geoSpotsList - local nearestSpot = WG["resource_spot_builder"].FindNearestValidSpotForExtractor(wx, wz, geoSpots, buildDefID) + elseif isGeo and WG.resource_spot_finder and WG.resource_spot_builder then + local geoSpots = WG.resource_spot_finder .geoSpotsList + local nearestSpot = WG.resource_spot_builder .FindNearestValidSpotForExtractor(wx, wz, geoSpots, buildDefID) if nearestSpot then wx, wz = nearestSpot.x, nearestSpot.z wy = nearestSpot.y @@ -13249,7 +13249,7 @@ local function DrawBoxSelection() local maxY = math.min(math.max(interactionState.boxSelectStartY, interactionState.boxSelectEndY), render.dim.t) -- Check if selectionbox widget is enabled - local selectionboxEnabled = widgetHandler:IsWidgetKnown("Selectionbox") and (widgetHandler.orderList["Selectionbox"] and widgetHandler.knownWidgets["Selectionbox"].active) + local selectionboxEnabled = widgetHandler:IsWidgetKnown("Selectionbox") and (widgetHandler.orderList.Selectionbox and widgetHandler.knownWidgets.Selectionbox .active) -- Get modifier key states (ignoring alt as requested) local alt, ctrl, meta, shift = Spring.GetModKeyState() @@ -14805,7 +14805,7 @@ local function UpdateDecalTexture() if (frame - pipR2T.decalLastCheckFrame) < pipR2T.decalCheckInterval then return end pipR2T.decalLastCheckFrame = frame - local decalsAPI = WG['decalsgl4'] + local decalsAPI = WG.decalsgl4 if not decalsAPI then return end local getVBO = decalsAPI.GetVBOData if not getVBO then return end @@ -15033,8 +15033,8 @@ local function HandleHoverAndCursor(mx, my) end if not (interactionState.areBoxSelecting or (mx >= render.dim.l and mx <= render.dim.r and my >= render.dim.b and my <= render.dim.t)) then - if WG['info'] and WG['info'].clearCustomHover then - WG['info'].clearCustomHover() + if WG.info and WG.info .clearCustomHover then + WG.info .clearCustomHover() end interactionState.lastHoveredUnitID = nil interactionState.lastHoveredFeatureID = nil @@ -15050,11 +15050,11 @@ local function HandleHoverAndCursor(mx, my) interactionState.lastHoverCursorCheckTime = currentTime -- Update info widget with custom hover - if WG['info'] and WG['info'].setCustomHover then + if WG.info and WG.info .setCustomHover then local wx, wz = PipToWorldCoords(mx, my) local uID = GetUnitAtPoint(wx, wz) if uID then - WG['info'].setCustomHover('unit', uID) + WG.info .setCustomHover('unit', uID) interactionState.lastHoveredUnitID = uID interactionState.lastHoveredFeatureID = nil else @@ -15062,16 +15062,16 @@ local function HandleHoverAndCursor(mx, my) if cameraState.zoom >= config.zoomFeatures then local fID = GetFeatureAtPoint(wx, wz) if fID then - WG['info'].setCustomHover('feature', fID) + WG.info .setCustomHover('feature', fID) interactionState.lastHoveredFeatureID = fID interactionState.lastHoveredUnitID = nil else - WG['info'].clearCustomHover() + WG.info .clearCustomHover() interactionState.lastHoveredUnitID = nil interactionState.lastHoveredFeatureID = nil end else - WG['info'].clearCustomHover() + WG.info .clearCustomHover() interactionState.lastHoveredUnitID = nil interactionState.lastHoveredFeatureID = nil end @@ -15259,7 +15259,7 @@ local function DrawInteractiveOverlays(mx, my, usedButtonSize) local bx = render.dim.l for i = 1, #visibleButtons do if mx >= bx and mx <= bx + render.usedButtonSize and my >= render.dim.b and my <= render.dim.b + render.usedButtonSize then - if visibleButtons[i].tooltipKey and WG['tooltip'] then + if visibleButtons[i].tooltipKey and WG.tooltip then local tooltipKey = visibleButtons[i].tooltipKey if visibleButtons[i].tooltipActiveKey then if (visibleButtons[i].command == 'pip_track' and interactionState.areTracking) or @@ -15289,7 +15289,7 @@ local function DrawInteractiveOverlays(mx, my, usedButtonSize) if shortcut and shortcut ~= "" then tooltipText = tooltipText .. "\n" .. shortcut end - WG['tooltip'].ShowTooltip('pip'..pipNumber, tooltipText, nil, nil, nil) + WG.tooltip .ShowTooltip('pip'..pipNumber, tooltipText, nil, nil, nil) end glFunc.Color(1,1,1,0.12) glFunc.Texture(false) @@ -15378,8 +15378,8 @@ function widget:DrawScreen() -- Hover highlight if mx >= btnL and mx <= btnR and my >= btnB and my <= btnT then - if WG['tooltip'] then - WG['tooltip'].ShowTooltip('pip'..pipNumber, Spring.I18N('ui.pip.minimap_maximize'), nil, nil, nil) + if WG.tooltip then + WG.tooltip .ShowTooltip('pip'..pipNumber, Spring.I18N('ui.pip.minimap_maximize'), nil, nil, nil) end glFunc.Color(1,1,1,0.12) glFunc.Texture(false) @@ -15457,8 +15457,8 @@ function widget:DrawScreen() glFunc.Texture(false) if mx >= uiState.minModeL - render.elementPadding and mx <= uiState.minModeL + buttonSize + render.elementPadding and my >= uiState.minModeB - render.elementPadding and my <= uiState.minModeB + buttonSize + render.elementPadding then - if WG['tooltip'] then - WG['tooltip'].ShowTooltip('pip'..pipNumber, Spring.I18N('ui.pip.tooltip'), nil, nil, nil) + if WG.tooltip then + WG.tooltip .ShowTooltip('pip'..pipNumber, Spring.I18N('ui.pip.tooltip'), nil, nil, nil) end glFunc.Color(1,1,1,0.12) glFunc.Texture(false) @@ -15775,7 +15775,7 @@ function widget:DrawScreen() -- Draw minimap overlays from other widgets (only in minimap mode) -- This is done here in DrawScreen (not in R2T) because matrix manipulation works correctly here - if isMinimapMode and WG['minimap'] and widgetHandler and widgetHandler.DrawInMiniMapList then + if isMinimapMode and WG.minimap and widgetHandler and widgetHandler.DrawInMiniMapList then local minimapWidth = render.dim.r - render.dim.l local minimapHeight = render.dim.t - render.dim.b @@ -15786,7 +15786,7 @@ function widget:DrawScreen() gl.Scissor(render.dim.l, render.dim.b, minimapWidth, minimapHeight) -- Set a flag that widgets can check during their DrawInMiniMap - WG['minimap'].isDrawingInPip = true + WG.minimap .isDrawingInPip = true -- Update module-level upvalues for the minimap API functions (avoids per-frame closures) -- For shaders: pass in world-normalized coords (NOT Y-flipped), shaders do their own flip @@ -15797,8 +15797,8 @@ function widget:DrawScreen() minimapApi.zoom = mapInfo.mapSizeX / (worldR - worldL) -- Expose pre-created functions (no per-frame allocation) - WG['minimap'].getNormalizedVisibleArea = minimapApi.getNormalizedVisibleArea - WG['minimap'].getZoomLevel = minimapApi.getZoomLevel + WG.minimap .getNormalizedVisibleArea = minimapApi.getNormalizedVisibleArea + WG.minimap .getZoomLevel = minimapApi.getZoomLevel -- Compute rotation-aware ortho bounds for fixed-function GL widgets. -- Widgets handle rotation themselves via getCurrentMiniMapRotationOption(), @@ -15879,7 +15879,7 @@ function widget:DrawScreen() end -- Clear the flag and disable scissor - WG['minimap'].isDrawingInPip = false + WG.minimap .isDrawingInPip = false gl.Scissor(false) -- Reset GL state that widgets may have left dirty @@ -15958,8 +15958,8 @@ function widget:DrawScreen() if mx >= render.dim.l and mx <= render.dim.r and my >= render.dim.b and my <= render.dim.t then if (render.dim.r-mx + my-render.dim.b <= render.usedButtonSize) then hover = true - if WG['tooltip'] then - WG['tooltip'].ShowTooltip('pip'..pipNumber, Spring.I18N('ui.pip.resize'), nil, nil, nil) + if WG.tooltip then + WG.tooltip .ShowTooltip('pip'..pipNumber, Spring.I18N('ui.pip.resize'), nil, nil, nil) end end end @@ -15998,8 +15998,8 @@ function widget:DrawScreen() if mx >= render.dim.r - render.usedButtonSize - render.elementPadding and mx <= render.dim.r - render.elementPadding and my >= render.dim.t - render.usedButtonSize - render.elementPadding and my <= render.dim.t - render.elementPadding then hover = true - if WG['tooltip'] then - WG['tooltip'].ShowTooltip('pip'..pipNumber, Spring.I18N(isMinimapMode and 'ui.pip.minimap_minimize' or 'ui.pip.minimize'), nil, nil, nil) + if WG.tooltip then + WG.tooltip .ShowTooltip('pip'..pipNumber, Spring.I18N(isMinimapMode and 'ui.pip.minimap_minimize' or 'ui.pip.minimize'), nil, nil, nil) end glFunc.Color(1,1,1,0.12) glFunc.Texture(false) @@ -16287,7 +16287,7 @@ end -- Timer for periodic ghost building cleanup (checks ghosts outside PIP viewport) -- ghostCleanupTimer stored in cache table to avoid a top-level local cache.ghostCleanupTimer = 0 -cache.guishaderWasActive = WG['guishader'] ~= nil +cache.guishaderWasActive = WG.guishader ~= nil cache.guishaderCheckTimer = 0 function widget:Update(dt) @@ -16296,7 +16296,7 @@ function widget:Update(dt) cache.guishaderCheckTimer = cache.guishaderCheckTimer + dt if cache.guishaderCheckTimer >= 0.5 then cache.guishaderCheckTimer = 0 - local guishaderActive = WG['guishader'] ~= nil + local guishaderActive = WG.guishader ~= nil if guishaderActive and not cache.guishaderWasActive then UpdateGuishaderBlur() end @@ -16546,11 +16546,11 @@ function widget:Update(dt) gl.SlaveMiniMap(true) -- Update guishader blur: remove when hidden, re-add when shown if wantMinimized then - if WG['guishader'] then - if WG['guishader'].RemoveDlist then - WG['guishader'].RemoveDlist('pip'..pipNumber) - elseif WG['guishader'].RemoveRect then - WG['guishader'].RemoveRect('pip'..pipNumber) + if WG.guishader then + if WG.guishader .RemoveDlist then + WG.guishader .RemoveDlist('pip'..pipNumber) + elseif WG.guishader .RemoveRect then + WG.guishader .RemoveRect('pip'..pipNumber) end end else @@ -16802,7 +16802,7 @@ function widget:Update(dt) end -- Check if selectionbox widget state has changed and update command colors accordingly - local selectionboxEnabled = widgetHandler:IsWidgetKnown("Selectionbox") and (widgetHandler.orderList["Selectionbox"] and widgetHandler.knownWidgets["Selectionbox"].active) + local selectionboxEnabled = widgetHandler:IsWidgetKnown("Selectionbox") and (widgetHandler.orderList.Selectionbox and widgetHandler.knownWidgets.Selectionbox .active) if selectionboxEnabled ~= drawData.lastSelectionboxEnabled then drawData.lastSelectionboxEnabled = selectionboxEnabled if selectionboxEnabled then diff --git a/luaui/Widgets/gui_point_tracker.lua b/luaui/Widgets/gui_point_tracker.lua index 547fb227a6e..bbc14206f94 100644 --- a/luaui/Widgets/gui_point_tracker.lua +++ b/luaui/Widgets/gui_point_tracker.lua @@ -283,8 +283,8 @@ function DrawMapMarksWorld(isMiniMap) mapMarkShader:SetUniform("mapRotation", getCurrentMiniMapRotationOption() or 0) -- Pass PIP visible area if drawing in PIP minimap - if isMiniMap > 0 and WG['minimap'] and WG['minimap'].isDrawingInPip and WG['minimap'].getNormalizedVisibleArea then - local left, right, bottom, top = WG['minimap'].getNormalizedVisibleArea() + if isMiniMap > 0 and WG.minimap and WG.minimap .isDrawingInPip and WG.minimap .getNormalizedVisibleArea then + local left, right, bottom, top = WG.minimap .getNormalizedVisibleArea() mapMarkShader:SetUniform("pipVisibleArea", left, right, bottom, top) else mapMarkShader:SetUniform("pipVisibleArea", 0, 1, 0, 1) @@ -364,7 +364,7 @@ end function widget:DrawInMiniMap(sx, sy) if not enabled then return end -- Don't draw map marks inside the PIP minimap - if WG['minimap'] and WG['minimap'].isDrawingInPip then return end + if WG.minimap and WG.minimap .isDrawingInPip then return end -- this fixes drawing on only 1 quadrant of minimap as pwe gl.ClipDistance ( 1, false) gl.ClipDistance ( 3, false) diff --git a/luaui/Widgets/gui_pregame_build.lua b/luaui/Widgets/gui_pregame_build.lua index 05512c45424..97e012df88a 100644 --- a/luaui/Widgets/gui_pregame_build.lua +++ b/luaui/Widgets/gui_pregame_build.lua @@ -121,7 +121,7 @@ end --- QUEUE HANDLING --- ------------------------------------------ local function handleBuildMenu(shift) - local grid = WG["gridmenu"] + local grid = WG.gridmenu if not grid or not grid.clearCategory or not grid.getAlwaysReturn or not grid.setCurrentCategory then return end @@ -141,12 +141,12 @@ local function setPreGamestartDefID(uDefID) WG["pregame-unit-selected"] = uDefID or -1 end - if WG["buildinggrid"] ~= nil and WG["buildinggrid"].setForceShow ~= nil then - WG["buildinggrid"].setForceShow(FORCE_SHOW_REASON, uDefID ~= nil, uDefID) + if WG.buildinggrid ~= nil and WG.buildinggrid .setForceShow ~= nil then + WG.buildinggrid .setForceShow(FORCE_SHOW_REASON, uDefID ~= nil, uDefID) end - if WG["easyfacing"] ~= nil and WG["easyfacing"].setForceShow ~= nil then - WG["easyfacing"].setForceShow(FORCE_SHOW_REASON, uDefID ~= nil, uDefID) + if WG.easyfacing ~= nil and WG.easyfacing .setForceShow ~= nil then + WG.easyfacing .setForceShow(FORCE_SHOW_REASON, uDefID ~= nil, uDefID) end local isMex = UnitDefs[uDefID] and UnitDefs[uDefID].extractsMetal > 0 @@ -261,7 +261,7 @@ function widget:Initialize() end end - isMetalMap = WG["resource_spot_finder"].isMetalMap + isMetalMap = WG.resource_spot_finder .isMetalMap WG["pregame-build"] = {} WG["pregame-build"].getPreGameDefID = function() @@ -706,9 +706,9 @@ function widget:Update(dt) if not hasConflicts then local isMex = UnitDefs[selBuildQueueDefID] and UnitDefs[selBuildQueueDefID].extractsMetal > 0 if isMex and not isMetalMap then - local spot = WG["resource_spot_finder"].GetClosestMexSpot(posX, posZ) - local validPos = spot and WG["resource_spot_finder"].IsMexPositionValid(spot, posX, posZ) or false - local spotIsTaken = spot and WG["resource_spot_builder"].SpotHasExtractorQueued(spot) or false + local spot = WG.resource_spot_finder .GetClosestMexSpot(posX, posZ) + local validPos = spot and WG.resource_spot_finder .IsMexPositionValid(spot, posX, posZ) or false + local spotIsTaken = spot and WG.resource_spot_builder .SpotHasExtractorQueued(spot) or false if not validPos or spotIsTaken then hasConflicts = true end @@ -772,7 +772,7 @@ function widget:MousePress(mx, my, button) return end - if WG["topbar"] and WG["topbar"].showingQuit() then + if WG.topbar and WG.topbar .showingQuit() then return end @@ -866,9 +866,9 @@ function widget:MousePress(mx, my, button) local isMex = UnitDefs[selBuildQueueDefID] and UnitDefs[selBuildQueueDefID].extractsMetal > 0 if not hasConflicts and isMex and not isMetalMap then - local spot = WG["resource_spot_finder"].GetClosestMexSpot(posX, posZ) - local validPos = spot and WG["resource_spot_finder"].IsMexPositionValid(spot, posX, posZ) or false - local spotIsTaken = spot and WG["resource_spot_builder"].SpotHasExtractorQueued(spot) or false + local spot = WG.resource_spot_finder .GetClosestMexSpot(posX, posZ) + local validPos = spot and WG.resource_spot_finder .IsMexPositionValid(spot, posX, posZ) or false + local spotIsTaken = spot and WG.resource_spot_builder .SpotHasExtractorQueued(spot) or false if not validPos or spotIsTaken then hasConflicts = true end @@ -952,9 +952,9 @@ function widget:MousePress(mx, my, button) end if not hasConflicts and isMex and not isMetalMap then - local spot = WG["resource_spot_finder"].GetClosestMexSpot(bx, bz) - local validPos = spot and WG["resource_spot_finder"].IsMexPositionValid(spot, bx, bz) or false - local spotIsTaken = spot and WG["resource_spot_builder"].SpotHasExtractorQueued(spot) or false + local spot = WG.resource_spot_finder .GetClosestMexSpot(bx, bz) + local validPos = spot and WG.resource_spot_finder .IsMexPositionValid(spot, bx, bz) or false + local spotIsTaken = spot and WG.resource_spot_builder .SpotHasExtractorQueued(spot) or false if not validPos or spotIsTaken then hasConflicts = true end @@ -1135,7 +1135,7 @@ function widget:DrawWorld() if not alphaResults or cacheExpired then alphaResults = { queueAlphas = {}, selectedAlpha = ALPHA_DEFAULT } - local getBuildQueueSpawnStatus = WG["getBuildQueueSpawnStatus"] + local getBuildQueueSpawnStatus = WG.getBuildQueueSpawnStatus if getBuildQueueSpawnStatus then local spawnStatus = getBuildQueueSpawnStatus(buildQueue, selBuildData) @@ -1208,9 +1208,9 @@ function widget:DrawWorld() if not isMex or isMetalMap then return true end - local spot = WG["resource_spot_finder"] and WG["resource_spot_finder"].GetClosestMexSpot and WG["resource_spot_finder"].GetClosestMexSpot(posX, posZ) - local validPos = spot and WG["resource_spot_finder"].IsMexPositionValid and WG["resource_spot_finder"].IsMexPositionValid(spot, posX, posZ) or false - local spotIsTaken = spot and WG["resource_spot_builder"] and WG["resource_spot_builder"].SpotHasExtractorQueued and WG["resource_spot_builder"].SpotHasExtractorQueued(spot) or false + local spot = WG.resource_spot_finder and WG.resource_spot_finder .GetClosestMexSpot and WG.resource_spot_finder .GetClosestMexSpot(posX, posZ) + local validPos = spot and WG.resource_spot_finder .IsMexPositionValid and WG.resource_spot_finder .IsMexPositionValid(spot, posX, posZ) or false + local spotIsTaken = spot and WG.resource_spot_builder and WG.resource_spot_builder .SpotHasExtractorQueued and WG.resource_spot_builder .SpotHasExtractorQueued(spot) or false return validPos and not spotIsTaken end @@ -1249,7 +1249,7 @@ function widget:DrawWorld() local isMex = UnitDefs[selBuildQueueDefID] and UnitDefs[selBuildQueueDefID].extractsMetal > 0 local previewSpawnStatus = {} - local getBuildQueueSpawnStatus = WG["getBuildQueueSpawnStatus"] + local getBuildQueueSpawnStatus = WG.getBuildQueueSpawnStatus if getBuildQueueSpawnStatus then local tempQueue = {} for _, b in ipairs(buildQueue) do @@ -1375,7 +1375,7 @@ function widget:DrawWorld() local isSelectedSpawned = false local selectedAlpha = ALPHA_DEFAULT - local getBuildQueueSpawnStatus = WG["getBuildQueueSpawnStatus"] + local getBuildQueueSpawnStatus = WG.getBuildQueueSpawnStatus if getBuildQueueSpawnStatus and testOrder then local spawnStatus = getBuildQueueSpawnStatus(buildQueue, selBuildData) isSelectedSpawned = spawnStatus.selectedSpawned or false @@ -1519,12 +1519,12 @@ function widget:Shutdown() widgetHandler:DeregisterGlobal("GetBuildQueue") WG["pregame-build"] = nil - if WG["buildinggrid"] ~= nil and WG["buildinggrid"].setForceShow ~= nil then - WG["buildinggrid"].setForceShow(FORCE_SHOW_REASON, false) + if WG.buildinggrid ~= nil and WG.buildinggrid .setForceShow ~= nil then + WG.buildinggrid .setForceShow(FORCE_SHOW_REASON, false) end - if WG["easyfacing"] ~= nil and WG["easyfacing"].setForceShow ~= nil then - WG["easyfacing"].setForceShow(FORCE_SHOW_REASON, false) + if WG.easyfacing ~= nil and WG.easyfacing .setForceShow ~= nil then + WG.easyfacing .setForceShow(FORCE_SHOW_REASON, false) end end diff --git a/luaui/Widgets/gui_pregameui.lua b/luaui/Widgets/gui_pregameui.lua index 28ad89f141b..9d299fb046d 100644 --- a/luaui/Widgets/gui_pregameui.lua +++ b/luaui/Widgets/gui_pregameui.lua @@ -159,7 +159,7 @@ function widget:ViewResize(viewSizeX, viewSizeY) vsx, vsy = spGetViewGeometry() - font = WG['fonts'].getFont(2) + font = WG.fonts .getFont(2) uiScale = (0.75 + (vsx * vsy / 6000000)) buttonX = mathFloor(vsx * buttonPosX) @@ -332,8 +332,8 @@ function widget:Initialize() widget:ViewResize(vsx, vsy) checkStartPointChosen() - WG['pregameui'] = {} - WG['pregameui'].addReadyCondition = function(conditionKey, description) + WG.pregameui = {} + WG.pregameui .addReadyCondition = function(conditionKey, description) if conditionKey and description then readyBlockedConditions[conditionKey] = description isReadyBlocked = true @@ -341,14 +341,14 @@ function widget:Initialize() createButton() end end - WG['pregameui'].removeReadyCondition = function(conditionKey) + WG.pregameui .removeReadyCondition = function(conditionKey) if conditionKey and readyBlockedConditions[conditionKey] then readyBlockedConditions[conditionKey] = nil updateReadyTooltip() createButton() end end - WG['pregameui'].clearAllReadyConditions = function() + WG.pregameui .clearAllReadyConditions = function() readyBlockedConditions = {} isReadyBlocked = false updateReadyTooltip() @@ -361,8 +361,8 @@ function widget:DrawScreen() checkStartPointChosen() end - if WG['guishader'] then - WG['guishader'].RemoveRect('pregameui') + if WG.guishader then + WG.guishader .RemoveRect('pregameui') end buttonDrawn = false @@ -414,8 +414,8 @@ function widget:DrawScreen() end buttonDrawn = true - if WG['guishader'] then - WG['guishader'].InsertRect( + if WG.guishader then + WG.guishader .InsertRect( uiElementRect[1], uiElementRect[2], uiElementRect[3], @@ -431,8 +431,8 @@ function widget:DrawScreen() gl.CallList(buttonHoverList) colorString = "\255\210\210\210" - if isReadyBlocked and WG['tooltip'] then - WG['tooltip'].ShowTooltip('pregameui', cachedTooltipText) + if isReadyBlocked and WG.tooltip then + WG.tooltip .ShowTooltip('pregameui', cachedTooltipText) end else gl.CallList(buttonList) @@ -485,8 +485,8 @@ function widget:DrawWorld() for i = 1, #teamList do local teamID = teamList[i] local tsx, tsy, tsz - if WG['map_startbox'] and WG['map_startbox'].GetEffectiveStartPosition then - tsx, tsy, tsz = WG['map_startbox'].GetEffectiveStartPosition(teamID) + if WG.map_startbox and WG.map_startbox .GetEffectiveStartPosition then + tsx, tsy, tsz = WG.map_startbox .GetEffectiveStartPosition(teamID) else tsx, tsy, tsz = Spring.GetTeamStartPosition(teamID) end @@ -507,13 +507,13 @@ end function widget:Shutdown() gl.DeleteList(buttonList) gl.DeleteList(buttonHoverList) - if WG['guishader'] then - WG['guishader'].RemoveRect('pregameui') + if WG.guishader then + WG.guishader .RemoveRect('pregameui') end if WG.StopDrawUnitShapeGL4 then for id, _ in pairs(unitshapes) do removeUnitShape(id) end end - WG['pregameui'] = nil + WG.pregameui = nil end diff --git a/luaui/Widgets/gui_pregameui_draft.lua b/luaui/Widgets/gui_pregameui_draft.lua index cc1aaf99d75..29b91ea0a68 100644 --- a/luaui/Widgets/gui_pregameui_draft.lua +++ b/luaui/Widgets/gui_pregameui_draft.lua @@ -225,13 +225,13 @@ local function DrawState(playerID, posX, posY) end end end - gl_Texture(pics["readyTexture"]) + gl_Texture(pics.readyTexture ) DrawRect(posX, posY - (1*playerScale), posX + (16*playerScale), posY + (16*playerScale)) gl_Color(1, 1, 1, 1) end local function DrawHourglass(posX, posY) - gl_Texture(pics["hourglass"]) + gl_Texture(pics.hourglass ) DrawRect(posX, posY - (1*playerScale), posX + (16*playerScale), posY + (16*playerScale)) gl_Color(1, 1, 1, 1) end @@ -251,21 +251,21 @@ end local function DrawRank(rank, posX, posY) if rank == 0 then - DrawRankImage(pics["rank0"], posX, posY) + DrawRankImage(pics.rank0 , posX, posY) elseif rank == 1 then - DrawRankImage(pics["rank1"], posX, posY) + DrawRankImage(pics.rank1 , posX, posY) elseif rank == 2 then - DrawRankImage(pics["rank2"], posX, posY) + DrawRankImage(pics.rank2 , posX, posY) elseif rank == 3 then - DrawRankImage(pics["rank3"], posX, posY) + DrawRankImage(pics.rank3 , posX, posY) elseif rank == 4 then - DrawRankImage(pics["rank4"], posX, posY) + DrawRankImage(pics.rank4 , posX, posY) elseif rank == 5 then - DrawRankImage(pics["rank5"], posX, posY) + DrawRankImage(pics.rank5 , posX, posY) elseif rank == 6 then - DrawRankImage(pics["rank6"], posX, posY) + DrawRankImage(pics.rank6 , posX, posY) elseif rank == 7 then - DrawRankImage(pics["rank7"], posX, posY) + DrawRankImage(pics.rank7 , posX, posY) else end @@ -427,8 +427,8 @@ local function buttonTextRefresh() end local function PlayChooseStartLocSound() - if not mySpec and not startPointChosen and WG['notifications'] then - WG['notifications'].addEvent('ChooseStartLoc', true) + if not mySpec and not startPointChosen and WG.notifications then + WG.notifications .addEvent('ChooseStartLoc', true) end end @@ -717,8 +717,8 @@ local function drawButton() -- Render the button (this happens every frame but uses cached display lists) if showLockButton and buttonList and buttonHoverList then -- Add GUI shader rect - if WG['guishader'] then - WG['guishader'].InsertRect( + if WG.guishader then + WG.guishader .InsertRect( uiElementRect[1], uiElementRect[2], uiElementRect[3], @@ -734,8 +734,8 @@ local function drawButton() glCallList(buttonHoverList) colorString = "\255\210\210\210" - if isReadyBlocked and WG['tooltip'] then - WG['tooltip'].ShowTooltip('pregameui', cachedTooltipText) + if isReadyBlocked and WG.tooltip then + WG.tooltip .ShowTooltip('pregameui', cachedTooltipText) end else glCallList(buttonList) @@ -1010,20 +1010,20 @@ function widget:Initialize() reloadedDraftMode = os.clock()+2 -- in case you luaui reload end - WG['pregameui_draft'] = {} - WG['pregameui_draft'].addReadyCondition = function(conditionKey, description) + WG.pregameui_draft = {} + WG.pregameui_draft .addReadyCondition = function(conditionKey, description) if conditionKey and description then readyBlockedConditions[conditionKey] = description updateTooltip() end end - WG['pregameui_draft'].removeReadyCondition = function(conditionKey) + WG.pregameui_draft .removeReadyCondition = function(conditionKey) if conditionKey and readyBlockedConditions[conditionKey] then readyBlockedConditions[conditionKey] = nil updateTooltip() end end - WG['pregameui_draft'].clearAllReadyConditions = function() + WG.pregameui_draft .clearAllReadyConditions = function() readyBlockedConditions = {} updateTooltip() end @@ -1088,8 +1088,8 @@ function widget:DrawScreen() end end if not showingTeamplacementUI then - if WG['guishader'] then - WG['guishader'].RemoveRect('pregameui_draft') + if WG.guishader then + WG.guishader .RemoveRect('pregameui_draft') end end @@ -1161,8 +1161,8 @@ function widget:DrawWorld() for i = 1, #teamList do local teamID = teamList[i] local tsx, tsy, tsz - if WG['map_startbox'] and WG['map_startbox'].GetEffectiveStartPosition then - tsx, tsy, tsz = WG['map_startbox'].GetEffectiveStartPosition(teamID) + if WG.map_startbox and WG.map_startbox .GetEffectiveStartPosition then + tsx, tsy, tsz = WG.map_startbox .GetEffectiveStartPosition(teamID) else tsx, tsy, tsz = Spring.GetTeamStartPosition(teamID) end @@ -1296,13 +1296,13 @@ function widget:Shutdown() glDeleteList(buttonHoverList) glDeleteList(TeamPlacementUI) gl.DeleteFont(font) - if WG['guishader'] then - WG['guishader'].RemoveRect('pregameui_draft') + if WG.guishader then + WG.guishader .RemoveRect('pregameui_draft') end if WG.StopDrawUnitShapeGL4 then for id, _ in pairs(unitshapes) do removeUnitShape(id) end end - WG['pregameui_draft'] = nil + WG.pregameui_draft = nil end diff --git a/luaui/Widgets/gui_prospector.lua b/luaui/Widgets/gui_prospector.lua index 62bc2f53ed9..5fbd5f8c13e 100644 --- a/luaui/Widgets/gui_prospector.lua +++ b/luaui/Widgets/gui_prospector.lua @@ -102,10 +102,10 @@ end local function SetupMexDefInfos() local minExtractsMetal - local armMexDef = UnitDefNames["armmex"] + local armMexDef = UnitDefNames.armmex if armMexDef and armMexDef.extractsMetal > 0 then - defaultDefID = UnitDefNames["armmex"].id + defaultDefID = UnitDefNames.armmex .id minExtractsMetal = 0 end @@ -189,7 +189,7 @@ end function widget:Initialize() SetupMexDefInfos() once = true - metalMap = WG["resource_spot_finder"].isMetalMap + metalMap = WG.resource_spot_finder .isMetalMap end @@ -231,7 +231,7 @@ function widget:DrawScreen() return end if not metalMap then - local pos = WG["resource_spot_finder"].GetClosestMexSpot(coords[1], coords[3]) + local pos = WG.resource_spot_finder .GetClosestMexSpot(coords[1], coords[3]) if not pos then return end coords[1] = pos.x coords[3] = pos.z @@ -242,5 +242,5 @@ function widget:DrawScreen() end function widget:ViewResize() - font = WG['fonts'].getFont(1, 1.5) + font = WG.fonts .getFont(1, 1.5) end diff --git a/luaui/Widgets/gui_rank_icons_gl4.lua b/luaui/Widgets/gui_rank_icons_gl4.lua index e21d8177d97..35cc79917a4 100644 --- a/luaui/Widgets/gui_rank_icons_gl4.lua +++ b/luaui/Widgets/gui_rank_icons_gl4.lua @@ -268,26 +268,26 @@ function widget:Initialize() widgetHandler:RemoveWidget() return end - WG['rankicons'] = {} - WG['rankicons'].getDrawDistance = function() + WG.rankicons = {} + WG.rankicons .getDrawDistance = function() return distanceMult end - WG['rankicons'].setDrawDistance = function(value) + WG.rankicons .setDrawDistance = function(value) distanceMult = value usedCutoffDistance = cutoffDistance * distanceMult end - WG['rankicons'].getScale = function() + WG.rankicons .getScale = function() return iconsizeMult end - WG['rankicons'].setScale = function(value) + WG.rankicons .setScale = function(value) iconsizeMult = value usedIconsize = iconsize * iconsizeMult doRefresh = true end - WG['rankicons'].getRank = function(unitDefID, xp) + WG.rankicons .getRank = function(unitDefID, xp) return getRank(unitDefID, xp) end - WG['rankicons'].getRankTextures = function(unitDefID, xp) + WG.rankicons .getRankTextures = function(unitDefID, xp) return rankTextures end diff --git a/luaui/Widgets/gui_raptorStatsPanel.lua b/luaui/Widgets/gui_raptorStatsPanel.lua index 185fd45b1c1..2058a989e46 100644 --- a/luaui/Widgets/gui_raptorStatsPanel.lua +++ b/luaui/Widgets/gui_raptorStatsPanel.lua @@ -462,8 +462,8 @@ end function widget:ViewResize() vsx, vsy = spGetViewGeometry() - font = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2) + font = WG.fonts .getFont() + font2 = WG.fonts .getFont(2) x1 = mathFloor(x1 - viewSizeX) y1 = mathFloor(y1 - viewSizeY) diff --git a/luaui/Widgets/gui_reclaim_field_highlight.lua b/luaui/Widgets/gui_reclaim_field_highlight.lua index 786eed1fd7a..ac1d397b0ee 100644 --- a/luaui/Widgets/gui_reclaim_field_highlight.lua +++ b/luaui/Widgets/gui_reclaim_field_highlight.lua @@ -2732,96 +2732,96 @@ function widget:Initialize() widgetHandler:AddAction("reclaim_highlight", enableHighlight, nil, "p") widgetHandler:AddAction("reclaim_highlight", disableHighlight, nil, "r") - WG['reclaimfieldhighlight'] = {} - WG['reclaimfieldhighlight'].getShowOption = function() + WG.reclaimfieldhighlight = {} + WG.reclaimfieldhighlight .getShowOption = function() return showOption end - WG['reclaimfieldhighlight'].setShowOption = function(value) + WG.reclaimfieldhighlight .setShowOption = function(value) showOption = value end - WG['reclaimfieldhighlight'].getSmoothingSegments = function() + WG.reclaimfieldhighlight .getSmoothingSegments = function() return smoothingSegments end - WG['reclaimfieldhighlight'].setSmoothingSegments = function(value) + WG.reclaimfieldhighlight .setSmoothingSegments = function(value) smoothingSegments = clamp(value, 4, 40) -- Clamp to reasonable range dirty.needCluster = true -- Force recluster with new settings end - WG['reclaimfieldhighlight'].getShowEnergyFields = function() + WG.reclaimfieldhighlight .getShowEnergyFields = function() return showEnergyFields end - WG['reclaimfieldhighlight'].setShowEnergyFields = function(value) + WG.reclaimfieldhighlight .setShowEnergyFields = function(value) showEnergyFields = value dirty.needCluster = true -- Force recluster with new settings end - WG['reclaimfieldhighlight'].getShowEnergyOption = function() + WG.reclaimfieldhighlight .getShowEnergyOption = function() return showEnergyOption end - WG['reclaimfieldhighlight'].setShowEnergyOption = function(value) + WG.reclaimfieldhighlight .setShowEnergyOption = function(value) showEnergyOption = value end - WG['reclaimfieldhighlight'].getFadeStartDistance = function() + WG.reclaimfieldhighlight .getFadeStartDistance = function() return fadeStartDistance end - WG['reclaimfieldhighlight'].setFadeStartDistance = function(value) + WG.reclaimfieldhighlight .setFadeStartDistance = function(value) fadeStartDistance = max(100, value) -- Ensure start < end if fadeStartDistance >= fadeEndDistance then fadeEndDistance = fadeStartDistance + 1000 end end - WG['reclaimfieldhighlight'].getFadeEndDistance = function() + WG.reclaimfieldhighlight .getFadeEndDistance = function() return fadeEndDistance end - WG['reclaimfieldhighlight'].setFadeEndDistance = function(value) + WG.reclaimfieldhighlight .setFadeEndDistance = function(value) fadeEndDistance = max(fadeStartDistance + 100, value) end - WG['reclaimfieldhighlight'].getAlwaysShowFields = function() + WG.reclaimfieldhighlight .getAlwaysShowFields = function() return alwaysShowFields end - WG['reclaimfieldhighlight'].setAlwaysShowFields = function(value) + WG.reclaimfieldhighlight .setAlwaysShowFields = function(value) alwaysShowFields = value end - WG['reclaimfieldhighlight'].getAlwaysShowFieldsThreshold = function() + WG.reclaimfieldhighlight .getAlwaysShowFieldsThreshold = function() return alwaysShowFieldsThreshold end - WG['reclaimfieldhighlight'].setAlwaysShowFieldsThreshold = function(value) + WG.reclaimfieldhighlight .setAlwaysShowFieldsThreshold = function(value) -- Deprecated - threshold is now auto-calculated -- This function kept for backwards compatibility end - WG['reclaimfieldhighlight'].getAlwaysShowFieldsMinThreshold = function() + WG.reclaimfieldhighlight .getAlwaysShowFieldsMinThreshold = function() return alwaysShowFieldsMinThreshold end - WG['reclaimfieldhighlight'].setAlwaysShowFieldsMinThreshold = function(value) + WG.reclaimfieldhighlight .setAlwaysShowFieldsMinThreshold = function(value) alwaysShowFieldsMinThreshold = max(0, value) alwaysShowFieldsThreshold = CalculateAlwaysShowThreshold() end - WG['reclaimfieldhighlight'].getAlwaysShowFieldsMaxThreshold = function() + WG.reclaimfieldhighlight .getAlwaysShowFieldsMaxThreshold = function() return alwaysShowFieldsMaxThreshold end - WG['reclaimfieldhighlight'].setAlwaysShowFieldsMaxThreshold = function(value) + WG.reclaimfieldhighlight .setAlwaysShowFieldsMaxThreshold = function(value) alwaysShowFieldsMaxThreshold = max(alwaysShowFieldsMinThreshold, value) alwaysShowFieldsThreshold = CalculateAlwaysShowThreshold() end - WG['reclaimfieldhighlight'].getTotalMapMetal = function() + WG.reclaimfieldhighlight .getTotalMapMetal = function() return totalMapMetal end -- Deferred update settings - WG['reclaimfieldhighlight'].getDeferOutOfViewUpdates = function() + WG.reclaimfieldhighlight .getDeferOutOfViewUpdates = function() return batch.deferOutOfView end - WG['reclaimfieldhighlight'].setDeferOutOfViewUpdates = function(value) + WG.reclaimfieldhighlight .setDeferOutOfViewUpdates = function(value) batch.deferOutOfView = value end - WG['reclaimfieldhighlight'].getOutOfViewMargin = function() + WG.reclaimfieldhighlight .getOutOfViewMargin = function() return batch.outOfViewMargin end - WG['reclaimfieldhighlight'].setOutOfViewMargin = function(value) + WG.reclaimfieldhighlight .setOutOfViewMargin = function(value) batch.outOfViewMargin = max(0, value) end @@ -2849,7 +2849,7 @@ function widget:Shutdown() widgetHandler:RemoveAction("reclaim_highlight", "p") widgetHandler:RemoveAction("reclaim_highlight", "r") - WG['reclaimfieldhighlight'] = nil -- todo: register/deregister, right? + WG.reclaimfieldhighlight = nil -- todo: register/deregister, right? -- Clean up per-cluster display lists for cid in pairs(clusterDisplayLists) do diff --git a/luaui/Widgets/gui_reclaiminfo.lua b/luaui/Widgets/gui_reclaiminfo.lua index 3517f1c4ea6..17f6650c794 100644 --- a/luaui/Widgets/gui_reclaiminfo.lua +++ b/luaui/Widgets/gui_reclaiminfo.lua @@ -88,7 +88,7 @@ end function widget:ViewResize() vsx, vsy = Spring.GetViewGeometry() - font = WG['fonts'].getFont(1, 1.5) + font = WG.fonts .getFont(1, 1.5) form = mathFloor(vsx / 87) end diff --git a/luaui/Widgets/gui_rejoinprogress.lua b/luaui/Widgets/gui_rejoinprogress.lua index e97aa4ae0de..4b370e1cb91 100644 --- a/luaui/Widgets/gui_rejoinprogress.lua +++ b/luaui/Widgets/gui_rejoinprogress.lua @@ -63,8 +63,8 @@ local function updateRejoin() dlistRejoinGuishader = gl.CreateList(function() RectRound(area[1], area[2], area[3], area[4], 5.5 * widgetScale, 0,0,1,1) end) - if WG['guishader'] then - WG['guishader'].InsertDlist(dlistRejoinGuishader, 'rejoinprogress') + if WG.guishader then + WG.guishader .InsertDlist(dlistRejoinGuishader, 'rejoinprogress') end end @@ -171,8 +171,8 @@ function widget:Update(dt) elseif showRejoinUI then showRejoinUI = false if dlistRejoinGuishader ~= nil then - if WG['guishader'] then - WG['guishader'].RemoveDlist('rejoinprogress') + if WG.guishader then + WG.guishader .RemoveDlist('rejoinprogress') end gl.DeleteList(dlistRejoinGuishader) dlistRejoinGuishader = nil @@ -199,13 +199,13 @@ function widget:ViewResize() TexturedRectRound = WG.FlowUI.Draw.TexturedRectRound UiElement = WG.FlowUI.Draw.Element - font2 = WG['fonts'].getFont(2) + font2 = WG.fonts .getFont(2) rejoinArea = { mathFloor(0.5*vsx)-mathFloor(width*0.5), mathFloor(posY*vsy)-mathFloor(height*0.5), mathFloor(0.5*vsx) + mathFloor(width*0.5), mathFloor(posY*vsy)+mathFloor(height*0.5) } if dlistRejoinGuishader ~= nil then - if WG['guishader'] then - WG['guishader'].RemoveDlist('rejoinprogress') + if WG.guishader then + WG.guishader .RemoveDlist('rejoinprogress') end gl.DeleteList(dlistRejoinGuishader) dlistRejoinGuishader = nil @@ -235,8 +235,8 @@ end function widget:Initialize() widget:ViewResize() - WG['rejoin'] = {} - WG['rejoin'].showingRejoining = function() + WG.rejoin = {} + WG.rejoin .showingRejoining = function() return showRejoinUI end end @@ -245,8 +245,8 @@ function widget:Shutdown() if dlistRejoin ~= nil then gl.DeleteList(dlistRejoin) end - if dlistRejoinGuishader ~= nil and WG['guishader'] then - WG['guishader'].RemoveDlist('rejoinprogress') + if dlistRejoinGuishader ~= nil and WG.guishader then + WG.guishader .RemoveDlist('rejoinprogress') end - WG['rejoin'] = nil + WG.rejoin = nil end diff --git a/luaui/Widgets/gui_replaybuttons.lua b/luaui/Widgets/gui_replaybuttons.lua index 1da7dfc9046..a428c9da99f 100644 --- a/luaui/Widgets/gui_replaybuttons.lua +++ b/luaui/Widgets/gui_replaybuttons.lua @@ -109,7 +109,7 @@ function widget:ViewResize() RectRound = WG.FlowUI.Draw.RectRound UiButton = WG.FlowUI.Draw.Button - font = WG['fonts'].getFont(2, 1.6) + font = WG.fonts .getFont(2, 1.6) end function widget:Initialize() @@ -129,8 +129,8 @@ function widget:Initialize() end function widget:Shutdown() - if WG['guishader'] then - WG['guishader'].DeleteDlist('replaybuttons') + if WG.guishader then + WG.guishader .DeleteDlist('replaybuttons') end gl.DeleteList(buttonsList) end @@ -139,8 +139,8 @@ end function widget:DrawScreen() if not isActive then - if WG['guishader'] and prevIsActive ~= isActive then - WG['guishader'].RemoveDlist('replaybuttons') + if WG.guishader and prevIsActive ~= isActive then + WG.guishader .RemoveDlist('replaybuttons') end return end @@ -161,8 +161,8 @@ function widget:DrawScreen() end) end - if WG['guishader'] and isActive and prevIsActive ~= isActive then - WG['guishader'].InsertDlist(backgroundGuishader, 'replaybuttons') + if WG.guishader and isActive and prevIsActive ~= isActive then + WG.guishader .InsertDlist(backgroundGuishader, 'replaybuttons') end if buttonsList then diff --git a/luaui/Widgets/gui_resurrection_halos_gl4.lua b/luaui/Widgets/gui_resurrection_halos_gl4.lua index 7f2e2245a02..5fb23118695 100644 --- a/luaui/Widgets/gui_resurrection_halos_gl4.lua +++ b/luaui/Widgets/gui_resurrection_halos_gl4.lua @@ -131,8 +131,8 @@ function widget:Initialize() end if not initGL4() then return end - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - local visibleUnits = WG['unittrackerapi'].visibleUnits + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + local visibleUnits = WG.unittrackerapi .visibleUnits for unitID, unitDefID in pairs(visibleUnits) do widget:VisibleUnitAdded(unitID, unitDefID) end diff --git a/luaui/Widgets/gui_savegame.lua b/luaui/Widgets/gui_savegame.lua index 640a91ba87f..191289d1507 100644 --- a/luaui/Widgets/gui_savegame.lua +++ b/luaui/Widgets/gui_savegame.lua @@ -236,12 +236,12 @@ local function savegameCmd(_, _, params) end function widget:Initialize() - WG['savegame'] = {} + WG.savegame = {} widgetHandler:AddAction("savegame", savegameCmd, nil, 't') end function widget:Shutdown() - WG['savegame'] = nil + WG.savegame = nil widgetHandler:RemoveAction("savegame") end diff --git a/luaui/Widgets/gui_scavStatsPanel.lua b/luaui/Widgets/gui_scavStatsPanel.lua index 35c5a0aeb20..27700ff736f 100644 --- a/luaui/Widgets/gui_scavStatsPanel.lua +++ b/luaui/Widgets/gui_scavStatsPanel.lua @@ -431,8 +431,8 @@ end function widget:ViewResize() vsx, vsy = spGetViewGeometry() - font = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2) + font = WG.fonts .getFont() + font2 = WG.fonts .getFont(2) x1 = mathFloor(x1 - viewSizeX) y1 = mathFloor(y1 - viewSizeY) diff --git a/luaui/Widgets/gui_scavenger_info.lua b/luaui/Widgets/gui_scavenger_info.lua index 531f23441d2..521f524584d 100644 --- a/luaui/Widgets/gui_scavenger_info.lua +++ b/luaui/Widgets/gui_scavenger_info.lua @@ -75,8 +75,8 @@ function widget:ViewResize() screenX = mathFloor((vsx * centerPosX) - (screenWidth / 2)) screenY = mathFloor((vsy * centerPosY) + (screenHeight / 2)) - font, loadedFontSize = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2) + font, loadedFontSize = WG.fonts .getFont() + font2 = WG.fonts .getFont(2) elementCorner = WG.FlowUI.elementCorner RectRound = WG.FlowUI.Draw.RectRound @@ -197,7 +197,7 @@ function widget:DrawScreen() -- draw the text panel glCallList(textList) - if WG['guishader'] then + if WG.guishader then if backgroundGuishader ~= nil then glDeleteList(backgroundGuishader) end @@ -208,7 +208,7 @@ function widget:DrawScreen() RectRound(titleRect[1], titleRect[2], titleRect[3], titleRect[4], elementCorner, 1, 1, 0, 0) end) dlistcreated = true - WG['guishader'].InsertDlist(backgroundGuishader, 'text') + WG.guishader .InsertDlist(backgroundGuishader, 'text') end showOnceMore = false @@ -217,8 +217,8 @@ function widget:DrawScreen() Spring.SetMouseCursor('cursornormal') end - elseif dlistcreated and WG['guishader'] then - WG['guishader'].DeleteDlist('text') + elseif dlistcreated and WG.guishader then + WG.guishader .DeleteDlist('text') dlistcreated = nil end end @@ -279,15 +279,15 @@ end function widget:Initialize() if textFile then - WG['scavengerinfo'] = {} - WG['scavengerinfo'].toggle = function(state) + WG.scavengerinfo = {} + WG.scavengerinfo .toggle = function(state) if state ~= nil then show = state else show = not show end end - WG['scavengerinfo'].isvisible = function() + WG.scavengerinfo .isvisible = function() return show end @@ -312,8 +312,8 @@ function widget:Shutdown() glDeleteList(textList) textList = nil end - if WG['guishader'] then - WG['guishader'].DeleteDlist('text') + if WG.guishader then + WG.guishader .DeleteDlist('text') end end diff --git a/luaui/Widgets/gui_screen_mode_info.lua b/luaui/Widgets/gui_screen_mode_info.lua index cd68a5579fb..45b463c58d2 100644 --- a/luaui/Widgets/gui_screen_mode_info.lua +++ b/luaui/Widgets/gui_screen_mode_info.lua @@ -71,7 +71,7 @@ function widget:ViewResize() vsx, vsy = spGetViewGeometry() widgetScale = (0.80 + (vsx * vsy / 6000000)) - font = WG['fonts'].getFont(1, 1.5) + font = WG.fonts .getFont(1, 1.5) end function widget:Initialize() @@ -79,7 +79,7 @@ function widget:Initialize() end function widget:DrawScreen() - if WG['topbar'] and WG['topbar'].showingQuit() then return end + if WG.topbar and WG.topbar .showingQuit() then return end framecount = framecount + 1 diff --git a/luaui/Widgets/gui_selectionbox.lua b/luaui/Widgets/gui_selectionbox.lua index d89b2d22b05..e937b2572ab 100644 --- a/luaui/Widgets/gui_selectionbox.lua +++ b/luaui/Widgets/gui_selectionbox.lua @@ -105,7 +105,7 @@ function widget:MousePress(x, y, button) if button ~= 1 then return false end -- Don't track selection if minimap left-click-move is enabled - if WG['minimap'] and WG['minimap'].getLeftClickMove and WG['minimap'].getLeftClickMove() then + if WG.minimap and WG.minimap .getLeftClickMove and WG.minimap .getLeftClickMove() then return false end @@ -140,7 +140,7 @@ function widget:Update() if leftPressed then -- Don't track selection if minimap left-click-move is enabled - if WG['minimap'] and WG['minimap'].getLeftClickMove and WG['minimap'].getLeftClickMove() then + if WG.minimap and WG.minimap .getLeftClickMove and WG.minimap .getLeftClickMove() then if minimapSelectionActive then minimapSelectionActive = false end @@ -196,7 +196,7 @@ function widget:MouseMove(x, y, dx, dy, button) end function widget:DrawInMiniMap(minimapWidth, minimapHeight) -- Skip if PIP minimap replacement is active (it handles its own selection box) - if WG['minimap'] and WG['minimap'].isPipMinimapActive and WG['minimap'].isPipMinimapActive() then + if WG.minimap and WG.minimap .isPipMinimapActive and WG.minimap .isPipMinimapActive() then return end @@ -204,7 +204,7 @@ function widget:DrawInMiniMap(minimapWidth, minimapHeight) if not minimapSelectionActive then return end -- Don't draw if minimap left-click-move is enabled - if WG['minimap'] and WG['minimap'].getLeftClickMove and WG['minimap'].getLeftClickMove() then + if WG.minimap and WG.minimap .getLeftClickMove and WG.minimap .getLeftClickMove() then return end diff --git a/luaui/Widgets/gui_selfd_icons.lua b/luaui/Widgets/gui_selfd_icons.lua index 0c56b3ee7d1..0bc95068f73 100644 --- a/luaui/Widgets/gui_selfd_icons.lua +++ b/luaui/Widgets/gui_selfd_icons.lua @@ -117,7 +117,7 @@ local function init() gl.DeleteList(drawLists[k]) end drawLists = {} - font = WG['fonts'].getFont(2, 1.5) + font = WG.fonts .getFont(2, 1.5) spec = spGetSpectatingState() diff --git a/luaui/Widgets/gui_sensor_ranges_jammer.lua b/luaui/Widgets/gui_sensor_ranges_jammer.lua index 4d0b6372bd3..8eb7f3ade93 100644 --- a/luaui/Widgets/gui_sensor_ranges_jammer.lua +++ b/luaui/Widgets/gui_sensor_ranges_jammer.lua @@ -206,8 +206,8 @@ local instanceCache = {0,0,0,0,0,0,0,0} local function InitializeUnits() --spEcho("Sensor Ranges LOS InitializeUnits") InstanceVBOTable.clearInstanceTable(circleInstanceVBO) - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - local visibleUnits = WG['unittrackerapi'].visibleUnits + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + local visibleUnits = WG.unittrackerapi .visibleUnits for unitID, unitDefID in pairs(visibleUnits) do widget:VisibleUnitAdded(unitID, unitDefID, spGetUnitTeam(unitID), nil, true) end diff --git a/luaui/Widgets/gui_sensor_ranges_los.lua b/luaui/Widgets/gui_sensor_ranges_los.lua index 651c748835c..a192d491776 100644 --- a/luaui/Widgets/gui_sensor_ranges_los.lua +++ b/luaui/Widgets/gui_sensor_ranges_los.lua @@ -223,8 +223,8 @@ local instanceCache = {0,0,0,0,0,0,0,0} local function InitializeUnits() --spEcho("Sensor Ranges LOS InitializeUnits") InstanceVBOTable.clearInstanceTable(circleInstanceVBO) - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - local visibleUnits = WG['unittrackerapi'].visibleUnits + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + local visibleUnits = WG.unittrackerapi .visibleUnits for unitID, unitDefID in pairs(visibleUnits) do widget:VisibleUnitAdded(unitID, unitDefID, spGetUnitTeam(unitID), nil, true) end diff --git a/luaui/Widgets/gui_sensor_ranges_radar.lua b/luaui/Widgets/gui_sensor_ranges_radar.lua index 25da160956e..d9ac7ff9e21 100644 --- a/luaui/Widgets/gui_sensor_ranges_radar.lua +++ b/luaui/Widgets/gui_sensor_ranges_radar.lua @@ -206,8 +206,8 @@ local instanceCache = {0,0,0,0,0,0,0,0} local function InitializeUnits() --spEcho("Sensor Ranges LOS InitializeUnits") InstanceVBOTable.clearInstanceTable(circleInstanceVBO) - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - local visibleUnits = WG['unittrackerapi'].visibleUnits + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + local visibleUnits = WG.unittrackerapi .visibleUnits for unitID, unitDefID in pairs(visibleUnits) do widget:VisibleUnitAdded(unitID, unitDefID, spGetUnitTeam(unitID), nil, true) end diff --git a/luaui/Widgets/gui_sensor_ranges_radar_preview.lua b/luaui/Widgets/gui_sensor_ranges_radar_preview.lua index ad67127f189..63a0c91b0bf 100644 --- a/luaui/Widgets/gui_sensor_ranges_radar_preview.lua +++ b/luaui/Widgets/gui_sensor_ranges_radar_preview.lua @@ -149,7 +149,7 @@ function widget:DrawWorld() end -- not build command end - if Spring.IsGUIHidden() or (WG['topbar'] and WG['topbar'].showingQuit()) then + if Spring.IsGUIHidden() or (WG.topbar and WG.topbar .showingQuit()) then return end diff --git a/luaui/Widgets/gui_sensor_ranges_sonar.lua b/luaui/Widgets/gui_sensor_ranges_sonar.lua index 8a301695545..2d7bfaf8ba3 100644 --- a/luaui/Widgets/gui_sensor_ranges_sonar.lua +++ b/luaui/Widgets/gui_sensor_ranges_sonar.lua @@ -212,8 +212,8 @@ local instanceCache = {0,0,0,0,0,0,0,0} local function InitializeUnits() --spEcho("Sensor Ranges LOS InitializeUnits") InstanceVBOTable.clearInstanceTable(circleInstanceVBO) - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - local visibleUnits = WG['unittrackerapi'].visibleUnits + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + local visibleUnits = WG.unittrackerapi .visibleUnits for unitID, unitDefID in pairs(visibleUnits) do widget:VisibleUnitAdded(unitID, unitDefID, spGetUnitTeam(unitID), nil, true) end diff --git a/luaui/Widgets/gui_show_orders.lua b/luaui/Widgets/gui_show_orders.lua index b0fcc26dd21..f4a78bc1fe9 100644 --- a/luaui/Widgets/gui_show_orders.lua +++ b/luaui/Widgets/gui_show_orders.lua @@ -196,7 +196,7 @@ end function widget:ViewResize() vsx,vsy = spGetViewGeometry() widgetScale = vsy / 2000 - font = WG['fonts'].getFont(2) + font = WG.fonts .getFont(2) -- Pre-calculate scaled values cachedScaledValues.iconSize = iconSize * widgetScale diff --git a/luaui/Widgets/gui_spectator_hud.lua b/luaui/Widgets/gui_spectator_hud.lua index 311a9bf9753..d8eebc990bf 100644 --- a/luaui/Widgets/gui_spectator_hud.lua +++ b/luaui/Widgets/gui_spectator_hud.lua @@ -747,8 +747,8 @@ local function calculateWidgetDimensions() widgetDimensions.left = viewScreenWidth - widgetDimensions.width widgetDimensions.distanceFromTopBar = mathfloor(defaults.widgetDimensions.distanceFromTopBar * scaleMultiplier) - if WG['topbar'] and WG['topbar'].getShowButtons() then - local topBarPosition = WG['topbar'].GetPosition() + if WG.topbar and WG.topbar .getShowButtons() then + local topBarPosition = WG.topbar .GetPosition() widgetDimensions.top = topBarPosition[2] -- widgetDimensions.distanceFromTopBar else widgetDimensions.top = viewScreenHeight @@ -845,7 +845,7 @@ local function deleteTextures() end local function updateMetricTextTooltips() - if WG['tooltip'] then + if WG.tooltip then for metricIndex,metric in ipairs(metricsEnabled) do local bottom = widgetDimensions.top - metricIndex * metricDimensions.height local top = bottom + metricDimensions.height @@ -853,7 +853,7 @@ local function updateMetricTextTooltips() local left = titleDimensions.left local right = titleDimensions.right - WG['tooltip'].AddTooltip( + WG.tooltip .AddTooltip( string.format("spectator_hud_vsmode_%d", metric.id), { left, bottom, right, top }, metric.tooltip, @@ -1831,7 +1831,7 @@ local function showEcostats() end local function init() - font = WG['fonts'].getFont() + font = WG.fonts .getFont() viewScreenWidth, viewScreenHeight = Spring.GetViewGeometry() @@ -1907,28 +1907,28 @@ function widget:Initialize() widgetEnabled = getAmountOfAllyTeams() == 2 if not widgetEnabled then return end - WG["spectator_hud"] = {} + WG.spectator_hud = {} - WG["spectator_hud"].getWidgetSize = function() + WG.spectator_hud .getWidgetSize = function() return settings.widgetScale end - WG["spectator_hud"].setWidgetSize = function(value) + WG.spectator_hud .setWidgetSize = function(value) settings.widgetScale = value reInit() end - WG["spectator_hud"].getConfig = function() + WG.spectator_hud .getConfig = function() return settings.widgetConfig end - WG["spectator_hud"].setConfig = function(value) + WG.spectator_hud .setConfig = function(value) settings.widgetConfig = value reInit() end - WG["spectator_hud"].getMetricEnabled = function(metric) + WG.spectator_hud .getMetricEnabled = function(metric) return settings.metricsEnabled[metric] end - WG["spectator_hud"].setMetricEnabled = function(args) + WG.spectator_hud .setMetricEnabled = function(args) settings.metricsEnabled[args[1]] = args[2] reInit() end @@ -1952,15 +1952,15 @@ end function widget:Shutdown() deInit() - WG["spectator_hud"] = {} + WG.spectator_hud = {} showEcostats() if shader then shader:Finalize() end if guishaderDlist then - if WG['guishader'] then - WG['guishader'].DeleteDlist('spechud') + if WG.guishader then + WG.guishader .DeleteDlist('spechud') else gl.DeleteList(guishaderDlist) end @@ -2085,10 +2085,10 @@ function widget:Update(dt) sec = sec + dt if sec > 0.05 then sec = 0 - if WG['topbar'] then + if WG.topbar then local prevShowButtons = topbarShowButtons - if WG['topbar'].getShowButtons() ~= prevShowButtons then - topbarShowButtons = WG['topbar'].getShowButtons() + if WG.topbar .getShowButtons() ~= prevShowButtons then + topbarShowButtons = WG.topbar .getShowButtons() if haveFullView then init() else @@ -2120,14 +2120,14 @@ end function widget:DrawScreen() if not widgetEnabled or not haveFullView then - if WG['guishader'] and guishaderDlist then - WG['guishader'].DeleteDlist('spechud') + if WG.guishader and guishaderDlist then + WG.guishader .DeleteDlist('spechud') guishaderDlist = nil end return end - if WG['guishader'] and (displayListsChanged or not guishaderDlist) then + if WG.guishader and (displayListsChanged or not guishaderDlist) then if guishaderDlist then gl.DeleteList(guishaderDlist) guishaderDlist = nil @@ -2137,7 +2137,7 @@ function widget:DrawScreen() gl.CallList(metricDisplayList) end end) - WG['guishader'].InsertDlist(guishaderDlist, 'spechud') + WG.guishader .InsertDlist(guishaderDlist, 'spechud') displayListsChanged = nil end @@ -2178,10 +2178,10 @@ function widget:SetConfigData(data) settings.oneTimeEcostatsEnableDone = data.oneTimeEcostatsEnableDone end - if data["metricsEnabled"] then + if data.metricsEnabled then for _,metric in pairs(metricKeys) do - if data["metricsEnabled"][metric] then - settings.metricsEnabled[metric] = data["metricsEnabled"][metric] + if data.metricsEnabled [metric] then + settings.metricsEnabled[metric] = data.metricsEnabled [metric] end end end diff --git a/luaui/Widgets/gui_team_platter.lua b/luaui/Widgets/gui_team_platter.lua index efe661adc96..5bca5665f16 100644 --- a/luaui/Widgets/gui_team_platter.lua +++ b/luaui/Widgets/gui_team_platter.lua @@ -195,33 +195,33 @@ local function init() return false end - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end return true end function widget:Initialize() if not init() then return end - WG['teamplatter'] = {} - WG['teamplatter'].getOpacity = function() + WG.teamplatter = {} + WG.teamplatter .getOpacity = function() return opacity end - WG['teamplatter'].setOpacity = function(value) + WG.teamplatter .setOpacity = function(value) opacity = value init() end - WG['teamplatter'].getSkipOwnTeam = function() + WG.teamplatter .getSkipOwnTeam = function() return skipOwnTeam end - WG['teamplatter'].setSkipOwnTeam = function(value) + WG.teamplatter .setSkipOwnTeam = function(value) skipOwnTeam = value init() end end function widget:Shutdown() - WG['teamplatter'] = nil + WG.teamplatter = nil end function widget:GetConfigData(data) diff --git a/luaui/Widgets/gui_teamstats.lua b/luaui/Widgets/gui_teamstats.lua index 72374e31da8..023500f162c 100644 --- a/luaui/Widgets/gui_teamstats.lua +++ b/luaui/Widgets/gui_teamstats.lua @@ -207,8 +207,8 @@ function widget:ViewResize() vsx,vsy = spGetViewGeometry() widgetScale = (vsy / 1080) - font = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2) + font = WG.fonts .getFont() + font2 = WG.fonts .getFont(2) for _, data in pairs(headerRemap) do maxColumnTextSize = max(font:GetTextWidth(data[2]), max(font:GetTextWidth(data[1]), maxColumnTextSize)) end @@ -261,8 +261,8 @@ function widget:Initialize() widget:GameFrame(GetGameFrame(),true) end - WG['teamstats'] = {} - WG['teamstats'].toggle = function(state) + WG.teamstats = {} + WG.teamstats .toggle = function(state) if state ~= nil then guiData.mainPanel.visible = state else @@ -272,7 +272,7 @@ function widget:Initialize() widget:GameFrame(GetGameFrame(),true) end end - WG['teamstats'].isvisible = function() + WG.teamstats .isvisible = function() return guiData.mainPanel.visible end end @@ -280,8 +280,8 @@ end function widget:Shutdown() glDeleteList(textDisplayList) glDeleteList(backgroundDisplayList) - if WG['guishader'] then - WG['guishader'].RemoveDlist('teamstats_window') + if WG.guishader then + WG.guishader .RemoveDlist('teamstats_window') end if backgroundGuishader ~= nil then glDeleteList(backgroundGuishader) @@ -538,17 +538,17 @@ local function DrawBackground() return end - gl.Color(0,0,0,WG['guishader'] and 0.8 or 0.85) + gl.Color(0,0,0,WG.guishader and 0.8 or 0.85) local x1,y1,x2,y2 = mathFloor(guiData.mainPanel.absSizes.x.min), mathFloor(guiData.mainPanel.absSizes.y.min), mathFloor(guiData.mainPanel.absSizes.x.max), mathFloor(guiData.mainPanel.absSizes.y.max) UiElement(x1-bgpadding,y1-bgpadding,x2+bgpadding,y2+bgpadding, 1, 1, 1, 1, 1,1,1,1, WG.FlowUI.clampedOpacity) - if WG['guishader'] then + if WG.guishader then if backgroundGuishader ~= nil then glDeleteList(backgroundGuishader) end backgroundGuishader = glCreateList( function() RectRound(x1-bgpadding,y1-bgpadding,x2+bgpadding,y2+bgpadding, elementCorner) end) - WG['guishader'].InsertDlist(backgroundGuishader,'teamstats_window') + WG.guishader .InsertDlist(backgroundGuishader,'teamstats_window') end if backgroundDisplayList then @@ -567,8 +567,8 @@ end function widget:DrawScreen() if not guiData.mainPanel.visible then - if WG['guishader'] then - WG['guishader'].RemoveDlist('teamstats_window') + if WG.guishader then + WG.guishader .RemoveDlist('teamstats_window') end return end diff --git a/luaui/Widgets/gui_tooltip.lua b/luaui/Widgets/gui_tooltip.lua index 2e947ff9d4b..0f6a6dcb985 100644 --- a/luaui/Widgets/gui_tooltip.lua +++ b/luaui/Widgets/gui_tooltip.lua @@ -134,12 +134,12 @@ end function widget:Initialize() widget:ViewResize(vsx, vsy) - if WG['tooltip'] == nil then - WG['tooltip'] = {} - WG['tooltip'].getFontsize = function() + if WG.tooltip == nil then + WG.tooltip = {} + WG.tooltip .getFontsize = function() return usedFontSize end - WG['tooltip'].AddTooltip = function(name, area, value, delay, title) + WG.tooltip .AddTooltip = function(name, area, value, delay, title) if ((value ~= nil or title ~= nil) and area[1] ~= nil and area[2] ~= nil and area[3] ~= nil and area[4] ~= nil) or (tooltips[name] ~= nil and (tooltips[name].value ~= nil or tooltips[name].title ~= nil)) then if delay == nil then delay = defaultDelay @@ -158,7 +158,7 @@ function widget:Initialize() end end end - WG['tooltip'].RemoveTooltip = function(name) + WG.tooltip .RemoveTooltip = function(name) if tooltips[name] ~= nil then if tooltips[name].dlist then gl.DeleteList(tooltips[name].dlist) @@ -168,7 +168,7 @@ function widget:Initialize() tooltips[name] = nil end end - WG['tooltip'].ShowTooltip = function(name, value, x, y, title) + WG.tooltip .ShowTooltip = function(name, value, x, y, title) if value ~= nil or title ~= nil then if not tooltips[name] then tooltips[name] = {} @@ -202,10 +202,10 @@ function widget:Initialize() end function widget:Shutdown() - if WG['guishader'] then + if WG.guishader then for name, tooltip in pairs(tooltips) do - WG['guishader'].RemoveScreenRect('tooltip_' .. name) - WG['guishader'].RemoveScreenRect('2tooltip_' .. name) + WG.guishader .RemoveScreenRect('tooltip_' .. name) + WG.guishader .RemoveScreenRect('2tooltip_' .. name) if tooltip.dlist then gl.DeleteList(tooltip.dlist) end @@ -225,14 +225,14 @@ function widget:Shutdown() end texturePool = {} - WG['tooltip'] = nil + WG.tooltip = nil end function widget:ViewResize(x, y) vsx, vsy = spGetViewGeometry() - font, loadedFontSize = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2, 1.6) + font, loadedFontSize = WG.fonts .getFont() + font2 = WG.fonts .getFont(2, 1.6) widgetScale = (1 + ((vsy - 850) / 900)) * (0.95 + (ui_scale - 1) / 2.5) usedFontSize = cfgFontSize * widgetScale @@ -243,9 +243,9 @@ function widget:ViewResize(x, y) UiElement = WG.FlowUI.Draw.Element for name, tooltip in pairs(tooltips) do - if WG['guishader'] then - WG['guishader'].RemoveScreenRect('tooltip_' .. name) - WG['guishader'].RemoveScreenRect('2tooltip_' .. name) + if WG.guishader then + WG.guishader .RemoveScreenRect('tooltip_' .. name) + WG.guishader .RemoveScreenRect('2tooltip_' .. name) end if tooltip.dlist then gl.DeleteList(tooltip.dlist) @@ -265,8 +265,8 @@ local function drawTooltipBackground(addX, addY, paddingW, paddingH, maxWidth, m bgpadding*1.4, 1,1,1,1, {0,0,0,0.08}) UiElement(addX-paddingW, addY-maxHeight-paddingH, addX+maxWidth + paddingW, addY+paddingH, 1,1,1,1, 1,1,1,1, nil, - {0.85, 0.85, 0.85, (WG['guishader'] and 0.7 or 0.93)}, - {0, 0, 0, (WG['guishader'] and 0.5 or 0.56)}, bgpadding) + {0.85, 0.85, 0.85, (WG.guishader and 0.7 or 0.93)}, + {0, 0, 0, (WG.guishader and 0.5 or 0.56)}, bgpadding) end local function drawTooltipContent(name, addX, addY, paddingH, lines) @@ -398,11 +398,11 @@ local function drawTooltip(name, x, y) posY = 0 + maxHeight + paddingH + paddingH end - if WG['guishader'] then - WG['guishader'].InsertScreenRect(posX - paddingW + bgpadding, + if WG.guishader then + WG.guishader .InsertScreenRect(posX - paddingW + bgpadding, posY - maxHeight - paddingH, posX + maxWidth + paddingW -bgpadding, posY + paddingH, 'tooltip_' .. name) - WG['guishader'].InsertScreenRect(posX - paddingW, + WG.guishader .InsertScreenRect(posX - paddingW, posY - maxHeight - paddingH + bgpadding, posX + maxWidth + paddingW, posY + paddingH - bgpadding, '2tooltip_' .. name) end @@ -422,16 +422,16 @@ local function drawTooltip(name, x, y) end function widget:DrawScreen() - if WG['topbar'] and WG['topbar'].showingQuit() then + if WG.topbar and WG.topbar .showingQuit() then return end local x, y = spGetMouseState() local now = os.clock() - if WG['guishader'] then + if WG.guishader then for name, _ in pairs(cleanupGuishaderAreas) do - WG['guishader'].RemoveScreenRect('tooltip_' .. name) - WG['guishader'].RemoveScreenRect('2tooltip_' .. name) + WG.guishader .RemoveScreenRect('tooltip_' .. name) + WG.guishader .RemoveScreenRect('2tooltip_' .. name) cleanupGuishaderAreas[name] = nil end end @@ -462,9 +462,9 @@ function widget:DrawScreen() else if tooltip.displayTime ~= nil then tooltip.displayTime = nil - if WG['guishader'] then - WG['guishader'].RemoveScreenRect('tooltip_' .. name) - WG['guishader'].RemoveScreenRect('2tooltip_' .. name) + if WG.guishader then + WG.guishader .RemoveScreenRect('tooltip_' .. name) + WG.guishader .RemoveScreenRect('2tooltip_' .. name) end end end diff --git a/luaui/Widgets/gui_top_bar.lua b/luaui/Widgets/gui_top_bar.lua index aa324717756..c56283db364 100644 --- a/luaui/Widgets/gui_top_bar.lua +++ b/luaui/Widgets/gui_top_bar.lua @@ -271,8 +271,8 @@ function widget:ViewResize() UiButton = WG.FlowUI.Draw.Button UiSliderKnob = WG.FlowUI.Draw.SliderKnob - font = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2) + font = WG.fonts .getFont() + font2 = WG.fonts .getFont(2) for n, _ in pairs(dlist.windText) do dlist.windText[n] = glDeleteList(dlist.windText[n]) @@ -325,7 +325,7 @@ local function updateButtons() local prevButtonsArea = buttonsArea -- if not buttonsArea['buttons'] then -- With this condition it doesn't actually update buttons if they were already added - buttonsArea['buttons'] = {} + buttonsArea.buttons = {} local margin = bgpadding local textPadding = mathFloor(fontsize*0.8) @@ -335,8 +335,8 @@ local function updateButtons() local function addButton(name, text) local width = mathFloor((font2:GetTextWidth(text) * fontsize) + textPadding) - buttonsArea['buttons'][name] = { buttonsArea[3] - offset - width, buttonsArea[2] + margin, buttonsArea[3] - offset, buttonsArea[4], text, buttonsArea[3] - offset - (width/2) } - if not lastbutton then buttonsArea['buttons'][name][3] = buttonsArea[3] end + buttonsArea.buttons [name] = { buttonsArea[3] - offset - width, buttonsArea[2] + margin, buttonsArea[3] - offset, buttonsArea[4], text, buttonsArea[3] - offset - (width/2) } + if not lastbutton then buttonsArea.buttons [name][3] = buttonsArea[3] end offset = mathFloor(offset + width + 0.5) lastbutton = name end @@ -350,15 +350,15 @@ local function updateButtons() addButton('resign', Spring.I18N('ui.topbar.button.resign')) end - if WG['options'] then addButton('options', Spring.I18N('ui.topbar.button.settings')) end - if WG['keybinds'] then addButton('keybinds', Spring.I18N('ui.topbar.button.keys')) end - if WG['changelog'] then addButton('changelog', Spring.I18N('ui.topbar.button.changes')) end - if WG['teamstats'] then addButton('stats', Spring.I18N('ui.topbar.button.stats')) end + if WG.options then addButton('options', Spring.I18N('ui.topbar.button.settings')) end + if WG.keybinds then addButton('keybinds', Spring.I18N('ui.topbar.button.keys')) end + if WG.changelog then addButton('changelog', Spring.I18N('ui.topbar.button.changes')) end + if WG.teamstats then addButton('stats', Spring.I18N('ui.topbar.button.stats')) end if gameIsOver then addButton('graphs', Spring.I18N('ui.topbar.button.graphs')) end - if WG['scavengerinfo'] then addButton('scavengers', Spring.I18N('ui.topbar.button.scavengers')) end - if isSinglePlayer and cfg.allowSavegame and WG['savegame'] then addButton('save', Spring.I18N('ui.topbar.button.save')) end + if WG.scavengerinfo then addButton('scavengers', Spring.I18N('ui.topbar.button.scavengers')) end + if isSinglePlayer and cfg.allowSavegame and WG.savegame then addButton('save', Spring.I18N('ui.topbar.button.save')) end - buttonsArea['buttons'][lastbutton][1] = buttonsArea['buttons'][lastbutton][1] - sidePadding + buttonsArea.buttons [lastbutton][1] = buttonsArea.buttons [lastbutton][1] - sidePadding offset = offset + sidePadding buttonsArea[1] = buttonsArea[3]-offset-margin @@ -373,7 +373,7 @@ local function updateButtons() font2:Begin(true) font2:SetTextColor(0.92, 0.92, 0.92, 1) font2:SetOutlineColor(0, 0, 0, 1) - for name, params in pairs(buttonsArea['buttons']) do + for name, params in pairs(buttonsArea.buttons ) do font2:Print(params[5], params[6], params[2] + ((params[4] - params[2]) * 0.5) - (fontsize / 5), fontsize, 'co') end font2:End() @@ -420,8 +420,8 @@ local function updateComs(forceText) comcountChanged = nil - if WG['tooltip'] and refreshUi then - WG['tooltip'].AddTooltip('coms', area, Spring.I18N('ui.topbar.commanderCountTooltip'), nil, Spring.I18N('ui.topbar.commanderCount')) + if WG.tooltip and refreshUi then + WG.tooltip .AddTooltip('coms', area, Spring.I18N('ui.topbar.commanderCountTooltip'), nil, Spring.I18N('ui.topbar.commanderCount')) end end @@ -462,9 +462,9 @@ local function updateWind() glPopMatrix() end) - if WG['tooltip'] and refreshUi then + if WG.tooltip and refreshUi then local avgWindValueForTooltip = windFunctions.isNoWind() and Spring.I18N('ui.topbar.wind.nowind1') or avgWindValue - WG['tooltip'].AddTooltip('wind', area, Spring.I18N('ui.topbar.windspeedTooltip', { avgWindValue = avgWindValueForTooltip, riskWindValue = riskWindValue, warnColor = textWarnColor }), nil, Spring.I18N('ui.topbar.windspeed')) + WG.tooltip .AddTooltip('wind', area, Spring.I18N('ui.topbar.windspeedTooltip', { avgWindValue = avgWindValueForTooltip, riskWindValue = riskWindValue, warnColor = textWarnColor }), nil, Spring.I18N('ui.topbar.windspeed')) end end @@ -503,8 +503,8 @@ local function updateTidal() glPopMatrix() end) - if WG['tooltip'] and refreshUi then - WG['tooltip'].AddTooltip('tidal', area, Spring.I18N('ui.topbar.tidalspeedTooltip'), nil, Spring.I18N('ui.topbar.tidalspeed')) + if WG.tooltip and refreshUi then + WG.tooltip .AddTooltip('tidal', area, Spring.I18N('ui.topbar.tidalspeedTooltip'), nil, Spring.I18N('ui.topbar.tidalspeed')) end end @@ -576,25 +576,25 @@ local function updateResbarText(res, force) if res == 'metal' then text = (allyteamOverflowingMetal and ' ' .. Spring.I18N('ui.topbar.resources.wastingMetal') .. ' ' or ' ' .. Spring.I18N('ui.topbar.resources.overflowing') .. ' ') - if not supressOverflowNotifs and WG['notifications'] and not isMetalmap and (not WG.sharedMetalFrame or WG.sharedMetalFrame+60 < gameFrame) then + if not supressOverflowNotifs and WG.notifications and not isMetalmap and (not WG.sharedMetalFrame or WG.sharedMetalFrame+60 < gameFrame) then if allyteamOverflowingMetal then if numTeamsInAllyTeam > 1 then - WG['notifications'].queueNotification('WholeTeamWastingMetal') + WG.notifications .queueNotification('WholeTeamWastingMetal') else - WG['notifications'].queueNotification('YouAreWastingMetal') + WG.notifications .queueNotification('YouAreWastingMetal') end elseif r[res][6] > 0.75 then -- supress if you are deliberately overflowing by adjustingthe share slider down - WG['notifications'].queueNotification('YouAreOverflowingMetal') + WG.notifications .queueNotification('YouAreOverflowingMetal') end end else text = (allyteamOverflowingEnergy and ' ' .. Spring.I18N('ui.topbar.resources.wastingEnergy') .. ' ' or ' ' .. Spring.I18N('ui.topbar.resources.overflowing') .. ' ') - if not supressOverflowNotifs and WG['notifications'] and (not WG.sharedEnergyFrame or WG.sharedEnergyFrame+60 < gameFrame) then + if not supressOverflowNotifs and WG.notifications and (not WG.sharedEnergyFrame or WG.sharedEnergyFrame+60 < gameFrame) then if allyteamOverflowingEnergy then if numTeamsInAllyTeam > 1 then - WG['notifications'].queueNotification('WholeTeamWastingEnergy') + WG.notifications .queueNotification('WholeTeamWastingEnergy') else - WG['notifications'].queueNotification('YouAreWastingEnergy') + WG.notifications .queueNotification('YouAreWastingEnergy') end end end @@ -854,22 +854,22 @@ local function updateResbar(res) local resourceName = resourceTranslations[res] -- add/update tooltips - if WG['tooltip'] and conversionIndicatorArea then + if WG.tooltip and conversionIndicatorArea then -- always update for now if res == 'energy' then - WG['tooltip'].AddTooltip(res .. '_share_slider', { resbarDrawinfo[res].barArea[1], shareIndicatorArea[res][2], conversionIndicatorArea[1], shareIndicatorArea[res][4] }, Spring.I18N('ui.topbar.resources.shareEnergyTooltip'), nil, Spring.I18N('ui.topbar.resources.shareEnergyTooltipTitle')) - WG['tooltip'].AddTooltip(res .. '_share_slider2', { conversionIndicatorArea[3], shareIndicatorArea[res][2], resbarDrawinfo[res].barArea[3], shareIndicatorArea[res][4] }, Spring.I18N('ui.topbar.resources.shareEnergyTooltip'), nil, Spring.I18N('ui.topbar.resources.shareEnergyTooltipTitle')) - WG['tooltip'].AddTooltip(res .. '_metalmaker_slider', conversionIndicatorArea, Spring.I18N('ui.topbar.resources.conversionTooltip'), nil, Spring.I18N('ui.topbar.resources.conversionTooltipTitle')) + WG.tooltip .AddTooltip(res .. '_share_slider', { resbarDrawinfo[res].barArea[1], shareIndicatorArea[res][2], conversionIndicatorArea[1], shareIndicatorArea[res][4] }, Spring.I18N('ui.topbar.resources.shareEnergyTooltip'), nil, Spring.I18N('ui.topbar.resources.shareEnergyTooltipTitle')) + WG.tooltip .AddTooltip(res .. '_share_slider2', { conversionIndicatorArea[3], shareIndicatorArea[res][2], resbarDrawinfo[res].barArea[3], shareIndicatorArea[res][4] }, Spring.I18N('ui.topbar.resources.shareEnergyTooltip'), nil, Spring.I18N('ui.topbar.resources.shareEnergyTooltipTitle')) + WG.tooltip .AddTooltip(res .. '_metalmaker_slider', conversionIndicatorArea, Spring.I18N('ui.topbar.resources.conversionTooltip'), nil, Spring.I18N('ui.topbar.resources.conversionTooltipTitle')) else - WG['tooltip'].AddTooltip(res .. '_share_slider', { resbarDrawinfo[res].barArea[1], shareIndicatorArea[res][2], resbarDrawinfo[res].barArea[3], shareIndicatorArea[res][4] }, Spring.I18N('ui.topbar.resources.shareMetalTooltip'), nil, Spring.I18N('ui.topbar.resources.shareMetalTooltipTitle')) + WG.tooltip .AddTooltip(res .. '_share_slider', { resbarDrawinfo[res].barArea[1], shareIndicatorArea[res][2], resbarDrawinfo[res].barArea[3], shareIndicatorArea[res][4] }, Spring.I18N('ui.topbar.resources.shareMetalTooltip'), nil, Spring.I18N('ui.topbar.resources.shareMetalTooltipTitle')) end if refreshUi then - WG['tooltip'].AddTooltip(res .. '_pull', { resbarDrawinfo[res].textPull[2] - (resbarDrawinfo[res].textPull[4] * 2.5), resbarDrawinfo[res].textPull[3], resbarDrawinfo[res].textPull[2] + (resbarDrawinfo[res].textPull[4] * 0.5), resbarDrawinfo[res].textPull[3] + resbarDrawinfo[res].textPull[4] }, Spring.I18N('ui.topbar.resources.pullTooltip', { resource = resourceName })) - WG['tooltip'].AddTooltip(res .. '_income', { resbarDrawinfo[res].textIncome[2] - (resbarDrawinfo[res].textIncome[4] * 2.5), resbarDrawinfo[res].textIncome[3], resbarDrawinfo[res].textIncome[2] + (resbarDrawinfo[res].textIncome[4] * 0.5), resbarDrawinfo[res].textIncome[3] + resbarDrawinfo[res].textIncome[4] }, Spring.I18N('ui.topbar.resources.incomeTooltip', { resource = resourceName })) + WG.tooltip .AddTooltip(res .. '_pull', { resbarDrawinfo[res].textPull[2] - (resbarDrawinfo[res].textPull[4] * 2.5), resbarDrawinfo[res].textPull[3], resbarDrawinfo[res].textPull[2] + (resbarDrawinfo[res].textPull[4] * 0.5), resbarDrawinfo[res].textPull[3] + resbarDrawinfo[res].textPull[4] }, Spring.I18N('ui.topbar.resources.pullTooltip', { resource = resourceName })) + WG.tooltip .AddTooltip(res .. '_income', { resbarDrawinfo[res].textIncome[2] - (resbarDrawinfo[res].textIncome[4] * 2.5), resbarDrawinfo[res].textIncome[3], resbarDrawinfo[res].textIncome[2] + (resbarDrawinfo[res].textIncome[4] * 0.5), resbarDrawinfo[res].textIncome[3] + resbarDrawinfo[res].textIncome[4] }, Spring.I18N('ui.topbar.resources.incomeTooltip', { resource = resourceName })) --WG['tooltip'].AddTooltip(res .. '_expense', { resbarDrawinfo[res].textExpense[2] - (4 * widgetScale), resbarDrawinfo[res].textExpense[3], resbarDrawinfo[res].textExpense[2] + (30 * widgetScale), resbarDrawinfo[res].textExpense[3] + resbarDrawinfo[res].textExpense[4] }, Spring.I18N('ui.topbar.resources.expenseTooltip', { resource = resourceName })) - WG['tooltip'].AddTooltip(res .. '_storage', { resbarDrawinfo[res].textStorage[2] - (resbarDrawinfo[res].textStorage[4] * 2.75), resbarDrawinfo[res].textStorage[3], resbarDrawinfo[res].textStorage[2], resbarDrawinfo[res].textStorage[3] + resbarDrawinfo[res].textStorage[4] }, Spring.I18N('ui.topbar.resources.storageTooltip', { resource = resourceName })) + WG.tooltip .AddTooltip(res .. '_storage', { resbarDrawinfo[res].textStorage[2] - (resbarDrawinfo[res].textStorage[4] * 2.75), resbarDrawinfo[res].textStorage[3], resbarDrawinfo[res].textStorage[2], resbarDrawinfo[res].textStorage[3] + resbarDrawinfo[res].textStorage[4] }, Spring.I18N('ui.topbar.resources.storageTooltip', { resource = resourceName })) end end end @@ -976,12 +976,12 @@ function init() -- metal local width = mathFloor(totalWidth / 4.4) - resbarArea['metal'] = { topbarArea[1] + filledWidth, topbarArea[2], topbarArea[1] + filledWidth + width, topbarArea[4] } + resbarArea.metal = { topbarArea[1] + filledWidth, topbarArea[2], topbarArea[1] + filledWidth + width, topbarArea[4] } filledWidth = filledWidth + width + widgetSpaceMargin updateResbar('metal') --energy - resbarArea['energy'] = { topbarArea[1] + filledWidth, topbarArea[2], topbarArea[1] + filledWidth + width, topbarArea[4] } + resbarArea.energy = { topbarArea[1] + filledWidth, topbarArea[2], topbarArea[1] + filledWidth + width, topbarArea[4] } filledWidth = filledWidth + width + widgetSpaceMargin updateResbar('energy') @@ -1015,12 +1015,12 @@ function init() buttonsArea = { topbarArea[3] - width, topbarArea[2], topbarArea[3], topbarArea[4] } updateButtons() - if WG['topbar'] then - WG['topbar'].GetPosition = function() + if WG.topbar then + WG.topbar .GetPosition = function() return { topbarArea[1], topbarArea[2], topbarArea[3], topbarArea[4], widgetScale} end - WG['topbar'].GetFreeArea = function() + WG.topbar .GetFreeArea = function() return { topbarArea[1] + filledWidth, topbarArea[2], topbarArea[3] - width - widgetSpaceMargin, topbarArea[4], widgetScale} end end @@ -1245,11 +1245,11 @@ function widget:Update(dt) -- make sure conversion/overflow sliders are adjusted if mmLevel then local currentMmLevel = sp.GetTeamRulesParam(myTeamID, 'mmLevel') - if mmLevel ~= currentMmLevel or energyOverflowLevel ~= r['energy'][6] then + if mmLevel ~= currentMmLevel or energyOverflowLevel ~= r.energy [6] then mmLevel = currentMmLevel updateResbar('energy') end - if metalOverflowLevel ~= r['metal'][6] then + if metalOverflowLevel ~= r.metal [6] then updateResbar('metal') end end @@ -1258,11 +1258,11 @@ function widget:Update(dt) -- make sure conversion/overflow sliders are adjusted if mmLevel then local currentMmLevel = sp.GetTeamRulesParam(myTeamID, 'mmLevel') - if mmLevel ~= currentMmLevel or energyOverflowLevel ~= r['energy'][6] then + if mmLevel ~= currentMmLevel or energyOverflowLevel ~= r.energy [6] then mmLevel = currentMmLevel updateResbar('energy') end - if metalOverflowLevel ~= r['metal'][6] then + if metalOverflowLevel ~= r.metal [6] then updateResbar('metal') end end @@ -1279,17 +1279,17 @@ function widget:Update(dt) local prevR = r r = { metal = { sp.GetTeamResources(myTeamID, 'metal') }, energy = { sp.GetTeamResources(myTeamID, 'energy') } } -- check if we need to smooth the resources - local metalDiff7 = r['metal'][7] - prevR['metal'][7] - local metalDiff8 = r['metal'][8] - prevR['metal'][8] - local energyDiff7 = r['energy'][7] - prevR['energy'][7] - local energyDiff8 = r['energy'][8] - prevR['energy'][8] - local metalStorage = r['metal'][2] - local energyStorage = r['energy'][2] - - if (r['metal'][7] > 1 and metalDiff7 ~= 0 and r['metal'][7] / metalStorage > 0.05) or - (r['metal'][8] > 1 and metalDiff8 ~= 0 and r['metal'][8] / metalStorage > 0.05) or - (r['energy'][7] > 1 and energyDiff7 ~= 0 and r['energy'][7] / energyStorage > 0.05) or - (r['energy'][8] > 1 and energyDiff8 ~= 0 and r['energy'][8] / energyStorage > 0.05) + local metalDiff7 = r.metal [7] - prevR.metal [7] + local metalDiff8 = r.metal [8] - prevR.metal [8] + local energyDiff7 = r.energy [7] - prevR.energy [7] + local energyDiff8 = r.energy [8] - prevR.energy [8] + local metalStorage = r.metal [2] + local energyStorage = r.energy [2] + + if (r.metal [7] > 1 and metalDiff7 ~= 0 and r.metal [7] / metalStorage > 0.05) or + (r.metal [8] > 1 and metalDiff8 ~= 0 and r.metal [8] / metalStorage > 0.05) or + (r.energy [7] > 1 and energyDiff7 ~= 0 and r.energy [7] / energyStorage > 0.05) or + (r.energy [8] > 1 and energyDiff8 ~= 0 and r.energy [8] / energyStorage > 0.05) then smoothedResources = r end @@ -1485,7 +1485,7 @@ local function drawQuitScreen() Spring.SetMouseCursor('cursornormal') dlist.quit = glCreateList(function() - if WG['guishader'] then + if WG.guishader then glColor(0, 0, 0, (0.18 * fadeProgress)) else glColor(0, 0, 0, (0.35 * fadeProgress)) @@ -1621,9 +1621,9 @@ local function drawQuitScreen() end) -- background - if WG['guishader'] then - WG['guishader'].setScreenBlur(true) - WG['guishader'].insertRenderDlist(dlist.quit) + if WG.guishader then + WG.guishader .setScreenBlur(true) + WG.guishader .insertRenderDlist(dlist.quit) else glCallList(dlist.quit) end @@ -1760,7 +1760,7 @@ function widget:DrawScreen() r2tHelper.RenderToTexture(uiTex, renderUi, true) end - if WG['guishader'] then + if WG.guishader then if uiBgList then glDeleteList(uiBgList) end uiBgList = glCreateList(function() glColor(1,1,1,1) @@ -1768,7 +1768,7 @@ function widget:DrawScreen() gl.TexRect(topbarArea[1], topbarArea[2], topbarArea[3], topbarArea[4], false, true) gl.Texture(false) end) - WG['guishader'].InsertDlist(uiBgList, 'topbar_background') + WG.guishader .InsertDlist(uiBgList, 'topbar_background') end end @@ -1836,26 +1836,26 @@ function widget:DrawScreen() end end - if showButtons and dlist.buttons and buttonsArea['buttons'] then + if showButtons and dlist.buttons and buttonsArea.buttons then -- changelog changes highlight - if WG['changelog'] and WG['changelog'].haschanges() then + if WG.changelog and WG.changelog .haschanges() then local button = 'changelog' local paddingsize = 1 - RectRound(buttonsArea['buttons'][button][1]+paddingsize, buttonsArea['buttons'][button][2]+paddingsize, buttonsArea['buttons'][button][3]-paddingsize, buttonsArea['buttons'][button][4]-paddingsize, 3.5 * widgetScale, 0, 0, 0, button == firstButton and 1 or 0, { 1,1,1, 0.1*blinkProgress }) + RectRound(buttonsArea.buttons [button][1]+paddingsize, buttonsArea.buttons [button][2]+paddingsize, buttonsArea.buttons [button][3]-paddingsize, buttonsArea.buttons [button][4]-paddingsize, 3.5 * widgetScale, 0, 0, 0, button == firstButton and 1 or 0, { 1,1,1, 0.1*blinkProgress }) end -- hovered? - if not showQuitscreen and buttonsArea['buttons'] and hoveringTopbar == 'menu' then - for button, pos in pairs(buttonsArea['buttons']) do + if not showQuitscreen and buttonsArea.buttons and hoveringTopbar == 'menu' then + for button, pos in pairs(buttonsArea.buttons ) do if mathIsInRect(mx, my, pos[1], pos[2], pos[3], pos[4]) then local paddingsize = 1 - RectRound(buttonsArea['buttons'][button][1]+paddingsize, buttonsArea['buttons'][button][2]+paddingsize, buttonsArea['buttons'][button][3]-paddingsize, buttonsArea['buttons'][button][4]-paddingsize, 3.5 * widgetScale, 0, 0, 0, button == firstButton and 1 or 0, { 0,0,0, 0.06 }) + RectRound(buttonsArea.buttons [button][1]+paddingsize, buttonsArea.buttons [button][2]+paddingsize, buttonsArea.buttons [button][3]-paddingsize, buttonsArea.buttons [button][4]-paddingsize, 3.5 * widgetScale, 0, 0, 0, button == firstButton and 1 or 0, { 0,0,0, 0.06 }) glBlending(GL.SRC_ALPHA, GL.ONE) - RectRound(buttonsArea['buttons'][button][1], buttonsArea['buttons'][button][2], buttonsArea['buttons'][button][3], buttonsArea['buttons'][button][4], 3.5 * widgetScale, 0, 0, 0, button == firstButton and 1 or 0, { 1, 1, 1, mb and 0.13 or 0.03 }, { 0.44, 0.44, 0.44, mb and 0.4 or 0.2 }) + RectRound(buttonsArea.buttons [button][1], buttonsArea.buttons [button][2], buttonsArea.buttons [button][3], buttonsArea.buttons [button][4], 3.5 * widgetScale, 0, 0, 0, button == firstButton and 1 or 0, { 1, 1, 1, mb and 0.13 or 0.03 }, { 0.44, 0.44, 0.44, mb and 0.4 or 0.2 }) local mult = 1 - RectRound(buttonsArea['buttons'][button][1], buttonsArea['buttons'][button][4] - ((buttonsArea['buttons'][button][4] - buttonsArea['buttons'][button][2]) * 0.4), buttonsArea['buttons'][button][3], buttonsArea['buttons'][button][4], 3.3 * widgetScale, 0, 0, 0, 0, { 1, 1, 1, 0 }, { 1, 1, 1, 0.18 * mult }) - RectRound(buttonsArea['buttons'][button][1], buttonsArea['buttons'][button][2], buttonsArea['buttons'][button][3], buttonsArea['buttons'][button][2] + ((buttonsArea['buttons'][button][4] - buttonsArea['buttons'][button][2]) * 0.25), 3.3 * widgetScale, 0, 0, 0, button == firstButton and 1 or 0, { 1, 1, 1, 0.045 * mult }, { 1, 1, 1, 0 }) + RectRound(buttonsArea.buttons [button][1], buttonsArea.buttons [button][4] - ((buttonsArea.buttons [button][4] - buttonsArea.buttons [button][2]) * 0.4), buttonsArea.buttons [button][3], buttonsArea.buttons [button][4], 3.3 * widgetScale, 0, 0, 0, 0, { 1, 1, 1, 0 }, { 1, 1, 1, 0.18 * mult }) + RectRound(buttonsArea.buttons [button][1], buttonsArea.buttons [button][2], buttonsArea.buttons [button][3], buttonsArea.buttons [button][2] + ((buttonsArea.buttons [button][4] - buttonsArea.buttons [button][2]) * 0.25), 3.3 * widgetScale, 0, 0, 0, button == firstButton and 1 or 0, { 1, 1, 1, 0.045 * mult }, { 1, 1, 1, 0 }) glBlending(GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA) break end @@ -1864,7 +1864,7 @@ function widget:DrawScreen() end if dlist.quit then - if WG['guishader'] then WG['guishader'].removeRenderDlist(dlist.quit) end + if WG.guishader then WG.guishader .removeRenderDlist(dlist.quit) end glDeleteList(dlist.quit) dlist.quit = nil end @@ -1881,7 +1881,7 @@ end local function adjustSliders(x, y) if draggingShareIndicator and not spec then - local shareValue = (x - resbarDrawinfo[draggingShareIndicator]['barArea'][1]) / (resbarDrawinfo[draggingShareIndicator]['barArea'][3] - resbarDrawinfo[draggingShareIndicator]['barArea'][1]) + local shareValue = (x - resbarDrawinfo[draggingShareIndicator].barArea [1]) / (resbarDrawinfo[draggingShareIndicator].barArea [3] - resbarDrawinfo[draggingShareIndicator].barArea [1]) if shareValue < 0 then shareValue = 0 end if shareValue > 1 then shareValue = 1 end Spring.SetShareLevel(draggingShareIndicator, shareValue) @@ -1890,7 +1890,7 @@ local function adjustSliders(x, y) end if draggingConversionIndicator and not spec then - local convValue = mathFloor((x - resbarDrawinfo['energy']['barArea'][1]) / (resbarDrawinfo['energy']['barArea'][3] - resbarDrawinfo['energy']['barArea'][1]) * 100) + local convValue = mathFloor((x - resbarDrawinfo.energy .barArea [1]) / (resbarDrawinfo.energy .barArea [3] - resbarDrawinfo.energy .barArea [1]) * 100) if convValue < 12 then convValue = 12 end if convValue > 88 then convValue = 88 end Spring.SendLuaRulesMsg(stringFormat(string.char(137) .. '%i', convValue)) @@ -1924,7 +1924,7 @@ local function hideWindows() showQuitscreen = nil - if WG['guishader'] then WG['guishader'].setScreenBlur(false) end + if WG.guishader then WG.guishader .setScreenBlur(false) end if gameIsOver then -- Graphs window can only be open after game end -- Closing Graphs window if open, no way to tell if it was open or not @@ -1966,7 +1966,7 @@ local function applyButtonAction(button) if oldShowQuitscreen then if isvisible ~= true then showQuitscreen = oldShowQuitscreen - if WG['guishader'] then WG['guishader'].setScreenBlur(true) end + if WG.guishader then WG.guishader .setScreenBlur(true) end end else showQuitscreen = now @@ -1975,7 +1975,7 @@ local function applyButtonAction(button) elseif button == 'options' then toggleWindow('options') elseif button == 'save' then - if isSinglePlayer and cfg.allowSavegame and WG['savegame'] then + if isSinglePlayer and cfg.allowSavegame and WG.savegame then local time = os.date("%Y%m%d_%H%M%S") Spring.SendCommands("savegame "..time) end @@ -2009,7 +2009,7 @@ end function widget:KeyPress(key) if key == 27 then -- ESC - if not WG['options'] or (WG['options'].disallowEsc and not WG['options'].disallowEsc()) then + if not WG.options or (WG.options .disallowEsc and not WG.options .disallowEsc()) then local escDidSomething = hideWindows() if cfg.escapeKeyPressesQuit and not escDidSomething then applyButtonAction('quit') @@ -2027,7 +2027,7 @@ function widget:MousePress(x, y, button) if playSounds then Spring.PlaySoundFile(leftclick, 0.75, 'ui') end showQuitscreen = nil - if WG['guishader'] then WG['guishader'].setScreenBlur(false) end + if WG.guishader then WG.guishader .setScreenBlur(false) end end if (gameIsOver or not chobbyLoaded) and mathIsInRect(x, y, quitscreenQuitArea[1], quitscreenQuitArea[2], quitscreenQuitArea[3], quitscreenQuitArea[4]) then if playSounds then Spring.PlaySoundFile(leftclick, 0.75, 'ui') end @@ -2045,28 +2045,28 @@ function widget:MousePress(x, y, button) if playSounds then Spring.PlaySoundFile(leftclick, 0.75, 'ui') end Spring.SendCommands("spectator") showQuitscreen = nil - if WG['guishader'] then WG['guishader'].setScreenBlur(false) end + if WG.guishader then WG.guishader .setScreenBlur(false) end end if not spec and not gameIsOver and teamResign and mathIsInRect(x, y, quitscreenTeamResignArea[1], quitscreenTeamResignArea[2], quitscreenTeamResignArea[3], quitscreenTeamResignArea[4]) then if playSounds then Spring.PlaySoundFile(leftclick, 0.75, 'ui') end Spring.SendCommands("say !cv resign") showQuitscreen = nil - if WG['guishader'] then WG['guishader'].setScreenBlur(false) end + if WG.guishader then WG.guishader .setScreenBlur(false) end end else showQuitscreen = nil - if WG['guishader'] then WG['guishader'].setScreenBlur(false) end + if WG.guishader then WG.guishader .setScreenBlur(false) end end return true end if not spec then if not isSingle then - if mathIsInRect(x, y, shareIndicatorArea['metal'][1], shareIndicatorArea['metal'][2], shareIndicatorArea['metal'][3], shareIndicatorArea['metal'][4]) then + if mathIsInRect(x, y, shareIndicatorArea.metal [1], shareIndicatorArea.metal [2], shareIndicatorArea.metal [3], shareIndicatorArea.metal [4]) then draggingShareIndicator = 'metal' end - if mathIsInRect(x, y, shareIndicatorArea['energy'][1], shareIndicatorArea['energy'][2], shareIndicatorArea['energy'][3], shareIndicatorArea['energy'][4]) then + if mathIsInRect(x, y, shareIndicatorArea.energy [1], shareIndicatorArea.energy [2], shareIndicatorArea.energy [3], shareIndicatorArea.energy [4]) then draggingShareIndicator = 'energy' end end @@ -2081,8 +2081,8 @@ function widget:MousePress(x, y, button) end end - if buttonsArea['buttons'] then - for button, pos in pairs(buttonsArea['buttons']) do + if buttonsArea.buttons then + for button, pos in pairs(buttonsArea.buttons ) do if mathIsInRect(x, y, pos[1], pos[2], pos[3], pos[4]) then applyButtonAction(button) return true @@ -2195,42 +2195,42 @@ function widget:Initialize() end end - WG['topbar'] = {} + WG.topbar = {} - WG['topbar'].showingQuit = function() + WG.topbar .showingQuit = function() return (showQuitscreen) end - WG['topbar'].hideWindows = function() + WG.topbar .hideWindows = function() hideWindows() end - WG['topbar'].setAutoHideButtons = function(value) + WG.topbar .setAutoHideButtons = function(value) refreshUi = true autoHideButtons = value showButtons = not value updateButtons() end - WG['topbar'].getAutoHideButtons = function() + WG.topbar .getAutoHideButtons = function() return autoHideButtons end - WG['topbar'].getShowButtons = function() + WG.topbar .getShowButtons = function() return showButtons end - WG['topbar'].updateTopBarEnergy = function(value) + WG.topbar .updateTopBarEnergy = function(value) draggingConversionIndicatorValue = value updateResbar('energy') end - WG['topbar'].setResourceBarsVisible = function(visible) + WG.topbar .setResourceBarsVisible = function(visible) showResourceBars = visible refreshUi = true end - WG['topbar'].getResourceBarsVisible = function() + WG.topbar .getResourceBarsVisible = function() return showResourceBars end @@ -2243,7 +2243,7 @@ function widget:Initialize() widget:GameStart() end - if WG['resource_spot_finder'] and WG['resource_spot_finder'].metalSpotsList and #WG['resource_spot_finder'].metalSpotsList > 0 and #WG['resource_spot_finder'].metalSpotsList <= 2 then -- probably speedmetal kind of map + if WG.resource_spot_finder and WG.resource_spot_finder .metalSpotsList and #WG.resource_spot_finder .metalSpotsList > 0 and #WG.resource_spot_finder .metalSpotsList <= 2 then -- probably speedmetal kind of map isMetalmap = true end end @@ -2260,8 +2260,8 @@ function widget:Shutdown() dlist.quit = glDeleteList(dlist.quit) for n, _ in pairs(dlist.windText) do dlist.windText[n] = glDeleteList(dlist.windText[n]) end - for n, _ in pairs(dlist.resbar['metal']) do dlist.resbar['metal'][n] = glDeleteList(dlist.resbar['metal'][n]) end - for n, _ in pairs(dlist.resbar['energy']) do dlist.resbar['energy'][n] = glDeleteList(dlist.resbar['energy'][n]) end + for n, _ in pairs(dlist.resbar.metal ) do dlist.resbar.metal [n] = glDeleteList(dlist.resbar.metal [n]) end + for n, _ in pairs(dlist.resbar.energy ) do dlist.resbar.energy [n] = glDeleteList(dlist.resbar.energy [n]) end for res, _ in pairs(dlist.resValues) do dlist.resValues[res] = glDeleteList(dlist.resValues[res]) end for res, _ in pairs(dlist.resValuesBar) do dlist.resValuesBar[res] = glDeleteList(dlist.resValuesBar[res]) end end @@ -2275,31 +2275,31 @@ function widget:Shutdown() uiTex = nil end - if WG['guishader'] then - WG['guishader'].DeleteDlist('topbar_background') + if WG.guishader then + WG.guishader .DeleteDlist('topbar_background') end - if WG['tooltip'] then - WG['tooltip'].RemoveTooltip('coms') - WG['tooltip'].RemoveTooltip('wind') + if WG.tooltip then + WG.tooltip .RemoveTooltip('coms') + WG.tooltip .RemoveTooltip('wind') local res = 'energy' - WG['tooltip'].RemoveTooltip(res .. '_share_slider') - WG['tooltip'].RemoveTooltip(res .. '_share_slider2') - WG['tooltip'].RemoveTooltip(res .. '_metalmaker_slider') - WG['tooltip'].RemoveTooltip(res .. '_pull') - WG['tooltip'].RemoveTooltip(res .. '_income') - WG['tooltip'].RemoveTooltip(res .. '_storage') - WG['tooltip'].RemoveTooltip(res .. '_current') + WG.tooltip .RemoveTooltip(res .. '_share_slider') + WG.tooltip .RemoveTooltip(res .. '_share_slider2') + WG.tooltip .RemoveTooltip(res .. '_metalmaker_slider') + WG.tooltip .RemoveTooltip(res .. '_pull') + WG.tooltip .RemoveTooltip(res .. '_income') + WG.tooltip .RemoveTooltip(res .. '_storage') + WG.tooltip .RemoveTooltip(res .. '_current') res = 'metal' - WG['tooltip'].RemoveTooltip(res .. '_share_slider') - WG['tooltip'].RemoveTooltip(res .. '_share_slider2') - WG['tooltip'].RemoveTooltip(res .. '_pull') - WG['tooltip'].RemoveTooltip(res .. '_income') - WG['tooltip'].RemoveTooltip(res .. '_storage') - WG['tooltip'].RemoveTooltip(res .. '_current') + WG.tooltip .RemoveTooltip(res .. '_share_slider') + WG.tooltip .RemoveTooltip(res .. '_share_slider2') + WG.tooltip .RemoveTooltip(res .. '_pull') + WG.tooltip .RemoveTooltip(res .. '_income') + WG.tooltip .RemoveTooltip(res .. '_storage') + WG.tooltip .RemoveTooltip(res .. '_current') end - WG['topbar'] = nil + WG.topbar = nil end function widget:GetConfigData() diff --git a/luaui/Widgets/gui_unit_energy_icons.lua b/luaui/Widgets/gui_unit_energy_icons.lua index ad92f9b7012..117f492ff28 100644 --- a/luaui/Widgets/gui_unit_energy_icons.lua +++ b/luaui/Widgets/gui_unit_energy_icons.lua @@ -165,8 +165,8 @@ function widget:Initialize() end if not initGL4() then return end - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end end diff --git a/luaui/Widgets/gui_unit_idlebuilder_icons.lua b/luaui/Widgets/gui_unit_idlebuilder_icons.lua index 2277507a9d1..d23ffaf18bd 100644 --- a/luaui/Widgets/gui_unit_idlebuilder_icons.lua +++ b/luaui/Widgets/gui_unit_idlebuilder_icons.lua @@ -109,8 +109,8 @@ function widget:Initialize() widgetHandler:RemoveWidget() return end - if WG['unittrackerapi'] and WG['unittrackerapi'].visibleUnits then - widget:VisibleUnitsChanged(WG['unittrackerapi'].visibleUnits, nil) + if WG.unittrackerapi and WG.unittrackerapi .visibleUnits then + widget:VisibleUnitsChanged(WG.unittrackerapi .visibleUnits, nil) end end diff --git a/luaui/Widgets/gui_unit_stats.lua b/luaui/Widgets/gui_unit_stats.lua index 97c640aa671..4b0aa03c449 100644 --- a/luaui/Widgets/gui_unit_stats.lua +++ b/luaui/Widgets/gui_unit_stats.lua @@ -359,9 +359,9 @@ end local guishaderEnabled = false -- not a config var function RemoveGuishader() - if guishaderEnabled and WG['guishader'] then - WG['guishader'].DeleteScreenDlist('unit_stats_title') - WG['guishader'].DeleteScreenDlist('unit_stats_data') + if guishaderEnabled and WG.guishader then + WG.guishader .DeleteScreenDlist('unit_stats_title') + WG.guishader .DeleteScreenDlist('unit_stats_data') guishaderEnabled = false end if dlistGuishaderTitle then @@ -406,8 +406,8 @@ function widget:Initialize() widget:ViewResize(vsx,vsy) - WG['unitstats'] = {} - WG['unitstats'].showUnit = function(unitID) + WG.unitstats = {} + WG.unitstats .showUnit = function(unitID) showUnitID = unitID end @@ -418,7 +418,7 @@ function widget:Initialize() end function widget:Shutdown() - WG['unitstats'] = nil + WG.unitstats = nil RemoveGuishader() invalidateContent() end @@ -447,7 +447,7 @@ function widget:ViewResize(n_vsx,n_vsy) UiElement = WG.FlowUI.Draw.Element UiUnit = WG.FlowUI.Draw.Unit - font = WG['fonts'].getFont() + font = WG.fonts .getFont() init() invalidateContent() @@ -895,8 +895,8 @@ local function computeContent(uDefID, uID, shiftBool) -- Compute title text local effectivenessRate = '' - if damageStats and damageStats[gameName] and damageStats[gameName]["team"] and damageStats[gameName]["team"][uDef.name] and damageStats[gameName]["team"][uDef.name].cost and damageStats[gameName]["team"][uDef.name].killed_cost then - effectivenessRate = " "..damageStats[gameName]["team"][uDef.name].killed_cost / damageStats[gameName]["team"][uDef.name].cost + if damageStats and damageStats[gameName] and damageStats[gameName].team and damageStats[gameName].team [uDef.name] and damageStats[gameName].team [uDef.name].cost and damageStats[gameName].team [uDef.name].killed_cost then + effectivenessRate = " "..damageStats[gameName].team [uDef.name].killed_cost / damageStats[gameName].team [uDef.name].cost end cachedTitleText = "\255\190\255\190" .. UnitDefs[uDefID].translatedHumanName if uID then @@ -923,8 +923,8 @@ end local function drawStats(uDefID, uID) local mx, my = spGetMouseState() local alt, ctrl, meta, shift = spGetModKeyState() - if WG['chat'] and WG['chat'].isInputActive then - if WG['chat'].isInputActive() then + if WG.chat and WG.chat .isInputActive then + if WG.chat .isInputActive() then showStats = false end end @@ -976,7 +976,7 @@ local function drawStats(uDefID, uID) true) -- Update guishader only when position changed - if WG['guishader'] then + if WG.guishader then if cachedGuishaderX ~= screenX or cachedGuishaderY ~= screenY then guishaderEnabled = true cachedGuishaderX = screenX @@ -992,7 +992,7 @@ local function drawStats(uDefID, uID) dlistGuishaderTitle = gl.CreateList(function() RectRound(tLeft, tBottom, tRight, tTop, elementCorner, 1,1,1,0) end) - WG['guishader'].InsertScreenDlist(dlistGuishaderTitle, 'unit_stats_title') + WG.guishader .InsertScreenDlist(dlistGuishaderTitle, 'unit_stats_title') local sLeft = floor(screenX - bgpadding) local sBottom = ceil(screenY + cachedContentBottom + (fontSize / 3) + (bgpadding * 0.3)) @@ -1003,18 +1003,18 @@ local function drawStats(uDefID, uID) dlistGuishaderStats = gl.CreateList(function() RectRound(sLeft, sBottom, sRight, sTop, elementCorner, 0,1,1,1) end) - WG['guishader'].InsertScreenDlist(dlistGuishaderStats, 'unit_stats_data') + WG.guishader .InsertScreenDlist(dlistGuishaderStats, 'unit_stats_data') end end end function widget:DrawScreen() - if WG['topbar'] and WG['topbar'].showingQuit() then + if WG.topbar and WG.topbar .showingQuit() then return end - if WG['chat'] and WG['chat'].isInputActive then - if WG['chat'].isInputActive() then + if WG.chat and WG.chat .isInputActive then + if WG.chat .isInputActive() then showStats = false end end @@ -1040,9 +1040,9 @@ function widget:DrawScreen() local useHoverID = false local _, activeID = Spring.GetActiveCommand() if not activeID then activeID = 0 end - if not uID and (WG['buildmenu'] and not WG['buildmenu'].hoverID) and not (activeID < 0) then + if not uID and (WG.buildmenu and not WG.buildmenu .hoverID) and not (activeID < 0) then RemoveGuishader() return - elseif WG['buildmenu'] and WG['buildmenu'].hoverID and not (activeID < 0) then + elseif WG.buildmenu and WG.buildmenu .hoverID and not (activeID < 0) then uID = nil useHoverID = true elseif activeID < 0 then @@ -1053,7 +1053,7 @@ function widget:DrawScreen() RemoveGuishader() return end - local uDefID = (uID and spGetUnitDefID(uID)) or (useHoverID and WG['buildmenu'] and WG['buildmenu'].hoverID) or (UnitDefs[-activeID] and -activeID) + local uDefID = (uID and spGetUnitDefID(uID)) or (useHoverID and WG.buildmenu and WG.buildmenu .hoverID) or (UnitDefs[-activeID] and -activeID) if not uDefID then RemoveGuishader() diff --git a/luaui/Widgets/gui_unitgroups.lua b/luaui/Widgets/gui_unitgroups.lua index 3e1570b3206..a850aa77cbf 100644 --- a/luaui/Widgets/gui_unitgroups.lua +++ b/luaui/Widgets/gui_unitgroups.lua @@ -81,8 +81,8 @@ function widget:ViewResize() vsx, vsy = spGetViewGeometry() height = setHeight * uiScale - font2 = WG['fonts'].getFont() - font = WG['fonts'].getFont(2) + font2 = WG.fonts .getFont() + font = WG.fonts .getFont(2) elementCorner = WG.FlowUI.elementCorner backgroundPadding = WG.FlowUI.elementPadding @@ -92,14 +92,14 @@ function widget:ViewResize() UiElement = WG.FlowUI.Draw.Element UiUnit = WG.FlowUI.Draw.Unit - if WG['buildmenu'] then - buildmenuBottomPosition = WG['buildmenu'].getBottomPosition() - buildmenuAlwaysShow = WG['buildmenu'].getAlwaysShow() + if WG.buildmenu then + buildmenuBottomPosition = WG.buildmenu .getBottomPosition() + buildmenuAlwaysShow = WG.buildmenu .getAlwaysShow() end local omPosX, omPosY, omWidth, omHeight = 0, 0, 0, 0 - if WG['ordermenu'] then - omPosX, omPosY, omWidth, omHeight = WG['ordermenu'].getPosition() + if WG.ordermenu then + omPosX, omPosY, omWidth, omHeight = WG.ordermenu .getPosition() end ordermenuPosY = omPosY @@ -117,7 +117,7 @@ function widget:ViewResize() if buildmenuBottomPosition and not buildmenuAlwaysShow then buildmenuShowingPosY = posY - if (not selectedUnits[1] or not WG['buildmenu'].getIsShowing()) then + if (not selectedUnits[1] or not WG.buildmenu .getIsShowing()) then posY = 0 end end @@ -149,8 +149,8 @@ function widget:Initialize() end widget:ViewResize() widget:PlayerChanged() - WG['unitgroups'] = {} - WG['unitgroups'].getPosition = function() + WG.unitgroups = {} + WG.unitgroups .getPosition = function() return posX, backgroundRect and backgroundRect[2] or posY, backgroundRect and backgroundRect[3] or posX, backgroundRect and backgroundRect[4] or posY + usedHeight end end @@ -165,11 +165,11 @@ function widget:Shutdown() if uiTex then gl.DeleteTexture(uiTex) end - if WG['guishader'] and dlistGuishader then + if WG.guishader and dlistGuishader then WG.FlowUI.guishaderDeleteDlist('unitgroups') dlistGuishader = nil end - WG['unitgroups'] = nil + WG.unitgroups = nil end local function checkGuishader(force) @@ -500,7 +500,7 @@ function widget:Update(dt) return end - if WG['topbar'] and WG['topbar'].showingQuit() then + if WG.topbar and WG.topbar .showingQuit() then return end @@ -508,13 +508,13 @@ function widget:Update(dt) sec = sec + dt sec2 = sec2 + dt - if WG['buildmenu'] then - if buildmenuAlwaysShow ~= WG['buildmenu'].getAlwaysShow() then + if WG.buildmenu then + if buildmenuAlwaysShow ~= WG.buildmenu .getAlwaysShow() then widget:ViewResize() doUpdate = true end - if buildmenuBottomPosition and not buildmenuAlwaysShow and WG['info'] then - if (not selectedUnits[1] or not WG['buildmenu'].getIsShowing()) and (posX > 0 or not WG['info'].getIsShowing()) then + if buildmenuBottomPosition and not buildmenuAlwaysShow and WG.info then + if (not selectedUnits[1] or not WG.buildmenu .getIsShowing()) and (posX > 0 or not WG.info .getIsShowing()) then if posY ~= 0 then posY = 0 doUpdate = true @@ -536,11 +536,11 @@ function widget:Update(dt) tooltipAddition = tooltipAddition .. Spring.I18N('ui.unitGroups.shiftclick')..'\n'..Spring.I18N('ui.unitGroups.ctrlclick')..'\n'..Spring.I18N('ui.unitGroups.rightclick') end tooltipAddition = tooltipAddition .. (tooltipAddition~='' and '\n' or '') .. Spring.I18N('ui.unitGroups.tooltip') - if WG['autogroup'] ~= nil then + if WG.autogroup ~= nil then tooltipAddition = tooltipAddition .. (tooltipAddition~='' and '\n\n' or '') .. "\255\200\255\200" .. Spring.I18N('ui.unitGroups.autogroupTooltip') end - if WG['tooltip'] then - WG['tooltip'].ShowTooltip('unitgroups', tooltipAddition, nil, nil, Spring.I18N('ui.unitGroups.name')) + if WG.tooltip then + WG.tooltip .ShowTooltip('unitgroups', tooltipAddition, nil, nil, Spring.I18N('ui.unitGroups.name')) end Spring.SetMouseCursor('cursornormal') if b then @@ -599,17 +599,17 @@ function widget:Update(dt) end end - if WG['buildmenu'] and WG['buildmenu'].getBottomPosition then + if WG.buildmenu and WG.buildmenu .getBottomPosition then local prevbuildmenuBottomPos = buildmenuBottomPos - buildmenuBottomPos = WG['buildmenu'].getBottomPosition() + buildmenuBottomPos = WG.buildmenu .getBottomPosition() if buildmenuBottomPos ~= prevbuildmenuBottomPos then widget:ViewResize() doUpdate = true end end - if WG['ordermenu'] then + if WG.ordermenu then local prevOrdermenuPosY = ordermenuPosY - ordermenuPosY = select(2, WG['ordermenu'].getPosition()) + ordermenuPosY = select(2, WG.ordermenu .getPosition()) if ordermenuPosY ~= prevOrdermenuPosY then widget:ViewResize() doUpdate = true @@ -619,7 +619,7 @@ function widget:Update(dt) doUpdate = true -- TODO: find a way to detect group changes and only doUpdate then -- detect guishader toggle: force refresh when it comes back on - local guishaderActive = WG['guishader'] ~= nil + local guishaderActive = WG.guishader ~= nil if guishaderActive and not guishaderWasActive then checkGuishader(true) end diff --git a/luaui/Widgets/gui_vote_interface.lua b/luaui/Widgets/gui_vote_interface.lua index 837f687029e..7e38c95a0d0 100644 --- a/luaui/Widgets/gui_vote_interface.lua +++ b/luaui/Widgets/gui_vote_interface.lua @@ -89,8 +89,8 @@ local function CloseVote() voteName = nil weAreVoteOwner = nil eligibleToVote = false - if WG['guishader'] then - WG['guishader'].DeleteDlist('voteinterface') + if WG.guishader then + WG.guishader .DeleteDlist('voteinterface') end gl.DeleteList(voteDlist) end @@ -136,8 +136,8 @@ local function StartVote(name) -- when called without params its just to refresh local xpos = mathFloor(width / 2) local ypos = mathFloor(vsy - (height / 2)) - if WG['topbar'] ~= nil then - local topbarArea = WG['topbar'].GetPosition() + if WG.topbar ~= nil then + local topbarArea = WG.topbar .GetPosition() xpos = mathFloor(topbarArea[1] + (width/2) + widgetSpaceMargin + ((topbarArea[3] - topbarArea[1])/2)) ypos = mathFloor(topbarArea[2] - widgetSpaceMargin - (height / 2)) end @@ -281,11 +281,11 @@ local function StartVote(name) -- when called without params its just to refresh end) -- background blur - if WG['guishader'] then + if WG.guishader then dlistGuishader = gl.CreateList(function() RectRound(windowArea[1], windowArea[2], windowArea[3], windowArea[4], elementCorner) end) - WG['guishader'].InsertDlist(dlistGuishader, 'voteinterface') + WG.guishader .InsertDlist(dlistGuishader, 'voteinterface') end end @@ -305,8 +305,8 @@ function widget:ViewResize() UiElement = WG.FlowUI.Draw.Element UiButton = WG.FlowUI.Draw.Button - font = WG['fonts'].getFont() - font2 = WG['fonts'].getFont(2) + font = WG.fonts .getFont() + font2 = WG.fonts .getFont(2) end function widget:PlayerChanged(playerID) @@ -383,7 +383,7 @@ end function widget:AddConsoleLine(lines, priority) if priority and priority == L_DEPRECATED then return end - if not WG['rejoin'] or not WG['rejoin'].showingRejoining() then + if not WG.rejoin or not WG.rejoin .showingRejoining() then lines = lines:match('^%[f=[0-9]+%] (.*)$') or lines for line in lines:gmatch("[^\n]+") do @@ -573,7 +573,7 @@ end function widget:DrawScreen() if voteDlist then - if not WG['topbar'] or not WG['topbar'].showingQuit() then + if not WG.topbar or not WG.topbar .showingQuit() then if eligibleToVote then local x, y, b = spGetMouseState() if hovered then diff --git a/luaui/Widgets/map_auto_mapmark_eraser.lua b/luaui/Widgets/map_auto_mapmark_eraser.lua index 2eadd4886a5..fff7f0fb1eb 100644 --- a/luaui/Widgets/map_auto_mapmark_eraser.lua +++ b/luaui/Widgets/map_auto_mapmark_eraser.lua @@ -18,14 +18,14 @@ local pointsToErase = {} local recentlyErased = {} function widget:Initialize() - WG['autoeraser'] = {} - WG['autoeraser'].getEraseTime = function() + WG.autoeraser = {} + WG.autoeraser .getEraseTime = function() return eraseTime end - WG['autoeraser'].setEraseTime = function(value) + WG.autoeraser .setEraseTime = function(value) eraseTime = value end - WG['autoeraser'].getRecentlyErased = function(value) -- so mapmarks fx widget can call this and wont activate on auto erasing + WG.autoeraser .getRecentlyErased = function(value) -- so mapmarks fx widget can call this and wont activate on auto erasing return recentlyErased end end diff --git a/luaui/Widgets/map_edge_extension2.lua b/luaui/Widgets/map_edge_extension2.lua index 0fc58a48fb7..9c0fd511ac9 100644 --- a/luaui/Widgets/map_edge_extension2.lua +++ b/luaui/Widgets/map_edge_extension2.lua @@ -529,18 +529,18 @@ function widget:Initialize() widgetHandler:RemoveWidget(self) end - WG['mapedgeextension'] = {} - WG['mapedgeextension'].getBrightness = function() + WG.mapedgeextension = {} + WG.mapedgeextension .getBrightness = function() return brightness end - WG['mapedgeextension'].setBrightness = function(value) + WG.mapedgeextension .setBrightness = function(value) brightness = value --UpdateShader() end - WG['mapedgeextension'].getCurvature = function() + WG.mapedgeextension .getCurvature = function() return curvature end - WG['mapedgeextension'].setCurvature = function(value) + WG.mapedgeextension .setCurvature = function(value) curvature = value --UpdateShader() end @@ -892,8 +892,8 @@ function widget:SunChanged() -- Note that map_nightmode.lua gadget has to change if df == lastSunChanged then return end lastSunChanged = df -- Do the math: - if WG['NightFactor'] then - nightFactor = (WG['NightFactor'].red + WG['NightFactor'].green + WG['NightFactor'].blue) * 0.33 + if WG.NightFactor then + nightFactor = (WG.NightFactor .red + WG.NightFactor .green + WG.NightFactor .blue) * 0.33 end end diff --git a/luaui/Widgets/map_grass_gl4.lua b/luaui/Widgets/map_grass_gl4.lua index 73fffd14f4f..4be6681c0d4 100644 --- a/luaui/Widgets/map_grass_gl4.lua +++ b/luaui/Widgets/map_grass_gl4.lua @@ -158,28 +158,28 @@ local mapoverrides = { MAPCOLORFACTOR = 0.6, }, }, - ["DeltaSiegeDry"] = { + DeltaSiegeDry = { patchResolution = 32, grassShaderParams = { MAPCOLORFACTOR = 0.6, SHADOWFACTOR = 0.001, }, }, - ["Pentos_V1"] = { + Pentos_V1 = { patchResolution = 32, grassShaderParams = { MAPCOLORFACTOR = 0.6, }, }, - ["Taldarim_V3"] = { + Taldarim_V3 = { patchResolution = 32, grassShaderParams = { MAPCOLORFACTOR = 0.5, }, grassDistTGA = "LuaUI/Images/luagrass/Taldarim_V3_grassDist.tga", }, - ["Altair_Crossing_V4"] = { + Altair_Crossing_V4 = { patchResolution = 32, grassMinSize = 0.5; --Size for grassmap value of 1 , min and max should be equal for old style binary grassmap (because its only 0,1) grassMaxSize = 2.0; -- Size for grassmap value of 254 @@ -513,8 +513,8 @@ local function clearAllUnitGrass() end local function clearGeothermalGrass() - if WG['resource_spot_finder'] then - local spots = WG['resource_spot_finder'].geoSpotsList + if WG.resource_spot_finder then + local spots = WG.resource_spot_finder .geoSpotsList if spots then local maxValue = 15 for i = 1, #spots do @@ -527,8 +527,8 @@ end -- because not all maps have done this for us local function clearMetalspotGrass() - if WG['resource_spot_finder'] then - local spots = WG['resource_spot_finder'].metalSpotsList + if WG.resource_spot_finder then + local spots = WG.resource_spot_finder .metalSpotsList if spots then local maxValue = 15 for i = 1, #spots do @@ -587,8 +587,8 @@ function widget:GameFrame(gf) local lavaLevel = Spring.GetGameRulesParam("lavaLevel") if lavaLevel and lavaLevel ~= -99999 and (not lastLavaLevel or lavaLevel > lastLavaLevel) then lastLavaLevel = lavaLevel - if WG['grassgl4'] and WG['grassgl4'].removeGrassBelowHeight then - WG['grassgl4'].removeGrassBelowHeight(lavaLevel) + if WG.grassgl4 and WG.grassgl4 .removeGrassBelowHeight then + WG.grassgl4 .removeGrassBelowHeight(lavaLevel) end end end @@ -914,14 +914,14 @@ function widget:Initialize() widgetHandler:RemoveWidget() return end - WG['grassgl4'] = {} - WG['grassgl4'].getDistanceMult = function() + WG.grassgl4 = {} + WG.grassgl4 .getDistanceMult = function() return distanceMult end - WG['grassgl4'].setDistanceMult = function(value) + WG.grassgl4 .setDistanceMult = function(value) distanceMult = value end - WG['grassgl4'].removeGrass = function(wx,wz,radius) + WG.grassgl4 .removeGrass = function(wx,wz,radius) radius = radius or grassConfig.patchResolution for x = wx - radius, wx + radius, grassConfig.patchResolution do for z = wz - radius, wz + radius, grassConfig.patchResolution do @@ -933,7 +933,7 @@ function widget:Initialize() end end end - WG['grassgl4'].removeGrassBelowHeight = function(height) + WG.grassgl4 .removeGrassBelowHeight = function(height) if #grassInstanceData == 0 then return nil end if not removedBelowHeight or height > removedBelowHeight then removedBelowHeight = height @@ -963,15 +963,15 @@ function widget:Initialize() clearAllUnitGrass() clearMetalspotGrass() if Game.waterDamage > 0 then - WG['grassgl4'].removeGrassBelowHeight(20) + WG.grassgl4 .removeGrassBelowHeight(20) end -- initial lava check local initLavaLevel = Spring.GetGameRulesParam("lavaLevel") if initLavaLevel and initLavaLevel ~= -99999 then lastLavaLevel = initLavaLevel - WG['grassgl4'].removeGrassBelowHeight(initLavaLevel) + WG.grassgl4 .removeGrassBelowHeight(initLavaLevel) end - widgetHandler:RegisterGlobal('GadgetRemoveGrass', WG['grassgl4'].removeGrass) + widgetHandler:RegisterGlobal('GadgetRemoveGrass', WG.grassgl4 .removeGrass) processChanges = false for k, v in pairs(grassInstanceData) do @@ -1175,12 +1175,12 @@ function widget:SunChanged() -- Note that map_nightmode.lua gadget has to change lastSunChanged = df -- Do the math: - if WG['NightFactor'] then + if WG.NightFactor then local altitudefactor = 1.0 --+ (1.0 - WG['NightFactor'].altitude) * 0.5 - nightFactor[1] = WG['NightFactor'].red * altitudefactor - nightFactor[2] = WG['NightFactor'].green * altitudefactor - nightFactor[3] = WG['NightFactor'].blue * altitudefactor - nightFactor[4] = WG['NightFactor'].shadow + nightFactor[1] = WG.NightFactor .red * altitudefactor + nightFactor[2] = WG.NightFactor .green * altitudefactor + nightFactor[3] = WG.NightFactor .blue * altitudefactor + nightFactor[4] = WG.NightFactor .shadow end end diff --git a/luaui/Widgets/map_lighting_adjuster.lua b/luaui/Widgets/map_lighting_adjuster.lua index d00d8d2bf7f..4bc0305cef9 100644 --- a/luaui/Widgets/map_lighting_adjuster.lua +++ b/luaui/Widgets/map_lighting_adjuster.lua @@ -9,7 +9,7 @@ local mapSunLighting = { unitSpecularColor = {0.95, 0.75, 0.7}, modelShadowDensity = 0.55, }, - ['valles_marineris_v2'] = { + valles_marineris_v2 = { groundAmbientColor = { 0.4, 0.55, 0.55 }, groundDiffuseColor = { 0.92, 0.58, 0.45 }, unitAmbientColor = {0.66, 0.5, 0.43}, @@ -23,7 +23,7 @@ local mapSunLighting = { modelShadowDensity = 0.66, unitAmbientColor = {0.83, 0.73, 0.63}, }, - ['tempest'] = { + tempest = { groundDiffuseColor = { 0.32, 0.28, 0.34 }, unitAmbientColor = {0.8, 0.77, 0.77}, unitDiffuseColor = {0.66, 0.65, 0.63}, @@ -37,13 +37,13 @@ local mapSunLighting = { unitSpecularColor = {0.5, 0.5, 0.5}, modelShadowDensity = 0.77, }, - ['seths_ravine_v4'] = { + seths_ravine_v4 = { unitAmbientColor = {0.36, 0.36, 0.36}, unitDiffuseColor = {0.88, 0.78, 0.68}, unitSpecularColor = {0.88, 0.78, 0.68}, modelShadowDensity = 0.77, }, - ['kolmogorov'] = { + kolmogorov = { groundDiffuseColor = { 0.95, 0.75, 0.4 }, unitAmbientColor = {0.6, 0.5, 0.45}, unitDiffuseColor = {1.2, 0.75, 0.35}, @@ -68,11 +68,11 @@ local mapSunLighting = { modelShadowDensity = 0.5, groundShadowDensity = 0.8, }, - ['mescaline_v2'] = { + mescaline_v2 = { modelShadowDensity = 0.9, groundShadowDensity = 0.88, }, - ['downs_of_destruction_fix'] = { + downs_of_destruction_fix = { unitDiffuseColor = {1.4, 1.4, 1.3}, }, ['twin lakes park 1'] = { @@ -129,13 +129,13 @@ local mapSun = { ['eye of horus v13'] = {0.23, 0.62, 0.6}, ['tabula-v4'] = {0.45, 0.65, 0.25}, ['titan v3.1'] = { 0.6, 0.82, -0.33 }, - ['tempest'] = { -0.35, 0.83, 0.47 }, + tempest = { -0.35, 0.83, 0.47 }, ['tempest dry'] = { -0.35, 0.83, 0.47 }, - ['seths_ravine_v4'] = { -0.6, 0.63, 0.43 }, - ['kolmogorov'] = { 0.4, 0.75, -0.43}, + seths_ravine_v4 = { -0.6, 0.63, 0.43 }, + kolmogorov = { 0.4, 0.75, -0.43}, ['otago 1.4'] = { -0.55, 0.5, 0.55}, ['tropical-v2'] = { 0.6, 0.33, 0.27}, - ['downs_of_destruction_fix'] = { 0.65, 0.43, -65}, + downs_of_destruction_fix = { 0.65, 0.43, -65}, ['flats and forests remake v1'] = {0.55, 0.5, -0.5}, } @@ -155,16 +155,16 @@ function widget:GetInfo() end local function NightFactorChanged(red, green, blue, shadow, altitude) - WG['NightFactor'].red = red - WG['NightFactor'].green = green - WG['NightFactor'].blue = blue - WG['NightFactor'].shadow = shadow - WG['NightFactor'].altitude = altitude + WG.NightFactor .red = red + WG.NightFactor .green = green + WG.NightFactor .blue = blue + WG.NightFactor .shadow = shadow + WG.NightFactor .altitude = altitude --Spring.Echo("Widget NightFactorChanged") end function widget:Initialize() widgetHandler:RegisterGlobal("NightFactorChanged",NightFactorChanged ) - WG['NightFactor'] = {red = 1, green = 1, blue = 1, shadow = 1, altitude = 1} + WG.NightFactor = {red = 1, green = 1, blue = 1, shadow = 1, altitude = 1} if not mapSunLighting[currentMapname] and not mapSun[currentMapname] then return end if Spring.GetGameFrame() < 1 then diff --git a/luaui/Widgets/map_start_position_suggestions.lua b/luaui/Widgets/map_start_position_suggestions.lua index ac6097053af..a79b24a3083 100644 --- a/luaui/Widgets/map_start_position_suggestions.lua +++ b/luaui/Widgets/map_start_position_suggestions.lua @@ -640,7 +640,7 @@ local function drawTooltip() end local xOffset, yOffset = 20, -12 - WG["tooltip"].ShowTooltip( + WG.tooltip .ShowTooltip( "startPositionTooltip", wrappedDescriptionCache[tooltipKey], x + xOffset, @@ -650,7 +650,7 @@ local function drawTooltip() end local function drawTutorial() - if config.hasRunBefore and (not WG["notifications"] or not WG["notifications"].getTutorial()) then + if config.hasRunBefore and (not WG.notifications or not WG.notifications .getTutorial()) then return end diff --git a/luaui/Widgets/map_startbox.lua b/luaui/Widgets/map_startbox.lua index edd2ce56110..8b01e327eaa 100644 --- a/luaui/Widgets/map_startbox.lua +++ b/luaui/Widgets/map_startbox.lua @@ -220,8 +220,8 @@ end local function createCommanderNameList(name, teamID) commanderNameList[teamID] = {} - commanderNameList[teamID]['name'] = name - commanderNameList[teamID]['list'] = gl.CreateList(function() + commanderNameList[teamID].name = name + commanderNameList[teamID].list = gl.CreateList(function() local x, y = 0, 0 local r, g, b = GetTeamColor(teamID) local outlineColor = { 0, 0, 0, 1 } @@ -255,15 +255,15 @@ local function createCommanderNameList(name, teamID) end local function drawName(x, y, name, teamID) - if commanderNameList[teamID] == nil or commanderNameList[teamID]['name'] ~= name then + if commanderNameList[teamID] == nil or commanderNameList[teamID].name ~= name then if commanderNameList[teamID] ~= nil then - gl.DeleteList(commanderNameList[teamID]['list']) + gl.DeleteList(commanderNameList[teamID].list ) end createCommanderNameList(name, teamID) end glPushMatrix() glTranslate(mathFloor(x), mathFloor(y), 0) - glCallList(commanderNameList[teamID]['list']) + glCallList(commanderNameList[teamID].list ) glPopMatrix() end @@ -365,7 +365,7 @@ end local allSpawnPositions = {} local function notifySpawnPositionsChanged() - if not WG["quick_start_updateSpawnPositions"] then + if not WG.quick_start_updateSpawnPositions then return end @@ -381,7 +381,7 @@ local function notifySpawnPositionsChanged() end end end - WG["quick_start_updateSpawnPositions"](allSpawnPositions) + WG.quick_start_updateSpawnPositions (allSpawnPositions) end function widget:LanguageChanged() @@ -510,8 +510,8 @@ local function DrawStartPolygons(inminimap) if advMapShading then gl.Texture(0, "$map_gbuffer_zvaltex") else - if WG['screencopymanager'] and WG['screencopymanager'].GetDepthCopy() then - gl.Texture(0, WG['screencopymanager'].GetDepthCopy()) + if WG.screencopymanager and WG.screencopymanager .GetDepthCopy() then + gl.Texture(0, WG.screencopymanager .GetDepthCopy()) else spEcho("Start Polygons: Adv map shading not available, and no depth copy available") return @@ -538,8 +538,8 @@ local function DrawStartPolygons(inminimap) startPolygonShader:SetUniformInt("myAllyTeamID", myAllyTeamID or -1) -- Pass PIP visible area if drawing in PIP minimap - if inminimap and WG['minimap'] and WG['minimap'].isDrawingInPip and WG['minimap'].getNormalizedVisibleArea then - local left, right, bottom, top = WG['minimap'].getNormalizedVisibleArea() + if inminimap and WG.minimap and WG.minimap .isDrawingInPip and WG.minimap .getNormalizedVisibleArea then + local left, right, bottom, top = WG.minimap .getNormalizedVisibleArea() startPolygonShader:SetUniform("pipVisibleArea", left, right, bottom, top) else startPolygonShader:SetUniform("pipVisibleArea", 0, 1, 0, 1) @@ -561,8 +561,8 @@ local function DrawStartCones(inminimap) startConeShader:SetUniformInt("rotationMiniMap", getCurrentMiniMapRotationOption() or ROTATION.DEG_0) -- Pass PIP visible area if drawing in PIP minimap - if inminimap and WG['minimap'] and WG['minimap'].isDrawingInPip and WG['minimap'].getNormalizedVisibleArea then - local left, right, bottom, top = WG['minimap'].getNormalizedVisibleArea() + if inminimap and WG.minimap and WG.minimap .isDrawingInPip and WG.minimap .getNormalizedVisibleArea then + local left, right, bottom, top = WG.minimap .getNormalizedVisibleArea() startConeShader:SetUniform("pipVisibleArea", left, right, bottom, top) else startConeShader:SetUniform("pipVisibleArea", 0, 1, 0, 1) @@ -928,8 +928,8 @@ function widget:Initialize() widgetHandler:RegisterGlobal('GadgetCoopStartPoint', CoopStartPoint) - WG['map_startbox'] = {} - WG['map_startbox'].GetEffectiveStartPosition = getEffectiveStartPosition + WG.map_startbox = {} + WG.map_startbox .GetEffectiveStartPosition = getEffectiveStartPosition updateTeamList() assignTeamColors() @@ -988,7 +988,7 @@ function widget:Shutdown() gl.DeleteFont(font2) gl.DeleteFont(shadowFont) widgetHandler:DeregisterGlobal('GadgetCoopStartPoint') - WG['map_startbox'] = nil + WG.map_startbox = nil end -------------------------------------------------------------------------------- @@ -1104,7 +1104,7 @@ function widget:DrawInMiniMap(sx, sz) end -- Check if we're being called from PIP minimap - local inPip = WG['minimap'] and WG['minimap'].isDrawingInPip + local inPip = WG.minimap and WG.minimap .isDrawingInPip DrawStartPolygons(true) DrawStartUnitIcons(sx, sz, inPip) @@ -1160,9 +1160,9 @@ function widget:Update(delta) end if draftMode == nil or draftMode == "disabled" then -- otherwise draft mod will play it instead - if not isSpec and not amPlaced and not playedChooseStartLoc and placeVoiceNotifTimer < os.clock() and WG['notifications'] then + if not isSpec and not amPlaced and not playedChooseStartLoc and placeVoiceNotifTimer < os.clock() and WG.notifications then playedChooseStartLoc = true - WG['notifications'].addEvent('ChooseStartLoc', true) + WG.notifications .addEvent('ChooseStartLoc', true) end end diff --git a/luaui/Widgets/map_startpolygon_gl4.lua b/luaui/Widgets/map_startpolygon_gl4.lua index 38e291e8d01..f0649dafd14 100644 --- a/luaui/Widgets/map_startpolygon_gl4.lua +++ b/luaui/Widgets/map_startpolygon_gl4.lua @@ -93,8 +93,8 @@ local function DrawStartPolygons(inminimap) if advMapShading then gl.Texture(0, "$map_gbuffer_zvaltex") else - if WG['screencopymanager'] and WG['screencopymanager'].GetDepthCopy() then - gl.Texture(0, WG['screencopymanager'].GetDepthCopy()) + if WG.screencopymanager and WG.screencopymanager .GetDepthCopy() then + gl.Texture(0, WG.screencopymanager .GetDepthCopy()) else spEcho("Start Polygons: Adv map shading not available, and no depth copy available") return diff --git a/luaui/Widgets/minimap_rotation_manager.lua b/luaui/Widgets/minimap_rotation_manager.lua index ed40f823567..1f887a19336 100644 --- a/luaui/Widgets/minimap_rotation_manager.lua +++ b/luaui/Widgets/minimap_rotation_manager.lua @@ -89,12 +89,12 @@ local function minimapRotateHandler(_, _, args) end local modeMap = { - ["none"] = CameraRotationModes.none, - ["autoFlip"] = CameraRotationModes.autoFlip, + none = CameraRotationModes.none, + autoFlip = CameraRotationModes.autoFlip, ["180"] = CameraRotationModes.autoFlip, - ["autoRotate"] = CameraRotationModes.autoRotate, + autoRotate = CameraRotationModes.autoRotate, ["90"] = CameraRotationModes.autoRotate, - ["autoLandscape"] = CameraRotationModes.autoLandscape, + autoLandscape = CameraRotationModes.autoLandscape, } local newMode = modeMap[args[2]] @@ -103,7 +103,7 @@ local function minimapRotateHandler(_, _, args) return end - WG['options'].applyOptionValue("minimaprotation", newMode) + WG.options .applyOptionValue("minimaprotation", newMode) spEcho("[MinimapManager] Mode set to " .. args[2]) return true @@ -207,8 +207,8 @@ local function applyAutoFitRotation() end function widget:Initialize() - WG['minimaprotationmanager'] = {} - WG['minimaprotationmanager'].setMode = function(newMode) + WG.minimaprotationmanager = {} + WG.minimaprotationmanager .setMode = function(newMode) if isValidOption(newMode) then mode = newMode prevSnap = nil @@ -228,11 +228,11 @@ function widget:Initialize() end end - WG['minimaprotationmanager'].getMode = function() + WG.minimaprotationmanager .getMode = function() return mode end - local temp = WG['options'].getOptionValue("minimaprotation") + local temp = WG.options .getOptionValue("minimaprotation") if isValidOption(temp) then -- Sync up when the widget was unloaded mode = temp end @@ -245,7 +245,7 @@ function widget:Initialize() end function widget:Shutdown() - WG['minimaprotationmanager'] = nil + WG.minimaprotationmanager = nil end function widget:Update() diff --git a/luaui/Widgets/snd_mapmark_ping.lua b/luaui/Widgets/snd_mapmark_ping.lua index e3705a5e9b8..a14b1c2b0f2 100644 --- a/luaui/Widgets/snd_mapmark_ping.lua +++ b/luaui/Widgets/snd_mapmark_ping.lua @@ -16,11 +16,11 @@ local mapmarkFile = "sounds/ui/mappoint2.wav" local volume = 0.6 function widget:Initialize() - WG['mapmarkping'] = {} - WG['mapmarkping'].getMapmarkVolume = function() + WG.mapmarkping = {} + WG.mapmarkping .getMapmarkVolume = function() return volume end - WG['mapmarkping'].setMapmarkVolume = function(value) + WG.mapmarkping .setMapmarkVolume = function(value) volume = value end end diff --git a/luaui/Widgets/snd_notifications.lua b/luaui/Widgets/snd_notifications.lua index 32ed820fa41..51cb13beabd 100644 --- a/luaui/Widgets/snd_notifications.lua +++ b/luaui/Widgets/snd_notifications.lua @@ -242,12 +242,12 @@ unitsOfInterestNames = nil -- added this so they wont get immediately triggered after gamestart -LastPlay['YouAreOverflowingMetal'] = spGetGameFrame() + 1200 +LastPlay.YouAreOverflowingMetal = spGetGameFrame() + 1200 --LastPlay['YouAreOverflowingEnergy'] = spGetGameFrame()+300 -LastPlay['YouAreWastingMetal'] = spGetGameFrame() -LastPlay['YouAreWastingEnergy'] = spGetGameFrame() -LastPlay['WholeTeamWastingMetal'] = spGetGameFrame() -LastPlay['WholeTeamWastingEnergy'] = spGetGameFrame() +LastPlay.YouAreWastingMetal = spGetGameFrame() +LastPlay.YouAreWastingEnergy = spGetGameFrame() +LastPlay.WholeTeamWastingMetal = spGetGameFrame() +LastPlay.WholeTeamWastingEnergy = spGetGameFrame() local soundQueue = {} local nextSoundQueued = 0 @@ -288,35 +288,35 @@ local tutorialPlayed = {} -- store the number of times a tutorial event h local tutorialPlayedThisGame = {} -- log that a tutorial event has played this game local unitIsReadyTab = { - { UnitDefNames['armvulc'].id, 'UnitReady/RagnarokIsReady' }, - { UnitDefNames['armbanth'].id, 'UnitReady/TitanIsReady' }, - { UnitDefNames['armepoch'].id, 'UnitReady/FlagshipIsReady' }, - { UnitDefNames['armthor'].id, 'UnitReady/ThorIsReady' }, - { UnitDefNames['armfus'].id, 'UnitReady/FusionIsReady' }, - { UnitDefNames['armckfus'].id, 'UnitReady/FusionIsReady' }, - { UnitDefNames['armuwfus'].id, 'UnitReady/FusionIsReady' }, - { UnitDefNames['armafus'].id, 'UnitReady/AdvancedFusionIsReady' }, - { UnitDefNames['armsilo'].id, 'UnitReady/NuclearSiloIsReady' }, - - { UnitDefNames['corbuzz'].id, 'UnitReady/CalamityIsReady' }, - { UnitDefNames['corkorg'].id, 'UnitReady/JuggernautIsReady' }, - { UnitDefNames['corjugg'].id, 'UnitReady/BehemothIsReady' }, - { UnitDefNames['corblackhy'].id, 'UnitReady/FlagshipIsReady' }, - { UnitDefNames['corfus'].id, 'UnitReady/FusionIsReady' }, - { UnitDefNames['coruwfus'].id, 'UnitReady/FusionIsReady' }, - { UnitDefNames['corafus'].id, 'UnitReady/AdvancedFusionIsReady' }, - { UnitDefNames['corsilo'].id, 'UnitReady/NuclearSiloIsReady' }, - - { UnitDefNames['legstarfall'] and UnitDefNames['legstarfall'].id, 'UnitReady/StarfallIsReady' }, - { UnitDefNames['legelrpcmech'] and UnitDefNames['legelrpcmech'].id, 'UnitReady/AstraeusIsReady' }, - { UnitDefNames['legeheatraymech'] and UnitDefNames['legeheatraymech'].id, 'UnitReady/SolinvictusIsReady' }, - { UnitDefNames['legfus'] and UnitDefNames['legfus'].id, 'UnitReady/FusionIsReady' }, - { UnitDefNames['leganavalfusion'] and UnitDefNames['leganavalfusion'].id, 'UnitReady/FusionIsReady' }, - { UnitDefNames['legafus'] and UnitDefNames['legafus'].id, 'UnitReady/AdvancedFusionIsReady' }, - { UnitDefNames['legsilo'] and UnitDefNames['legsilo'].id, 'UnitReady/NuclearSiloIsReady' }, + { UnitDefNames.armvulc .id, 'UnitReady/RagnarokIsReady' }, + { UnitDefNames.armbanth .id, 'UnitReady/TitanIsReady' }, + { UnitDefNames.armepoch .id, 'UnitReady/FlagshipIsReady' }, + { UnitDefNames.armthor .id, 'UnitReady/ThorIsReady' }, + { UnitDefNames.armfus .id, 'UnitReady/FusionIsReady' }, + { UnitDefNames.armckfus .id, 'UnitReady/FusionIsReady' }, + { UnitDefNames.armuwfus .id, 'UnitReady/FusionIsReady' }, + { UnitDefNames.armafus .id, 'UnitReady/AdvancedFusionIsReady' }, + { UnitDefNames.armsilo .id, 'UnitReady/NuclearSiloIsReady' }, + + { UnitDefNames.corbuzz .id, 'UnitReady/CalamityIsReady' }, + { UnitDefNames.corkorg .id, 'UnitReady/JuggernautIsReady' }, + { UnitDefNames.corjugg .id, 'UnitReady/BehemothIsReady' }, + { UnitDefNames.corblackhy .id, 'UnitReady/FlagshipIsReady' }, + { UnitDefNames.corfus .id, 'UnitReady/FusionIsReady' }, + { UnitDefNames.coruwfus .id, 'UnitReady/FusionIsReady' }, + { UnitDefNames.corafus .id, 'UnitReady/AdvancedFusionIsReady' }, + { UnitDefNames.corsilo .id, 'UnitReady/NuclearSiloIsReady' }, + + { UnitDefNames.legstarfall and UnitDefNames.legstarfall .id, 'UnitReady/StarfallIsReady' }, + { UnitDefNames.legelrpcmech and UnitDefNames.legelrpcmech .id, 'UnitReady/AstraeusIsReady' }, + { UnitDefNames.legeheatraymech and UnitDefNames.legeheatraymech .id, 'UnitReady/SolinvictusIsReady' }, + { UnitDefNames.legfus and UnitDefNames.legfus .id, 'UnitReady/FusionIsReady' }, + { UnitDefNames.leganavalfusion and UnitDefNames.leganavalfusion .id, 'UnitReady/FusionIsReady' }, + { UnitDefNames.legafus and UnitDefNames.legafus .id, 'UnitReady/AdvancedFusionIsReady' }, + { UnitDefNames.legsilo and UnitDefNames.legsilo .id, 'UnitReady/NuclearSiloIsReady' }, } -if UnitDefNames["armcom_scav"] then -- quick check if scav units exist +if UnitDefNames.armcom_scav then -- quick check if scav units exist local unitIsReadyScavAppend = {} for i = 1,#unitIsReadyTab do if UnitDefNames[UnitDefs[unitIsReadyTab[1][1]].name .. "_scav" ].id then @@ -505,16 +505,16 @@ function widget:Initialize() widgetHandler:RegisterGlobal('NotificationEvent', gadgetNotificationEvent) - WG['notifications'] = {} + WG.notifications = {} for sound, params in pairs(notification) do - WG['notifications']['getNotification' .. sound] = function() + WG.notifications ['getNotification' .. sound] = function() return notificationList[sound] or false end - WG['notifications']['setNotification' .. sound] = function(value) + WG.notifications ['setNotification' .. sound] = function(value) notificationList[sound] = value end end - WG['notifications'].getNotificationList = function() + WG.notifications .getNotificationList = function() local soundInfo = {} for i, event in pairs(notificationOrder) do @@ -529,43 +529,43 @@ function widget:Initialize() return soundInfo end - WG['notifications'].getTutorial = function() + WG.notifications .getTutorial = function() return tutorialMode end - WG['notifications'].setTutorial = function(value) + WG.notifications .setTutorial = function(value) tutorialMode = value if tutorialMode then tutorialPlayed = {} end widget:PlayerChanged() end - WG['notifications'].getVolume = function() + WG.notifications .getVolume = function() return globalVolume end - WG['notifications'].setVolume = function(value) + WG.notifications .setVolume = function(value) globalVolume = value end - WG['notifications'].getSpoken = function() + WG.notifications .getSpoken = function() return spoken end - WG['notifications'].setSpoken = function(value) + WG.notifications .setSpoken = function(value) spoken = value end - WG['notifications'].getMessages = function() + WG.notifications .getMessages = function() return displayMessages end - WG['notifications'].setMessages = function(value) + WG.notifications .setMessages = function(value) displayMessages = value end - WG['notifications'].addEvent = function(value, force) + WG.notifications .addEvent = function(value, force) if notification[value] then queueNotification(value, force) end end - WG['notifications'].queueNotification = function(event, forceplay) + WG.notifications .queueNotification = function(event, forceplay) queueNotification(event, forceplay) end - WG['notifications'].playNotification = function(event) + WG.notifications .playNotification = function(event) if notification[event] then if notification[event].voiceFiles and #notification[event].voiceFiles > 0 then local m = #notification[event].voiceFiles > 1 and mathRandom(1, #notification[event].voiceFiles) or 1 @@ -581,26 +581,26 @@ function widget:Initialize() if notification[event].soundEffect then Spring.PlaySoundFile(soundEffectsFolder .. notification[event].soundEffect .. ".wav", globalVolume, 'ui') end - if displayMessages and WG['messages'] and notification[event].textID and not notification[event].notext then + if displayMessages and WG.messages and notification[event].textID and not notification[event].notext then if not notification[event].customText then - WG['messages'].addMessage(Spring.I18N(notification[event].textID)) + WG.messages .addMessage(Spring.I18N(notification[event].textID)) else - WG['messages'].addMessage(notification[event].textID) + WG.messages .addMessage(notification[event].textID) end end end end - WG['notifications'].resetEventDelay = function(event) + WG.notifications .resetEventDelay = function(event) LastPlay[event] = spGetGameFrame() end - WG['notifications'].addNotificationDefs = function(tableOfNotifs) + WG.notifications .addNotificationDefs = function(tableOfNotifs) notificationTable = table.merge(notificationTable, tableOfNotifs) processNotificationDefs() end - WG['notifications'].addUnitDetected = function(unitName, notifName) + WG.notifications .addUnitDetected = function(unitName, notifName) if UnitDefNames[unitName] then unitsOfInterest[UnitDefNames[unitName].id] = notifName end @@ -610,13 +610,13 @@ function widget:Initialize() end RegisteredCustomNotifWidgets = {} - WG['notifications'].registerCustomNotifWidget = function(widgetName) + WG.notifications .registerCustomNotifWidget = function(widgetName) if not RegisteredCustomNotifWidgets[widgetName] then RegisteredCustomNotifWidgets[widgetName] = true end end - WG['notifications'].registeredCustomNotifWidgets = function() + WG.notifications .registeredCustomNotifWidgets = function() return RegisteredCustomNotifWidgets end @@ -633,7 +633,7 @@ function widget:Initialize() end function widget:Shutdown() - WG['notifications'] = nil + WG.notifications = nil widgetHandler:DeregisterGlobal('NotificationEvent') end @@ -903,8 +903,8 @@ local function playNextSound() if notification[event].soundEffect then Spring.PlaySoundFile(soundEffectsFolder .. notification[event].soundEffect .. ".wav", globalVolume, 'ui') end - if displayMessages and WG['messages'] and notification[event].textID and (not notification[event].notext) then - WG['messages'].addMessage(Spring.I18N(notification[event].textID)) + if displayMessages and WG.messages and notification[event].textID and (not notification[event].notext) then + WG.messages .addMessage(Spring.I18N(notification[event].textID)) end end @@ -964,7 +964,7 @@ function widget:Update(dt) --else isIdle = false --end - if WG['rejoin'] and WG['rejoin'].showingRejoining() then + if WG.rejoin and WG.rejoin .showingRejoining() then isIdle = true end diff --git a/luaui/Widgets/snd_notifications_addon_ally_alerts.lua b/luaui/Widgets/snd_notifications_addon_ally_alerts.lua index 40328e9beb7..3eaa1d38cee 100644 --- a/luaui/Widgets/snd_notifications_addon_ally_alerts.lua +++ b/luaui/Widgets/snd_notifications_addon_ally_alerts.lua @@ -27,15 +27,15 @@ function widget:RecvLuaMsg(msg, playerID) return end - if WG['notifications'] and WG['notifications'].queueNotification then + if WG.notifications and WG.notifications .queueNotification then -- Check which resource is being requested if msg == 'alert:allyRequest:energy' then - WG['notifications'].queueNotification("AllyRequestEnergy") + WG.notifications .queueNotification("AllyRequestEnergy") return true elseif msg == 'alert:allyRequest:metal' then - WG['notifications'].queueNotification("AllyRequestMetal") + WG.notifications .queueNotification("AllyRequestMetal") return true end diff --git a/luaui/Widgets/snd_notifications_addon_playerstatus.lua b/luaui/Widgets/snd_notifications_addon_playerstatus.lua index fcfd646a388..b00e180524d 100644 --- a/luaui/Widgets/snd_notifications_addon_playerstatus.lua +++ b/luaui/Widgets/snd_notifications_addon_playerstatus.lua @@ -49,11 +49,11 @@ function ComparePlayerData(playerID) local allyTeamID = select(5, spGetPlayerInfo(playerID)) local ping = select(6, spGetPlayerInfo(playerID)) - if id ~= PlayersInformationMemory[playerName].id then Differences["id"] = true end - if spectator ~= PlayersInformationMemory[playerName].spectator then Differences["spectator"] = spectator end - if teamID ~= PlayersInformationMemory[playerName].teamID then Differences["teamID"] = teamID end - if allyTeamID ~= PlayersInformationMemory[playerName].allyTeamID then Differences["allyteamid"] = allyTeamID end - if ping then Differences["ping"] = ping end + if id ~= PlayersInformationMemory[playerName].id then Differences.id = true end + if spectator ~= PlayersInformationMemory[playerName].spectator then Differences.spectator = spectator end + if teamID ~= PlayersInformationMemory[playerName].teamID then Differences.teamID = teamID end + if allyTeamID ~= PlayersInformationMemory[playerName].allyTeamID then Differences.allyteamid = allyTeamID end + if ping then Differences.ping = ping end return Differences end @@ -73,22 +73,22 @@ function widget:Update(dt) if ping and ping > 5 and not PlayersInformationMemory[playerName].timingout then if (not PlayersInformationMemory[playerName].spectator) and (not PlayersInformationMemory[playerName].resigned) then if (spGetSpectatingState() and lockPlayerID == nil) or PlayersInformationMemory[playerName].teamID == spGetLocalTeamID() then - WG['notifications'].queueNotification("NeutralPlayerLagging", true) + WG.notifications .queueNotification("NeutralPlayerLagging", true) elseif PlayersInformationMemory[playerName].allyTeamID == spGetLocalAllyTeamID() then - WG['notifications'].queueNotification("TeammateLagging", true) + WG.notifications .queueNotification("TeammateLagging", true) else - WG['notifications'].queueNotification("EnemyPlayerLagging", true) + WG.notifications .queueNotification("EnemyPlayerLagging", true) end end PlayersInformationMemory[playerName].timingout = true elseif ping and ping <= 2 and PlayersInformationMemory[playerName].timingout and (not PlayersInformationMemory[playerName].hasDisconnected) then if (not PlayersInformationMemory[playerName].spectator) and (not PlayersInformationMemory[playerName].resigned) then if (spGetSpectatingState() and lockPlayerID == nil) or PlayersInformationMemory[playerName].teamID == spGetLocalTeamID() then - WG['notifications'].queueNotification("NeutralPlayerCaughtUp", true) + WG.notifications .queueNotification("NeutralPlayerCaughtUp", true) elseif PlayersInformationMemory[playerName].allyTeamID == spGetLocalAllyTeamID() then - WG['notifications'].queueNotification("TeammateCaughtUp", true) + WG.notifications .queueNotification("TeammateCaughtUp", true) else - WG['notifications'].queueNotification("EnemyPlayerCaughtUp", true) + WG.notifications .queueNotification("EnemyPlayerCaughtUp", true) end end PlayersInformationMemory[playerName].timingout = false @@ -114,21 +114,21 @@ function widget:PlayerChanged(playerID) if (not PlayersInformationMemory[playerName].resigned) then if Differences.spectator then if (spGetSpectatingState() and lockPlayerID == nil) or PlayersInformationMemory[playerName].teamID == spGetLocalTeamID() then - WG['notifications'].queueNotification("NeutralPlayerResigned", true) + WG.notifications .queueNotification("NeutralPlayerResigned", true) elseif PlayersInformationMemory[playerName].allyTeamID == spGetLocalAllyTeamID() then - WG['notifications'].queueNotification("TeammateResigned", true) + WG.notifications .queueNotification("TeammateResigned", true) else - WG['notifications'].queueNotification("EnemyPlayerResigned", true) + WG.notifications .queueNotification("EnemyPlayerResigned", true) end PlayersInformationMemory[playerName].resigned = true end if PlayersInformationMemory[playerName].hasDisconnected and (not (Differences.spectator or PlayersInformationMemory[playerName].spectator)) then if (spGetSpectatingState() and lockPlayerID == nil) or PlayersInformationMemory[playerName].teamID == spGetLocalTeamID() then - WG['notifications'].queueNotification("NeutralPlayerReconnected", true) + WG.notifications .queueNotification("NeutralPlayerReconnected", true) elseif PlayersInformationMemory[playerName].allyTeamID == spGetLocalAllyTeamID() then - WG['notifications'].queueNotification("TeammateReconnected", true) + WG.notifications .queueNotification("TeammateReconnected", true) else - WG['notifications'].queueNotification("EnemyPlayerReconnected", true) + WG.notifications .queueNotification("EnemyPlayerReconnected", true) end PlayersInformationMemory[playerName].hasDisconnected = false end @@ -149,19 +149,19 @@ function widget:PlayerRemoved(playerID) if (not PlayersInformationMemory[playerName].spectator) and (not PlayersInformationMemory[playerName].resigned) then if PlayersInformationMemory[playerName].timingout then if (spGetSpectatingState() and lockPlayerID == nil) or PlayersInformationMemory[playerName].teamID == spGetLocalTeamID() then - WG['notifications'].queueNotification("NeutralPlayerTimedout", true) + WG.notifications .queueNotification("NeutralPlayerTimedout", true) elseif PlayersInformationMemory[playerName].allyTeamID == spGetLocalAllyTeamID() then - WG['notifications'].queueNotification("TeammateTimedout", true) + WG.notifications .queueNotification("TeammateTimedout", true) else - WG['notifications'].queueNotification("EnemyPlayerTimedout", true) + WG.notifications .queueNotification("EnemyPlayerTimedout", true) end else if (spGetSpectatingState() and lockPlayerID == nil) or PlayersInformationMemory[playerName].teamID == spGetLocalTeamID() then - WG['notifications'].queueNotification("NeutralPlayerDisconnected", true) + WG.notifications .queueNotification("NeutralPlayerDisconnected", true) elseif PlayersInformationMemory[playerName].allyTeamID == spGetLocalAllyTeamID() then - WG['notifications'].queueNotification("TeammateDisconnected", true) + WG.notifications .queueNotification("TeammateDisconnected", true) else - WG['notifications'].queueNotification("EnemyPlayerDisconnected", true) + WG.notifications .queueNotification("EnemyPlayerDisconnected", true) end end PlayersInformationMemory[playerName].hasDisconnected = true diff --git a/luaui/Widgets/snd_notifications_addon_scavraptorstatus.lua b/luaui/Widgets/snd_notifications_addon_scavraptorstatus.lua index 389611d287c..8f67b1ceb90 100644 --- a/luaui/Widgets/snd_notifications_addon_scavraptorstatus.lua +++ b/luaui/Widgets/snd_notifications_addon_scavraptorstatus.lua @@ -26,44 +26,44 @@ function widget:Update(dt) FinalBossHealth = Spring.GetGameRulesParam("raptorQueenHealth") TechProgress = Spring.GetGameRulesParam("raptorTechAnger") - if TechProgress and TechProgress >= 50 and not PlayedMessages["AntiNukeReminder1"] then - WG['notifications'].queueNotification("PvE/AntiNukeReminder") - PlayedMessages["AntiNukeReminder1"] = true + if TechProgress and TechProgress >= 50 and not PlayedMessages.AntiNukeReminder1 then + WG.notifications .queueNotification("PvE/AntiNukeReminder") + PlayedMessages.AntiNukeReminder1 = true end - if TechProgress and TechProgress >= 60 and not PlayedMessages["AntiNukeReminder2"] then - WG['notifications'].queueNotification("PvE/AntiNukeReminder") - PlayedMessages["AntiNukeReminder2"] = true + if TechProgress and TechProgress >= 60 and not PlayedMessages.AntiNukeReminder2 then + WG.notifications .queueNotification("PvE/AntiNukeReminder") + PlayedMessages.AntiNukeReminder2 = true end - if TechProgress and TechProgress >= 65 and not PlayedMessages["AntiNukeReminder3"] then - WG['notifications'].queueNotification("PvE/AntiNukeReminder") - PlayedMessages["AntiNukeReminder3"] = true + if TechProgress and TechProgress >= 65 and not PlayedMessages.AntiNukeReminder3 then + WG.notifications .queueNotification("PvE/AntiNukeReminder") + PlayedMessages.AntiNukeReminder3 = true end if FinalBossProgress ~= nil and FinalBossHealth ~= nil and FinalBossProgress < 100 then - if FinalBossProgress >= 50 and not PlayedMessages["FinalBossProgress50"] then - WG['notifications'].queueNotification("PvE/Raptor_Queen50Ready") - PlayedMessages["FinalBossProgress50"] = true + if FinalBossProgress >= 50 and not PlayedMessages.FinalBossProgress50 then + WG.notifications .queueNotification("PvE/Raptor_Queen50Ready") + PlayedMessages.FinalBossProgress50 = true end - if FinalBossProgress >= 75 and not PlayedMessages["FinalBossProgress75"] then - WG['notifications'].queueNotification("PvE/Raptor_Queen75Ready") - PlayedMessages["FinalBossProgress75"] = true + if FinalBossProgress >= 75 and not PlayedMessages.FinalBossProgress75 then + WG.notifications .queueNotification("PvE/Raptor_Queen75Ready") + PlayedMessages.FinalBossProgress75 = true end - if FinalBossProgress >= 90 and not PlayedMessages["FinalBossProgress90"] then - WG['notifications'].queueNotification("PvE/Raptor_Queen90Ready") - PlayedMessages["FinalBossProgress90"] = true + if FinalBossProgress >= 90 and not PlayedMessages.FinalBossProgress90 then + WG.notifications .queueNotification("PvE/Raptor_Queen90Ready") + PlayedMessages.FinalBossProgress90 = true end - if FinalBossProgress >= 95 and not PlayedMessages["FinalBossProgress95"] then - WG['notifications'].queueNotification("PvE/Raptor_Queen95Ready") - PlayedMessages["FinalBossProgress95"] = true + if FinalBossProgress >= 95 and not PlayedMessages.FinalBossProgress95 then + WG.notifications .queueNotification("PvE/Raptor_Queen95Ready") + PlayedMessages.FinalBossProgress95 = true end - if FinalBossProgress >= 98 and not PlayedMessages["FinalBossProgress98"] then - WG['notifications'].queueNotification("PvE/Raptor_Queen98Ready") - PlayedMessages["FinalBossProgress98"] = true + if FinalBossProgress >= 98 and not PlayedMessages.FinalBossProgress98 then + WG.notifications .queueNotification("PvE/Raptor_Queen98Ready") + PlayedMessages.FinalBossProgress98 = true end - if FinalBossIsAlive and FinalBossHealth <= 0 and not PlayedMessages["FinalBossIsDestroyed"] then - WG['notifications'].queueNotification("PvE/Raptor_QueenIsDestroyed") - PlayedMessages["FinalBossIsDestroyed"] = true + if FinalBossIsAlive and FinalBossHealth <= 0 and not PlayedMessages.FinalBossIsDestroyed then + WG.notifications .queueNotification("PvE/Raptor_QueenIsDestroyed") + PlayedMessages.FinalBossIsDestroyed = true if Spring.GetModOptions().scav_endless then FinalBossIsAlive = false PlayedMessages = {} @@ -73,25 +73,25 @@ function widget:Update(dt) if FinalBossHealth ~= nil and FinalBossProgress ~= nil and FinalBossHealth > 0 then FinalBossIsAlive = true - if FinalBossProgress >= 100 and not PlayedMessages["FinalBossProgress100"] then - WG['notifications'].queueNotification("PvE/Raptor_QueenIsReady") - PlayedMessages["FinalBossProgress100"] = true + if FinalBossProgress >= 100 and not PlayedMessages.FinalBossProgress100 then + WG.notifications .queueNotification("PvE/Raptor_QueenIsReady") + PlayedMessages.FinalBossProgress100 = true end - if FinalBossHealth <= 50 and not PlayedMessages["FinalBossHealth50"] then - WG['notifications'].queueNotification("PvE/Raptor_Queen50HealthLeft") - PlayedMessages["FinalBossHealth50"] = true + if FinalBossHealth <= 50 and not PlayedMessages.FinalBossHealth50 then + WG.notifications .queueNotification("PvE/Raptor_Queen50HealthLeft") + PlayedMessages.FinalBossHealth50 = true end - if FinalBossHealth <= 25 and not PlayedMessages["FinalBossHealth25"] then - WG['notifications'].queueNotification("PvE/Raptor_Queen25HealthLeft") - PlayedMessages["FinalBossHealth25"] = true + if FinalBossHealth <= 25 and not PlayedMessages.FinalBossHealth25 then + WG.notifications .queueNotification("PvE/Raptor_Queen25HealthLeft") + PlayedMessages.FinalBossHealth25 = true end - if FinalBossHealth <= 10 and not PlayedMessages["FinalBossHealth10"] then - WG['notifications'].queueNotification("PvE/Raptor_Queen10HealthLeft") - PlayedMessages["FinalBossHealth10"] = true + if FinalBossHealth <= 10 and not PlayedMessages.FinalBossHealth10 then + WG.notifications .queueNotification("PvE/Raptor_Queen10HealthLeft") + PlayedMessages.FinalBossHealth10 = true end - if FinalBossHealth <= 5 and not PlayedMessages["FinalBossHealth5"] then - WG['notifications'].queueNotification("PvE/Raptor_Queen5HealthLeft") - PlayedMessages["FinalBossHealth5"] = true + if FinalBossHealth <= 5 and not PlayedMessages.FinalBossHealth5 then + WG.notifications .queueNotification("PvE/Raptor_Queen5HealthLeft") + PlayedMessages.FinalBossHealth5 = true end end @@ -103,45 +103,45 @@ function widget:Update(dt) FinalBossHealth = Spring.GetGameRulesParam("scavBossHealth") TechProgress = Spring.GetGameRulesParam("scavTechAnger") - if TechProgress and TechProgress >= 50 and not PlayedMessages["AntiNukeReminder1"] then - WG['notifications'].queueNotification("PvE/AntiNukeReminder") - PlayedMessages["AntiNukeReminder1"] = true + if TechProgress and TechProgress >= 50 and not PlayedMessages.AntiNukeReminder1 then + WG.notifications .queueNotification("PvE/AntiNukeReminder") + PlayedMessages.AntiNukeReminder1 = true end - if TechProgress and TechProgress >= 60 and not PlayedMessages["AntiNukeReminder2"] then - WG['notifications'].queueNotification("PvE/AntiNukeReminder") - PlayedMessages["AntiNukeReminder2"] = true + if TechProgress and TechProgress >= 60 and not PlayedMessages.AntiNukeReminder2 then + WG.notifications .queueNotification("PvE/AntiNukeReminder") + PlayedMessages.AntiNukeReminder2 = true end - if TechProgress and TechProgress >= 65 and not PlayedMessages["AntiNukeReminder3"] then - WG['notifications'].queueNotification("PvE/AntiNukeReminder") - PlayedMessages["AntiNukeReminder3"] = true + if TechProgress and TechProgress >= 65 and not PlayedMessages.AntiNukeReminder3 then + WG.notifications .queueNotification("PvE/AntiNukeReminder") + PlayedMessages.AntiNukeReminder3 = true end if FinalBossProgress ~= nil and FinalBossHealth ~= nil and FinalBossProgress < 100 then - if FinalBossProgress >= 50 and not PlayedMessages["FinalBossProgress50"] then - WG['notifications'].queueNotification("PvE/Scav_Boss50Ready") - PlayedMessages["FinalBossProgress50"] = true + if FinalBossProgress >= 50 and not PlayedMessages.FinalBossProgress50 then + WG.notifications .queueNotification("PvE/Scav_Boss50Ready") + PlayedMessages.FinalBossProgress50 = true end - if FinalBossProgress >= 75 and not PlayedMessages["FinalBossProgress75"] then - WG['notifications'].queueNotification("PvE/Scav_Boss75Ready") - PlayedMessages["FinalBossProgress75"] = true + if FinalBossProgress >= 75 and not PlayedMessages.FinalBossProgress75 then + WG.notifications .queueNotification("PvE/Scav_Boss75Ready") + PlayedMessages.FinalBossProgress75 = true end - if FinalBossProgress >= 90 and not PlayedMessages["FinalBossProgress90"] then - WG['notifications'].queueNotification("PvE/Scav_Boss90Ready") - PlayedMessages["FinalBossProgress90"] = true + if FinalBossProgress >= 90 and not PlayedMessages.FinalBossProgress90 then + WG.notifications .queueNotification("PvE/Scav_Boss90Ready") + PlayedMessages.FinalBossProgress90 = true end - if FinalBossProgress >= 95 and not PlayedMessages["FinalBossProgress95"] then - WG['notifications'].queueNotification("PvE/Scav_Boss95Ready") - PlayedMessages["FinalBossProgress95"] = true + if FinalBossProgress >= 95 and not PlayedMessages.FinalBossProgress95 then + WG.notifications .queueNotification("PvE/Scav_Boss95Ready") + PlayedMessages.FinalBossProgress95 = true end - if FinalBossProgress >= 98 and not PlayedMessages["FinalBossProgress98"] then - WG['notifications'].queueNotification("PvE/Scav_Boss98Ready") - PlayedMessages["FinalBossProgress98"] = true + if FinalBossProgress >= 98 and not PlayedMessages.FinalBossProgress98 then + WG.notifications .queueNotification("PvE/Scav_Boss98Ready") + PlayedMessages.FinalBossProgress98 = true end - if FinalBossIsAlive and FinalBossHealth <= 0 and not PlayedMessages["FinalBossIsDestroyed"] then - WG['notifications'].queueNotification("PvE/Scav_BossIsDestroyed") - PlayedMessages["FinalBossIsDestroyed"] = true + if FinalBossIsAlive and FinalBossHealth <= 0 and not PlayedMessages.FinalBossIsDestroyed then + WG.notifications .queueNotification("PvE/Scav_BossIsDestroyed") + PlayedMessages.FinalBossIsDestroyed = true if Spring.GetModOptions().scav_endless then FinalBossIsAlive = false PlayedMessages = {} @@ -152,25 +152,25 @@ function widget:Update(dt) if FinalBossHealth ~= nil and FinalBossProgress ~= nil and FinalBossHealth > 0 then FinalBossIsAlive = true - if FinalBossProgress >= 100 and not PlayedMessages["FinalBossProgress100"] then - WG['notifications'].queueNotification("PvE/Scav_BossIsReady") - PlayedMessages["FinalBossProgress100"] = true + if FinalBossProgress >= 100 and not PlayedMessages.FinalBossProgress100 then + WG.notifications .queueNotification("PvE/Scav_BossIsReady") + PlayedMessages.FinalBossProgress100 = true end - if FinalBossHealth <= 50 and not PlayedMessages["FinalBossHealth50"] then - WG['notifications'].queueNotification("PvE/Scav_Boss50HealthLeft") - PlayedMessages["FinalBossHealth50"] = true + if FinalBossHealth <= 50 and not PlayedMessages.FinalBossHealth50 then + WG.notifications .queueNotification("PvE/Scav_Boss50HealthLeft") + PlayedMessages.FinalBossHealth50 = true end - if FinalBossHealth <= 25 and not PlayedMessages["FinalBossHealth25"] then - WG['notifications'].queueNotification("PvE/Scav_Boss25HealthLeft") - PlayedMessages["FinalBossHealth25"] = true + if FinalBossHealth <= 25 and not PlayedMessages.FinalBossHealth25 then + WG.notifications .queueNotification("PvE/Scav_Boss25HealthLeft") + PlayedMessages.FinalBossHealth25 = true end - if FinalBossHealth <= 10 and not PlayedMessages["FinalBossHealth10"] then - WG['notifications'].queueNotification("PvE/Scav_Boss10HealthLeft") - PlayedMessages["FinalBossHealth10"] = true + if FinalBossHealth <= 10 and not PlayedMessages.FinalBossHealth10 then + WG.notifications .queueNotification("PvE/Scav_Boss10HealthLeft") + PlayedMessages.FinalBossHealth10 = true end - if FinalBossHealth <= 5 and not PlayedMessages["FinalBossHealth5"] then - WG['notifications'].queueNotification("PvE/Scav_Boss5HealthLeft") - PlayedMessages["FinalBossHealth5"] = true + if FinalBossHealth <= 5 and not PlayedMessages.FinalBossHealth5 then + WG.notifications .queueNotification("PvE/Scav_Boss5HealthLeft") + PlayedMessages.FinalBossHealth5 = true end end end diff --git a/luaui/Widgets/snd_unit_finished.lua b/luaui/Widgets/snd_unit_finished.lua index f28404531ce..9499a2bda76 100644 --- a/luaui/Widgets/snd_unit_finished.lua +++ b/luaui/Widgets/snd_unit_finished.lua @@ -23,8 +23,8 @@ local volume = ((configVolume or 100) / 100) function widget:Initialize() for unitDefID,defs in pairs(UnitDefs) do - if defs["sounds"]["select"][1] and (not (defs["sounds"]["activate"][1])) then - activateSounds[unitDefID] = (defs["sounds"]["select"][1]["name"]) + if defs.sounds .select [1] and (not (defs.sounds .activate [1])) then + activateSounds[unitDefID] = (defs.sounds .select [1].name ) end end end diff --git a/luaui/Widgets/stats_damage.lua b/luaui/Widgets/stats_damage.lua index 711b64ab9ca..5e5c13753f3 100644 --- a/luaui/Widgets/stats_damage.lua +++ b/luaui/Widgets/stats_damage.lua @@ -67,9 +67,9 @@ function RecieveGameMode(mode) info.games = info.games or 0 info.games = info.games + 1 - info["_games_per_version"] = info["_games_per_version"] or {} - info["_games_per_version"][version] = info["_games_per_version"][version] or 0 - info["_games_per_version"][version] = info["_games_per_version"][version] + 1 + info._games_per_version = info._games_per_version or {} + info._games_per_version [version] = info._games_per_version [version] or 0 + info._games_per_version [version] = info._games_per_version [version] + 1 end function RecieveStats(uDID, n, ts, dmg_dealt, dmg_rec, minutes, kills, killed_cost) diff --git a/luaui/Widgets/unit_auto_cloak.lua b/luaui/Widgets/unit_auto_cloak.lua index 00c08c35349..f5233c88371 100644 --- a/luaui/Widgets/unit_auto_cloak.lua +++ b/luaui/Widgets/unit_auto_cloak.lua @@ -14,21 +14,21 @@ end -- defaults local unitdefConfigNames = { - ['armdecom'] = false, - ['cordecom'] = false, - ['armferret'] = false, - ['armamb'] = false, - ['armpb'] = false, - ['armsnipe'] = false, - ['corsktl'] = false, - ['armgremlin'] = true, - ['armamex'] = true, - ['armshockwave'] = true, - ['armckfus'] = true, - ['armspy'] = true, - ['corspy'] = true, - ['legaspy'] = true, - ['corphantom'] = true, + armdecom = false, + cordecom = false, + armferret = false, + armamb = false, + armpb = false, + armsnipe = false, + corsktl = false, + armgremlin = true, + armamex = true, + armshockwave = true, + armckfus = true, + armspy = true, + corspy = true, + legaspy = true, + corphantom = true, } -- convert unitname -> unitDefID local unitdefConfig = {} @@ -85,11 +85,11 @@ function widget:Initialize() maybeRemoveSelf() end - WG['autocloak'] = {} - WG['autocloak'].getUnitdefConfig = function() + WG.autocloak = {} + WG.autocloak .getUnitdefConfig = function() return unitdefConfig end - WG['autocloak'].setUnitdefConfig = function(data) + WG.autocloak .setUnitdefConfig = function(data) local type, value = data[1], data[2] unitdefConfig[type] = value end diff --git a/luaui/Widgets/unit_auto_group.lua b/luaui/Widgets/unit_auto_group.lua index ed7d284ea63..367a601b69e 100644 --- a/luaui/Widgets/unit_auto_group.lua +++ b/luaui/Widgets/unit_auto_group.lua @@ -182,7 +182,7 @@ end local function changeUnitTypeAutogroupHandler(_, _, args, data) local gr = args and args[1] - local removeAll = data and data['removeAll'] + local removeAll = data and data.removeAll changeUnitTypeAutogroup(gr, removeAll) end @@ -256,33 +256,33 @@ function widget:Initialize() widgetHandler:AddAction("remove_one_unit_from_group", removeOneUnitFromGroupHandler, nil, "p") -- Removes the closest of selected units from groups and selects only it widgetHandler:AddAction("load_autogroup_preset", loadAutogroupPresetHandler, nil, "p") -- Changes the autogroup preset - WG['autogroup'] = {} - WG['autogroup'].getImmediate = function() + WG.autogroup = {} + WG.autogroup .getImmediate = function() return immediate end - WG['autogroup'].setImmediate = function(value) + WG.autogroup .setImmediate = function(value) immediate = value end - WG['autogroup'].getPersist = function() + WG.autogroup .getPersist = function() return persist end - WG['autogroup'].setPersist = function(value) + WG.autogroup .setPersist = function(value) persist = value end - WG['autogroup'].getGroups = function() + WG.autogroup .getGroups = function() return unit2group end - WG['autogroup'].addCurrentSelectionToAutogroup = function(groupNumber) + WG.autogroup .addCurrentSelectionToAutogroup = function(groupNumber) changeUnitTypeAutogroup(groupNumber) end - WG['autogroup'].removeCurrentSelectionFromAutogroup = function() + WG.autogroup .removeCurrentSelectionFromAutogroup = function() changeUnitTypeAutogroup(nil, true) end - WG['autogroup'].removeOneUnitFromGroup = function() + WG.autogroup .removeOneUnitFromGroup = function() removeOneUnitFromGroupHandler() end - WG['autogroup'].loadAutogroupPreset = function(newPreset) + WG.autogroup .loadAutogroupPreset = function(newPreset) loadAutogroupPreset(newPreset) end if GetGameFrame() > 0 then @@ -291,7 +291,7 @@ function widget:Initialize() end function widget:Shutdown() - WG['autogroup'] = nil + WG.autogroup = nil end function widget:UnitFinished(unitID, unitDefID, unitTeam) diff --git a/luaui/Widgets/unit_key_select.lua b/luaui/Widgets/unit_key_select.lua index e1f87d62e87..b68d1df3de9 100644 --- a/luaui/Widgets/unit_key_select.lua +++ b/luaui/Widgets/unit_key_select.lua @@ -26,5 +26,5 @@ function widget:Initialize() end function widget:Shutdown() - WG['keyselect'] = nil + WG.keyselect = nil end diff --git a/luaui/Widgets/unit_share_tracker.lua b/luaui/Widgets/unit_share_tracker.lua index fa9edcf16be..8f45fa51ead 100644 --- a/luaui/Widgets/unit_share_tracker.lua +++ b/luaui/Widgets/unit_share_tracker.lua @@ -271,7 +271,7 @@ end function widget:ViewResize() vsx, vsy = spGetViewGeometry() - font = WG['fonts'].getFont(1, 1.5) + font = WG.fonts .getFont(1, 1.5) sMidX = vsx * 0.5 sMidY = vsy * 0.5 diff --git a/luaui/Widgets/unit_smart_area_reclaim.lua b/luaui/Widgets/unit_smart_area_reclaim.lua index 4923de5b7cb..717d56f1f20 100644 --- a/luaui/Widgets/unit_smart_area_reclaim.lua +++ b/luaui/Widgets/unit_smart_area_reclaim.lua @@ -194,9 +194,9 @@ local function storeReclaimOrders(uid) local reclaimOrdersCount = 0 for _, order in pairs(cmds) do - if order["id"] == RECLAIM then + if order.id == RECLAIM then reclaimOrdersCount = reclaimOrdersCount + 1 - reclaimOrders[uid][reclaimOrdersCount] = order["params"][1] + reclaimOrders[uid][reclaimOrdersCount] = order.params [1] end end diff --git a/luaui/Widgets/unit_smart_select.lua b/luaui/Widgets/unit_smart_select.lua index a060bbd9a9a..9873f817ccf 100644 --- a/luaui/Widgets/unit_smart_select.lua +++ b/luaui/Widgets/unit_smart_select.lua @@ -88,7 +88,7 @@ local jammerFilter = {} local customFilter = {} for udid, udef in pairs(UnitDefs) do - if udef.modCategories['object'] or udef.customParams.objectify then + if udef.modCategories.object or udef.customParams.objectify then ignoreUnits[udid] = true end @@ -484,7 +484,7 @@ end --end -- function widget:Shutdown() - WG['smartselect'] = nil + WG.smartselect = nil WG.SmartSelect_MousePress2 = nil WG.SmartSelect_SelectUnits = nil @@ -679,35 +679,35 @@ function widget:Initialize() widgetHandler:AddAction("selectbox", handleSetCustomFilter, nil, "p") widgetHandler:AddAction("selectbox", handleClearCustomFilter, nil, "r") - WG['smartselect'] = {} - WG['smartselect'].getIncludeBuildings = function() + WG.smartselect = {} + WG.smartselect .getIncludeBuildings = function() return selectBuildingsWithMobile end - WG['smartselect'].setIncludeBuildings = function(value) + WG.smartselect .setIncludeBuildings = function(value) selectBuildingsWithMobile = value end - WG['smartselect'].getIncludeBuilders = function() + WG.smartselect .getIncludeBuilders = function() return includeBuilders end - WG['smartselect'].setIncludeBuilders = function(value) + WG.smartselect .setIncludeBuilders = function(value) includeBuilders = value end - WG['smartselect'].getIncludeAntinuke = function() + WG.smartselect .getIncludeAntinuke = function() return includeAntinuke end - WG['smartselect'].setIncludeAntinuke = function(value) + WG.smartselect .setIncludeAntinuke = function(value) includeAntinuke = value end - WG['smartselect'].getIncludeRadar = function() + WG.smartselect .getIncludeRadar = function() return includeRadar end - WG['smartselect'].setIncludeRadar = function(value) + WG.smartselect .setIncludeRadar = function(value) includeRadar = value end - WG['smartselect'].getIncludeJammer = function() + WG.smartselect .getIncludeJammer = function() return includeJammer end - WG['smartselect'].setIncludeJammer = function(value) + WG.smartselect .setIncludeJammer = function(value) includeJammer = value end diff --git a/luaui/Widgets/widget_selector.lua b/luaui/Widgets/widget_selector.lua index 68e7d54edc3..5d16dc545dd 100644 --- a/luaui/Widgets/widget_selector.lua +++ b/luaui/Widgets/widget_selector.lua @@ -173,8 +173,8 @@ function widget:TextInput(char) -- if it isnt working: chobby probably hijacked end cursorBlinkTimer = 0 updateTextInputDlist = true - if WG['limitidlefps'] and WG['limitidlefps'].update then - WG['limitidlefps'].update() + if WG.limitidlefps and WG.limitidlefps .update then + WG.limitidlefps .update() end UpdateList(true) return true @@ -187,8 +187,8 @@ local function clearChatInput() inputTextPosition = 0 inputTextInsertActive = false --backgroundGuishader = gl.DeleteList(backgroundGuishader) - if WG['guishader'] then - WG['guishader'].RemoveRect('selectorinput') + if WG.guishader then + WG.guishader .RemoveRect('selectorinput') end UpdateList(true) end @@ -241,8 +241,8 @@ function drawChatInput() chatInputArea = { activationArea[1], activationArea[2]+chatlogHeightDiff-distance-inputHeight, x2, activationArea[2]+chatlogHeightDiff-distance } UiElement(chatInputArea[1], chatInputArea[2], chatInputArea[3], chatInputArea[4], 0,0,nil,nil, 0,nil,nil,nil, WG.FlowUI.clampedOpacity) - if WG['guishader'] and activeGuishader then - WG['guishader'].InsertRect(activationArea[1], activationArea[2]+chatlogHeightDiff-distance-inputHeight, x2, activationArea[2]+chatlogHeightDiff-distance, 'selectorinput') + if WG.guishader and activeGuishader then + WG.guishader .InsertRect(activationArea[1], activationArea[2]+chatlogHeightDiff-distance-inputHeight, x2, activationArea[2]+chatlogHeightDiff-distance, 'selectorinput') end -- button background @@ -365,14 +365,14 @@ function widget:Initialize() widgetHandler.knownChanged = true Spring.SendCommands('unbindkeyset f11') - WG['widgetselector'] = {} - WG['widgetselector'].toggle = function(state) + WG.widgetselector = {} + WG.widgetselector .toggle = function(state) local newShow = state if newShow == nil then newShow = not show end - if newShow and WG['topbar'] then - WG['topbar'].hideWindows() + if newShow and WG.topbar then + WG.topbar .hideWindows() end show = newShow if show then @@ -384,10 +384,10 @@ function widget:Initialize() widgetHandler.textOwner = nil --widgetHandler:DisownText() end end - WG['widgetselector'].isvisible = function() + WG.widgetselector .isvisible = function() return show end - WG['widgetselector'].getLocalWidgetCount = function() + WG.widgetselector .getLocalWidgetCount = function() return localWidgetCount end @@ -625,11 +625,11 @@ function UpdateList(force) end end - if force and WG['guishader']then + if force and WG.guishader then activeGuishader = false - WG['guishader'].RemoveDlist('widgetselector') - WG['guishader'].RemoveDlist('widgetselector2') - WG['guishader'].RemoveRect('selectorinput') + WG.guishader .RemoveDlist('widgetselector') + WG.guishader .RemoveDlist('widgetselector2') + WG.guishader .RemoveRect('selectorinput') if textInputDlist then textInputDlist = gl.DeleteList(textInputDlist) end @@ -671,8 +671,8 @@ function widget:KeyPress(key, mods, isRepeat) clearChatInput() else local newShow = not show - if newShow and WG['topbar'] then - WG['topbar'].hideWindows() + if newShow and WG.topbar then + WG.topbar .hideWindows() end show = newShow if show and not (Spring.Utilities.IsDevMode() or Spring.Utilities.ShowDevUI() or Spring.GetConfigInt("widgetselector", 0) == 1 or localWidgetCount > 0) then @@ -767,11 +767,11 @@ end function widget:DrawScreen() if not show then - if WG['guishader'] and activeGuishader then + if WG.guishader and activeGuishader then activeGuishader = false - WG['guishader'].RemoveDlist('widgetselector') - WG['guishader'].RemoveDlist('widgetselector2') - WG['guishader'].RemoveRect('selectorinput') + WG.guishader .RemoveDlist('widgetselector') + WG.guishader .RemoveDlist('widgetselector2') + WG.guishader .RemoveRect('selectorinput') if textInputDlist then textInputDlist = gl.DeleteList(textInputDlist) end @@ -779,7 +779,7 @@ function widget:DrawScreen() return end - if not WG['guishader'] then + if not WG.guishader then activeGuishader = false end @@ -830,11 +830,11 @@ function widget:DrawScreen() end) end - if WG['guishader'] and not activeGuishader then + if WG.guishader and not activeGuishader then activeGuishader = true if dlistGuishader then - WG['guishader'].InsertDlist(dlistGuishader, 'widgetselector') - WG['guishader'].InsertDlist(dlistGuishader2, 'widgetselector2') + WG.guishader .InsertDlist(dlistGuishader, 'widgetselector') + WG.guishader .InsertDlist(dlistGuishader2, 'widgetselector2') end end @@ -989,7 +989,7 @@ function widget:DrawScreen() font:End() end - if WG['tooltip'] ~= nil then + if WG.tooltip ~= nil then if aboveWidget then local n = aboveWidget[1] local d = aboveWidget[2] @@ -1009,7 +1009,7 @@ function widget:DrawScreen() end end local tooltip = '' - local maxWidth = WG['tooltip'].getFontsize() * 90 + local maxWidth = WG.tooltip .getFontsize() * 90 if d.desc and d.desc ~= '' then local textLines, numLines = font:WrapText(d.desc, maxWidth) tooltip = tooltip..WhiteStr..string.gsub(textLines, '[\n]', '\n'..WhiteStr)..'\n' @@ -1019,8 +1019,8 @@ function widget:DrawScreen() tooltip = tooltip.."\255\175\175\175" .. Spring.I18N('ui.widgetselector.author')..': ' ..string.gsub(textLines, '[\n]', "\n\255\175\175\175")..'\n' end tooltip = tooltip .."\255\175\175\175".. Spring.I18N('ui.widgetselector.file')..': ' ..d.basename .. (not d.fromZip and ' ('..Spring.I18N('ui.widgetselector.islocal')..')' or '') - if WG['tooltip'] then - WG['tooltip'].ShowTooltip('info', tooltip, nil, nil, tooltipTitle) + if WG.tooltip then + WG.tooltip .ShowTooltip('info', tooltip, nil, nil, tooltipTitle) end end end @@ -1031,8 +1031,8 @@ function widget:DrawScreen() if showTextInput and textInputDlist then gl.CallList(textInputDlist) drawChatInputCursor() - elseif WG['guishader'] then - WG['guishader'].RemoveRect('selectorinput') + elseif WG.guishader then + WG.guishader .RemoveRect('selectorinput') textInputDlist = gl.DeleteList(textInputDlist) end @@ -1264,9 +1264,9 @@ end function widget:Shutdown() Spring.SendCommands('bind f11 luaui selector') -- if this one is removed or crashes, then have the backup one take over. cancelChatInput() - if WG['guishader'] then - WG['guishader'].DeleteDlist('widgetselector') - WG['guishader'].DeleteDlist('widgetselector2') + if WG.guishader then + WG.guishader .DeleteDlist('widgetselector') + WG.guishader .DeleteDlist('widgetselector2') end uiList = gl.DeleteList(uiList) uiList2 = gl.DeleteList(uiList2) diff --git a/luaui/actions.lua b/luaui/actions.lua index 21dd0d54921..68dd7c3a7f5 100644 --- a/luaui/actions.lua +++ b/luaui/actions.lua @@ -214,8 +214,8 @@ function actionHandler:KeyAction(press, _, _, isRepeat, _, actions) end for _, bAction in ipairs(actions) do - local cmd = bAction["command"] - local extra = bAction["extra"] + local cmd = bAction.command + local extra = bAction.extra local words = string.split(extra) if (TryAction(actionSet, cmd, extra, words, isRepeat, not press, actions)) then diff --git a/luaui/barwidgets.lua b/luaui/barwidgets.lua index 6032818418e..82cd5e07e4f 100644 --- a/luaui/barwidgets.lua +++ b/luaui/barwidgets.lua @@ -1319,7 +1319,7 @@ function widgetHandler:Shutdown() -- save config if self.__blankOutConfig then - table.save({ ["allowUserWidgets"] = self.allowUserWidgets }, CONFIG_FILENAME, '-- Widget Custom data and order') + table.save({ allowUserWidgets = self.allowUserWidgets }, CONFIG_FILENAME, '-- Widget Custom data and order') else self:SaveConfigData() end @@ -1773,7 +1773,7 @@ end function widgetHandler:SunChanged() tracy.ZoneBeginN("W:SunChanged") - local nmp = _G['NightModeParams'] + local nmp = _G.NightModeParams local list = self.SunChangedList for i = #list, 1, -1 do list[i]:SunChanged(nmp) diff --git a/luaui/configs/DeferredLightsGL4WeaponsConfig.lua b/luaui/configs/DeferredLightsGL4WeaponsConfig.lua index 3aa178e4a70..34112d81076 100644 --- a/luaui/configs/DeferredLightsGL4WeaponsConfig.lua +++ b/luaui/configs/DeferredLightsGL4WeaponsConfig.lua @@ -396,7 +396,7 @@ local gibLight = { local muzzleFlashLights = {} local explosionLights = {} local projectileDefLights = { - ['default'] = { + default = { lightType = 'point', lightConfig = { posx = 0, posy = 16, posz = 0, radius = 420, color2r = 1, color2g = 1, color2b = 1, colortime = 15, @@ -748,21 +748,21 @@ local muzzleFlashLightsNames = {} local projectileDefLightsNames = {} --cortrem -explosionLightsNames["cortrem_tremor_focus_fire"] = +explosionLightsNames.cortrem_tremor_focus_fire = GetLightClass("Explosion", nil, "Tiny", { colortime = 3.5, sustain = 1, lifetime = 1, scattering = 0.7}) -explosionLightsNames["cortrem_tremor_spread_fire"] = +explosionLightsNames.cortrem_tremor_spread_fire = GetLightClass("Explosion", nil, "Smallish", { colortime = 2.5, sustain = 2, lifetime = 6, scattering = 0.7}) --corforge -projectileDefLightsNames["corforge_flamethrower_ce"] = +projectileDefLightsNames.corforge_flamethrower_ce = GetLightClass("FlameProjectile", "Fire", "Micro", { r = 1, a = 0.02791886, g = 0.94, b = 0.88}) --armthor -explosionLightsNames["armthor_thunder"] = +explosionLightsNames.armthor_thunder = GetLightClass("Explosion", nil, "Smallish", { r = 1.5, g = 1.5, b = 1.5, a = 0.08, radius = 120, color2r = 0.3, color2g = 0.3, color2b = 0.4, colortime = 5, @@ -770,16 +770,16 @@ GetLightClass("Explosion", nil, "Smallish", { modelfactor = 0.1, specular = 0.4, scattering = 0.1, lensflare = 4}) --corint -muzzleFlashLightsNames["corint_lrpc"] = +muzzleFlashLightsNames.corint_lrpc = GetLightClass("MuzzleFlash", nil, "Large", { posx = 0, posy = 0, posz = 0, radius = 240, color2r = 0.5, color2g = 0.1, color2b = 0, colortime = 50, r = 1.2, g = 1.0, b = 0.9, a = 0.5, modelfactor = 0.5, specular = 0.3, scattering = 0.3, lensflare = 0, lifetime = 17, sustain = 2}) -muzzleFlashLightsNames["corint_lrpc"].yOffset = 16 +muzzleFlashLightsNames.corint_lrpc .yOffset = 16 -explosionLightsNames["corint_lrpc"] = +explosionLightsNames.corint_lrpc = GetLightClass("ExplosionXL", nil, "Large", {colortime = 4, sustain = 12, lifetime = 26, scattering = 0.7}) -- muzzleFlashLightsNames["corint_lrpc"] = @@ -791,7 +791,7 @@ GetLightClass("ExplosionXL", nil, "Large", {colortime = 4, sustain = 12, lifetim -- muzzleFlashLightsNames["corint_lrpc"].yOffset = 16 --armstil -explosionLightsNames["armstil_stiletto_bomb"] = +explosionLightsNames.armstil_stiletto_bomb = GetLightClass("ExplosionEMP", nil, "Medium", { }) @@ -803,7 +803,7 @@ GetLightClass("ExplosionEMP", nil, "Medium", { -- }) --armbrtha -muzzleFlashLightsNames["armbrtha_lrpc"] = +muzzleFlashLightsNames.armbrtha_lrpc = GetLightClass("MuzzleFlash", nil, "Medium", { posx = 0, posy = 0, posz = 0, color2r = 0.3, color2g = 0.1, color2b = 0.05, colortime = 13, @@ -811,70 +811,70 @@ GetLightClass("MuzzleFlash", nil, "Medium", { modelfactor = 0.5, specular = 0.3, scattering = 0.3, lensflare = 0, lifetime = 20, sustain = 2}) -muzzleFlashLightsNames["armbrtha_lrpc"].yOffset = 8 +muzzleFlashLightsNames.armbrtha_lrpc .yOffset = 8 -explosionLightsNames["armbrtha_lrpc"] = +explosionLightsNames.armbrtha_lrpc = GetLightClass("ExplosionXL", nil, "Large", { colortime = 4, sustain = 12, lifetime = 26, scattering = 0.7}) --armvulc -muzzleFlashLightsNames["armvulc_rflrpc"] = +muzzleFlashLightsNames.armvulc_rflrpc = GetLightClass("MuzzleFlash", nil, "Medium", {posx = 0, posy = 0, posz = 0, r = 1.2, g = 1.1, b = 1.0, a = 0.5, color2r = 0.3, color2g = 0.12, color2b = 0.05, colortime = 4, modelfactor = 0.5, specular = 0.3, scattering = 0.8, lensflare = 14, lifetime = 17, sustain = 2}) -muzzleFlashLightsNames["armvulc_rflrpc"].yOffset = 4 -explosionLightsNames["armvulc_rflrpc"] = +muzzleFlashLightsNames.armvulc_rflrpc .yOffset = 4 +explosionLightsNames.armvulc_rflrpc = GetLightClass("ExplosionXL", nil, "Large", {colortime = 3.5, sustain = 14, lifetime = 26, scattering = 0.7}) -projectileDefLightsNames["armvulc_rflrpc"] = +projectileDefLightsNames.armvulc_rflrpc = GetLightClass("LRPCProjectile", nil, "Mediumer") --corbuzz -muzzleFlashLightsNames["corbuzz_rflrpc"] = +muzzleFlashLightsNames.corbuzz_rflrpc = GetLightClass("MuzzleFlash", nil, "Medium", {posx = 0, posy = 0, posz = 0, r = 1.2, g = 1.1, b = 1.0, a = 0.5, color2r = 0.3, color2g = 0.12, color2b = 0.05, colortime = 4, modelfactor = 0.5, specular = 0.3, scattering = 0.8, lensflare = 14, lifetime = 17, sustain = 2}) -muzzleFlashLightsNames["corbuzz_rflrpc"].yOffset = 4 -explosionLightsNames["corbuzz_rflrpc"] = +muzzleFlashLightsNames.corbuzz_rflrpc .yOffset = 4 +explosionLightsNames.corbuzz_rflrpc = GetLightClass("ExplosionXL", nil, "Large", {colortime = 3.5, sustain = 14, lifetime = 26, scattering = 0.7}) -projectileDefLightsNames["corbuzz_rflrpc"] = +projectileDefLightsNames.corbuzz_rflrpc = GetLightClass("LRPCProjectile", nil, "Mediumer") -muzzleFlashLightsNames["armsnipe_old_armsnipe_weapon"] = +muzzleFlashLightsNames.armsnipe_old_armsnipe_weapon = GetLightClass("MuzzleFlash", nil, "SmallMedium", {posx = 0, posy = 0, posz = 0, r = 1.2, g = 0.85, b = 0.6, a = 0.5, color2r = 0.3, color2g = 0.12, color2b = 0.05, colortime = 4, modelfactor = 0.5, specular = 0.3, scattering = 0.8, lensflare = 14, lifetime = 13, sustain = 1.5}) -muzzleFlashLightsNames["armpb_armpb_weapon"] = +muzzleFlashLightsNames.armpb_armpb_weapon = GetLightClass("MuzzleFlash", nil, "Smaller", {posx = 0, posy = 0, posz = 0, r = 1.2, g = 0.85, b = 0.6, a = 0.5, color2r = 0.3, color2g = 0.12, color2b = 0.05, colortime = 4, modelfactor = 0.5, specular = 0.3, scattering = 0.8, lensflare = 14, lifetime = 13, sustain = 1.5}) -- arm t1 naval def turret -muzzleFlashLightsNames["armnavaldefturret_arm_medium_gauss_cannon"] = +muzzleFlashLightsNames.armnavaldefturret_arm_medium_gauss_cannon = GetLightClass("MuzzleFlash", nil, "Smaller", {posx = 0, posy = 0, posz = 0, r = 1.2, g = 0.85, b = 0.6, a = 0.35, color2r = 0.3, color2g = 0.12, color2b = 0.05, colortime = 4, modelfactor = 0.5, specular = 0.3, scattering = 0.8, lensflare = 14, lifetime = 13, sustain = 1.5}) -muzzleFlashLightsNames["corlevlr_corlevlr_weapon"] = +muzzleFlashLightsNames.corlevlr_corlevlr_weapon = GetLightClass("MuzzleFlash", nil, "Smaller", {posx = 0, posy = 0, posz = 0, r = 1.2, g = 0.85, b = 0.6, a = 0.5, color2r = 0.3, color2g = 0.12, color2b = 0.05, colortime = 4, modelfactor = 0.5, specular = 0.3, scattering = 0.8, lensflare = 14, lifetime = 13, sustain = 1.5}) -muzzleFlashLightsNames["cormort_cor_mort"] = +muzzleFlashLightsNames.cormort_cor_mort = GetLightClass("MuzzleFlash", nil, "Tiniest", {posx = 0, posy = 0, posz = 0, r = 1.2, g = 1, b = 0.9, a = 0.5, color2r = 0.25, color2g = 0.14, color2b = 0.07, colortime = 4, @@ -898,26 +898,26 @@ GetLightClass("MuzzleFlash", nil, "Tiniest", {posx = 0, posy = 0, posz = 0, --corsilo -explosionLightsNames["corsilo_crblmssl"] = +explosionLightsNames.corsilo_crblmssl = GetLightClass("Explosion", nil, "Tera", {r = 3, g = 3, b = 2.8, a = 0.2, color2r = 1.0, color2g = 0.6, color2b = 0.18, colortime = 120, sustain = 30, lifetime = 200, modelfactor = 0.1, specular = 0.2, scattering = 0.1, lensflare = 4}) --corsilo engine -projectileDefLightsNames["corsilo_crblmssl"] = +projectileDefLightsNames.corsilo_crblmssl = GetLightClass("MissileProjectile", "Warm", "Large", {a = 0.6, modelfactor = 0.1, specular = 0.1, scattering = 0.5, lensflare = 0}) --RAPTOR Nuclear Meteor -explosionLightsNames["raptor_turret_meteor_t4_v1_weapon"] = +explosionLightsNames.raptor_turret_meteor_t4_v1_weapon = GetLightClass("Explosion", nil, "Tera", {r = 3, g = 3, b = 2.8, a = 0.2, color2r = 1.0, color2g = 0.6, color2b = 0.18, colortime = 120, sustain = 30, lifetime = 200, modelfactor = 0.1, specular = 0.2, scattering = 0.1, lensflare = 4}) --RAPTOR Nuclear Meteor engine -projectileDefLightsNames["raptor_turret_meteor_t4_v1_weapon"] = +projectileDefLightsNames.raptor_turret_meteor_t4_v1_weapon = GetLightClass("MissileProjectile", "Fire", "Large", {a = 0.8, modelfactor = 0.1, specular = 0.1, scattering = 0.5, lensflare = 0}) @@ -935,14 +935,14 @@ GetLightClass("MissileProjectile", "Fire", "Large", {a = 0.8, -- modelfactor = 0.1, specular = 0.1, scattering = 0.5, lensflare = 0}) --armsilo -explosionLightsNames["armsilo_nuclear_missile"] = +explosionLightsNames.armsilo_nuclear_missile = GetLightClass("Explosion", nil, "Giga", {r = 3, g = 3, b = 2.8, a = 0.18, color2r = 1.0, color2g = 0.6, color2b = 0.18, colortime = 110, sustain = 25, lifetime = 180, selfshadowing = 4, modelfactor = 0.1, specular = 0.2, scattering = 0.1, lensflare = 4}) --armsilo -explosionLightsNames["armguardnuke_plasma"] = +explosionLightsNames.armguardnuke_plasma = GetLightClass("Explosion", nil, "Giga", {r = 3, g = 2.9, b = 2.8, a = 0.18, posx = 0, posy = 1, posz = 0, dirx = 0, diry = -0.12, dirz = 0, @@ -950,30 +950,30 @@ GetLightClass("Explosion", nil, "Giga", {r = 3, g = 2.9, b = 2.8, a = 0.18, sustain = 25, lifetime = 155, selfshadowing = 3, modelfactor = 0.1, specular = 0.2, scattering = 0.1, lensflare = 4}) -projectileDefLightsNames["armguardnuke_plasma"] = +projectileDefLightsNames.armguardnuke_plasma = GetLightClass("MissileProjectile", "Warm", "Medium", {a = 0.4, modelfactor = 0.1, specular = 0.1, scattering = 0.5, lensflare = 0}) -projectileDefLightsNames["armguardnuke_plasma_high"] = +projectileDefLightsNames.armguardnuke_plasma_high = GetLightClass("MissileProjectile", "Warm", "Medium", {a = 0.4, modelfactor = 0.1, specular = 0.1, scattering = 0.5, lensflare = 0}) --armsilo engine -projectileDefLightsNames["armsilo_nuclear_missile"] = +projectileDefLightsNames.armsilo_nuclear_missile = GetLightClass("MissileProjectile", "Warm", "Large", {a = 0.6, modelfactor = 0.1, specular = 0.1, scattering = 0.5, lensflare = 0}) --legsilo -explosionLightsNames["legsilo_legicbm"] = +explosionLightsNames.legsilo_legicbm = GetLightClass("Explosion", nil, "Tera", {r = 3, g = 3, b = 2.8, a = 0.2, color2r = 1.0, color2g = 0.6, color2b = 0.18, colortime = 120, sustain = 30, lifetime = 200, modelfactor = 0.1, specular = 0.2, scattering = 0.1, lensflare = 4}) --legsilo engine -projectileDefLightsNames["legsilo_legicbm"] = +projectileDefLightsNames.legsilo_legicbm = GetLightClass("MissileProjectile", "Warm", "Large", {a = 0.6, modelfactor = 0.1, specular = 0.1, scattering = 0.5, lensflare = 0}) @@ -992,48 +992,48 @@ GetLightClass("MissileProjectile", "Warm", "Large", {a = 0.6, -- modelfactor = 0.1, specular = 0.1, scattering = 0.4, lensflare = 0}) --legbart -explosionLightsNames["legbart_clusternapalm"] = +explosionLightsNames.legbart_clusternapalm = GetLightClass("Explosion", "Fire", "SmallMedium", {r = 0.32, g = 0.24, b = 0.1, a = 0.1, color2r = 0.8, color2g = 0.4, color2b = 0.1, colortime = 44, sustain = 120, lifetime = 180, modelfactor = -0.3, specular = -0.3, scattering = 0.3, lensflare = 0}) --legbar -explosionLightsNames["legbar_clusternapalm"] = +explosionLightsNames.legbar_clusternapalm = GetLightClass("Explosion", "Fire", "Small", {r = 0.32, g = 0.24, b = 0.1, a = 0.005, color2r = 0.8, color2g = 0.4, color2b = 0.1, colortime = 44, sustain = 120, lifetime = 180, modelfactor = -0.3, specular = -0.3, scattering = 0.3, lensflare = 0}) --leginf -explosionLightsNames["leginf_rapidnapalm"] = +explosionLightsNames.leginf_rapidnapalm = GetLightClass("Explosion", "Fire", "Small", {r = 0.32, g = 0.24, b = 0.1, a = 0.001, color2r = 0.8, color2g = 0.4, color2b = 0.1, colortime = 180, sustain = 30, lifetime = 180, modelfactor = -0.3, specular = -0.3, scattering = 0.3, lensflare = 0}) --legnap -explosionLightsNames["legnap_napalmbombs"] = +explosionLightsNames.legnap_napalmbombs = GetLightClass("Explosion", "Fire", "Small", {r = 0.32, g = 0.24, b = 0.1, a = 0.1, color2r = 0.8, color2g = 0.4, color2b = 0.1, colortime = 44, sustain = 120, lifetime = 180, modelfactor = -0.3, specular = -0.3, scattering = 0.3, lensflare = 0}) --legperdition -explosionLightsNames["legperdition_napalmmissile"] = +explosionLightsNames.legperdition_napalmmissile = GetLightClass("Explosion", "Fire", "Large", {r = 0.32, g = 0.24, b = 0.1, a = 0.1, color2r = 0.8, color2g = 0.4, color2b = 0.1, colortime = 44, sustain = 120, lifetime = 180, modelfactor = -0.3, specular = -0.3, scattering = 0.3, lensflare = 0}) --legphoenix -explosionLightsNames["legphoenix_skybeam"] = +explosionLightsNames.legphoenix_skybeam = GetLightClass("Explosion", "Fire", "Small", {r = 0.54, g = 0.45, b = 0.12, a = 0.35, color2r = 1.2, color2g = 0.5, color2b = 0.2, colortime = 0.25, sustain = 2, lifetime = 3, modelfactor = -0.3, specular = -0.3, scattering = 0.45, lensflare = 0}) -projectileDefLightsNames["legphoenix_skybeam"] = +projectileDefLightsNames.legphoenix_skybeam = GetLightClass("LaserProjectile", "Warm", "Tiny", {a = 0.25, r = 1.0, g = 0.65, b = 0.1, color2r = 0.3, color2g = 0.1, color2b = 0.03, colortime = 15, @@ -1059,7 +1059,7 @@ GetLightClass("LaserProjectile", "Warm", "Tiny", {a = 0.25, --explosionLightsNames["legbastion_t2heatray"].yOffset = 28 -projectileDefLightsNames["legbastion_t2heatray"] = +projectileDefLightsNames.legbastion_t2heatray = GetLightClass("LaserProjectile", nil, "Small", {r = 1.0, g = 0.65, b = 0.1, a = 0.18, color2r = 0.15, color2g = 0.04, color2b = 0.015, colortime = 0.03, --pos2x = 0, pos2y = 0, pos2z = 0, @@ -1067,15 +1067,15 @@ GetLightClass("LaserProjectile", nil, "Small", {r = 1.0, g = 0.65, b = 0.1, a = lifetime = 3, sustain = 2}) --leginc -explosionLightsNames["leginc_heatraylarge"] = +explosionLightsNames.leginc_heatraylarge = GetLightClass("Explosion", "Fire", "Smaller", {r = 0.54, g = 0.45, b = 0.12, a = 0.15, color2r = 1.2, color2g = 0.5, color2b = 0.2, colortime = 0.3, sustain = 2, lifetime = 3, modelfactor = -0.3, specular = -0.1, scattering = 1.95, lensflare = 0}) -explosionLightsNames["leginc_heatraylarge"].yOffset = 32 +explosionLightsNames.leginc_heatraylarge .yOffset = 32 -projectileDefLightsNames["leginc_heatraylarge"] = +projectileDefLightsNames.leginc_heatraylarge = GetLightClass("LaserProjectile", "Warm", "Smallest", {r = 1.0, g = 0.65, b = 0.1, a = 0.15, color2r = 0.15, color2g = 0.05, color2b = 0.015, colortime = 0.03, --pos2x = 0, pos2y = 0, pos2z = 0, @@ -1083,15 +1083,15 @@ GetLightClass("LaserProjectile", "Warm", "Smallest", {r = 1.0, g = 0.65, b = 0.1 sustain = 2, lifetime = 3, }) --legeheatraymech -explosionLightsNames["legeheatraymech_heatray1"] = +explosionLightsNames.legeheatraymech_heatray1 = GetLightClass("Explosion", "Fire", "SmallMedium", {r = 0.26, g = 0.26, b = 0.06, a = 0.09, color2r = 0.9, color2g = 0.5, color2b = 0.2, colortime = 0.5, sustain = 2, lifetime = 3, modelfactor = -0.3, specular = -0.2, scattering = 0.8, lensflare = 0}) -explosionLightsNames["legeheatraymech_heatray1"].yOffset = 32 +explosionLightsNames.legeheatraymech_heatray1 .yOffset = 32 -projectileDefLightsNames["legeheatraymech_heatray1"] = +projectileDefLightsNames.legeheatraymech_heatray1 = GetLightClass("LaserProjectile", "Warm", "Smallest", {r = 1.0, g = 0.65, b = 0.1, a = 0.25, color2r = 0.15, color2g = 0.05, color2b = 0.015, colortime = 0.03, --pos2x = 0, pos2y = 0, pos2z = 0, @@ -1100,24 +1100,24 @@ GetLightClass("LaserProjectile", "Warm", "Smallest", {r = 1.0, g = 0.65, b = 0.1 --armthundt4 -explosionLightsNames["armthundt4_armbomb"] = +explosionLightsNames.armthundt4_armbomb = GetLightClass("Explosion", nil, "Large", {r = 2, g = 1.5, b = 1.0, a = 0.22, color2r = 0.9, color2g = 0.5, color2b = 0.15, colortime = 65, sustain = 4, lifetime = 55, modelfactor = 0.1, specular = 0.4, scattering = 0.4, lensflare = 6}) --armmerl -projectileDefLightsNames["armmerl_armtruck_rocket"] = +projectileDefLightsNames.armmerl_armtruck_rocket = GetLightClass("MissileProjectile", "Warm", "Small", {a = 0.60, modelfactor = 0.1, specular = 0.01, scattering = 0.5, lensflare = 8}) --armmerl -projectileDefLightsNames["corvroc_cortruck_rocket"] = +projectileDefLightsNames.corvroc_cortruck_rocket = GetLightClass("MissileProjectile", "Warm", "Small", {a = 0.60, modelfactor = 0.1, specular = 0.01, scattering = 0.5, lensflare = 8}) -- armbeamer -projectileDefLightsNames["armbeamer_armbeamer_weapon"] = +projectileDefLightsNames.armbeamer_armbeamer_weapon = GetLightClass("LaserProjectile", nil, "Medium", {a = 0.20, --r = 1.0, g = 0.65, b = 0.1, radius = 240, r = 0.1, g = 0.1, b = 1, radius = 110, @@ -1128,7 +1128,7 @@ GetLightClass("LaserProjectile", nil, "Medium", {a = 0.20, lifetime = 6, sustain = 0}) -- corcan -projectileDefLightsNames["corcan_cor_canlaser"] = +projectileDefLightsNames.corcan_cor_canlaser = GetLightClass("LaserProjectile", nil, "Medium", {a = 0.15, --r = 1.0, g = 0.65, b = 0.1, radius = 240, r = 0.3, g = 1, b = 0.3, radius = 110, @@ -1138,7 +1138,7 @@ GetLightClass("LaserProjectile", nil, "Medium", {a = 0.15, lifetime = 4, sustain = 0, selfshadowing = 5,}) -- corsumo -projectileDefLightsNames["corsumo_corsumo_weapon"] = +projectileDefLightsNames.corsumo_corsumo_weapon = GetLightClass("LaserProjectile", nil, "Medium", {a = 0.15, --r = 1.0, g = 0.65, b = 0.1, radius = 240, r = 0.4, g = 1.0, b = 0.4, radius = 110, @@ -1148,7 +1148,7 @@ GetLightClass("LaserProjectile", nil, "Medium", {a = 0.15, lifetime = 2.8, sustain = 0, selfshadowing = 5,}) --corsumo -muzzleFlashLightsNames["corsumo_corsumo_weapon"] = +muzzleFlashLightsNames.corsumo_corsumo_weapon = GetLightClass("MuzzleFlashCone", nil, "Large", { posx = 0, posy = 0, posz = 0, radius = 240, color2r = 0.5, color2g = 0.1, color2b = 0, colortime = 50, @@ -1162,14 +1162,14 @@ GetLightClass("MuzzleFlashCone", nil, "Large", { --corkorg -explosionLightsNames["corkorg_corkorg_laser"] = +explosionLightsNames.corkorg_corkorg_laser = GetLightClass("Explosion", "Fire", "Smallish", {r = 0.54, g = 0.45, b = 0.12, a = 0.33, color2r = 1.2, color2g = 0.5, color2b = 0.2, colortime = 0.3, sustain = 2, lifetime = 3, modelfactor = -0.3, specular = -0.1, scattering = 1.95, lensflare = 0}) -- org korglaser -projectileDefLightsNames["corkorg_corkorg_laser"] = +projectileDefLightsNames.corkorg_corkorg_laser = GetLightClass("LaserProjectile", nil, "Medium", {a = 0.09, --r = 1.0, g = 0.65, b = 0.1, radius = 240, r = 1.0, g = 0.75, b = 0.4, radius = 240, @@ -1190,7 +1190,7 @@ GetLightClass("LaserProjectile", nil, "Medium", {a = 0.09, -- selfshadowing = 8, -- lifetime = 23, sustain = 2}) -muzzleFlashLightsNames["corkorg_corkorg_laser"] = +muzzleFlashLightsNames.corkorg_corkorg_laser = GetLightClass("MuzzleFlash", "Fire", "Mega", {posx = 120, posy = 82, posz = 0, r = 1.2, g = 1.1, b = 0.5, a = 0.9, color2r = 0.3, color2g = 0.12, color2b = 0.05, colortime = 20, @@ -1198,7 +1198,7 @@ GetLightClass("MuzzleFlash", "Fire", "Mega", {posx = 120, posy = 82, posz = 0, lifetime = 120, sustain = 4}) --muzzleflashes for corkorg broken?? -muzzleFlashLightsNames["corkorg_corkorg_fire"] = +muzzleFlashLightsNames.corkorg_corkorg_fire = GetLightClass("MuzzleFlash", "Plasma", "Tiny", { r = 1.1, g = 0.85, b = 0.3, a = 0.6, color2r = 0.3, color2g = 0.12, color2b = 0.04, colortime = 15, @@ -1206,26 +1206,26 @@ GetLightClass("MuzzleFlash", "Plasma", "Tiny", { lifetime = 20, sustain = 2}) --corkorg_shotgun -projectileDefLightsNames["corkorg_corkorg_fire"] = +projectileDefLightsNames.corkorg_corkorg_fire = GetLightClass("CannonProjectile", "Plasma", "Smaller", {a = 0.012, radius = 200, selfshadowing = 4, modelfactor = 0.2, specular = 0.2, scattering = 0.3, lensflare = 3}) -explosionLightsNames["corkorg_corkorg_fire"] = +explosionLightsNames.corkorg_corkorg_fire = GetLightClass("Explosion", "Fire", "Tiny", {r = 0.5, g = 0.3, b = 0.08, a = 0.4, color2r = 1.2, color2g = 0.6, color2b = 0.4, colortime = 0.6, sustain = 2, lifetime = 6, modelfactor = -0.3, specular = -0.1, scattering = 1.95, lensflare = 0 }) -projectileDefLightsNames["corpyro_flamethrower"] = +projectileDefLightsNames.corpyro_flamethrower = GetLightClass("FlameProjectile", nil, "Tiny", { r = 0.7, g = 0.7, b = 0.65, a = 0.14, color2r = 1.0, color2g = 0.70, color2b = 0.4, colortime = 12, lifetime = 30, sustain = 15, }) -explosionLightsNames["corpyro_flamethrower"] = +explosionLightsNames.corpyro_flamethrower = GetLightClass("FlameProjectile", nil, "Smallest", { r = 1.7, g = 0.7, b = 0.65, a = 0.03, color2r = 1.0, color2g = 0.70, color2b = 0.4, colortime = 12, @@ -1234,14 +1234,14 @@ GetLightClass("FlameProjectile", nil, "Smallest", { --explosionLightsNames["corpyro_flamethrower"].fraction = 5 -projectileDefLightsNames["cormaw_dmaw"] = +projectileDefLightsNames.cormaw_dmaw = GetLightClass("FlameProjectile", nil, "Smallish", { r = 0.7, g = 0.7, b = 0.65, a = 0.03, color2r = 1.0, color2g = 0.70, color2b = 0.4, colortime = 12, lifetime = 70, sustain = 30, }) -projectileDefLightsNames["corfship_dmaw"] = +projectileDefLightsNames.corfship_dmaw = GetLightClass("FlameProjectile", nil, "Smallish", { r = 0.7, g = 0.7, b = 0.65, a = 0.05, color2r = 1.0, color2g = 0.70, color2b = 0.4, colortime = 12, @@ -1249,26 +1249,26 @@ GetLightClass("FlameProjectile", nil, "Smallish", { }) -projectileDefLightsNames["corcrwh_dragonmawh"] = +projectileDefLightsNames.corcrwh_dragonmawh = GetLightClass("FlameProjectileDragon", nil, "Smallest", { r = 0.7, g = 0.7, b = 0.65, a = 0.19, color2r = 1.0, color2g = 0.70, color2b = 0.4, colortime = 12, lifetime = 70, sustain = 30, selfshadowing = 0, }) -projectileDefLightsNames["corcrwh_dragonmawh"].yOffset = 32 +projectileDefLightsNames.corcrwh_dragonmawh .yOffset = 32 -explosionLightsNames["corcrwh_dragonmawh"] = +explosionLightsNames.corcrwh_dragonmawh = GetLightClass("FlameProjectile", nil, "Smaller", { r = 0.3, g = 0.2, b = 0.09, a = 0.020, color2r = 1.0, color2g = 0.45, color2b = 0.22, colortime = 10, lifetime = 20, sustain = 3, selfshadowing = 0, }) -explosionLightsNames["corcrwh_dragonmawh"].yOffset = 32 +explosionLightsNames.corcrwh_dragonmawh .yOffset = 32 --explosionLightsNames["corcrwh_dragonmawh"].fraction = 5 -explosionLightsNames["corcrwh_krowlaserh"] = +explosionLightsNames.corcrwh_krowlaserh = GetLightClass("Explosion", "Red", "Micro", { r = 1, g = 0.3, b = 0.08, a = 0.4, color2r = 1.2, color2g = 0.6, color2b = 0.4, colortime = 0.6, @@ -1278,14 +1278,14 @@ GetLightClass("Explosion", "Red", "Micro", { -projectileDefLightsNames["corcrwt4_kmaw"] = +projectileDefLightsNames.corcrwt4_kmaw = GetLightClass("FlameProjectileDragon", nil, "Medium", { r = 0.7, g = 0.7, b = 0.65, a = 0.13, color2r = 1.0, color2g = 0.70, color2b = 0.4, colortime = 12, lifetime = 70, sustain = 30, }) -projectileDefLightsNames["cordemon_newdmaw"] = +projectileDefLightsNames.cordemon_newdmaw = GetLightClass("FlameProjectileShadow", nil, "Medium", { r = 0.7, g = 0.7, b = 0.65, a = 0.05, color2r = 1.0, color2g = 0.70, color2b = 0.4, colortime = 12, @@ -1293,13 +1293,13 @@ GetLightClass("FlameProjectileShadow", nil, "Medium", { }) --corkorg_rocket -projectileDefLightsNames["corkorg_corkorg_rocket"] = +projectileDefLightsNames.corkorg_corkorg_rocket = GetLightClass("MissileProjectile", "Warm", "SmallMedium", {a = 0.40, r = 1.2, g = 0.65, b = 0.1, radius = 80, color2r = 1.2, color2g = 0.7, color2b = 0.4, modelfactor = 0.5, specular = 0.05, scattering = 0.45, lensflare = 5}) -explosionLightsNames["corkorg_corkorg_rocket"] = +explosionLightsNames.corkorg_corkorg_rocket = GetLightClass("Explosion", "Fire", "Medium", {r = 0.4, g = 0.2, b = 0.08, a = 0.5, radius = 240, color2r = 1.2, color2g = 0.9, color2b = 0.4, sustain = 4, lifetime = 10, @@ -1314,20 +1314,20 @@ GetLightClass("Explosion", "Fire", "Medium", {r = 0.4, g = 0.2, b = 0.08, a = 0. -- lifetime = 4, sustain = 0}) --cordoomt3 -projectileDefLightsNames["cordoomt3_armagmheat"] = +projectileDefLightsNames.cordoomt3_armagmheat = GetLightClass("LaserProjectile", "HeatRay", "Mediumer", {a = 0.09, color2r = 0.5, color2g = 0.3, color2b = 0.2, colortime = 10, modelfactor = 0.5, specular = 0.1, scattering = 0.1, lensflare = 0, lifetime = 4, sustain = 0}) --cortron -explosionLightsNames["cortron_cortron_weapon"] = +explosionLightsNames.cortron_cortron_weapon = GetLightClass("Explosion", nil, "Large", {r = 3, g = 2.5, b = 2.0, a = 0.25, color2r = 0.5, color2g = 0.2, color2b = 0.09, colortime = 10, sustain = 4, lifetime = 120, modelfactor = 0.1, specular = 0.2, scattering = 0.1, lensflare = 4}) -projectileDefLightsNames["cortron_cortron_weapon"] = +projectileDefLightsNames.cortron_cortron_weapon = GetLightClass("MissileProjectile", "Red", "SmallMedium", { --lifetime = 200, --color2r = 0.75, color2g = 0.9, color2b = 0.3, colortime = 25, @@ -1335,13 +1335,13 @@ GetLightClass("MissileProjectile", "Red", "SmallMedium", { --armjuno -projectileDefLightsNames["armjuno_juno_pulse"] = +projectileDefLightsNames.armjuno_juno_pulse = GetLightClass("MissileProjectile", "Green", "SmallMedium", {r = 0.02, g = 0.05, b = 0.01, a = 0.25, color2r = 0.88, color2g = 1.5, color2b = 0.6, colortime = 150, --lifetime = 200, --color2r = 0.75, color2g = 0.9, color2b = 0.3, colortime = 25, modelfactor = 0.3, specular = 0.1, scattering = 0.4, lensflare = 7}) -explosionLightsNames["armjuno_juno_pulse"] = +explosionLightsNames.armjuno_juno_pulse = GetLightClass("Explosion", "Green", "Largest", {a = 0.6, posx = 0, posy = 100, posz = 0, r = 0.9, g = 1.1, b = 0.45, @@ -1363,13 +1363,13 @@ GetLightClass("Explosion", "Green", "Largest", {a = 0.6, -- modelfactor = 0.1, specular = 0.2, scattering = 0.3, lensflare = 6}) --corjuno -projectileDefLightsNames["corjuno_juno_pulse"] = +projectileDefLightsNames.corjuno_juno_pulse = GetLightClass("MissileProjectile", "Green", "SmallMedium", {r = 0.02, g = 0.05, b = 0.01, a = 0.25, color2r = 0.88, color2g = 1.5, color2b = 0.6, colortime = 150, --lifetime = 200, --color2r = 0.75, color2g = 0.9, color2b = 0.3, colortime = 25, modelfactor = 0.3, specular = 0.1, scattering = 0.4, lensflare = 7}) -explosionLightsNames["corjuno_juno_pulse"] = +explosionLightsNames.corjuno_juno_pulse = GetLightClass("Explosion", "Green", "Largest", {a = 0.6, posx = 0, posy = 100, posz = 0, r = 0.9, g = 1.1, b = 0.45, @@ -1378,13 +1378,13 @@ GetLightClass("Explosion", "Green", "Largest", {a = 0.6, modelfactor = 0.1, specular = 0.2, scattering = 0.3, lensflare = 6}) --legjuno -projectileDefLightsNames["legjuno_juno_pulse"] = +projectileDefLightsNames.legjuno_juno_pulse = GetLightClass("MissileProjectile", "Green", "SmallMedium", {r = 0.02, g = 0.05, b = 0.01, a = 0.25, color2r = 0.88, color2g = 1.5, color2b = 0.6, colortime = 150, --lifetime = 200, --color2r = 0.75, color2g = 0.9, color2b = 0.3, colortime = 25, modelfactor = 0.3, specular = 0.1, scattering = 0.4, lensflare = 7}) -explosionLightsNames["legjuno_juno_pulse"] = +explosionLightsNames.legjuno_juno_pulse = GetLightClass("Explosion", "Green", "Largest", {a = 0.6, posx = 0, posy = 100, posz = 0, r = 0.9, g = 1.1, b = 0.45, @@ -1394,7 +1394,7 @@ GetLightClass("Explosion", "Green", "Largest", {a = 0.6, --armpw machinegun -muzzleFlashLightsNames["armpw_emg"] = +muzzleFlashLightsNames.armpw_emg = GetLightClass("MuzzleFlash", "Warm", "Medium", {posx = 1, posy = 1, posz = 1, radius = 50, r = 1.2, g = 1.1, b = 1.0, a = 0.5, color2r = 0.3, color2g = 0.12, color2b = 0.05, colortime = 4, @@ -1402,7 +1402,7 @@ GetLightClass("MuzzleFlash", "Warm", "Medium", {posx = 1, posy = 1, posz = 1, ra lifetime = 17, sustain = 2}) --armmanni -projectileDefLightsNames["armmanni_atam"] = +projectileDefLightsNames.armmanni_atam = GetLightClass("LaserProjectile", "Blue", "SmallMedium", {a = 0.09, color2r = 0.6, color2g = 0.6, color2b = 0.6, colortime = 10, modelfactor = 0.5, specular = 0.1, scattering = 0.7, lensflare = 0, @@ -1410,26 +1410,26 @@ GetLightClass("LaserProjectile", "Blue", "SmallMedium", {a = 0.09, lifetime = 0, sustain = 0}) --corjugg -explosionLightsNames["corjugg_juggernaut_fire"] = +explosionLightsNames.corjugg_juggernaut_fire = GetLightClass("Explosion", nil, "Small", {r = 1.3, g = 1.1, b = 0.8, a = 0.4, color2r = 0.35, color2g = 0.20, color2b = 0.05, colortime = 3, sustain = 4, lifetime = 20, scattering = 0.2}) -projectileDefLightsNames["corjugg_juggernaut_fire"] = +projectileDefLightsNames.corjugg_juggernaut_fire = GetLightClass("CannonProjectile", nil, "Large", {a = 0.5, color2r = 0.5, color2g = 0.5, color2b = 0.6, colortime = 10, modelfactor = 0.5, specular = 0.1, scattering = 0.1, lensflare = 0, lifetime = 26, sustain = 20}) -- --armanni -projectileDefLightsNames["armanni_ata"] = +projectileDefLightsNames.armanni_ata = GetLightClass("LaserProjectile", "Blue", "Medium", {a = 0.09, color2r = 0.5, color2g = 0.5, color2b = 0.6, colortime = 10, modelfactor = 0.5, specular = 0.1, scattering = 0.1, lensflare = 0, lifetime = 0, sustain = 0}) --corcat -explosionLightsNames["corcat_exp_heavyrocket"] = +explosionLightsNames.corcat_exp_heavyrocket = GetLightClass("Explosion", nil, "Mediumer", {r = 3, g = 2.5, b = 2.0, a = 0.25, color2r = 0.75, color2g = 0.40, color2b = 0.09, colortime = 4, sustain = 7, lifetime = 32, @@ -1449,7 +1449,7 @@ GetLightClass("Explosion", nil, "Mediumer", {r = 3, g = 2.5, b = 2.0, a = 0.25, -- sustain = 10, lifetime = 400, -- modelfactor = 0.1, specular = 0.2, scattering = 0.3, lensflare = 6}) --scavengerbossv4 -explosionLightsNames['scavengerbossv4_normal_turbo_napalm'] = +explosionLightsNames.scavengerbossv4_normal_turbo_napalm = GetLightClass("Explosion", "Fire", "SmallMedium", {r = 0.54, g = 0.45, b = 0.12, a = 0.29, color2r = 1.2, color2g = 0.5, color2b = 0.2, colortime = 0.03, sustain = 40, lifetime = 150, @@ -1461,7 +1461,7 @@ GetLightClass("Explosion", "Fire", "SmallMedium", {r = 0.54, g = 0.45, b = 0.12, local scavengerBossV4Table = {'scavengerbossv4_veryeasy_turbo_napalm', 'scavengerbossv4_easy_turbo_napalm', 'scavengerbossv4_hard_turbo_napalm', 'scavengerbossv4_veryhard_turbo_napalm', 'scavengerbossv4_epic_turbo_napalm', 'scavengerbossv4_veryeasy_scav_turbo_napalm', 'scavengerbossv4_easy_scav_turbo_napalm', 'scavengerbossv4_normal_scav_turbo_napalm', 'scavengerbossv4_hard_scav_turbo_napalm', 'scavengerbossv4_veryhard_scav_turbo_napalm', 'scavengerbossv4_epic_scav_turbo_napalm'} for _, name in pairs(scavengerBossV4Table) do - explosionLightsNames[name] = table.copy(explosionLightsNames['scavengerbossv4_normal_turbo_napalm']) + explosionLightsNames[name] = table.copy(explosionLightsNames.scavengerbossv4_normal_turbo_napalm ) end diff --git a/luaui/configs/DeferredLightsGL4config.lua b/luaui/configs/DeferredLightsGL4config.lua index b2446ec8788..ac18d2f08e1 100644 --- a/luaui/configs/DeferredLightsGL4config.lua +++ b/luaui/configs/DeferredLightsGL4config.lua @@ -35,7 +35,7 @@ local exampleLight = { local unitLights = { - ['armpw'] = { + armpw = { headlightpw = { -- this is the lightname lightType = 'cone', pieceName = 'head', -- invalid ones will attach to the worldpos of the unit @@ -91,7 +91,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armwar'] = { + armwar = { arm1 = { lightType = 'point', pieceName = 'luparm', @@ -138,7 +138,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfatf'] = { + armfatf = { greenblob = { lightType = 'point', pieceName = 'light', @@ -185,7 +185,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfrad'] = { + armfrad = { greenblob = { lightType = 'point', pieceName = 'turret', @@ -268,7 +268,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armamex'] = { + armamex = { mid1 = { lightType = 'point', pieceName = 'dish', @@ -279,7 +279,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsonar'] = { + armsonar = { mid1 = { lightType = 'point', pieceName = 'dish', @@ -317,7 +317,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armrad'] = { + armrad = { greenblob = { lightType = 'point', pieceName = 'turret', @@ -373,7 +373,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corrad'] = { + corrad = { greenblob = { lightType = 'point', pieceName = 'turret', @@ -384,7 +384,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corfrad'] = { + corfrad = { greenblob = { lightType = 'point', pieceName = 'turret', @@ -395,7 +395,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cortide'] = { + cortide = { energy1 = { lightType = 'beam', pieceName = 'base', @@ -417,7 +417,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armmart'] = { + armmart = { -- front = { -- lightType = 'point', -- pieceName = 'sleeve', @@ -455,7 +455,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armferret'] = { + armferret = { base1 = { lightType = 'point', pieceName = 'base', @@ -493,7 +493,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legrhapsis'] = { + legrhapsis = { searchlight = { lightType = 'cone', pieceName = 'searchLight', @@ -504,7 +504,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armkraken'] = { + armkraken = { base1 = { lightType = 'point', pieceName = 'base', @@ -614,7 +614,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armflak'] = { + armflak = { base1 = { lightType = 'point', pieceName = 'base', @@ -724,7 +724,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfflak'] = { + armfflak = { base1 = { lightType = 'point', pieceName = 'base', @@ -799,7 +799,7 @@ local unitLights = { }, }, - ['armdl'] = { + armdl = { top = { lightType = 'point', pieceName = 'turret', @@ -929,7 +929,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['cordl'] = { + cordl = { depthchargeflashl = { lightType = 'point', pieceName = 'turret', @@ -1003,7 +1003,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armmark'] = { + armmark = { greenblob = { lightType = 'point', pieceName = 'torso', @@ -1014,7 +1014,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legaradk'] = { + legaradk = { leggreenblob = { lightType = 'point', pieceName = 'dishTower', @@ -1026,7 +1026,7 @@ local unitLights = { }, }, - ['legavrad'] ={ + legavrad ={ greenbloba = { lightType = 'point', pieceName = 'radarlight1', @@ -1064,7 +1064,7 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, }, }, - ['corvoyr'] = { + corvoyr = { greenblob = { lightType = 'point', pieceName = 'torso', @@ -1120,7 +1120,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cortrem'] = { + cortrem = { eyesfront = { lightType = 'beam', pieceName = 'base', @@ -1228,7 +1228,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corvroc'] = { + corvroc = { eyesfront = { lightType = 'beam', pieceName = 'base', @@ -1325,7 +1325,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armmerl'] = { + armmerl = { eyesleft = { lightType = 'beam', pieceName = 'base', @@ -1366,7 +1366,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cortron'] = { + cortron = { --UNStockpiled base1 = { lightType = 'beam', @@ -1532,7 +1532,7 @@ local unitLights = { }, - ['armseer'] = { + armseer = { greenblob = { lightType = 'point', pieceName = 'eye', @@ -1552,7 +1552,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corvrad'] = { + corvrad = { greenblob = { lightType = 'point', pieceName = 'blink', @@ -1638,7 +1638,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armarad'] = { + armarad = { greenblob = { lightType = 'point', pieceName = 'base', @@ -1722,7 +1722,7 @@ local unitLights = { }, }, - ['corarad'] = { + corarad = { greenblob = { lightType = 'point', pieceName = 'base', @@ -1734,7 +1734,7 @@ local unitLights = { }, }, - ['armtarg'] = { + armtarg = { greenblob = { lightType = 'point', pieceName = 'base', @@ -1756,7 +1756,7 @@ local unitLights = { }, }, - ['armllt'] = { + armllt = { searchlight = { lightType = 'cone', pieceName = 'sleeve', @@ -1875,7 +1875,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corllt'] = { + corllt = { searchlight = { lightType = 'cone', pieceName = 'turret', @@ -1915,7 +1915,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corhllt'] = { + corhllt = { searchlight = { lightType = 'cone', pieceName = 'turret2', @@ -1966,7 +1966,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corhlt'] = { + corhlt = { searchlight = { lightType = 'cone', pieceName = 'turret', @@ -2015,7 +2015,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armmercury'] = { + armmercury = { base2 = { lightType = 'point', pieceName = 'turret', @@ -2118,7 +2118,7 @@ local unitLights = { }, }, - ['armbeamer'] = { + armbeamer = { searchlight = { lightType = 'cone', pieceName = 'sleeve', @@ -2266,7 +2266,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armassistdrone_land'] = { + armassistdrone_land = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -2295,7 +2295,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0 }, }, }, - ['corassistdrone_land'] = { + corassistdrone_land = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -2324,7 +2324,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0 }, }, }, - ['armnanotct2'] = { + armnanotct2 = { nanolight = { lightType = 'point', pieceName = 'emitnano1', @@ -2335,7 +2335,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cornanotct2'] = { + cornanotct2 = { nanolight = { lightType = 'point', pieceName = 'emitnano', @@ -2346,7 +2346,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legnanotc'] = { + legnanotc = { nanolight = { lightType = 'point', pieceName = 'emitnano', @@ -2357,7 +2357,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legmohoconct'] = { + legmohoconct = { nanolight1 = { lightType = 'point', pieceName = 'nano1', @@ -2377,7 +2377,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legmohocon'] = { + legmohocon = { nanolight1 = { lightType = 'point', pieceName = 'nano1', @@ -2397,7 +2397,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legnanotcplat'] = { + legnanotcplat = { nanolight = { lightType = 'point', pieceName = 'emitnano', @@ -2408,7 +2408,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armnanotc'] = { + armnanotc = { nanolight = { lightType = 'point', pieceName = 'emitnano', @@ -2464,7 +2464,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cornanotc'] = { + cornanotc = { nanolight = { lightType = 'point', pieceName = 'emitnano', @@ -2493,7 +2493,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armhlt'] = { + armhlt = { searchlight = { lightType = 'cone', pieceName = 'gunl', @@ -2567,7 +2567,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfhlt'] = { + armfhlt = { searchlight = { lightType = 'cone', pieceName = 'gunl', @@ -2650,7 +2650,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armrl'] = { + armrl = { searchlight = { lightType = 'cone', pieceName = 'sleeve', @@ -2752,7 +2752,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfrt'] = { + armfrt = { searchlight = { lightType = 'cone', pieceName = 'sleeve', @@ -2844,7 +2844,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corrl'] = { + corrl = { searchlight = { lightType = 'cone', pieceName = 'turret', @@ -2891,7 +2891,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corfrt'] = { + corfrt = { searchlight = { lightType = 'cone', pieceName = 'turret', @@ -2938,7 +2938,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armcir'] = { + armcir = { searchlight = { lightType = 'cone', pieceName = 'spindle', @@ -2989,7 +2989,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormadsam'] = { + cormadsam = { searchlight = { lightType = 'cone', pieceName = 'launcher', @@ -3018,7 +3018,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corflak'] = { + corflak = { searchlight = { lightType = 'cone', pieceName = 'gunbase', @@ -3047,7 +3047,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corenaa'] = { + corenaa = { searchlight = { lightType = 'cone', pieceName = 'gunbase', @@ -3076,7 +3076,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corfrock'] = { + corfrock = { searchlight = { lightType = 'cone', pieceName = 'sleeve', @@ -3105,7 +3105,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corerad'] = { + corerad = { searchlight = { lightType = 'cone', pieceName = 'turret', @@ -3143,7 +3143,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armjamt'] = { + armjamt = { cloaklightred = { lightType = 'point', pieceName = 'jam', @@ -3190,7 +3190,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0 }, }, }, - ['corshroud'] = { + corshroud = { cloaklightred = { lightType = 'point', pieceName = 'jam', @@ -3201,7 +3201,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armjuno'] = { + armjuno = { top = { lightType = 'point', pieceName = 'base', @@ -3284,7 +3284,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0 }, }, }, - ['corjuno'] = { + corjuno = { top = { lightType = 'point', pieceName = 'base', @@ -3295,7 +3295,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0 }, }, }, - ['legjuno'] = { + legjuno = { top = { lightType = 'point', pieceName = 'junoSphere', @@ -3306,7 +3306,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0 }, }, }, - ['armjam'] = { + armjam = { cloaklightred = { lightType = 'point', pieceName = 'jam', @@ -3326,7 +3326,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corjamt'] = { + corjamt = { cloaklightred = { lightType = 'point', pieceName = 'jam', @@ -3337,7 +3337,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coreter'] = { + coreter = { cloaklightred = { lightType = 'point', pieceName = 'jam', @@ -3424,7 +3424,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armaser'] = { + armaser = { cloaklightred = { lightType = 'point', pieceName = 'jam', @@ -3435,7 +3435,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corspec'] = { + corspec = { cloaklightred = { lightType = 'point', pieceName = 'jam', @@ -3446,7 +3446,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legavjam'] = { + legavjam = { cloaklightred = { lightType = 'point', pieceName = 'cloaklight', @@ -3457,7 +3457,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legajamk'] = { + legajamk = { legcloaklightred = { lightType = 'point', pieceName = 'blob', @@ -3468,7 +3468,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['leganavyradjamship']={ + leganavyradjamship={ cloaklightred = { lightType = 'point', pieceName = 'cloaklight', @@ -3515,7 +3515,7 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, }, }, - ['armveil'] = { + armveil = { cloaklightred = { lightType = 'point', pieceName = 'jam', @@ -3600,7 +3600,7 @@ local unitLights = { }, - ['corsiegebreaker'] = { + corsiegebreaker = { eyes1 = { @@ -3704,7 +3704,7 @@ local unitLights = { }, - ['corack'] = { + corack = { buildlight1 = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -3824,7 +3824,7 @@ local unitLights = { -- }, }, - ['legack'] = { + legack = { buildlight1 = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -3862,7 +3862,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legamphtank'] = { + legamphtank = { frontlight = { lightType = 'point', pieceName = 'base', @@ -3882,7 +3882,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legaabot'] = { + legaabot = { frontlight1 = { lightType = 'point', pieceName = 'frontLight1', @@ -3940,7 +3940,7 @@ local unitLights = { }, }, - ['legadveconv'] = { + legadveconv = { enabled1 = { lightType = 'point', pieceName = 'lightFlare1', @@ -3987,7 +3987,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['leganavaleconv'] = { + leganavaleconv = { enabled1 = { lightType = 'point', pieceName = 'toprightLight', @@ -4034,7 +4034,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legeconv'] = { + legeconv = { enabled1 = { lightType = 'point', pieceName = 'flare', @@ -4063,7 +4063,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['leghp'] = { + leghp = { buildlight1 = { lightType = 'cone', pieceName = 'buildlight1Point', @@ -4138,7 +4138,7 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, }, }, - ['legfhp'] = { + legfhp = { buildlight1 = { lightType = 'cone', pieceName = 'buildlight1Point', @@ -4213,7 +4213,7 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, }, }, - ['legfeconv'] = { + legfeconv = { enabled1 = { lightType = 'point', pieceName = 'light', @@ -4318,7 +4318,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['leguwestore'] = { + leguwestore = { sidelight1 = { lightType = 'point', pieceName = 'sidelight1', @@ -4469,7 +4469,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legscout'] = { + legscout = { bodylight = { lightType = 'point', pieceName = 'bodylight', @@ -4480,7 +4480,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['leggat'] = { + leggat = { gatbodylighta = { lightType = 'point', pieceName = 'body', @@ -4500,7 +4500,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legafcv'] = { + legafcv = { buildlight1 = { --top spinning light lightType = 'cone', pieceName = 'conLight1', @@ -4538,7 +4538,7 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, }, }, - ['legvcarry'] = { + legvcarry = { lightglowtarget = { lightType = 'point', pieceName = 'targetLightGlow', @@ -4558,7 +4558,7 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, }, }, - ['armack'] = { + armack = { buildlight1 = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight1emit', @@ -4659,7 +4659,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfark'] = { + armfark = { armbuildlight = { lightType = 'point', pieceName = 'armhexl_emit', @@ -4744,7 +4744,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfido'] = { + armfido = { -- eyesglow = { -- lightType = 'point', -- pieceName = 'torso', @@ -4854,7 +4854,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armham'] = { + armham = { body = { lightType = 'point', pieceName = 'torso', @@ -4874,7 +4874,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armshltx'] = { + armshltx = { nanolight1 = { lightType = 'point', pieceName = 'nano1', @@ -5066,7 +5066,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armasy'] = { + armasy = { buildlight1 = { -- this is the lightname lightType = 'point', pieceName = 'beam1', @@ -5284,7 +5284,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coraap'] = { + coraap = { buildlight1A = { lightType = 'cone', pieceName = 'cagelight_emit1', @@ -5466,7 +5466,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coramsub'] = { + coramsub = { nanolight1 = { lightType = 'point', pieceName = 'nano1', @@ -5567,7 +5567,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legamsub'] = { + legamsub = { nanolight1 = { lightType = 'point', pieceName = 'nano1', @@ -5641,7 +5641,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coralab'] = { + coralab = { buildflash = { lightType = 'point', pieceName = 'cagelight', @@ -5769,7 +5769,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corasy'] = { + corasy = { buildflash1 = { lightType = 'point', pieceName = 'cagelight1', @@ -5915,7 +5915,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corgant'] = { + corgant = { buildlight1 = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -6088,7 +6088,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corsy'] = { + corsy = { buildlight = { lightType = 'cone', pieceName = 'cagelight_emit1', @@ -6162,7 +6162,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armason'] = { + armason = { base1 = { lightType = 'point', pieceName = 'base', @@ -6209,7 +6209,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsub'] = { + armsub = { headlighttorpedo = { -- this is the lightname lightType = 'cone', pieceName = 'base', -- invalid ones will attach to the worldpos of the unit @@ -6265,7 +6265,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armroy'] = { + armroy = { sidelightl = { lightType = 'beam', pieceName = 'turret', @@ -6379,7 +6379,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armcs'] = { + armcs = { buildlight1 = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -6480,7 +6480,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corpt'] = { + corpt = { searchlightaa = { lightType = 'cone', pieceName = 'turret', @@ -6528,7 +6528,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcs'] = { + corcs = { nanolight1 = { lightType = 'point', pieceName = 'nano1', @@ -6604,7 +6604,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armcsa'] = { + armcsa = { buildlight = { lightType = 'point', pieceName = 'emit', @@ -6705,7 +6705,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcsa'] = { + corcsa = { nanolight1 = { lightType = 'point', pieceName = 'nano', @@ -6789,7 +6789,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armdronecarry'] = { + armdronecarry = { tower = { lightType = 'point', pieceName = 'base', @@ -6818,7 +6818,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armtrident'] = { + armtrident = { tower = { lightType = 'point', pieceName = 'base', @@ -6838,7 +6838,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armdronecarryland'] = { + armdronecarryland = { tower = { lightType = 'point', pieceName = 'base', @@ -6867,7 +6867,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armcarry'] = { + armcarry = { nanolight1 = { lightType = 'point', pieceName = 'nanoemit1', @@ -7053,7 +7053,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armantiship'] = { + armantiship = { greenblob = { lightType = 'point', pieceName = 'radar', @@ -7158,7 +7158,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cordrone'] = { + cordrone = { eyes = { lightType = 'point', pieceName = 'base', @@ -7169,7 +7169,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0 }, }, }, - ['cordronecarry'] = { + cordronecarry = { tower = { lightType = 'point', pieceName = 'base', @@ -7189,7 +7189,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corsentinel'] = { + corsentinel = { tower = { lightType = 'point', pieceName = 'base', @@ -7209,7 +7209,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cordronecarryair'] = { + cordronecarryair = { tower = { lightType = 'point', pieceName = 'base', @@ -7229,7 +7229,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcarry'] = { + corcarry = { nanolight1 = { lightType = 'point', pieceName = 'nano1', @@ -7285,7 +7285,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corantiship'] = { + corantiship = { eyesfronttop = { lightType = 'beam', pieceName = 'base', @@ -7450,7 +7450,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corfship'] = { + corfship = { flamelight = { lightType = 'point', pieceName = 'sleeve', @@ -7648,7 +7648,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coracsub'] = { + coracsub = { nanolight1 = { lightType = 'point', pieceName = 'flare', @@ -7714,7 +7714,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armacsub'] = { + armacsub = { buildflash = { lightType = 'point', pieceName = 'base', @@ -7770,7 +7770,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormls'] = { + cormls = { nanolight1 = { lightType = 'point', pieceName = 'nano', @@ -7818,7 +7818,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corshark'] = { + corshark = { eyesfront = { lightType = 'beam', pieceName = 'base', @@ -7875,7 +7875,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['cordesolator'] = { + cordesolator = { nukelight = { lightType = 'cone', pieceName = 'firing1', @@ -7925,7 +7925,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coronager'] = { + coronager = { engine = { lightType = 'point', pieceName = 'base', @@ -7946,7 +7946,7 @@ local unitLights = { }, }, - ['corblackhy'] = { + corblackhy = { eyesfront = { lightType = 'beam', pieceName = 'tur1', @@ -8212,7 +8212,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corfblackhyt4'] = { + corfblackhyt4 = { eyes1 = { lightType = 'point', pieceName = 'base', @@ -8331,7 +8331,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormship'] = { + cormship = { -- eyes1 = { -- lightType = 'point', -- pieceName = 'base', @@ -8437,7 +8437,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcrus'] = { + corcrus = { headlight = { -- this is the lightname lightType = 'cone', pieceName = 'sleeve', -- invalid ones will attach to the worldpos of the unit @@ -8594,7 +8594,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corbats'] = { + corbats = { eyesfront = { lightType = 'beam', pieceName = 'turretb', @@ -8759,7 +8759,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corssub'] = { + corssub = { eyesfront = { lightType = 'beam', pieceName = 'base', @@ -8798,7 +8798,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corarch'] = { + corarch = { searchlight1 = { lightType = 'cone', pieceName = 'sleeve', @@ -8847,7 +8847,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armmship'] = { + armmship = { frontlight = { lightType = 'beam', pieceName = 'base', @@ -8996,7 +8996,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsjam'] = { + armsjam = { mid1 = { lightType = 'point', pieceName = 'base', @@ -9043,7 +9043,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armsubk'] = { + armsubk = { headlighttorpedo = { -- this is the lightname lightType = 'cone', pieceName = 'base', -- invalid ones will attach to the worldpos of the unit @@ -9108,7 +9108,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armseadragon'] = { + armseadragon = { eyes = { lightType = 'point', pieceName = 'base', @@ -9142,7 +9142,7 @@ local unitLights = { }, - ['armexcalibur'] = { + armexcalibur = { antenna = { lightType = 'point', pieceName = 'antenna', @@ -9190,7 +9190,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armbats'] = { + armbats = { top = { lightType = 'point', pieceName = 'base', @@ -9285,7 +9285,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armepoch'] = { + armepoch = { searchlight = { lightType = 'cone', pieceName = 'misbox2', @@ -9586,7 +9586,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfepocht4'] = { + armfepocht4 = { turret1 = { lightType = 'point', pieceName = 'base', @@ -9741,7 +9741,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armcrus'] = { + armcrus = { teamtopglow = { lightType = 'beam', pieceName = 'turret', @@ -9835,7 +9835,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armserp'] = { + armserp = { headlighttorpedo1 = { -- this is the lightname lightType = 'cone', pieceName = 'base', -- invalid ones will attach to the worldpos of the unit @@ -9874,7 +9874,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armaas'] = { + armaas = { eyes = { lightType = 'beam', pieceName = 'base', @@ -10009,7 +10009,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armmls'] = { + armmls = { nanolight1 = { lightType = 'point', pieceName = 'nanoemit', @@ -10086,7 +10086,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armrecl'] = { + armrecl = { nanolight1 = { lightType = 'point', pieceName = 'flare', @@ -10133,7 +10133,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corplat'] = { + corplat = { buildlight = { lightType = 'cone', pieceName = 'cagelight_emit1', @@ -10243,7 +10243,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coravp'] = { + coravp = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -10407,7 +10407,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armdecade'] = { + armdecade = { frontlight = { lightType = 'beam', pieceName = 'base', @@ -10540,7 +10540,7 @@ local unitLights = { }, - ['coresupp'] = { + coresupp = { -- front = { -- lightType = 'point', -- pieceName = 'base', @@ -10700,7 +10700,7 @@ local unitLights = { -- }, }, - ['armlship'] = { + armlship = { back = { lightType = 'point', pieceName = 'base', @@ -10816,7 +10816,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['correcl'] = { + correcl = { nanolight1 = { lightType = 'point', pieceName = 'nano1', @@ -11025,7 +11025,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corsd'] = { + corsd = { eyes1 = { lightType = 'point', pieceName = 'base', @@ -11036,7 +11036,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corscreamer'] = { + corscreamer = { eyes1 = { lightType = 'point', pieceName = 'turret', @@ -11123,7 +11123,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corsub'] = { + corsub = { eyesfront = { lightType = 'beam', pieceName = 'base', @@ -11172,7 +11172,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corpship'] = { + corpship = { eyes1 = { lightType = 'point', pieceName = 'turret', @@ -11220,7 +11220,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corsjam'] = { + corsjam = { -- eyes1 = { -- lightType = 'point', -- pieceName = 'base', @@ -11299,7 +11299,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corroy'] = { + corroy = { eyeshighfront = { lightType = 'beam', pieceName = 'turret', @@ -11423,7 +11423,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armpt'] = { + armpt = { front1 = { lightType = 'point', pieceName = 'base', @@ -11470,7 +11470,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armpship'] = { + armpship = { -- front1 = { -- lightType = 'point', -- pieceName = 'base', @@ -11537,7 +11537,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsy'] = { + armsy = { buildlight1 = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -11674,7 +11674,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armavp'] = { + armavp = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -11977,7 +11977,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armalab'] = { + armalab = { buildlight1 = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -12124,7 +12124,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armamsub'] = { + armamsub = { buildlight1 = { -- this is the lightname lightType = 'point', pieceName = 'beam1', @@ -12244,7 +12244,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armplat'] = { + armplat = { buildlight = { lightType = 'cone', pieceName = 'cagelight_emit', @@ -12300,7 +12300,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armaap'] = { + armaap = { buildlightflare1 = { lightType = 'point', pieceName = 'cagelight_emit1', @@ -12567,7 +12567,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corlab'] = { + corlab = { nanolight1 = { lightType = 'point', pieceName = 'nano1', @@ -12653,7 +12653,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['leglab'] = { + leglab = { nanolight1 = { lightType = 'point', pieceName = 'flare1', @@ -12718,7 +12718,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legsy'] = { + legsy = { nanolight1 = { lightType = 'point', pieceName = 'beam1', @@ -12774,7 +12774,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legadvshipyard'] = { + legadvshipyard = { nanolight1 = { lightType = 'point', pieceName = 'flare1', @@ -12920,7 +12920,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corvp'] = { + corvp = { nanolight1 = { lightType = 'point', pieceName = 'nano1', @@ -13057,7 +13057,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corhp'] = { + corhp = { buildlight = { lightType = 'cone', pieceName = 'cagelight_emit1', @@ -13167,7 +13167,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corfhp'] = { + corfhp = { buildlight = { lightType = 'cone', pieceName = 'cagelight_emit1', @@ -13277,7 +13277,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corap'] = { + corap = { greenblob = { lightType = 'point', pieceName = 'blink', @@ -13360,7 +13360,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corapt3'] = { + corapt3 = { nanolight1 = { lightType = 'point', pieceName = 'nano1', @@ -13407,7 +13407,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legap'] = { + legap = { greenblob = { lightType = 'point', pieceName = 'blink', @@ -13463,7 +13463,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legaap'] = { + legaap = { greenblob = { lightType = 'point', pieceName = 'blink', @@ -13528,7 +13528,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legalab'] = { + legalab = { nanolight1 = { lightType = 'point', pieceName = 'flare1', @@ -13584,7 +13584,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legafus'] = { + legafus = { fusionglow = { lightType = 'point', pieceName = 'emit', @@ -13613,7 +13613,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['legafust3'] = { + legafust3 = { fusionglow = { lightType = 'point', pieceName = 'emit', @@ -13642,7 +13642,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['legapt3'] = { + legapt3 = { nanolight1 = { lightType = 'point', pieceName = 'nano1', @@ -13689,7 +13689,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armhp'] = { + armhp = { buildlight = { lightType = 'cone', pieceName = 'cagelight_emit1', @@ -13781,7 +13781,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfhp'] = { + armfhp = { buildlight = { lightType = 'cone', pieceName = 'cagelight_emit1', @@ -13873,7 +13873,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armvp'] = { + armvp = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -13965,7 +13965,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armap'] = { + armap = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -14059,7 +14059,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armlab'] = { + armlab = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -14128,7 +14128,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armck'] = { + armck = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -14176,7 +14176,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armart'] = { + armart = { light = { lightType = 'point', pieceName = 'turret', @@ -14241,7 +14241,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armflash'] = { + armflash = { back1 = { lightType = 'point', pieceName = 'base', @@ -14351,7 +14351,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corfav'] = { + corfav = { back = { lightType = 'point', pieceName = 'base', @@ -14398,7 +14398,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfav'] = { + armfav = { light = { lightType = 'point', pieceName = 'base', @@ -14445,7 +14445,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armjanus'] = { + armjanus = { turretlamp = { lightType = 'point', pieceName = 'turret', @@ -14537,7 +14537,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armpincer'] = { + armpincer = { searchlight = { lightType = 'cone', pieceName = 'base', @@ -14602,7 +14602,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsaber'] = { + armsaber = { front1 = { lightType = 'point', pieceName = 'base', @@ -14640,7 +14640,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsb'] = { + armsb = { front1 = { lightType = 'point', pieceName = 'base', @@ -14714,7 +14714,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsam'] = { + armsam = { front1 = { lightType = 'point', pieceName = 'base', @@ -14785,7 +14785,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armstump'] = { + armstump = { searchlight = { lightType = 'cone', pieceName = 'base', @@ -14832,7 +14832,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcrash'] = { + corcrash = { eyes = { lightType = 'point', pieceName = 'head', @@ -14879,7 +14879,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corfast'] = { + corfast = { eyes = { lightType = 'point', pieceName = 'head', @@ -14917,7 +14917,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cornecro'] = { + cornecro = { corbuildlight = { lightType = 'point', pieceName = 'corhexl_emit', @@ -14964,7 +14964,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armrectr'] = { + armrectr = { armbuildlight = { lightType = 'point', pieceName = 'armhexl_emit', @@ -15020,7 +15020,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armmlv'] = { + armmlv = { backpack = { lightType = 'point', pieceName = 'base', @@ -15094,7 +15094,7 @@ local unitLights = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['armbanth'] = { + armbanth = { searchlight = { lightType = 'cone', pieceName = 'turret', @@ -15343,7 +15343,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corkarg'] = { + corkarg = { eyesbeam = { lightType = 'beam', pieceName = 'turret', @@ -15458,7 +15458,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corjugg'] = { + corjugg = { antenna1 = { lightType = 'point', pieceName = 'torso', @@ -15651,7 +15651,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armvang'] = { + armvang = { top = { lightType = 'point', pieceName = 'sleeve', @@ -15966,7 +15966,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, -- }, - ['corkorg'] = { + corkorg = { -- searchlight = { -- lightType = 'cone', -- pieceName = 'head', @@ -16061,7 +16061,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armcom'] = { + armcom = { headlightarmcom = { lightType = 'cone', pieceName = 'head', @@ -16360,7 +16360,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armcomlvl3'] = { + armcomlvl3 = { headlightarmcom = { lightType = 'cone', pieceName = 'head', @@ -16560,7 +16560,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armcomboss'] = { + armcomboss = { --headlightarmcom = { -- lightType = 'cone', -- pieceName = 'head', @@ -16671,7 +16671,7 @@ local unitLights = { }, }, - ['scavengerbossv4_normal'] = { + scavengerbossv4_normal = { vortex1 = { lightType = 'point', pieceName = 'vortex3', @@ -16783,7 +16783,7 @@ local unitLights = { }, }, - ['legcom'] = { + legcom = { headlightcomteam = { lightType = 'cone', pieceName = 'head', @@ -16876,7 +16876,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcom'] = { + corcom = { headlightcorcoml = { lightType = 'cone', pieceName = 'head', @@ -17168,7 +17168,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcomboss'] = { + corcomboss = { --headlightcorcom = { -- lightType = 'cone', -- pieceName = 'head', @@ -17251,7 +17251,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armbull'] = { + armbull = { front1 = { lightType = 'point', pieceName = 'base', @@ -17378,7 +17378,7 @@ local unitLights = { }, - ['armcroc'] = { + armcroc = { frontlighteye = { lightType = 'beam', pieceName = 'base', @@ -17419,7 +17419,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armconsul'] = { + armconsul = { front = { lightType = 'point', pieceName = 'base', @@ -17520,7 +17520,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcan'] = { + corcan = { footfront1 = { lightType = 'point', pieceName = 'lfoot', @@ -17605,7 +17605,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corspy'] = { + corspy = { eyes1 = { lightType = 'point', pieceName = 'torso', @@ -17616,7 +17616,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormando'] = { + cormando = { -- eyes1 = { -- lightType = 'point', -- pieceName = 'head', @@ -17683,7 +17683,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormandot4'] = { + cormandot4 = { eyes1 = { lightType = 'point', pieceName = 'head', @@ -17721,7 +17721,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corphantom'] = { + corphantom = { eyes1 = { lightType = 'point', pieceName = 'body', @@ -17733,7 +17733,7 @@ local unitLights = { }, }, - ['cortoast'] = { + cortoast = { doorlight1a = { lightType = 'beam', pieceName = 'door1', @@ -17776,7 +17776,7 @@ local unitLights = { }, }, - ['corvipe'] = { + corvipe = { eyesfront = { lightType = 'beam', pieceName = 'turret', @@ -17845,7 +17845,7 @@ local unitLights = { }, }, - ['corparrow'] = { + corparrow = { eyesfront = { lightType = 'beam', pieceName = 'base', @@ -17951,7 +17951,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['cormart'] = { + cormart = { rackbl1 = { lightType = 'point', pieceName = 'trackbl', @@ -18156,7 +18156,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corban'] = { + corban = { base1 = { lightType = 'point', pieceName = 'base', @@ -18306,7 +18306,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['correap'] = { + correap = { -- headlight = { -- this is the lightname -- lightType = 'cone', -- pieceName = 'base', -- invalid ones will attach to the worldpos of the unit @@ -18417,7 +18417,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corhrk'] = { + corhrk = { eyes1 = { lightType = 'point', pieceName = 'torso', @@ -18482,7 +18482,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corak'] = { + corak = { eyes1 = { lightType = 'point', pieceName = 'torso', @@ -18567,7 +18567,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corgator'] = { + corgator = { headlight = { -- this is the lightname lightType = 'cone', pieceName = 'justattachtobase', -- invalid ones will attach to the worldpos of the unit @@ -18614,7 +18614,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corca'] = { + corca = { nanolight = { lightType = 'point', pieceName = 'nano', @@ -18697,7 +18697,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corfink'] = { + corfink = { thruster1 = { lightType = 'point', pieceName = 'base', @@ -18735,7 +18735,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corsb'] = { + corsb = { thrustera = { lightType = 'point', pieceName = 'base', @@ -18782,7 +18782,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cords'] = { + cords = { antenna = { lightType = 'point', pieceName = 'sleeve', @@ -18982,7 +18982,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corsfig'] = { + corsfig = { thruster = { lightType = 'point', pieceName = 'base', @@ -19020,7 +19020,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corseap'] = { + corseap = { thruster = { lightType = 'point', pieceName = 'base', @@ -19058,7 +19058,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corhunt'] = { + corhunt = { thruster = { lightType = 'point', pieceName = 'base', @@ -19087,7 +19087,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcut'] = { + corcut = { thruster1 = { lightType = 'point', pieceName = 'base', @@ -19172,7 +19172,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corhurc'] = { + corhurc = { thruster1 = { lightType = 'point', pieceName = 'base', @@ -19246,7 +19246,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corshad'] = { + corshad = { thruster1 = { lightType = 'point', pieceName = 'base', @@ -19338,7 +19338,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['cortitan'] = { + cortitan = { eyes1 = { lightType = 'point', pieceName = 'base', @@ -19430,7 +19430,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coraca'] = { + coraca = { nanolight = { lightType = 'point', pieceName = 'nano', @@ -19495,7 +19495,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfig'] = { + armfig = { front1 = { lightType = 'point', pieceName = 'turret', @@ -19560,7 +19560,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armca'] = { + armca = { --nanolightarmca = { -- lightType = 'cone', -- pieceName = 'nano', @@ -19679,7 +19679,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armpb'] = { + armpb = { turrettop = { lightType = 'point', pieceName = 'turret', @@ -19812,7 +19812,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armtide'] = { + armtide = { enabled_mainglowbeam = { lightType = 'beam', pieceName = 'base', @@ -19851,7 +19851,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armthund'] = { + armthund = { front1 = { lightType = 'point', pieceName = 'base', @@ -20042,7 +20042,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armstil'] = { + armstil = { front1 = { lightType = 'point', pieceName = 'base', @@ -20143,7 +20143,7 @@ local unitLights = { lifetime = 0, selfshadowing = 0}, }, }, - ['armhawk'] = { + armhawk = { front1 = { lightType = 'point', pieceName = 'base', @@ -20190,7 +20190,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armpeep'] = { + armpeep = { front1 = { lightType = 'point', pieceName = 'base', @@ -20246,7 +20246,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armkam'] = { + armkam = { front1 = { lightType = 'point', pieceName = 'base', @@ -20293,7 +20293,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armlance'] = { + armlance = { thrust = { lightType = 'point', pieceName = 'thrust1', @@ -20322,7 +20322,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armbrawl'] = { + armbrawl = { frontcockpit = { lightType = 'point', pieceName = 'base', @@ -20379,7 +20379,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armpnix'] = { + armpnix = { front1 = { lightType = 'point', pieceName = 'turret', @@ -20471,7 +20471,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armaca'] = { + armaca = { buildlight = { lightType = 'point', pieceName = 'nanolight', @@ -20599,7 +20599,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armgremlin'] = { + armgremlin = { -- cloaklightred1 = { -- lightType = 'point', -- pieceName = 'flleg', @@ -20690,7 +20690,7 @@ local unitLights = { }, }, - ['armamd'] = { + armamd = { orangelightamd = { lightType = 'point', pieceName = 'orangelight', @@ -20795,7 +20795,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corfmd'] = { + corfmd = { orangelightcenter = { lightType = 'point', pieceName = 'orangelight', @@ -20911,7 +20911,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corvalk'] = { + corvalk = { -- eyes1 = { -- lightType = 'point', -- pieceName = 'base', @@ -21112,7 +21112,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corhvytrans'] = { + corhvytrans = { -- eyes1 = { -- lightType = 'point', -- pieceName = 'base', @@ -21287,7 +21287,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armemp'] = { + armemp = { emplight1 = { lightType = 'point', pieceName = 'orangelight', @@ -21363,7 +21363,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armgplat'] = { + armgplat = { base1 = { lightType = 'point', pieceName = 'base', @@ -21419,7 +21419,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armatl'] = { + armatl = { base1 = { lightType = 'point', pieceName = 'base', @@ -21457,7 +21457,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coratl'] = { + coratl = { torpedoflash1 = { lightType = 'point', pieceName = 'turret', @@ -21477,7 +21477,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armatlas'] = { + armatlas = { jetm = { lightType = 'point', pieceName = 'base', @@ -21582,7 +21582,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armhvytrans'] = { + armhvytrans = { jetbltop = { lightType = 'point', pieceName = 'jetbl', @@ -21710,7 +21710,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armeyes'] = { + armeyes = { light = { lightType = 'point', pieceName = 'sphere', @@ -21730,7 +21730,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 2}, }, }, - ['coreyes'] = { + coreyes = { eyeglow = { lightType = 'point', pieceName = 'sphere', @@ -21777,7 +21777,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armanni'] = { + armanni = { searchlight = { lightType = 'cone', pieceName = 'light', @@ -21918,7 +21918,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armannit3'] = { + armannit3 = { searchlight = { lightType = 'cone', pieceName = 'light', @@ -22028,7 +22028,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armblade'] = { + armblade = { fan = { lightType = 'point', pieceName = 'base', @@ -22084,7 +22084,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armdfly'] = { + armdfly = { flashtop = { lightType = 'point', pieceName = 'barrel', @@ -22250,7 +22250,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corbw'] = { + corbw = { emplight = { lightType = 'point', pieceName = 'base', @@ -22297,7 +22297,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corawac'] = { + corawac = { dish = { lightType = 'point', pieceName = 'base', @@ -22362,7 +22362,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armseap'] = { + armseap = { thruster = { lightType = 'point', pieceName = 'base', @@ -22382,7 +22382,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsfig'] = { + armsfig = { front = { lightType = 'point', pieceName = 'base', @@ -22447,7 +22447,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsehak'] = { + armsehak = { greenblob1 = { lightType = 'point', pieceName = 'dish', @@ -22575,7 +22575,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armminebomber'] = { + armminebomber = { thruster1 = { lightType = 'point', pieceName = 'base', @@ -22595,7 +22595,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armliche'] = { + armliche = { thruster1 = { lightType = 'point', pieceName = 'base', @@ -22696,7 +22696,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corape'] = { + corape = { thruster1 = { lightType = 'point', pieceName = 'rjet', @@ -22734,7 +22734,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armawac'] = { + armawac = { greenblob1 = { lightType = 'point', pieceName = 'dish', @@ -22808,7 +22808,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormine4'] = { + cormine4 = { top1 = { lightType = 'point', pieceName = 'base', @@ -22819,7 +22819,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corfmine3'] = { + corfmine3 = { top1 = { lightType = 'point', pieceName = 'base', @@ -22839,7 +22839,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormine3'] = { + cormine3 = { top1 = { lightType = 'point', pieceName = 'base', @@ -22859,7 +22859,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormine2'] = { + cormine2 = { top1 = { lightType = 'point', pieceName = 'base', @@ -22870,7 +22870,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormine1'] = { + cormine1 = { top1 = { lightType = 'point', pieceName = 'base', @@ -22881,7 +22881,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfmine3'] = { + armfmine3 = { top1 = { lightType = 'point', pieceName = 'base', @@ -22892,7 +22892,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armmine3'] = { + armmine3 = { top1 = { lightType = 'point', pieceName = 'base', @@ -22903,7 +22903,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armmine2'] = { + armmine2 = { top1 = { lightType = 'point', pieceName = 'base', @@ -22914,7 +22914,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armmine1'] = { + armmine1 = { top1 = { lightType = 'point', pieceName = 'base', @@ -22925,7 +22925,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsd'] = { + armsd = { antenna = { lightType = 'point', pieceName = 'base', @@ -22945,7 +22945,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 3}, }, }, - ['armvulc'] = { + armvulc = { whitemid1 = { lightType = 'point', pieceName = 'base', @@ -23333,7 +23333,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 4}, }, }, - ['armtl'] = { + armtl = { barrel1 = { lightType = 'point', pieceName = 'base', @@ -23380,7 +23380,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cortl'] = { + cortl = { torpedoflash = { lightType = 'point', pieceName = 'gun', @@ -23391,7 +23391,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armbotrail'] = { + armbotrail = { top = { lightType = 'point', pieceName = 'rail', @@ -23411,7 +23411,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfus'] = { + armfus = { fusionglow1 = { lightType = 'point', pieceName = 'emit1', @@ -23869,7 +23869,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corfus'] = { + corfus = { -- fusionglowcoretimed = { -- lightType = 'point', -- pieceName = 'emit', @@ -24022,7 +24022,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['legfus'] = { + legfus = { fusionglow = { lightType = 'point', pieceName = 'emit', @@ -24042,7 +24042,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corafus'] = { + corafus = { fusionglow = { lightType = 'point', pieceName = 'emit', @@ -24174,7 +24174,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corafust3'] = { + corafust3 = { fusionglow = { lightType = 'point', pieceName = 'emit', @@ -24194,7 +24194,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armafus'] = { + armafus = { fusionglow = { lightType = 'point', pieceName = 'emit', @@ -24223,7 +24223,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armafust3'] = { + armafust3 = { fusionglow = { lightType = 'point', pieceName = 'emit', @@ -24252,7 +24252,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['resourcecheat'] = { + resourcecheat = { fusionglow = { lightType = 'point', pieceName = 'emit', @@ -24272,7 +24272,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 1}, }, }, - ['armzeus'] = { + armzeus = { eyes = { lightType = 'point', pieceName = 'torso', @@ -24319,7 +24319,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armclaw'] = { + armclaw = { weaponglow = { lightType = 'point', pieceName = 'glow', @@ -24339,7 +24339,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armyork'] = { + armyork = { searchlightsource = { lightType = 'beam', pieceName = 'turret', @@ -24441,7 +24441,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armmanni'] = { + armmanni = { antenna = { lightType = 'point', pieceName = 'sleeve', @@ -24500,7 +24500,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armlatnk'] = { + armlatnk = { lightningweaponglow = { lightType = 'point', pieceName = 'emit_spark', @@ -24597,7 +24597,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armsptk'] = { + armsptk = { eyes = { lightType = 'point', pieceName = 'base', @@ -24653,7 +24653,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsptkt4'] = { + armsptkt4 = { eyes = { lightType = 'point', pieceName = 'base', @@ -24700,7 +24700,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armspid'] = { + armspid = { nanolight = { lightType = 'point', pieceName = 'flare', @@ -24756,7 +24756,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armjeth'] = { + armjeth = { eyes = { lightType = 'point', pieceName = 'torso', @@ -24812,7 +24812,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfboy'] = { + armfboy = { top = { lightType = 'point', pieceName = 'turret', @@ -24904,7 +24904,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfast'] = { + armfast = { top = { lightType = 'point', pieceName = 'head', @@ -24983,7 +24983,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armscab'] = { + armscab = { eyes = { lightType = 'point', pieceName = 'body', @@ -25034,7 +25034,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armmav'] = { + armmav = { eyes = { lightType = 'point', pieceName = 'head', @@ -25111,7 +25111,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armrock'] = { + armrock = { barrel = { lightType = 'point', pieceName = 'lmisspod', @@ -25158,7 +25158,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['coramph'] = { + coramph = { front1 = { lightType = 'point', pieceName = 'torso', @@ -25196,7 +25196,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armamph'] = { + armamph = { top = { lightType = 'point', pieceName = 'pelvis', @@ -25243,7 +25243,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armaak'] = { + armaak = { top = { lightType = 'point', pieceName = 'torso', @@ -25281,7 +25281,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coraak'] = { + coraak = { top = { lightType = 'point', pieceName = 'flakgun', @@ -25310,7 +25310,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corsent'] = { + corsent = { -- top = { -- lightType = 'point', -- pieceName = 'turret', @@ -25339,7 +25339,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armflea'] = { + armflea = { body = { lightType = 'point', pieceName = 'torso', @@ -25368,7 +25368,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corpyro'] = { + corpyro = { flamelight = { lightType = 'point', pieceName = 'lloarm', @@ -25424,7 +25424,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corsumo'] = { + corsumo = { -- eyesl = { -- lightType = 'point', -- pieceName = 'torso', @@ -25681,7 +25681,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, -- }, - ['corsala'] = { + corsala = { teamtopfront = { lightType = 'point', pieceName = 'turret', @@ -25751,7 +25751,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cortermite'] = { + cortermite = { -- eyes = { -- lightType = 'point', -- pieceName = 'head', @@ -25830,7 +25830,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corthermite'] = { + corthermite = { eyes = { lightType = 'point', pieceName = 'head', @@ -25841,7 +25841,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corstorm'] = { + corstorm = { eyes = { lightType = 'point', pieceName = 'pelvis', @@ -25891,7 +25891,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['cormort'] = { + cormort = { eyes = { lightType = 'point', pieceName = 'head', @@ -25956,7 +25956,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corthud'] = { + corthud = { -- eyes = { -- lightType = 'point', -- pieceName = 'torso', @@ -25995,7 +25995,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corsktl'] = { + corsktl = { -- eyes = { -- lightType = 'point', -- pieceName = 'base', @@ -26025,7 +26025,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corroach'] = { + corroach = { -- baseback = { -- lightType = 'point', -- pieceName = 'base', @@ -26072,7 +26072,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legsnapper'] = { + legsnapper = { base = { lightType = 'point', pieceName = 'base', @@ -26092,7 +26092,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legca'] = { + legca = { nanolight = { lightType = 'point', pieceName = 'beam', @@ -26139,7 +26139,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legatrans'] = { + legatrans = { lgThrust = { lightType = 'cone', pieceName = 'leftGroundThrust', @@ -26208,7 +26208,7 @@ local unitLights = { }, }, - ['legcib'] = { + legcib = { eyes = { lightType = 'point', pieceName = 'chassis', @@ -26238,7 +26238,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legmos'] = { + legmos = { eyes = { lightType = 'point', pieceName = 'base', @@ -26276,7 +26276,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legkam'] = { + legkam = { thrustMain = { lightType = 'cone', pieceName = 'thrust', @@ -26305,7 +26305,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legatorpbomber'] = { + legatorpbomber = { thrustrightAJet = { lightType = 'cone', pieceName = 'rightAJet', @@ -26343,7 +26343,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legaheattank'] = { + legaheattank = { gunglow1 = { lightType = 'point', @@ -26364,7 +26364,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legionnaire'] = { + legionnaire = { thruster1 = { lightType = 'point', pieceName = 'base', @@ -26402,7 +26402,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legvenator'] = { + legvenator = { thruster1 = { lightType = 'point', pieceName = 'lthrust', @@ -26423,7 +26423,7 @@ local unitLights = { }, }, - ['legphoenix'] = { + legphoenix = { dish = { lightType = 'point', pieceName = 'base', @@ -26489,7 +26489,7 @@ local unitLights = { }, }, - ['legbastion'] = { + legbastion = { dish = { lightType = 'point', pieceName = 'ambienttop', @@ -26547,7 +26547,7 @@ local unitLights = { }, }, - ['leganavyartyship']={ + leganavyartyship={ exhaustlights = { lightType = 'point', pieceName = 'cell2', @@ -26567,7 +26567,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['leganavyflagship'] = { + leganavyflagship = { bigtoroid = { lightType = 'point', pieceName = 'torus1', @@ -26671,7 +26671,7 @@ local unitLights = { -- modelfactor = 0, specular = 1, scattering = 2, lensflare = 0, -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, - ['legbart'] = { + legbart = { cannisterlight = { lightType = 'point', pieceName = 'cannisterFlare', @@ -26682,7 +26682,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['leginf'] = { + leginf = { cannisterlightl = { lightType = 'point', pieceName = 'leftCannisterLight', @@ -26738,7 +26738,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legeheatraymech'] = { + legeheatraymech = { bigtoroid = { lightType = 'point', pieceName = 'torso', @@ -26917,7 +26917,7 @@ local unitLights = { }, - ['legeheatraymech_old'] = { + legeheatraymech_old = { bigtoroid = { lightType = 'point', pieceName = 'bigToroidLight', @@ -26968,7 +26968,7 @@ local unitLights = { }, - ['legehovertank'] = { + legehovertank = { bigtoroid = { lightType = 'point', pieceName = 'outter_ring', @@ -27008,7 +27008,7 @@ local unitLights = { }, - ['armvader'] = { + armvader = { -- redlight = { -- lightType = 'point', -- pieceName = 'body', @@ -27047,7 +27047,7 @@ local unitLights = { -- }, }, - ['armthor'] = { + armthor = { searchlight = { lightType = 'cone', pieceName = 'base', @@ -27196,7 +27196,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armthundt4'] = { + armthundt4 = { tipleft = { lightType = 'point', pieceName = 'blinka', @@ -27333,7 +27333,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsnipe'] = { + armsnipe = { -- headreddot = { -- lightType = 'cone', -- pieceName = 'head', @@ -27407,7 +27407,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corvamp'] = { + corvamp = { thruster1 = { lightType = 'point', pieceName = 'base', @@ -27445,7 +27445,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corveng'] = { + corveng = { eyes1 = { lightType = 'point', pieceName = 'base', @@ -27510,7 +27510,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corseah'] = { + corseah = { eyesfront = { lightType = 'beam', pieceName = 'base', @@ -27623,7 +27623,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcrwt4'] = { + corcrwt4 = { eyes1 = { lightType = 'point', pieceName = 'base', @@ -27760,7 +27760,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcrw'] = { + corcrw = { eyes1 = { lightType = 'point', pieceName = 'base', @@ -27897,7 +27897,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcrwh'] = { + corcrwh = { flamelight = { lightType = 'point', pieceName = 'sleevef', @@ -28184,7 +28184,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armwin'] = { + armwin = { light1 = { lightType = 'point', pieceName = 'emit', @@ -28213,7 +28213,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armwint2'] = { + armwint2 = { light = { lightType = 'point', pieceName = 'base', @@ -28224,7 +28224,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corwin'] = { + corwin = { antennalight = { lightType = 'point', pieceName = 'cradle', @@ -28253,7 +28253,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corestor'] = { + corestor = { top = { lightType = 'point', pieceName = 'emit', @@ -28378,7 +28378,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['coruwfus'] = { + coruwfus = { light = { lightType = 'point', pieceName = 'emit', @@ -28389,7 +28389,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coruwmmm'] = { + coruwmmm = { botright = { lightType = 'beam', pieceName = 'emit', @@ -28508,7 +28508,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['coruwmme'] = { + coruwmme = { metalglowtop = { lightType = 'point', pieceName = 'emit', @@ -28528,7 +28528,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coruwes'] = { + coruwes = { light = { lightType = 'point', pieceName = 'emit', @@ -28539,7 +28539,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coruwadves'] = { + coruwadves = { light = { lightType = 'point', pieceName = 'emit', @@ -28590,7 +28590,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armestor'] = { + armestor = { top = { lightType = 'point', pieceName = 'emit', @@ -28686,7 +28686,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armmstor'] = { + armmstor = { mid = { lightType = 'point', pieceName = 'base', @@ -28706,7 +28706,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['cormstor'] = { + cormstor = { mid = { lightType = 'point', pieceName = 'base', @@ -28726,7 +28726,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armuwmex'] = { + armuwmex = { light = { lightType = 'point', pieceName = 'spinner', @@ -28737,7 +28737,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armuwes'] = { + armuwes = { light = { lightType = 'point', pieceName = 'emit', @@ -28784,7 +28784,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armuwadves'] = { + armuwadves = { light1 = { lightType = 'point', pieceName = 'emit1', @@ -28918,7 +28918,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armbrtha'] = { + armbrtha = { base1 = { lightType = 'point', pieceName = 'base', @@ -29150,7 +29150,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armgmm'] = { + armgmm = { -- light = { -- lightType = 'point', -- pieceName = 'base', @@ -29317,7 +29317,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corbhmth'] = { + corbhmth = { corner1 = { lightType = 'point', pieceName = 'base', @@ -29404,7 +29404,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corgeo'] = { + corgeo = { --top1 = { -- lightType = 'point', -- pieceName = 'base', @@ -29460,7 +29460,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coruwgeo'] = { + coruwgeo = { chimney = { lightType = 'point', pieceName = 'base', @@ -29498,7 +29498,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corageo'] = { + corageo = { chimney = { lightType = 'point', pieceName = 'base', @@ -29563,7 +29563,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coruwageo'] = { + coruwageo = { chimney = { lightType = 'point', pieceName = 'base', @@ -29628,7 +29628,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armgeo'] = { + armgeo = { top1 = { lightType = 'point', pieceName = 'base', @@ -29787,7 +29787,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armgeo'] = { + armgeo = { top1 = { lightType = 'point', pieceName = 'base', @@ -29947,7 +29947,7 @@ local unitLights = { }, }, - ['armuwgeo'] = { + armuwgeo = { top1 = { lightType = 'point', pieceName = 'base', @@ -30050,7 +30050,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['legestor'] = { + legestor = { rturbb = { lightType = 'point', pieceName = 'base', @@ -30061,7 +30061,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['leggeo'] = { + leggeo = { turb1 = { lightType = 'point', pieceName = 'turbine', @@ -30072,7 +30072,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['leguwgeo'] = { + leguwgeo = { enabled1 = { lightType = 'point', pieceName = 'turbine', @@ -30092,7 +30092,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legageo'] = { + legageo = { aturbf = { lightType = 'point', pieceName = 'turbinef', @@ -30121,7 +30121,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legrampart'] = { + legrampart = { rturbb = { lightType = 'point', pieceName = 'turbinef', @@ -30177,7 +30177,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armageo'] = { + armageo = { --light = { -- lightType = 'point', -- pieceName = 'base', @@ -30356,7 +30356,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armuwageo'] = { + armuwageo = { --light = { -- lightType = 'point', -- pieceName = 'base', @@ -30535,7 +30535,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armuwmme'] = { + armuwmme = { base1 = { lightType = 'point', pieceName = 'base', @@ -30627,7 +30627,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armmoho'] = { + armmoho = { base1 = { lightType = 'point', pieceName = 'base', @@ -30719,7 +30719,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armshockwave'] = { + armshockwave = { base1 = { lightType = 'point', pieceName = 'base', @@ -30811,7 +30811,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0 }, }, }, - ['corsolar'] = { + corsolar = { light_small_1 = { lightType = 'point', pieceName = 'base', @@ -30967,7 +30967,7 @@ local unitLights = { }, }, - ['armmex'] = { + armmex = { base = { lightType = 'point', pieceName = 'base', @@ -31032,7 +31032,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 2}, }, }, - ['armsolar'] = { + armsolar = { light = { lightType = 'point', pieceName = 'emit', @@ -31043,7 +31043,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armadvsol'] = { + armadvsol = { side1cone = { lightType = 'cone', pieceName = 'base', @@ -31101,7 +31101,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['cormex'] = { + cormex = { base = { lightType = 'point', pieceName = 'base', @@ -31157,7 +31157,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corexp'] = { + corexp = { base = { lightType = 'point', pieceName = 'base', @@ -31213,7 +31213,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormoho'] = { + cormoho = { side1 = { lightType = 'point', pieceName = 'column', @@ -31242,7 +31242,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coradvsol'] = { + coradvsol = { glow = { lightType = 'point', pieceName = 'emit', @@ -31254,7 +31254,7 @@ local unitLights = { }, }, - ['legadvsol'] = { + legadvsol = { glow1 = { lightType = 'point', pieceName = 'base', @@ -31285,7 +31285,7 @@ local unitLights = { }, - ['cormakr'] = { + cormakr = { side1cone = { lightType = 'cone', pieceName = 'light', @@ -31336,7 +31336,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corfmkr'] = { + corfmkr = { enabled1 = { lightType = 'point', pieceName = 'light', @@ -31423,7 +31423,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armuwmmm'] = { + armuwmmm = { -- light1 = { -- lightType = 'point', -- pieceName = 'light1', @@ -31546,7 +31546,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armmakr'] = { + armmakr = { side1cone = { lightType = 'cone', pieceName = 'light', @@ -31595,7 +31595,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['armfmkr'] = { + armfmkr = { enabled1 = { lightType = 'point', pieceName = 'light', @@ -31624,7 +31624,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormmkr'] = { + cormmkr = { enabled_top = { lightType = 'point', pieceName = 'light', @@ -31662,7 +31662,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armmmkr'] = { + armmmkr = { -- enabled_cone1x = { -- lightType = 'cone', -- pieceName = 'light', @@ -31721,7 +31721,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['lootboxbronze'] = { + lootboxbronze = { blinka = { lightType = 'point', pieceName = 'blinka', @@ -31777,7 +31777,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['lootboxsilver'] = { + lootboxsilver = { blinka = { lightType = 'point', pieceName = 'blinka', @@ -31833,7 +31833,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['lootboxgold'] = { + lootboxgold = { blinka = { lightType = 'point', pieceName = 'blinka', @@ -31889,7 +31889,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['lootboxplatinum'] = { + lootboxplatinum = { blinka = { lightType = 'point', pieceName = 'blinka', @@ -31945,7 +31945,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['lootboxsilver'] = { + lootboxsilver = { blinka = { lightType = 'point', pieceName = 'blinka', @@ -32001,7 +32001,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['scavbeacon_t1'] = { + scavbeacon_t1 = { blinka = { lightType = 'point', pieceName = 'blink1', @@ -32066,7 +32066,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['scavbeacon_t2'] = { + scavbeacon_t2 = { blinka = { lightType = 'point', pieceName = 'blink1', @@ -32131,7 +32131,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['scavbeacon_t3'] = { + scavbeacon_t3 = { blinka = { lightType = 'point', pieceName = 'blink1', @@ -32196,7 +32196,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['scavbeacon_t4'] = { + scavbeacon_t4 = { blinka = { lightType = 'point', pieceName = 'blink1', @@ -32261,7 +32261,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsilo'] = { + armsilo = { top1 = { lightType = 'point', pieceName = 'base', @@ -32407,7 +32407,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 4}, }, }, - ['corsilo'] = { + corsilo = { top1 = { lightType = 'point', pieceName = 'base', @@ -32517,7 +32517,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legsilo'] = { + legsilo = { launchlight1 = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit1', @@ -32546,7 +32546,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corint'] = { + corint = { teamflashr = { lightType = 'point', pieceName = 'turret', @@ -32594,7 +32594,7 @@ local unitLights = { -- lifetime = 300, sustain = 1, selfshadowing = 0}, -- }, }, - ['corgplat'] = { + corgplat = { eyes = { lightType = 'point', pieceName = 'base', @@ -32605,7 +32605,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corfhlt'] = { + corfhlt = { eyes = { lightType = 'point', pieceName = 'turret1', @@ -32625,7 +32625,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corcv'] = { + corcv = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -32681,7 +32681,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legcv'] = { + legcv = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -32701,7 +32701,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, } }, - ['legacv']={ + legacv={ buildlight1 = { --top spinning light lightType = 'cone', pieceName = 'conLightA', @@ -32739,7 +32739,7 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, }, }, - ['legavantinuke']={ + legavantinuke={ cannisterlightambient = { lightType = 'point', pieceName = 'base', @@ -32804,7 +32804,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legnavyconship']={ + legnavyconship={ nanolight1 = { lightType = 'point', pieceName = 'nanoFlare', @@ -32852,7 +32852,7 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, }, }, - ['legnavyrezsub']={ + legnavyrezsub={ nanolight1 = { lightType = 'point', pieceName = 'nanoFlare', @@ -32872,7 +32872,7 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, }, }, - ['leganavyengineer']={ + leganavyengineer={ --spin lights buildlight1a = { --top spinning light lightType = 'cone', @@ -32929,7 +32929,7 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, }, }, - ['leganavyconsub']={ + leganavyconsub={ --spin lights buildlight1a = { --top spinning light lightType = 'cone', @@ -32986,7 +32986,7 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, }, }, - ['legnavyaaship']={ + legnavyaaship={ greenblobA = { lightType = 'point', pieceName = 'dishA', @@ -33006,7 +33006,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legaca']={ + legaca={ nanolight1 = { lightType = 'point', pieceName = 'nanoFlare1', @@ -33044,7 +33044,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legwhisper']={ + legwhisper={ airjet1 = { lightType = 'cone', pieceName = 'bigAirJet1', @@ -33146,7 +33146,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legafigdef']={ + legafigdef={ airjet1 = { lightType = 'cone', pieceName = 'leftAirjet', @@ -33175,7 +33175,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legrezbot']={ + legrezbot={ buildlight1 = { --top spinning light lightType = 'cone', pieceName = 'buildLightFlareLeft', @@ -33232,7 +33232,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legamphlab']={ + legamphlab={ buildlight1 = { --top spinning light lightType = 'cone', pieceName = 'buildFlare1', @@ -33364,7 +33364,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['leggant']={ + leggant={ nanolight1 = { lightType = 'point', pieceName = 'nanofr', @@ -33495,7 +33495,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legch'] = { + legch = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -33515,7 +33515,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, } }, - ['armraz'] = { + armraz = { searchlightl = { lightType = 'cone', pieceName = 'torso', @@ -33772,7 +33772,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0 }, -- }, }, - ['armmar'] = { + armmar = { foot1 = { lightType = 'point', pieceName = 'rfoot', @@ -34009,7 +34009,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armamb'] = { + armamb = { -- sleeve1beam = { --needs BOS update to show/hide part - light shines through closed version -- lightType = 'beam', -- pieceName = 'turret', @@ -34040,7 +34040,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armguard'] = { + armguard = { base1 = { lightType = 'point', pieceName = 'head', @@ -34154,7 +34154,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corpun'] = { + corpun = { -- base1 = { -- lightType = 'point', -- pieceName = 'head', @@ -34243,7 +34243,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corbuzz'] = { + corbuzz = { base1 = { lightType = 'point', pieceName = 'base', @@ -34398,7 +34398,7 @@ local unitLights = { -- }, }, - ['corcat'] = { + corcat = { eyes = { lightType = 'point', pieceName = 'head', @@ -34520,7 +34520,7 @@ local unitLights = { }, }, - ['corshiva'] = { + corshiva = { eyes = { lightType = 'beam', pieceName = 'torso', @@ -34606,7 +34606,7 @@ local unitLights = { }, }, - ['cordoom'] = { + cordoom = { -- searchlightmaintop = { -- lightType = 'cone', -- pieceName = 'mainbarrel', @@ -34743,7 +34743,7 @@ local unitLights = { }, - ['corfdoom'] = { + corfdoom = { searchlightyellow = { lightType = 'cone', pieceName = 'barrelb', @@ -34802,7 +34802,7 @@ local unitLights = { }, - ['cordemon'] = { + cordemon = { eyes = { lightType = 'beam', pieceName = 'head', @@ -34926,7 +34926,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['coracv'] = { + coracv = { buildlight1 = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -35048,7 +35048,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corgol'] = { + corgol = { base1 = { lightType = 'point', pieceName = 'base', @@ -35252,7 +35252,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corgolt4'] = { + corgolt4 = { base1 = { lightType = 'point', pieceName = 'base', @@ -35308,7 +35308,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormabm'] = { + cormabm = { orangelightcenter = { lightType = 'point', pieceName = 'orangelight', @@ -35526,7 +35526,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corgarp'] = { + corgarp = { eyes1 = { lightType = 'point', pieceName = 'base', @@ -35537,7 +35537,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corlevlr'] = { + corlevlr = { headlight = { -- this is the lightname lightType = 'cone', pieceName = 'base', -- invalid ones will attach to the worldpos of the unit @@ -35673,7 +35673,7 @@ local unitLights = { -- lifetime = 0, sustain = 0, selfshadowing = 0}, -- }, }, - ['corraid'] = { + corraid = { headlight = { -- this is the lightname lightType = 'cone', pieceName = 'justattachtobase', -- invalid ones will attach to the worldpos of the unit @@ -35711,7 +35711,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corwolv'] = { + corwolv = { headlight = { -- this is the lightname lightType = 'cone', pieceName = 'base', -- invalid ones will attach to the worldpos of the unit @@ -35749,7 +35749,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormlv'] = { + cormlv = { nanolight = { lightType = 'point', pieceName = 'flare', @@ -35850,7 +35850,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legmlv'] = { + legmlv = { eyes1 = { lightType = 'point', pieceName = 'base', @@ -35870,7 +35870,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legrwall'] = { + legrwall = { eye1 = { lightType = 'point', pieceName = 'base', @@ -35917,7 +35917,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legjav'] = { + legjav = { eye1 = { lightType = 'point', pieceName = 'torso', @@ -35964,7 +35964,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legbunk'] = { + legbunk = { searchlight = { lightType = 'cone', pieceName = 'torch', @@ -35975,7 +35975,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, } }, - ['legkark'] = { + legkark = { eye1 = { lightType = 'point', pieceName = 'armortorso', @@ -36031,7 +36031,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormuskrat'] = { + cormuskrat = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -36114,7 +36114,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legotter'] = { + legotter = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -36161,7 +36161,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormist'] = { + cormist = { -- eyes1 = { -- lightType = 'point', -- pieceName = 'base', @@ -36210,7 +36210,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armbeaver'] = { + armbeaver = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -36275,7 +36275,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armch'] = { + armch = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -36358,7 +36358,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corhal'] = { + corhal = { back1 = { lightType = 'point', pieceName = 'base', @@ -36434,7 +36434,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corsh'] = { + corsh = { thruster = { lightType = 'point', pieceName = 'base', @@ -36445,7 +36445,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corch'] = { + corch = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -36519,7 +36519,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corsnap'] = { + corsnap = { lightfront = { lightType = 'beam', pieceName = 'base', @@ -36540,7 +36540,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corsh'] = { + corsh = { lightfront = { lightType = 'beam', pieceName = 'base', @@ -36570,7 +36570,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['cormh'] = { + cormh = { lightfront1 = { lightType = 'beam', pieceName = 'base', @@ -36637,7 +36637,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armah'] = { + armah = { eyes = { lightType = 'point', pieceName = 'base', @@ -36675,7 +36675,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armanac'] = { + armanac = { front = { lightType = 'point', pieceName = 'base', @@ -36758,7 +36758,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armmh'] = { + armmh = { eyes = { lightType = 'point', pieceName = 'base', @@ -36814,7 +36814,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armsh'] = { + armsh = { searchlight = { -- this is the lightname lightType = 'cone', pieceName = 'base', -- invalid ones will attach to the worldpos of the unit @@ -36843,7 +36843,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armlun'] = { + armlun = { searchlight = { lightType = 'cone', pieceName = 'base', @@ -36899,7 +36899,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corah'] = { + corah = { eyes = { lightType = 'point', pieceName = 'base', @@ -36928,7 +36928,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corsok'] = { + corsok = { lightfront1 = { lightType = 'beam', pieceName = 'base', @@ -37079,7 +37079,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armcv'] = { + armcv = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -37144,7 +37144,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armacv'] = { + armacv = { buildflash1 = { lightType = 'point', pieceName = 'ldoor', @@ -37218,7 +37218,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corck'] = { + corck = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -37292,7 +37292,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legck'] = { + legck = { buildlight = { -- this is the lightname lightType = 'cone', pieceName = 'cagelight_emit', @@ -37348,7 +37348,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legaceb'] = { + legaceb = { tankglow = { lightType = 'point', pieceName = 'torso', @@ -37386,7 +37386,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legrail'] = { + legrail = { eye1 = { lightType = 'point', pieceName = 'base', @@ -37470,7 +37470,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legsrail'] = { + legsrail = { eye1 = { lightType = 'point', pieceName = 'pelvis', @@ -37517,7 +37517,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legsrailt4'] = { + legsrailt4 = { eye1 = { lightType = 'point', pieceName = 'pelvis', @@ -37564,7 +37564,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legelrpcmech'] = { + legelrpcmech = { chassislight1 = { lightType = 'point', pieceName = 'chassisLightLeft', @@ -37602,7 +37602,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legstarfall'] = { + legstarfall = { --other glows otherglow1 = { lightType = 'point', @@ -37650,7 +37650,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 1}, }, }, - ['legministarfall'] = { + legministarfall = { --other glows otherglow1 = { lightType = 'point', @@ -37698,7 +37698,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 1}, }, }, - ['armgate'] = { + armgate = { shieldglow = { lightType = 'point', pieceName = 'base', @@ -37737,7 +37737,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['armfgate'] = { + armfgate = { shieldglow = { lightType = 'point', pieceName = 'base', @@ -37748,7 +37748,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 5}, }, }, - ['armgatet3'] = { + armgatet3 = { shieldglow = { lightType = 'point', pieceName = 'base', @@ -37786,7 +37786,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['leggatet3'] = { + leggatet3 = { shieldglow = { lightType = 'point', pieceName = 'base', @@ -37824,7 +37824,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['corgate'] = { + corgate = { -- shieldglowold = { -- lightType = 'point', -- pieceName = 'base', @@ -37844,7 +37844,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 4}, }, }, - ['corgatet3'] = { + corgatet3 = { shieldglow = { lightType = 'point', pieceName = 'base', @@ -37855,7 +37855,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legdeflector'] = { + legdeflector = { shieldglow = { lightType = 'point', pieceName = 'shieldFlare', @@ -37866,7 +37866,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legrad'] = { + legrad = { greenblobA = { lightType = 'point', pieceName = 'dishA', @@ -37886,7 +37886,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legjam'] = { + legjam = { cloaklightred = { lightType = 'point', pieceName = 'strut', @@ -37897,7 +37897,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['leginc'] = { + leginc = { bigheatray = { lightType = 'point', pieceName = 'flare', @@ -37908,7 +37908,7 @@ local unitLights = { lifetime = 0, sustain = 0, selfshadowing = 0}, }, }, - ['legrl'] = { + legrl = { searchlight = { lightType = 'cone', pieceName = 'barrel', @@ -37922,21 +37922,21 @@ local unitLights = { } -unitLights['armtorps'] = unitLights['armmls'] +unitLights.armtorps = unitLights.armmls --unitLights['coruwgeo'] = unitLights['corgeo'] --unitLights['coruwageo'] = unitLights['corageo'] --unitLights['armuwgeo'] = unitLights['armgeo'] --unitLights['armuwageo'] = unitLights['armageo'] -unitLights['armshltxuw'] = unitLights['armshltx'] -unitLights['corgantuw'] = unitLights['corgant'] -unitLights['armdecom'] = unitLights['armcom'] -unitLights['cordecom'] = unitLights['corcom'] -unitLights['armcomcon'] = unitLights['armcom'] -unitLights['corcomcon'] = unitLights['corcom'] -unitLights['armdf'] = table.copy(unitLights['armfus']) -unitLights['armuwfus'] = table.copy(unitLights['armfus']) -unitLights['armckfus'] = table.copy(unitLights['armfus']) -unitLights['legdecom'] = unitLights['legcom'] +unitLights.armshltxuw = unitLights.armshltx +unitLights.corgantuw = unitLights.corgant +unitLights.armdecom = unitLights.armcom +unitLights.cordecom = unitLights.corcom +unitLights.armcomcon = unitLights.armcom +unitLights.corcomcon = unitLights.corcom +unitLights.armdf = table.copy(unitLights.armfus ) +unitLights.armuwfus = table.copy(unitLights.armfus ) +unitLights.armckfus = table.copy(unitLights.armfus ) +unitLights.legdecom = unitLights.legcom local unitEventLightsNames = { ------------------------------------ Put lights that are slaved to ProjectileCreated here! --------------------------------- @@ -37972,7 +37972,7 @@ local unitEventLightsNames = { --corint disabled for now since it has static positioning - now only 'working' when shooting to east: UnitScriptLights = { - ['armcom'] = { + armcom = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'lflare', @@ -37986,7 +37986,7 @@ local unitEventLightsNames = { }, }, - ['armdecom'] = { + armdecom = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'lflare', @@ -38000,7 +38000,7 @@ local unitEventLightsNames = { }, }, - ['corcom'] = { + corcom = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'biggun', @@ -38014,7 +38014,7 @@ local unitEventLightsNames = { }, }, - ['cordecom'] = { + cordecom = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'biggun', @@ -38028,7 +38028,7 @@ local unitEventLightsNames = { }, }, - ['legheavydrone'] = { + legheavydrone = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'flare', @@ -38042,7 +38042,7 @@ local unitEventLightsNames = { }, }, - ['leghelios'] = { + leghelios = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'turret', @@ -38056,7 +38056,7 @@ local unitEventLightsNames = { }, }, - ['legkark'] = { + legkark = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'rflare', @@ -38070,7 +38070,7 @@ local unitEventLightsNames = { }, }, - ['legcom'] = { + legcom = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'flare', @@ -38105,7 +38105,7 @@ local unitEventLightsNames = { lifetime = 200, sustain = 2}, }, }, - ['legjav'] = { + legjav = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'lbarrel', @@ -38130,7 +38130,7 @@ local unitEventLightsNames = { }, }, - ['legrwall'] = { + legrwall = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'rgbarrel', @@ -38144,7 +38144,7 @@ local unitEventLightsNames = { }, }, - ['corint'] = { + corint = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'light', @@ -38169,7 +38169,7 @@ local unitEventLightsNames = { }, }, - ['armbrtha'] = { + armbrtha = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'barrel', @@ -38205,7 +38205,7 @@ local unitEventLightsNames = { }, }, - ['legaheattank'] = { + legaheattank = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'gun', @@ -38229,7 +38229,7 @@ local unitEventLightsNames = { lifetime = 80, sustain = 5}, }, }, - ['legelrpcmech'] = { + legelrpcmech = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'rightTopFlare', @@ -38364,7 +38364,7 @@ local unitEventLightsNames = { }, }, - ['leganavyartyship'] = { + leganavyartyship = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'rightTopFlare1', @@ -38489,7 +38489,7 @@ local unitEventLightsNames = { }, }, - ['leglrpc'] = { + leglrpc = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'barrelA', @@ -38613,7 +38613,7 @@ local unitEventLightsNames = { }, }, - ['legstarfall'] = { + legstarfall = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'flare1', @@ -38840,7 +38840,7 @@ local unitEventLightsNames = { }, - ['legministarfall'] = { + legministarfall = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'flare1', @@ -39032,7 +39032,7 @@ local unitEventLightsNames = { }, }, - ['leglraa'] = { + leglraa = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'flare', @@ -39068,7 +39068,7 @@ local unitEventLightsNames = { }, }, - ['armvulc'] = { + armvulc = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'barrel01', @@ -39119,7 +39119,7 @@ local unitEventLightsNames = { }, }, - ['armsnipe'] = { + armsnipe = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'barrel2', @@ -39133,7 +39133,7 @@ local unitEventLightsNames = { }, }, - ['legrail'] = { + legrail = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'beam', pieceName = 'flare', @@ -39160,7 +39160,7 @@ local unitEventLightsNames = { }, }, - ['legsrail'] = { + legsrail = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'flare1', @@ -39185,7 +39185,7 @@ local unitEventLightsNames = { }, }, - ['legsrailt4'] = { + legsrailt4 = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'beam', pieceName = 'flare1', @@ -39210,7 +39210,7 @@ local unitEventLightsNames = { }, }, - ['legerailtank'] = { + legerailtank = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'rightFlare', @@ -39246,7 +39246,7 @@ local unitEventLightsNames = { }, }, - ['legphoenix'] = { + legphoenix = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'ringlight', @@ -39260,7 +39260,7 @@ local unitEventLightsNames = { }, }, - ['legbastion'] = { + legbastion = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'lightpoint', @@ -39274,7 +39274,7 @@ local unitEventLightsNames = { }, }, - ['leganavyflagship'] = { + leganavyflagship = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'torus3', @@ -39288,7 +39288,7 @@ local unitEventLightsNames = { }, }, - ['legeheatraymech'] = { + legeheatraymech = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'rightToroidLight', @@ -39312,7 +39312,7 @@ local unitEventLightsNames = { lifetime = 200, sustain = 15, selfshadowing = 0}, }, }, - ['legeheatraymech_old'] = { + legeheatraymech_old = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'rightToroidLight', @@ -39338,7 +39338,7 @@ local unitEventLightsNames = { }, - ['cordemon'] = { + cordemon = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'lfbarrel2', @@ -39363,7 +39363,7 @@ local unitEventLightsNames = { }, }, - ['corthermite'] = { + corthermite = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'barrel1', @@ -39400,7 +39400,7 @@ local unitEventLightsNames = { }, - ['corsiegebreaker'] = { + corsiegebreaker = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'barrel_glow', @@ -39427,7 +39427,7 @@ local unitEventLightsNames = { }, - ['corsok'] = { + corsok = { [1] = { lightType = 'point', pieceName = 'flare1', @@ -39455,7 +39455,7 @@ local unitEventLightsNames = { }, }, - ['armraz'] = { + armraz = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'lcannon', @@ -39524,7 +39524,7 @@ local unitEventLightsNames = { }, }, - ['corcat'] = { + corcat = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'lturret', @@ -39571,7 +39571,7 @@ local unitEventLightsNames = { }, }, - ['armanni'] = { + armanni = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'barrel', @@ -39584,7 +39584,7 @@ local unitEventLightsNames = { lifetime = 200, sustain = 10}, }, }, - [UnitDefNames['armexcalibur'].id] = { + [UnitDefNames.armexcalibur .id] = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'barrel', @@ -39598,7 +39598,7 @@ local unitEventLightsNames = { }, }, - ['corsilo'] = { + corsilo = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'base', @@ -39624,7 +39624,7 @@ local unitEventLightsNames = { }, }, - ['legsilo'] = { + legsilo = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'base', @@ -39650,7 +39650,7 @@ local unitEventLightsNames = { }, }, - ['armsilo'] = { + armsilo = { [1] = { --lightIndex as above, MUST BE AN INTEGER, Give it a nice name in a comment, lightType = 'point', pieceName = 'base', @@ -39682,7 +39682,7 @@ local unitEventLightsNames = { ------------------------------- Put additional lights tied to events here! -------------------------------- UnitIdle = { - ['armcom'] = { + armcom = { idleBlink = { lightType = 'point', pieceName = 'head', @@ -39693,7 +39693,7 @@ local unitEventLightsNames = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['corcom'] = { + corcom = { idleBlink = { lightType = 'point', pieceName = 'head', @@ -39704,7 +39704,7 @@ local unitEventLightsNames = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['legcom'] = { + legcom = { idleBlink = { lightType = 'point', pieceName = 'head', @@ -39715,7 +39715,7 @@ local unitEventLightsNames = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['armck'] = { + armck = { idleBlink = { lightType = 'point', pieceName = 'base', @@ -39728,7 +39728,7 @@ local unitEventLightsNames = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['armcv'] = { + armcv = { idleBlink = { lightType = 'point', pieceName = 'base', @@ -39740,7 +39740,7 @@ local unitEventLightsNames = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['armbeaver'] = { + armbeaver = { idleBlink = { lightType = 'point', pieceName = 'base', @@ -39752,7 +39752,7 @@ local unitEventLightsNames = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['armca'] = { + armca = { idleBlink = { lightType = 'point', pieceName = 'base', @@ -39764,7 +39764,7 @@ local unitEventLightsNames = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['armcsa'] = { + armcsa = { idleBlink = { lightType = 'point', pieceName = 'base', @@ -39776,7 +39776,7 @@ local unitEventLightsNames = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['armcs'] = { + armcs = { idleBlink = { lightType = 'point', pieceName = 'base', @@ -39806,7 +39806,7 @@ local unitEventLightsNames = { }, }, - ['armacsub'] = { + armacsub = { idleBlink = { lightType = 'point', pieceName = 'base', @@ -39817,7 +39817,7 @@ local unitEventLightsNames = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['armch'] = { + armch = { idleBlink = { lightType = 'point', pieceName = 'base', @@ -39837,7 +39837,7 @@ local unitEventLightsNames = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['armack'] = { + armack = { idleBlink = { lightType = 'point', pieceName = 'base', @@ -39848,7 +39848,7 @@ local unitEventLightsNames = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['armacv'] = { + armacv = { idleBlink = { lightType = 'point', pieceName = 'base', @@ -39859,7 +39859,7 @@ local unitEventLightsNames = { lifetime = 12, sustain = 0, selfshadowing = 0}, }, }, - ['armaca'] = { + armaca = { idleBlink = { lightType = 'point', pieceName = 'base', @@ -39916,7 +39916,7 @@ local unitEventLightsNames = { }, UnitCloaked = { - ['armcom'] = { + armcom = { cloakBlink = { lightType = 'point', pieceName = 'head', @@ -39951,7 +39951,7 @@ local unitEventLightsNames = { }, UnitDecloaked = { - ['armcom'] = { + armcom = { cloakBlink = { lightType = 'point', pieceName = 'head', @@ -39977,7 +39977,7 @@ local unitEventLightsNames = { }, StockpileChanged = { - ['legmos'] = { + legmos = { cloakBlink = { lightType = 'point', pieceName = 'base', @@ -40065,35 +40065,35 @@ local unitEventLightsNames = { local armComTable = {'armcomlvl2', 'armcomlvl4', 'armcomlvl5', 'armcomlvl6', 'armcomlvl7', 'armcomlvl8', 'armcomlvl9', 'armcomlvl10'} for _, name in pairs(armComTable) do if name == 'armcomlvl2' then - unitLights[name] = table.copy(unitLights['armcom']) + unitLights[name] = table.copy(unitLights.armcom ) else - unitLights[name] = table.copy(unitLights['armcomlvl3']) + unitLights[name] = table.copy(unitLights.armcomlvl3 ) end - unitEventLightsNames.UnitDecloaked[name] = table.copy(unitEventLightsNames.UnitDecloaked['armcom']) - unitEventLightsNames.UnitIdle[name] = table.copy(unitEventLightsNames.UnitIdle['armcom']) - unitEventLightsNames.UnitScriptLights[name] = table.copy(unitEventLightsNames.UnitScriptLights['armcom']) + unitEventLightsNames.UnitDecloaked[name] = table.copy(unitEventLightsNames.UnitDecloaked.armcom ) + unitEventLightsNames.UnitIdle[name] = table.copy(unitEventLightsNames.UnitIdle.armcom ) + unitEventLightsNames.UnitScriptLights[name] = table.copy(unitEventLightsNames.UnitScriptLights.armcom ) end --duplicate lights from corcom for Cortex Evocom local corComTable = {'corcomlvl2', 'corcomlvl3', 'corcomlvl4', 'corcomlvl5', 'corcomlvl6', 'corcomlvl7', 'corcomlvl8', 'corcomlvl9', 'corcomlvl10'} for _, name in pairs(corComTable) do - unitLights[name] = table.copy(unitLights['corcom']) - unitEventLightsNames.UnitIdle[name] = table.copy(unitEventLightsNames.UnitIdle['corcom']) - unitEventLightsNames.UnitScriptLights[name] = table.copy(unitEventLightsNames.UnitScriptLights['corcom']) + unitLights[name] = table.copy(unitLights.corcom ) + unitEventLightsNames.UnitIdle[name] = table.copy(unitEventLightsNames.UnitIdle.corcom ) + unitEventLightsNames.UnitScriptLights[name] = table.copy(unitEventLightsNames.UnitScriptLights.corcom ) end --duplicate lights from legcom for Legion Evocom local legComTable = {'legcomlvl2', 'legcomlvl3', 'legcomlvl4', 'legcomlvl5', 'legcomlvl6', 'legcomlvl7', 'legcomlvl8', 'legcomlvl9', 'legcomlvl10', 'legdecomlvl3', 'legdecomlvl6', 'legdecomlvl10'} for _, name in pairs(legComTable) do - unitLights[name] = table.copy(unitLights['legcom']) - unitEventLightsNames.UnitIdle[name] = table.copy(unitEventLightsNames.UnitIdle['legcom']) - unitEventLightsNames.UnitScriptLights[name] = table.copy(unitEventLightsNames.UnitScriptLights['legcom']) + unitLights[name] = table.copy(unitLights.legcom ) + unitEventLightsNames.UnitIdle[name] = table.copy(unitEventLightsNames.UnitIdle.legcom ) + unitEventLightsNames.UnitScriptLights[name] = table.copy(unitEventLightsNames.UnitScriptLights.legcom ) end --duplicate lights from scavengerbossv4_normal for all scavengerbossv4 variants local scavengerBossV4Table = {'scavengerbossv4_veryeasy', 'scavengerbossv4_easy', 'scavengerbossv4_hard', 'scavengerbossv4_veryhard', 'scavengerbossv4_epic'} for _, name in pairs(scavengerBossV4Table) do - unitLights[name] = table.copy(unitLights['scavengerbossv4_normal']) + unitLights[name] = table.copy(unitLights.scavengerbossv4_normal ) end --AND THE REST @@ -40312,7 +40312,7 @@ local xmaslightbase = { -- White Fire Remake 1.3 -- Ice Scream v2.5.1 -- add colorful xmas lights to a percentage of certain snowy trees -if Spring.Utilities.Gametype.GetCurrentHolidays()["xmas"] then --and os.date("%d") <= "26" +if Spring.Utilities.Gametype.GetCurrentHolidays().xmas then --and os.date("%d") <= "26" local snowy_tree_keys = {allpinesb_ad0 = 60, __tree_fir_tall_3 = 60, __tree_fir_ = 60} local xmasColors = { [1] = {234,13,13}, -- red diff --git a/luaui/configs/DistortionGL4Config.lua b/luaui/configs/DistortionGL4Config.lua index e2d4c87f128..c80d1c5fbf7 100644 --- a/luaui/configs/DistortionGL4Config.lua +++ b/luaui/configs/DistortionGL4Config.lua @@ -41,7 +41,7 @@ local unitDistortions = { -- }, -- }, - ['armcom'] = { + armcom = { distortion = { distortionType = 'point', pieceName = 'biggun', @@ -51,7 +51,7 @@ local unitDistortions = { effectType = 0}, }, }, - ['corcom'] = { + corcom = { distortion = { distortionType = 'point', pieceName = 'biggun', @@ -61,7 +61,7 @@ local unitDistortions = { lifeTime = 0, effectType = 0}, }, }, - ['armmakr'] = { + armmakr = { distortion = { distortionType = 'point', pieceName = 'light', @@ -71,7 +71,7 @@ local unitDistortions = { effectType = 0}, }, }, - ['cormakr'] = { + cormakr = { distortion = { distortionType = 'point', pieceName = 'light', @@ -81,7 +81,7 @@ local unitDistortions = { effectType = 0}, }, }, - ['armmmkr'] = { + armmmkr = { distortion = { distortionType = 'point', pieceName = 'light', @@ -91,7 +91,7 @@ local unitDistortions = { effectType = 0}, }, }, - ['cormmkr'] = { + cormmkr = { distortion = { distortionType = 'point', pieceName = 'light', @@ -101,7 +101,7 @@ local unitDistortions = { effectType = 0}, }, }, - ['armestor'] = { + armestor = { distortion = { distortionType = 'beam', pieceName = 'base', @@ -112,7 +112,7 @@ local unitDistortions = { lifeTime = 0, effectType = 0}, }, }, - ['armvang'] = { + armvang = { distortion = { distortionType = 'beam', pieceName = 'base', @@ -123,7 +123,7 @@ local unitDistortions = { lifeTime = 0, effectType = 0}, }, }, - ['corcat'] = { + corcat = { distortionl = { distortionType = 'point', pieceName = 'lturret', @@ -141,7 +141,7 @@ local unitDistortions = { lifeTime = 0, effectType = 0}, }, }, - ['armthor'] = { + armthor = { distortionbackenergy = { distortionType = 'beam', pieceName = 'base', @@ -170,7 +170,7 @@ local unitDistortions = { lifeTime = 0, effectType = 0}, }, }, - ['armlship'] = { + armlship = { distortion1 = { distortionType = 'beam', pieceName = 'turret', @@ -190,7 +190,7 @@ local unitDistortions = { lifeTime = 0, effectType = 0}, }, }, - ['corfship'] = { + corfship = { distortionflame = { distortionType = 'beam', pieceName = 'sleeve', @@ -201,7 +201,7 @@ local unitDistortions = { lifeTime = 0, effectType = 0}, }, }, - ['armantiship'] = { + armantiship = { distortionback1 = { distortionType = 'beam', pieceName = 'base', @@ -222,7 +222,7 @@ local unitDistortions = { }, }, - ['armuwadves'] = { + armuwadves = { distortion1 = { distortionType = 'beam', pieceName = 'emit1', @@ -243,7 +243,7 @@ local unitDistortions = { }, }, - ['corestor'] = { + corestor = { distortion = { distortionType = 'beam', pieceName = 'base', @@ -256,7 +256,7 @@ local unitDistortions = { }, }, - ['coruwadves'] = { + coruwadves = { distortion = { distortionType = 'beam', pieceName = 'base', @@ -269,7 +269,7 @@ local unitDistortions = { }, }, - ['armguard'] = { + armguard = { sleeve1 = { distortionType = 'beam', pieceName = 'sleeves', @@ -290,7 +290,7 @@ local unitDistortions = { }, }, - ['armbull'] = { + armbull = { distortion = { distortionType = 'point', pieceName = 'base', @@ -300,7 +300,7 @@ local unitDistortions = { }, }, - ['armvp'] = { + armvp = { heatvent1 = { distortionType = 'beam', pieceName = 'base', @@ -339,7 +339,7 @@ local unitDistortions = { }, }, - ['corhal'] = { + corhal = { heatventfront1 = { distortionType = 'beam', pieceName = 'base', @@ -360,7 +360,7 @@ local unitDistortions = { }, }, - ['corvp'] = { + corvp = { heatvent1 = { distortionType = 'beam', pieceName = 'base', @@ -408,7 +408,7 @@ local unitDistortions = { -- }, }, - ['armsd'] = { + armsd = { distortion = { distortionType = 'point', pieceName = 'base', @@ -419,7 +419,7 @@ local unitDistortions = { }, }, - ['armanac'] = { + armanac = { fanheat1 = { distortionType = 'point', pieceName = 'base', @@ -454,7 +454,7 @@ local unitDistortions = { }, }, - ['armgeo'] = { + armgeo = { fanheat = { distortionType = 'point', pieceName = 'base', @@ -477,7 +477,7 @@ local unitDistortions = { lifeTime = 0, effectType = 'heatDistortion'}, }, }, - ['armgmm'] = { + armgmm = { fanheat = { distortionType = 'point', pieceName = 'base', @@ -486,7 +486,7 @@ local unitDistortions = { lifeTime = 0, effectType = 'heatDistortion'}, }, }, - ['armageo'] = { + armageo = { storageheatcenter = { distortionType = 'beam', pieceName = 'base', @@ -524,7 +524,7 @@ local unitDistortions = { lifeTime = 0, effectType = 0}, }, }, - ['corkarg'] = { + corkarg = { engineheatr = { distortionType = 'point', pieceName = 'turret', @@ -543,7 +543,7 @@ local unitDistortions = { }, }, - ['corkorg'] = { + corkorg = { engineheatr = { distortionType = 'point', pieceName = 'ruparm', @@ -561,7 +561,7 @@ local unitDistortions = { lifeTime = 0, effectType = 'heatDistortion'}, }, }, - ['armadvsol'] = { + armadvsol = { -- magnifier = { -- distortionType = 'point', -- pieceName = 'base', @@ -571,7 +571,7 @@ local unitDistortions = { -- }, }, - ['armhawk'] = { + armhawk = { thrust = { distortionType = 'cone', pieceName = 'thrust', @@ -583,7 +583,7 @@ local unitDistortions = { }, }, - ['armblade'] = { + armblade = { thrustdown = { distortionType = 'cone', pieceName = 'trust', @@ -595,7 +595,7 @@ local unitDistortions = { }, }, - ['armbrawl'] = { + armbrawl = { thrustdown = { distortionType = 'point', pieceName = 'fan', @@ -606,7 +606,7 @@ local unitDistortions = { }, }, - ['armstil'] = { + armstil = { thrusta = { distortionType = 'cone', pieceName = 'thrusta', @@ -627,7 +627,7 @@ local unitDistortions = { }, }, - ['armdfly'] = { + armdfly = { thrust1 = { distortionType = 'cone', pieceName = 'thrustb', @@ -666,7 +666,7 @@ local unitDistortions = { }, }, - ['armawac'] = { + armawac = { thrust = { distortionType = 'cone', pieceName = 'thrust', @@ -678,7 +678,7 @@ local unitDistortions = { }, }, - ['armpnix'] = { + armpnix = { thrusta = { distortionType = 'cone', pieceName = 'thrusta', @@ -699,7 +699,7 @@ local unitDistortions = { }, }, - ['armliche'] = { + armliche = { engineheata = { distortionType = 'point', pieceName = 'wing1', @@ -753,7 +753,7 @@ local unitDistortions = { }, }, - ['armtide'] = { + armtide = { waterflow = { distortionType = 'beam', pieceName = 'wheel', @@ -767,7 +767,7 @@ local unitDistortions = { }, }, - ['cortide'] = { + cortide = { waterflow = { distortionType = 'beam', pieceName = 'wheel', @@ -781,7 +781,7 @@ local unitDistortions = { }, }, - ['corvamp'] = { + corvamp = { thrust = { distortionType = 'cone', pieceName = 'thrust', @@ -792,7 +792,7 @@ local unitDistortions = { }, }, - ['armpeep'] = { + armpeep = { thrust1 = { distortionType = 'cone', pieceName = 'jet1', @@ -845,7 +845,7 @@ local unitDistortions = { -- }, -- }, - ['armsnipe'] = { + armsnipe = { -- snipecloakbeam = { -- distortionType = 'point', -- pieceName = 'head', @@ -857,7 +857,7 @@ local unitDistortions = { -- }, }, - ['armamex'] = { + armamex = { cloakbeam = { distortionType = 'beam', pieceName = 'base', @@ -869,7 +869,7 @@ local unitDistortions = { }, }, - ['corvroc'] = { + corvroc = { cloakblobf = { distortionType = 'point', pieceName = 'base', @@ -907,7 +907,7 @@ local unitDistortions = { -- }, }, - ['armrectr'] = { + armrectr = { cloakmodule = { distortionType = 'point', pieceName = 'base', @@ -917,7 +917,7 @@ local unitDistortions = { }, }, - ['cornecro'] = { + cornecro = { cloakmodule = { distortionType = 'point', pieceName = 'base', @@ -927,7 +927,7 @@ local unitDistortions = { }, }, - ['armmerl'] = { + armmerl = { cloakblobf = { distortionType = 'point', pieceName = 'base', @@ -972,7 +972,7 @@ local unitDistortions = { }, }, - ['armmlv'] = { + armmlv = { cloakblob = { distortionType = 'point', pieceName = 'turret', @@ -990,7 +990,7 @@ local unitDistortions = { }, - ['armgremlin'] = { + armgremlin = { cloakblobf = { distortionType = 'point', pieceName = 'base', @@ -1067,7 +1067,7 @@ local unitDistortions = { }, }, - ['armspy'] = { + armspy = { -- fullstealth = { -- distortionType = 'point', -- pieceName = 'body', @@ -1102,7 +1102,7 @@ local unitDistortions = { }, }, - ['corspy'] = { + corspy = { -- spycloakhead = { -- distortionType = 'point', -- pieceName = 'body', @@ -1156,7 +1156,7 @@ local unitDistortions = { -- }, -- }, - ['armveil'] = { + armveil = { -- magnifier = { -- distortionType = 'point', -- pieceName = 'base', @@ -1174,7 +1174,7 @@ local unitDistortions = { }, }, - ['armjam'] = { + armjam = { jamdistortion = { distortionType = 'point', pieceName = 'jam', @@ -1185,7 +1185,7 @@ local unitDistortions = { }, }, - ['coreter'] = { + coreter = { jamdistortion = { distortionType = 'point', pieceName = 'jam', @@ -1196,7 +1196,7 @@ local unitDistortions = { }, }, - ['corshroud'] = { + corshroud = { jamdistortion = { distortionType = 'point', pieceName = 'jam', @@ -1207,7 +1207,7 @@ local unitDistortions = { }, }, - ['corap'] = { + corap = { heatvent1 = { distortionType = 'beam', pieceName = 'base', @@ -1219,7 +1219,7 @@ local unitDistortions = { }, }, - ['corpyro'] = { + corpyro = { flameheat = { distortionType = 'beam', pieceName = 'lloarm', @@ -1232,7 +1232,7 @@ local unitDistortions = { }, }, - ['cordemon'] = { + cordemon = { flameheatl = { distortionType = 'beam', pieceName = 'lfbarrel1', @@ -1255,7 +1255,7 @@ local unitDistortions = { }, }, - ['corint'] = { + corint = { heatvent1 = { distortionType = 'beam', pieceName = 'gun', @@ -1267,7 +1267,7 @@ local unitDistortions = { }, }, - ['coravp'] = { + coravp = { factoryheat = { distortionType = 'point', pieceName = 'base', @@ -1299,7 +1299,7 @@ local unitDistortions = { }, }, - ['corgant'] = { + corgant = { factoryheat1 = { distortionType = 'point', pieceName = 'base', @@ -1353,7 +1353,7 @@ local unitDistortions = { }, }, - ['corfus'] = { + corfus = { distortion = { distortionType = 'point', pieceName = 'emit', @@ -1364,7 +1364,7 @@ local unitDistortions = { }, }, - ['corafus'] = { + corafus = { distortion = { distortionType = 'point', pieceName = 'emit', @@ -1375,7 +1375,7 @@ local unitDistortions = { }, }, - ['corafust3'] = { + corafust3 = { distortion = { distortionType = 'point', pieceName = 'emit', @@ -1386,7 +1386,7 @@ local unitDistortions = { }, }, - ['legfus'] = { + legfus = { distortion = { distortionType = 'point', pieceName = 'emit', @@ -1397,7 +1397,7 @@ local unitDistortions = { }, }, - ['legafus'] = { + legafus = { distortion = { distortionType = 'point', pieceName = 'emit', @@ -1408,7 +1408,7 @@ local unitDistortions = { }, }, - ['armfus'] = { + armfus = { distortion1 = { distortionType = 'point', pieceName = 'emit1', @@ -1427,7 +1427,7 @@ local unitDistortions = { }, }, - ['armafus'] = { + armafus = { distortion = { distortionType = 'point', pieceName = 'emit', @@ -1454,7 +1454,7 @@ local unitDistortions = { -- }, }, - ['armafust3'] = { + armafust3 = { distortion = { distortionType = 'point', pieceName = 'emit', @@ -1466,7 +1466,7 @@ local unitDistortions = { }, }, - ['legafust3'] = { + legafust3 = { distortion = { distortionType = 'point', pieceName = 'emit', @@ -1478,7 +1478,7 @@ local unitDistortions = { }, }, - ['armgate'] = { + armgate = { distortion = { distortionType = 'point', pieceName = 'none', @@ -1509,7 +1509,7 @@ local unitDistortions = { -- }, }, - ['armfgate'] = { + armfgate = { distortion = { distortionType = 'point', pieceName = 'none', @@ -1520,7 +1520,7 @@ local unitDistortions = { }, }, - ['corgate'] = { + corgate = { distortion = { distortionType = 'point', pieceName = 'none', @@ -1539,7 +1539,7 @@ local unitDistortions = { -- }, }, - ['corfgate'] = { + corfgate = { distortion = { distortionType = 'point', pieceName = 'none', @@ -1550,7 +1550,7 @@ local unitDistortions = { }, }, - ['corjamt'] = { + corjamt = { distortion = { distortionType = 'point', pieceName = 'jam', @@ -1561,7 +1561,7 @@ local unitDistortions = { }, }, - ['armjamt'] = { + armjamt = { jamdistortion = { distortionType = 'point', pieceName = 'jam', @@ -1572,7 +1572,7 @@ local unitDistortions = { }, }, - ['corsjam'] = { + corsjam = { distortionbeam = { distortionType = 'beam', pieceName = 'jam', @@ -1584,7 +1584,7 @@ local unitDistortions = { }, }, - ['cormando'] = { + cormando = { distortionbeam = { distortionType = 'beam', pieceName = 'turret', @@ -1610,7 +1610,7 @@ local unitDistortions = { -- }, }, - ['scavengerbossv4_normal'] = { + scavengerbossv4_normal = { distortionbeam = { distortionType = 'point', pieceName = 'head', @@ -1636,7 +1636,7 @@ local unitDistortions = { -- }, }, - ['armsjam'] = { + armsjam = { distortionbeam1 = { distortionType = 'beam', pieceName = 'jam', @@ -1657,7 +1657,7 @@ local unitDistortions = { }, }, - ['armmark'] = { + armmark = { -- radarring = { -- distortionType = 'point', -- pieceName = 'none', @@ -1668,7 +1668,7 @@ local unitDistortions = { -- }, }, - ['armaser'] = { + armaser = { distortionbeam = { distortionType = 'beam', pieceName = 'jam', @@ -1680,7 +1680,7 @@ local unitDistortions = { }, }, - ['corspec'] = { + corspec = { distortionbeam = { distortionType = 'beam', pieceName = 'jam', @@ -1692,7 +1692,7 @@ local unitDistortions = { }, }, - ['legajamk'] = { + legajamk = { legdistortionbeam = { distortionType = 'beam', pieceName = 'blob', @@ -1704,7 +1704,7 @@ local unitDistortions = { }, }, - ['legavjam'] = { + legavjam = { legdistortionbeam = { distortionType = 'beam', pieceName = 'cloaklight', @@ -1716,7 +1716,7 @@ local unitDistortions = { }, }, - ['corjuno'] = { + corjuno = { distortion = { distortionType = 'point', pieceName = 'none', @@ -1727,7 +1727,7 @@ local unitDistortions = { }, }, - ['corjugg'] = { + corjugg = { distortion = { distortionType = 'point', pieceName = 'mainbarrel', @@ -1746,7 +1746,7 @@ local unitDistortions = { }, - ['armjuno'] = { + armjuno = { distortion = { distortionType = 'point', pieceName = 'none', @@ -1757,7 +1757,7 @@ local unitDistortions = { }, }, - ['lootboxbronze'] = { + lootboxbronze = { distortion = { distortionType = 'point', pieceName = 'none', @@ -1768,7 +1768,7 @@ local unitDistortions = { }, }, - ['lootboxsilver'] = { + lootboxsilver = { distortion = { distortionType = 'point', pieceName = 'none', @@ -1779,7 +1779,7 @@ local unitDistortions = { }, }, - ['lootboxgold'] = { + lootboxgold = { distortion = { distortionType = 'point', pieceName = 'none', @@ -1790,7 +1790,7 @@ local unitDistortions = { }, }, - ['lootboxplatinum'] = { + lootboxplatinum = { distortion = { distortionType = 'point', pieceName = 'none', @@ -1801,7 +1801,7 @@ local unitDistortions = { }, }, - ['armblade'] = { + armblade = { thrust = { distortionType = 'cone', pieceName = 'thrust', @@ -1812,7 +1812,7 @@ local unitDistortions = { }, }, - ['corape'] = { + corape = { rthrust = { distortionType = 'cone', pieceName = 'rthrust', @@ -1832,7 +1832,7 @@ local unitDistortions = { }, }, - ['armkam'] = { + armkam = { thrusta = { distortionType = 'cone', pieceName = 'thrusta', @@ -1852,7 +1852,7 @@ local unitDistortions = { }, }, - ['legmos'] = { + legmos = { -- motionl = { --motion blur only works when unit is moving -- distortionType = 'point', -- pieceName = 'blur', @@ -1894,7 +1894,7 @@ local unitDistortions = { }, }, - ['legmost3'] = { + legmost3 = { blurl = { distortionType = 'cone', pieceName = 'blur', @@ -1926,7 +1926,7 @@ local unitDistortions = { }, }, - ['corcrwh'] = { + corcrwh = { thrust1 = { distortionType = 'cone', pieceName = 'thrustrra', @@ -1980,7 +1980,7 @@ local unitDistortions = { }, }, - ['corcrwt4'] = { + corcrwt4 = { thrust1 = { distortionType = 'cone', pieceName = 'thrustrra', @@ -2034,7 +2034,7 @@ local unitDistortions = { -- }, }, - ['armfepocht4'] = { + armfepocht4 = { thrustl1 = { distortionType = 'cone', pieceName = 'thrustl1', @@ -2070,7 +2070,7 @@ local unitDistortions = { }, }, - ['corfblackhyt4'] = { + corfblackhyt4 = { thrustl1 = { distortionType = 'cone', pieceName = 'thrustl1', @@ -2158,8 +2158,8 @@ do end -- Effect duplications: -unitDistortions['armdecom'] = unitDistortions['armcom'] -unitDistortions['corgantuw'] = unitDistortions['corgant'] +unitDistortions.armdecom = unitDistortions.armcom +unitDistortions.corgantuw = unitDistortions.corgant local unitEventDistortionsNames = { ------------------------------------ Put distortions that are slaved to ProjectileCreated here! --------------------------------- @@ -2196,7 +2196,7 @@ local unitEventDistortionsNames = { UnitScriptDistortions = { - ['corkorg'] = { + corkorg = { [1] = { -- Footstep shockwave alwaysVisible = false, @@ -2212,7 +2212,7 @@ local unitEventDistortionsNames = { }, }, - ['corsumo'] = { + corsumo = { [1] = { -- Footstep shockwave alwaysVisible = false, @@ -2267,7 +2267,7 @@ local unitEventDistortionsNames = { }, }, - ['corjugg'] = { + corjugg = { [1] = { -- Footstep shockwave alwaysVisible = false, @@ -2338,7 +2338,7 @@ local unitEventDistortionsNames = { -- }, -- }, - ['cordemon'] = { + cordemon = { [1] = { -- Barrel Heat alwaysVisible = false, @@ -2414,7 +2414,7 @@ local unitEventDistortionsNames = { }, }, - ['armraz'] = { + armraz = { [1] = { -- Barrel Heat alwaysVisible = false, @@ -2446,7 +2446,7 @@ local unitEventDistortionsNames = { }, - ['armbrtha'] = { + armbrtha = { [1] = { -- Barrel Heat after shot alwaysVisible = false, @@ -2464,7 +2464,7 @@ local unitEventDistortionsNames = { }, }, - ['corint'] = { + corint = { [1] = { -- Barrel Heat after shot alwaysVisible = false, diff --git a/luaui/configs/DistortionGL4WeaponsConfig.lua b/luaui/configs/DistortionGL4WeaponsConfig.lua index df37ccbc652..6f19e3dbf21 100644 --- a/luaui/configs/DistortionGL4WeaponsConfig.lua +++ b/luaui/configs/DistortionGL4WeaponsConfig.lua @@ -953,7 +953,7 @@ local gibDistortion = { local muzzleFlashDistortions = {} local explosionDistortions = {} local projectileDefDistortions = { - ['default'] = { + default = { distortionType = 'point', distortionConfig = { posx = 0, posy = 16, posz = 0, radius = 420, lifeTime = 50, sustain = 20, effectType = 0}, @@ -1278,43 +1278,43 @@ local projectileDefDistortionsNames = {} -- GetDistortionClass("ProjectileDgun", "Micro") -- GetDistortionClass("AirShockWaveDgun", "Micro") -projectileDefDistortionsNames["corjugg_juggernaut_fire"] = +projectileDefDistortionsNames.corjugg_juggernaut_fire = GetDistortionClass("AirShockWaveDgun", "Nano", { lifeTime = 40, }) -explosionDistortionsNames['corjugg_juggernaut_fire'] = { +explosionDistortionsNames.corjugg_juggernaut_fire = { --GetDistortionClass("GroundShockWave", "Smaller", { -- lifeTime = 24, }), --GetDistortionClass("AirShockWaveDgun", "Smaller"), GetDistortionClass("ExplosionRadiationDgun", "Micro"), } -projectileDefDistortionsNames["cormort_cor_mort"] = +projectileDefDistortionsNames.cormort_cor_mort = GetDistortionClass("PlasmaTrailProjectile", "Small", { theta = 0.08, noiseStrength = 5, noiseScaleSpace = 0.88, distanceFalloff = 1.5, lifeTime = 60, rampUp = 15, decay = 0, effectStrength = 1.5, radius = 170, startRadius = 0.1, yoffset = 8, }) -explosionDistortionsNames['cormort_cor_mort'] = { +explosionDistortionsNames.cormort_cor_mort = { -- GetDistortionClass("GroundShockWave", "Pico", { -- lifeTime = 18, }), GetDistortionClass("AirShockWaveXS", "Femto", { lifeTime = 6, effectStrength = 4.5, }), } -projectileDefDistortionsNames["armmav_armmav_weapon"] = +projectileDefDistortionsNames.armmav_armmav_weapon = GetDistortionClass("PlasmaTrailProjectile", "Smaller", { theta = 0.11, noiseStrength = 15, noiseScaleSpace = 0.55, lifeTime = 60, rampUp = 20, decay = 0, radius = 40, }) -explosionDistortionsNames['armmav_armmav_weapon'] = { +explosionDistortionsNames.armmav_armmav_weapon = { GetDistortionClass("GroundShockWave", "Micro", { lifeTime = 19, effectStrength = 1.0, }), } -explosionDistortionsNames['armemp_armemp_weapon'] = { +explosionDistortionsNames.armemp_armemp_weapon = { GetDistortionClass("EMPShockWave", "Medium", { effectStrength = -2.5, }), @@ -1326,7 +1326,7 @@ explosionDistortionsNames['armemp_armemp_weapon'] = { }), } -explosionDistortionsNames['armthor_empmissile'] = { +explosionDistortionsNames.armthor_empmissile = { GetDistortionClass("EMPShockWave", "Small", { effectStrength = -2.5, }), @@ -1338,7 +1338,7 @@ explosionDistortionsNames['armthor_empmissile'] = { }), } -explosionDistortionsNames['spybombx'] = { +explosionDistortionsNames.spybombx = { GetDistortionClass("EMPShockWave", "Medium", { effectStrength = -2.5, }), @@ -1350,7 +1350,7 @@ explosionDistortionsNames['spybombx'] = { }), } -explosionDistortionsNames['armstil_stiletto_bomb'] = { +explosionDistortionsNames.armstil_stiletto_bomb = { GetDistortionClass("EMPShockWave", "Smaller", { }), GetDistortionClass("EMPNoise", "Smaller", { @@ -1373,7 +1373,7 @@ explosionDistortionsNames['armstil_stiletto_bomb'] = { -- }), -- } -explosionDistortionsNames['raptor_air_bomber_acid_t2_v1_acidbomb'] = { +explosionDistortionsNames.raptor_air_bomber_acid_t2_v1_acidbomb = { GetDistortionClass("GroundAcidExplo", "SmallMedium", { -- noiseStrength = 15.0, noiseScaleSpace = 0.90, distanceFalloff = 0.9, onlyModelMap = 1, -- lifeTime = 190, effectStrength = 2, @@ -1383,7 +1383,7 @@ explosionDistortionsNames['raptor_air_bomber_acid_t2_v1_acidbomb'] = { GetDistortionClass("AirShockWave", "Smaller"), } -explosionDistortionsNames['raptor_land_assault_acid_t2_v1_acidspit'] = { +explosionDistortionsNames.raptor_land_assault_acid_t2_v1_acidspit = { GetDistortionClass("GroundAcidExplo", "Medium", { -- noiseStrength = 15.0, noiseScaleSpace = 0.90, distanceFalloff = 0.9, onlyModelMap = 1, -- lifeTime = 190, effectStrength = 2, @@ -1393,7 +1393,7 @@ explosionDistortionsNames['raptor_land_assault_acid_t2_v1_acidspit'] = { --GetDistortionClass("AirShockWave", "Smaller"), } -explosionDistortionsNames['raptor_allterrain_arty_acid_t2_v1_acidspit'] = { +explosionDistortionsNames.raptor_allterrain_arty_acid_t2_v1_acidspit = { GetDistortionClass("GroundAcidExplo", "Medium", { noiseStrength = 0.9, noiseScaleSpace = 0.50, distanceFalloff = 0.9, effectStrength = 1.7, @@ -1405,7 +1405,7 @@ explosionDistortionsNames['raptor_allterrain_arty_acid_t2_v1_acidspit'] = { --GetDistortionClass("AirShockWave", "Smaller"), } -explosionDistortionsNames['armjuno_juno_pulse'] = { +explosionDistortionsNames.armjuno_juno_pulse = { -- GetDistortionClass("JunoHeat", "Juno", { -- pos2x = 0, pos2y = 0, pos2z = 0, -- noiseStrength = 6.5, noiseScaleSpace = 0.5, distanceFalloff = -0.1, @@ -1429,14 +1429,14 @@ explosionDistortionsNames['armjuno_juno_pulse'] = { } -explosionDistortionsNames['corjuno_juno_pulse'] = { +explosionDistortionsNames.corjuno_juno_pulse = { GetDistortionClass("JunoShockWave", "Juno", { }), GetDistortionClass("JunoNoise", "Juno", { }), } -explosionDistortionsNames['legjuno_juno_pulse'] = { +explosionDistortionsNames.legjuno_juno_pulse = { GetDistortionClass("JunoShockWave", "Juno", { }), GetDistortionClass("JunoNoise", "Juno", { @@ -1444,14 +1444,14 @@ explosionDistortionsNames['legjuno_juno_pulse'] = { } -- corlevlr -projectileDefDistortionsNames["corlevlr_corlevlr_weapon"] = +projectileDefDistortionsNames.corlevlr_corlevlr_weapon = GetDistortionClass("PlasmaTrailProjectile", "Smaller", { theta = 0.11, noiseStrength = 24, noiseScaleSpace = 0.55, lifeTime = 60, rampUp = 20, decay = 0, radius = 40, yoffset = 8, }) -explosionDistortionsNames["corlevlr_corlevlr_weapon"] = { +explosionDistortionsNames.corlevlr_corlevlr_weapon = { GetDistortionClass("GroundShockWave", "Tiny", { lifeTime = 12, effectStrength = 1.5, startRadius = 0.40, shockWidth = 0.5, }), @@ -1479,12 +1479,12 @@ explosionDistortionsNames["corlevlr_corlevlr_weapon"] = { -- lifeTime = 0, rampUp = 0, decay = 0, radius = 3, yoffset = 5, -- }) -muzzleFlashDistortionsNames['armguard_plasma'] = { +muzzleFlashDistortionsNames.armguard_plasma = { GetDistortionClass("MuzzleShockWave", "Nano", { lifeTime = 8, effectStrength = 1.2, }), } -muzzleFlashDistortionsNames['armguard_plasma_high'] = { +muzzleFlashDistortionsNames.armguard_plasma_high = { GetDistortionClass("MuzzleShockWave", "Tiny") } @@ -1495,57 +1495,57 @@ muzzleFlashDistortionsNames['armguard_plasma_high'] = { -- GetDistortionClass("MuzzleShockWaveXL", "Tiniest") -- } -explosionDistortionsNames['corape_vtol_rocket'] = { +explosionDistortionsNames.corape_vtol_rocket = { GetDistortionClass("AirShockWave", "Nano", { lifeTime = 6, rampUp = 1,}) } -explosionDistortionsNames['armepoch_heavyplasma'] = { +explosionDistortionsNames.armepoch_heavyplasma = { GetDistortionClass("AirShockWave", "Tiny"), GetDistortionClass("ExplosionHeat", "Micro"), } -muzzleFlashDistortionsNames['armepoch_heavyplasma'] = { +muzzleFlashDistortionsNames.armepoch_heavyplasma = { GetDistortionClass("MuzzleShockWave", "Nano") } -muzzleFlashDistortionsNames['corblackhy_heavyplasma'] = { +muzzleFlashDistortionsNames.corblackhy_heavyplasma = { GetDistortionClass("MuzzleShockWave", "Tiny") } -explosionDistortionsNames['corblackhy_heavyplasma'] = { +explosionDistortionsNames.corblackhy_heavyplasma = { GetDistortionClass("AirShockWave", "Tiny"), GetDistortionClass("ExplosionHeat", "Micro"), } -projectileDefDistortionsNames["cormaw_dmaw"] = +projectileDefDistortionsNames.cormaw_dmaw = GetDistortionClass("FlameProjectile", "Micro", { lifeTime = 42, rampUp = 30, }) -projectileDefDistortionsNames["corpyro_flamethrower"] = +projectileDefDistortionsNames.corpyro_flamethrower = GetDistortionClass("FlameProjectile", "Micro") -projectileDefDistortionsNames["cordemon_newdmaw"] = +projectileDefDistortionsNames.cordemon_newdmaw = GetDistortionClass("FlameProjectileXL", "Smaller", { noiseStrength = 11, startRadius = 0.4, --noiseScaleSpace = 0.20, lifeTime = 55, rampUp = 15, decay = 60, }) -projectileDefDistortionsNames["corcrwh_dragonmawh"] = +projectileDefDistortionsNames.corcrwh_dragonmawh = GetDistortionClass("FlameProjectileXL", "Smaller", { noiseStrength = 11, startRadius = 0.4, --noiseScaleSpace = -0.20, lifeTime = 50, rampUp = 15, decay = 70, }) -projectileDefDistortionsNames["corfship_dmaw"] = +projectileDefDistortionsNames.corfship_dmaw = GetDistortionClass("FlameProjectile", "Tiny") -projectileDefDistortionsNames["corvipe_vipersabot"] = +projectileDefDistortionsNames.corvipe_vipersabot = GetDistortionClass("PlasmaTrailProjectile", "Smaller", { theta = 0.07, noiseStrength = 10, noiseScaleSpace = 0.35, lifeTime = 30, rampUp = 10, decay = 5, radius = 120, yoffset = 18, }) -explosionDistortionsNames['corvipe_vipersabot'] = { +explosionDistortionsNames.corvipe_vipersabot = { GetDistortionClass("GroundShockWaveXS", "Micro", { startRadius = 0.50, }), GetDistortionClass("AirShockWaveXS", "Pico", { @@ -1553,7 +1553,7 @@ explosionDistortionsNames['corvipe_vipersabot'] = { GetDistortionClass("ExplosionHeatXS", "Nano"), } -projectileDefDistortionsNames["armmship_rocket"] = +projectileDefDistortionsNames.armmship_rocket = GetDistortionClass("MissileProjectile", "Medium", { theta = 0.16, noiseStrength = 5, noiseScaleSpace = 0.35, windAffected = -1, riseRate = -0.5, @@ -1570,14 +1570,14 @@ projectileDefDistortionsNames["armmship_rocket"] = -projectileDefDistortionsNames["corkarg_super_missile"] = +projectileDefDistortionsNames.corkarg_super_missile = GetDistortionClass("MissileProjectile", "Medium", { theta = 0.08, noiseStrength = 4, noiseScaleSpace = 0.67, lifeTime = 46, rampUp = 4, decay = 5, radius = 150, yoffset = 18, effectStrength = 2.2, distanceFalloff = 1.3, startRadius = 0.3, onlyModelMap = 1, }) -explosionDistortionsNames['corkarg_super_missile'] = { +explosionDistortionsNames.corkarg_super_missile = { GetDistortionClass("GroundShockWaveXS", "Tiny", { lifeTime = 8, decay = 3, rampUp = 1, shockWidth = 0.5, }), @@ -1586,7 +1586,7 @@ explosionDistortionsNames['corkarg_super_missile'] = { effectStrength = 2.0, }), } -projectileDefDistortionsNames["corhrk_corhrk_rocket"] = +projectileDefDistortionsNames.corhrk_corhrk_rocket = GetDistortionClass("MissileProjectile", "Smallest", { theta = 0.19, noiseStrength = 2, noiseScaleSpace = 0.47, lifeTime = 120, rampUp = 50, decay = 30, radius = 130, yoffset = 10, @@ -1594,35 +1594,35 @@ projectileDefDistortionsNames["corhrk_corhrk_rocket"] = startRadius = 0.5, onlyModelMap = 1, }) -projectileDefDistortionsNames["corstorm_cor_bot_rocket"] = +projectileDefDistortionsNames.corstorm_cor_bot_rocket = GetDistortionClass("MissileProjectile", "Smallest") -projectileDefDistortionsNames["corban_banisher"] = +projectileDefDistortionsNames.corban_banisher = GetDistortionClass("MissileProjectile", "Medium") -projectileDefDistortionsNames["armsubk_armsmart_torpedo"] = +projectileDefDistortionsNames.armsubk_armsmart_torpedo = GetDistortionClass("TorpedoProjectile", "SmallMedium") -explosionDistortionsNames["armsubk_armsmart_torpedo"] = { +explosionDistortionsNames.armsubk_armsmart_torpedo = { GetDistortionClass("TorpedoShockWave", "Nano")} -- projectileDefDistortionsNames['armmanni_atam'] = -- GetDistortionClass("AirShockWaveBeam", "Small") -projectileDefDistortionsNames['armmanni_atam'] = +projectileDefDistortionsNames.armmanni_atam = GetDistortionClass("TachyonBeam", "Femto", { noiseStrength = 1, noiseScaleSpace = 0.03, windAffected = -0.8, riseRate = -0.2, }) -projectileDefDistortionsNames['armanni_ata'] = +projectileDefDistortionsNames.armanni_ata = GetDistortionClass("TachyonBeam", "Femto", { noiseStrength = 1.0, noiseScaleSpace = 0.04, windAffected = -0.9, riseRate = -0.2, --lifeTime = 0, rampUp = 20, decay = 0, }) -projectileDefDistortionsNames['cordoom_atadr'] = +projectileDefDistortionsNames.cordoom_atadr = GetDistortionClass("TachyonBeam", "Femto", { noiseStrength = 1.0, noiseScaleSpace = 0.04, windAffected = -0.9, riseRate = -0.2, @@ -1641,21 +1641,21 @@ projectileDefDistortionsNames['cordoom_atadr'] = -- GetDistortionClass("TachyonBeam2", "Atto", { -- }) -projectileDefDistortionsNames['armbanth_tehlazerofdewm'] = +projectileDefDistortionsNames.armbanth_tehlazerofdewm = GetDistortionClass("TachyonBeam3", "Banthlaser", { }) -projectileDefDistortionsNames["corhlt_cor_laserh1"] = +projectileDefDistortionsNames.corhlt_cor_laserh1 = GetDistortionClass("LaserBeamHeat", "Atto") -- Heatrays should all get this class -projectileDefDistortionsNames["corsala_cor_heat_laser"] = +projectileDefDistortionsNames.corsala_cor_heat_laser = GetDistortionClass("HeatRayHeat", "Atto") -projectileDefDistortionsNames["corkorg_corkorg_laser"] = +projectileDefDistortionsNames.corkorg_corkorg_laser = GetDistortionClass("HeatRayHeatXL", "KorgLaser") -muzzleFlashDistortionsNames['corkorg_corkorg_fire'] = { +muzzleFlashDistortionsNames.corkorg_corkorg_fire = { GetDistortionClass("MuzzleShockWaveXL", "Nano", { decay = 5, rampUp = 0, startRadius = 0.7, @@ -1664,25 +1664,25 @@ muzzleFlashDistortionsNames['corkorg_corkorg_fire'] = { }) } -muzzleFlashDistortionsNames['armguard_plasma'] = { +muzzleFlashDistortionsNames.armguard_plasma = { GetDistortionClass("MuzzleShockWave", "Nano", { lifeTime = 8, effectStrength = 1.2, }), } -projectileDefDistortionsNames["armspid_spider"] = --doesnt work on lightning cannon +projectileDefDistortionsNames.armspid_spider = --doesnt work on lightning cannon GetDistortionClass("EMPBeam", "Quaco") -projectileDefDistortionsNames["armdfly_armdfly_paralyzer"] = --doesnt work on lightning cannon +projectileDefDistortionsNames.armdfly_armdfly_paralyzer = --doesnt work on lightning cannon GetDistortionClass("EMPBeamXL", "Zetto") -projectileDefDistortionsNames["corbw_bladewing_lyzer"] = --doesnt work on lightning cannon +projectileDefDistortionsNames.corbw_bladewing_lyzer = --doesnt work on lightning cannon GetDistortionClass("EMPBeam", "Quaco") -projectileDefDistortionsNames["armclaw_dclaw"] = --doesnt work on lightning cannon +projectileDefDistortionsNames.armclaw_dclaw = --doesnt work on lightning cannon GetDistortionClass("LightningBeam", "Femto") -projectileDefDistortionsNames["armthor_emp"] = --doesnt work on lightning cannon +projectileDefDistortionsNames.armthor_emp = --doesnt work on lightning cannon GetDistortionClass("EMPBeam", "Quaco") -- projectileDefDistortionsNames["armzeus_lightning"] = --doesnt work on lightning cannon @@ -1691,10 +1691,10 @@ projectileDefDistortionsNames["armthor_emp"] = --doesnt work on lightning cannon -- projectileDefDistortionsNames["armlship_lightning"] = --doesnt work on lightning cannon -- GetDistortionClass("LightningBeam", "Femto") -projectileDefDistortionsNames["armthor_thunder"] = --doesnt work on lightning cannon +projectileDefDistortionsNames.armthor_thunder = --doesnt work on lightning cannon GetDistortionClass("LightningBeam", "Pico") -muzzleFlashDistortionsNames['armthor_thunder'] = { +muzzleFlashDistortionsNames.armthor_thunder = { GetDistortionClass("MuzzleShockWave", "Micro") } @@ -1704,11 +1704,11 @@ muzzleFlashDistortionsNames['armthor_thunder'] = { -- --GetDistortionClass("ExplosionHeatXS", "Nano"), -- } -muzzleFlashDistortionsNames['armbull_arm_bull'] = { +muzzleFlashDistortionsNames.armbull_arm_bull = { GetDistortionClass("MuzzleShockWave", "Femto") } -explosionDistortionsNames['cortrem_tremor_spread_fire'] = { +explosionDistortionsNames.cortrem_tremor_spread_fire = { GetDistortionClass("AirShockWaveXS", "Micro", { lifeTime = 6, effectStrength = 2.5, decay = 4, rampUp = 1, @@ -1725,7 +1725,7 @@ explosionDistortionsNames['cortrem_tremor_spread_fire'] = { -- GetDistortionClass("ExplosionHeatXS", "Nano"), -- } -explosionDistortionsNames['armthund_armbomb'] = { +explosionDistortionsNames.armthund_armbomb = { GetDistortionClass("AirShockWave", "Nano", { lifeTime = 15, effectStrength = 1.6, }), GetDistortionClass("GroundShockWave", "Tiny", { @@ -1733,7 +1733,7 @@ explosionDistortionsNames['armthund_armbomb'] = { GetDistortionClass("ExplosionHeat", "Pico"), } -explosionDistortionsNames['legphoenix_skybeam'] = { +explosionDistortionsNames.legphoenix_skybeam = { --GetDistortionClass("AirShockWave", "Small"), --GetDistortionClass("GroundShockWave", "Smallest"), GetDistortionClass("GroundShockWaveHeat", "Tiniest"), @@ -1742,28 +1742,28 @@ explosionDistortionsNames['legphoenix_skybeam'] = { -- a -explosionDistortionsNames['legphoenix_legphtarg'] = { +explosionDistortionsNames.legphoenix_legphtarg = { --GetDistortionClass("AirShockWave", "Small"), } -explosionDistortionsNames['corscreamer_cor_advsam'] = { +explosionDistortionsNames.corscreamer_cor_advsam = { GetDistortionClass("AirShockWave", "Small"), } -explosionDistortionsNames['armmercury_arm_advsam'] = { +explosionDistortionsNames.armmercury_arm_advsam = { GetDistortionClass("AirShockWave", "Small"), } -projectileDefDistortionsNames["legphoenix_legphtarg"] = +projectileDefDistortionsNames.legphoenix_legphtarg = GetDistortionClass("NoEffect", 0) -explosionDistortionsNames['armfboy_arm_fatboy_notalaser'] = { +explosionDistortionsNames.armfboy_arm_fatboy_notalaser = { GetDistortionClass("AirShockWave", "Small"), --GetDistortionClass("GroundShockWave", "SmallMedium"), GetDistortionClass("ExplosionHeat", "Tiniest"), } -explosionDistortionsNames['armliche_arm_pidr'] = { +explosionDistortionsNames.armliche_arm_pidr = { GetDistortionClass("GroundShockWaveNuke", "Larger", { shockWidth = 8, }), @@ -1779,20 +1779,20 @@ explosionDistortionsNames['armliche_arm_pidr'] = { }), } -explosionDistortionsNames['armlichet4_nuclear_missile'] = { +explosionDistortionsNames.armlichet4_nuclear_missile = { GetDistortionClass("ExplosionHeatNuke", "Larger"), GetDistortionClass("AirShockWaveNuke", "Armnuke"), GetDistortionClass("GroundShockWaveNuke", "Armnuke"), } -explosionDistortionsNames['commanderexplosion'] = { +explosionDistortionsNames.commanderexplosion = { --GetDistortionClass("ExplosionHeatNuke", "Large"), GetDistortionClass("AirShockWaveCommander", "Large"), GetDistortionClass("GroundShockWaveCommander", "Mega"), GetDistortionClass("GroundShockWaveCommanderSlow", "Large"), } -explosionDistortionsNames['armsilo_nuclear_missile'] = { +explosionDistortionsNames.armsilo_nuclear_missile = { GetDistortionClass("ExplosionHeatNuke", "Larger"), GetDistortionClass("AirShockWaveNuke", "Armnuke"), GetDistortionClass("GroundShockWaveNuke", "Armnuke"), @@ -1802,10 +1802,10 @@ explosionDistortionsNames['armsilo_nuclear_missile'] = { -- GetDistortionClass("ExplosionHeatNuke", "Larger"), } -projectileDefDistortionsNames["armsilo_nuclear_missile"] = --armnuke +projectileDefDistortionsNames.armsilo_nuclear_missile = --armnuke GetDistortionClass("MissileNukeProjectile", "Large") -explosionDistortionsNames['geo'] = { +explosionDistortionsNames.geo = { --GetDistortionClass("ExplosionHeatNuke", "Larger"), GetDistortionClass("AirShockWaveNuke", "Medium", { lifeTime = 13, decay = 7, rampUp = 6, @@ -1816,7 +1816,7 @@ explosionDistortionsNames['geo'] = { }), } -explosionDistortionsNames['customfusionexplo'] = { +explosionDistortionsNames.customfusionexplo = { GetDistortionClass("ExplosionHeatNuke", "Larger"), GetDistortionClass("AirShockWaveNuke", "Armnuke", { lifeTime = 20, decay = 15, rampUp = 5, @@ -1838,7 +1838,7 @@ explosionDistortionsNames['fusionExplosion-uw'] = { }), } -explosionDistortionsNames['crawl_blastsmlscavboss'] = { +explosionDistortionsNames.crawl_blastsmlscavboss = { GetDistortionClass("ExplosionHeatNuke", "MegaXL", { lifeTime = 30, decay = 20, rampUp = 10, --effectStrength = 1.0, @@ -1856,75 +1856,75 @@ explosionDistortionsNames['crawl_blastsmlscavboss'] = { }), } -explosionDistortionsNames['korgexplosion'] = { +explosionDistortionsNames.korgexplosion = { --GetDistortionClass("ExplosionHeatNuke", "Larger"), GetDistortionClass("AirShockWaveNuke", "Armnuke"), GetDistortionClass("GroundShockWaveNuke", "Armnuke"), } -explosionDistortionsNames['korgexplosionselfd'] = { +explosionDistortionsNames.korgexplosionselfd = { --GetDistortionClass("ExplosionHeatNuke", "Mega"), GetDistortionClass("AirShockWaveNuke", "Cornuke"), GetDistortionClass("GroundShockWaveNuke", "Cornuke"), } -explosionDistortionsNames['advancedfusionexplosionselfd'] = { +explosionDistortionsNames.advancedfusionexplosionselfd = { GetDistortionClass("ExplosionHeatNuke", "Mega"), GetDistortionClass("AirShockWaveNuke", "Cornuke"), GetDistortionClass("GroundShockWaveNuke", "Cornuke"), } -explosionDistortionsNames['corsilo_crblmssl'] = { +explosionDistortionsNames.corsilo_crblmssl = { GetDistortionClass("ExplosionHeatNuke", "Mega"), GetDistortionClass("AirShockWaveNuke", "Cornuke"), GetDistortionClass("GroundShockWaveNuke", "Cornuke"), } -projectileDefDistortionsNames["corsilo_crblmssl"] = --armnuke +projectileDefDistortionsNames.corsilo_crblmssl = --armnuke GetDistortionClass("MissileNukeProjectile", "Large") -explosionDistortionsNames['legsilo_legicbm'] = { +explosionDistortionsNames.legsilo_legicbm = { GetDistortionClass("ExplosionHeatNuke", "Mega"), GetDistortionClass("AirShockWaveNuke", "Cornuke"), GetDistortionClass("GroundShockWaveNuke", "Cornuke"), } -projectileDefDistortionsNames["legsilo_legicbm"] = --armnuke +projectileDefDistortionsNames.legsilo_legicbm = --armnuke GetDistortionClass("MissileNukeProjectile", "Large") -- RAPTOR meteor Nuke Tentacle -explosionDistortionsNames['raptor_turret_meteor_t4_v1_weapon'] = { +explosionDistortionsNames.raptor_turret_meteor_t4_v1_weapon = { GetDistortionClass("ExplosionHeatNuke", "Mega"), GetDistortionClass("AirShockWaveNuke", "Cornuke"), GetDistortionClass("GroundShockWaveNuke", "Cornuke"), } -explosionDistortionsNames['nuketest_nuketest'] = { +explosionDistortionsNames.nuketest_nuketest = { GetDistortionClass("ExplosionHeatNuke", "Larger"), GetDistortionClass("AirShockWaveNuke", "Armnuke"), GetDistortionClass("GroundShockWaveNuke", "Armnuke"), } -explosionDistortionsNames['nuketestcor_nuketestcor'] = { +explosionDistortionsNames.nuketestcor_nuketestcor = { GetDistortionClass("ExplosionHeatNuke", "Mega"), GetDistortionClass("AirShockWaveNuke", "Cornuke"), GetDistortionClass("GroundShockWaveNuke", "Cornuke"), } -explosionDistortionsNames['armguardnuke_plasma'] = { +explosionDistortionsNames.armguardnuke_plasma = { GetDistortionClass("ExplosionHeatNuke", "Larger"), GetDistortionClass("GroundShockWaveNuke", "Armnuke"), --GetDistortionClass("ExplosionRadiationNuke", "Larger"), --no use yet --GetDistortionClass("AirShockWaveNukeBlast", "MegaXXL"), } -projectileDefDistortionsNames["armguardnuke_plasma"] = --armnuke +projectileDefDistortionsNames.armguardnuke_plasma = --armnuke GetDistortionClass("MissileNukeProjectile", "Large") -projectileDefDistortionsNames["armguardnuke_plasma_high"] = --armnuke +projectileDefDistortionsNames.armguardnuke_plasma_high = --armnuke GetDistortionClass("MissileNukeProjectile", "Large") -explosionDistortionsNames['armguardnuke_plasma_high'] = { --cornuke +explosionDistortionsNames.armguardnuke_plasma_high = { --cornuke GetDistortionClass("ExplosionHeatNuke", "Mega"), --GetDistortionClass("GroundShockWave", "Medium"), GetDistortionClass("AirShockWaveNuke", "Cornuke"), @@ -1932,7 +1932,7 @@ explosionDistortionsNames['armguardnuke_plasma_high'] = { --cornuke --GetDistortionClass("ExplosionHeat", "Smallest"), } -explosionDistortionsNames['cortron_cortron_weapon'] = { +explosionDistortionsNames.cortron_cortron_weapon = { GetDistortionClass("GroundShockWaveNuke", "MediumLarge"), GetDistortionClass("AirShockWaveNuke", "SmallMedium"), GetDistortionClass("ExplosionHeatNuke", "Medium"), @@ -1955,7 +1955,7 @@ explosionDistortionsNames['cortron_cortron_weapon'] = { --GetDistortionClass("ExplosionDistort", "Atto"), --} -explosionDistortionsNames['corgol_cor_gol'] = { +explosionDistortionsNames.corgol_cor_gol = { GetDistortionClass("AirShockWave", "Small"), --GetDistortionClass("GroundShockWave", "SmallMedium"), GetDistortionClass("ExplosionHeat", "Tiniest"), @@ -1986,7 +1986,7 @@ explosionDistortionsNames['corgol_cor_gol'] = { -- lifeTime = 40, decay = 10, rampup = 5, startRadius = 50}), -- } -explosionDistortionsNames['corcat_exp_heavyrocket'] = { +explosionDistortionsNames.corcat_exp_heavyrocket = { GetDistortionClass("AirShockWave", "Smallest", { lifeTime = 8, effectStrength = 1.0, shockWidth = 0.50, @@ -1998,13 +1998,13 @@ explosionDistortionsNames['corcat_exp_heavyrocket'] = { -- }), } -muzzleFlashDistortionsNames['armmav_armmav_weapon'] = { +muzzleFlashDistortionsNames.armmav_armmav_weapon = { GetDistortionClass("MuzzleShockWave", "Atto") } -muzzleFlashDistortionsNames['corint_lrpc'] = { +muzzleFlashDistortionsNames.corint_lrpc = { GetDistortionClass("MuzzleShockWaveXL", "Tiny") } -explosionDistortionsNames['corint_lrpc'] = { +explosionDistortionsNames.corint_lrpc = { GetDistortionClass("AirShockWave", "Smaller", { lifeTime = 11, refractiveIndex = -1.5, decay = 4, shockWidth = -0.5, effectStrength = 1.0, @@ -2013,10 +2013,10 @@ explosionDistortionsNames['corint_lrpc'] = { GetDistortionClass("ExplosionHeat", "Smallest", { lifeTime = 80, decay = 40, rampup = 5}), } -muzzleFlashDistortionsNames['armbrtha_lrpc'] = { +muzzleFlashDistortionsNames.armbrtha_lrpc = { GetDistortionClass("MuzzleShockWaveXL", "Tiny") } -explosionDistortionsNames['armbrtha_lrpc'] = { +explosionDistortionsNames.armbrtha_lrpc = { GetDistortionClass("ExploShockWaveXL", "Smaller", { --lifeTime = 11, refractiveIndex = -1.5, decay = 4, --shockWidth = -0.5, effectStrength = 1.0, @@ -2026,18 +2026,18 @@ explosionDistortionsNames['armbrtha_lrpc'] = { lifeTime = 80, decay = 40, rampup = 5}), } -muzzleFlashDistortionsNames['corbuzz_rflrpc'] = { +muzzleFlashDistortionsNames.corbuzz_rflrpc = { GetDistortionClass("MuzzleShockWaveXL", "Tiny", { lifeTime = 18, effectStrength = 4.0, startRadius = 0.35, decay = 7, rampUp = 1, }) } -projectileDefDistortionsNames["corbuzz_rflrpc"] = +projectileDefDistortionsNames.corbuzz_rflrpc = GetDistortionClass("PlasmaTrailProjectile", "Smallish", { theta = 0.09, noiseStrength = 15, noiseScaleSpace = 0.12, radius = 380, distanceFalloff = 2.2, effectStrength = 3.8, }) -explosionDistortionsNames['corbuzz_rflrpc'] = { +explosionDistortionsNames.corbuzz_rflrpc = { GetDistortionClass("AirShockWave", "Smaller", { lifeTime = 9, refractiveIndex = -1.5, decay = 4, shockWidth = -0.5, effectStrength = 1.0, @@ -2053,18 +2053,18 @@ explosionDistortionsNames['corbuzz_rflrpc'] = { -- decay = 8, rampUp = 3, shockWidth = -0.55, -- }) -- } -projectileDefDistortionsNames["corbhmth_corbhmth_weapon"] = +projectileDefDistortionsNames.corbhmth_corbhmth_weapon = GetDistortionClass("PlasmaTrailProjectile", "Smallish", { theta = 0.09, noiseStrength = 3, noiseScaleSpace = 0.5, radius = 200, distanceFalloff = 0.94, }) -projectileDefDistortionsNames["armvulc_rflrpc"] = +projectileDefDistortionsNames.armvulc_rflrpc = GetDistortionClass("PlasmaTrailProjectile", "Smallish", { theta = 0.09, noiseStrength = 5, noiseScaleSpace = 0.4, radius = 380, distanceFalloff = 0.9, }) -explosionDistortionsNames['armvulc_rflrpc'] = { +explosionDistortionsNames.armvulc_rflrpc = { GetDistortionClass("ExploShockWaveL", "Smaller", { --lifeTime = 9, refractiveIndex = -1.5, decay = 4, --shockWidth = -0.5, effectStrength = 1.0, @@ -2074,7 +2074,7 @@ explosionDistortionsNames['armvulc_rflrpc'] = { lifeTime = 80, decay = 40, rampup = 5}), } -projectileDefDistortionsNames["legerailtank_t3_rail_accelerator"] = +projectileDefDistortionsNames.legerailtank_t3_rail_accelerator = GetDistortionClass("RailgunTrailProjectile", "Femto", { }) diff --git a/luaui/configs/airjet_effects.lua b/luaui/configs/airjet_effects.lua index 2e871282a8d..22fb09de69d 100644 --- a/luaui/configs/airjet_effects.lua +++ b/luaui/configs/airjet_effects.lua @@ -2,139 +2,139 @@ return { -- land vechs - ["cortorch"] = { + cortorch = { { color = { 0.7, 0.4, 0.1 }, width = 5, length = 24, piece = "thruster1", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 8, length = 32, piece = "thruster2", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 12, length = 64, piece = "thruster3", light = 1 }, }, - ["legspradarsonarplane"] = { + legspradarsonarplane = { { color = { 0.1, 0.6, 0.4 }, width = 2, length = 22, piece = "thrust1", light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 2, length = 22, piece = "thrust2", light = 1 }, }, -- scouts - ["armpeep"] = { + armpeep = { { color = { 0.7, 0.4, 0.1 }, width = 4, length = 20, piece = "jet1" }, { color = { 0.7, 0.4, 0.1 }, width = 4, length = 20, piece = "jet2" }, }, - ["corfink"] = { + corfink = { { color = { 0.7, 0.4, 0.1 }, width = 2.3, length = 18, piece = "thrusta" }, { color = { 0.7, 0.4, 0.1 }, width = 2.3, length = 18, piece = "thrustb" }, }, -- fighters - ["armfig"] = { + armfig = { { color = { 0.7, 0.4, 0.1 }, width = 6, length = 45, piece = "thrust" }, }, - ["corveng"] = { + corveng = { { color = { 0.7, 0.4, 0.1 }, width = 3.3, length = 24, piece = "thrust1" }, { color = { 0.7, 0.4, 0.1 }, width = 3.3, length = 24, piece = "thrust2" }, }, - ["armsfig"] = { + armsfig = { { color = { 0.2, 0.8, 0.2 }, width = 4, length = 25, piece = "thrust" }, }, - ["armsfig2"] = { + armsfig2 = { { color = { 0.2, 0.8, 0.2 }, width = 8, length = 45, piece = "thrust" }, }, - ["corsfig"] = { + corsfig = { { color = { 0.2, 0.8, 0.2 }, width = 3, length = 32, piece = "thrust" }, }, - ["corsfig2"] = { + corsfig2 = { { color = { 0.2, 0.8, 0.2 }, width = 8, length = 45, piece = "thrust" }, }, - ["armhawk"] = { + armhawk = { { color = { 0.1, 0.4, 0.6 }, width = 7, length = 45, piece = "thrust", light = 1 }, }, - ["corvamp"] = { + corvamp = { { color = { 0.1, 0.4, 0.6 }, width = 3.5, length = 35, piece = "thrusta" }, }, - ["legfig"] = { + legfig = { { color = { 0.2, 0.4, 0.2 }, width = 2, length = 15, piece = "thrust", light = 1}, }, - ["legafigdef"] = { + legafigdef = { { color = { 0.2, 0.8, 0.2 }, width = 3, length = 37, piece = "rightAirjet", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 6, length = 50, piece = "mainAirjet", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 3, length = 38, piece = "leftAirjet", light = 1 }, }, - ["legvenator"] = { + legvenator = { { color = { 0.2, 0.8, 0.2 }, width = 3, length = 24, piece = "lthrust" }, { color = { 0.2, 0.8, 0.2 }, width = 3, length = 24, piece = "rthrust" }, }, - ["legspfighter"] = { + legspfighter = { { color = { 0.1, 0.6, 0.4 }, width = 2, length = 22, piece = "smallThrust1", light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 2, length = 22, piece = "smallThrust2", light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 3, length = 32, piece = "mainThrust", light = 1 }, }, -- radar - ["armawac"] = { + armawac = { { color = { 0.1, 0.4, 0.6 }, width = 3.5, length = 30, piece = "thrust", light = 1 }, }, - ["corawac"] = { + corawac = { { color = { 0.1, 0.4, 0.6 }, width = 4, length = 25, piece = "lthrust", light = 1 }, { color = { 0.1, 0.4, 0.6 }, width = 4, length = 50, piece = "mthrust", light = 1 }, { color = { 0.1, 0.4, 0.6 }, width = 4, length = 25, piece = "rthrust", light = 1 }, }, - ["legwhisper"] = { + legwhisper = { { color = { 0.2, 0.8, 0.2 }, width = 5, length = 37, piece = "bigAirJet1", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 2, length = 50, piece = "littleAirJet", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 5, length = 38, piece = "bigAirJet2", light = 1 }, }, - ["legehovertank"] = { + legehovertank = { { color = { 0.2, 0.8, 0.2 }, width = 7, length = 12, piece = "airjetFlare", light = 1 }, }, - ["corhunt"] = { + corhunt = { { color = { 0.2, 0.8, 0.2 }, width = 4, length = 37, piece = "thrust", light = 1 }, }, --drones - ["armdroneold"] = { + armdroneold = { { color = { 0.7, 0.4, 0.1 }, width = 1.5, length = 6, piece = "thrustl", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 1.5, length = 6, piece = "thrustr", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 2, length = 8, piece = "thrustm", light = 1 }, --, xzVelocity = 1.5 -- removed xzVelocity else the other thrusters get disabled as well }, - ["armdrone"] = { + armdrone = { { color = { 0.7, 0.4, 0.1 }, width = 1.5, length = 6, piece = "thrustl", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 1.5, length = 6, piece = "thrustr", light = 1 }, }, - ["armtdrone"] = { + armtdrone = { { color = { 0.7, 0.4, 0.1 }, width = 1.5, length = 6, piece = "thrustl", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 1.5, length = 6, piece = "thrustr", light = 1 }, }, -- transports - ["armatlas"] = { + armatlas = { { color = { 0.7, 0.4, 0.1 }, width = 3, length = 12, piece = "thrustl", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 3, length = 12, piece = "thrustr", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 4, length = 15, piece = "thrustm", light = 1 }, --, xzVelocity = 1.5 -- removed xzVelocity else the other thrusters get disabled as well }, - ["armhvytrans"] = { + armhvytrans = { { color = { 0.7, 0.4, 0.1 }, width = 5, length = 16, piece = "thrustfl", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 5, length = 16, piece = "thrustfr", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 4, length = 15, piece = "thrustbl", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 4, length = 15, piece = "thrustbr", light = 1 }, --, xzVelocity = 1.5 -- removed xzVelocity else the other thrusters get disabled as well }, - ["corvalk"] = { + corvalk = { { color = { 0.7, 0.4, 0.1 }, width = 6, length = 17, piece = "thrust1", emitVector = { 0, 1, 0 }, light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 6, length = 17, piece = "thrust3", emitVector = { 0, 1, 0 }, light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 6, length = 17, piece = "thrust2", emitVector = { 0, 1, 0 }, light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 6, length = 17, piece = "thrust4", emitVector = { 0, 1, 0 }, light = 1 }, }, - ["corhvytrans"] = { + corhvytrans = { { color = { 0.7, 0.4, 0.1 }, width = 6, length = 17, piece = "thrustfl", emitVector = { 0, 1, 0 }, light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 6, length = 17, piece = "thrustfr", emitVector = { 0, 1, 0 }, light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 6, length = 17, piece = "thrustbl", emitVector = { 0, 1, 0 }, light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 6, length = 17, piece = "thrustbr", emitVector = { 0, 1, 0 }, light = 1 }, }, - ["armdfly"] = { + armdfly = { { color = { 0.1, 0.4, 0.6 }, width = 3.5, length = 35, piece = "thrusta", xzVelocity = 1.5, light = 1 }, { color = { 0.1, 0.4, 0.6 }, width = 3.5, length = 35, piece = "thrustb", xzVelocity = 1.5, light = 1 }, }, - ["corseah"] = { + corseah = { { color = { 0.1, 0.4, 0.6 }, width = 13, length = 25, piece = "thrustrra", emitVector = { 0, 1, 0 }, light = 0.75 }, { color = { 0.1, 0.4, 0.6 }, width = 13, length = 25, piece = "thrustrla", emitVector = { 0, 1, 0 }, light = 0.75 }, { color = { 0.1, 0.4, 0.6 }, width = 10, length = 25, piece = "thrustfra", emitVector = { 0, 1, 0 }, light = 0.75 }, { color = { 0.1, 0.4, 0.6 }, width = 10, length = 25, piece = "thrustfla", emitVector = { 0, 1, 0 }, light = 0.75 }, }, - ["legatrans"] = { + legatrans = { { color = { 0.2, 0.4, 0.2 }, width = 6, length = 17, piece = "rightGroundThrust", emitVector = { 0, 1, 0 }, light = 1 }, { color = { 0.2, 0.4, 0.2 }, width = 6, length = 17, piece = "leftGroundThrust", emitVector = { 0, 1, 0 }, light = 1 }, { color = { 0.2, 0.4, 0.2 }, width = 4, length = 17, piece = "rightMainThrust", emitVector = { 0, 1, 0 }, light = 1 }, @@ -142,7 +142,7 @@ return { { color = { 0.2, 0.4, 0.2 }, width = 2, length = 8.5, piece = "rightMiniThrust", emitVector = { 0, 1, 0 }, light = 1 }, { color = { 0.2, 0.4, 0.2 }, width = 2, length = 8.5, piece = "leftMiniThrust", emitVector = { 0, 1, 0 }, light = 1 }, }, - ["legstronghold"] = { + legstronghold = { { color = { 0.2, 0.8, 0.2 }, width = 3, length = 24, piece = "bthrust1", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.2, 0.8, 0.2 }, width = 3, length = 24, piece = "bthrust2", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.2, 0.8, 0.2 }, width = 3, length = 24, piece = "lthrust1", emitVector = { 0, 1, 0 }, light = 0.6 }, @@ -152,23 +152,23 @@ return { }, -- gunships - ["armkam"] = { + armkam = { { color = { 0.7, 0.4, 0.1 }, width = 3, length = 28, piece = "thrusta", xzVelocity = 1.5, light = 1, emitVector = { 0, 1, 0 } }, { color = { 0.7, 0.4, 0.1 }, width = 3, length = 28, piece = "thrustb", xzVelocity = 1.5, light = 1, emitVector = { 0, 1, 0 } }, }, - ["armblade"] = { + armblade = { { color = { 0.1, 0.4, 0.6 }, width = 3.5, length = 25, piece = "thrust", light = 1, xzVelocity = 1.5 }, }, - ["legmos"] = { + legmos = { { color = { 0.2, 0.4, 0.2 }, width = 3, length = 12, piece = "thrust", emitVector = { 0, 0, -1 }, xzVelocity = 1.2, light = 1 }, }, - ["legmost3"] = { + legmost3 = { { color = { 0.2, 0.8, 0.2 }, width = 4, length = 32, piece = "thrust", emitVector = { 0, 0, -1 }, xzVelocity = 3, light = 1 }, }, - ["legheavydrone"] = { + legheavydrone = { { color = { 0.2, 0.8, 0.2 }, width = 2, length = 16, piece = "thrusttrail", emitVector = { 0, 0, -1 }, xzVelocity = 1.5, light = 1 }, }, - ["corape"] = { + corape = { { color = { 0.1, 0.4, 0.6 }, width = 4, length = 24, piece = "rthrust", emitVector = { 0, 0, -1 }, xzVelocity = 1.5, light = 1 }, { color = { 0.1, 0.4, 0.6 }, width = 4, length = 24, piece = "lthrust", emitVector = { 0, 0, -1 }, xzVelocity = 1.5, light = 1 }, --{color={0.1,0.4,0.6}, width=2.2, length=4.7, piece="lhthrust1", emitVector= {1,0,0}, light=1}, @@ -176,38 +176,38 @@ return { --{color={0.1,0.4,0.6}, width=2.2, length=4.7, piece="lhthrust2", emitVector= {-1,0,0}, light=1}, --{color={0.1,0.4,0.6}, width=2.2, length=4.7, piece="rhthrust1", emitVector= {-1,0,0}, light=1}, }, - ["armseap"] = { + armseap = { { color = { 0.2, 0.8, 0.2 }, width = 5, length = 35, piece = "thrustm", light = 1 }, }, - ["corseap"] = { + corseap = { { color = { 0.2, 0.8, 0.2 }, width = 3, length = 32, piece = "thrust", light = 1 }, }, - ["legspcarrier"] = { + legspcarrier = { { color = { 0.1, 0.6, 0.4 }, width = 4, length = 22, piece = "thrust1a", light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 4, length = 22, piece = "thrust1b", light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 4, length = 22, piece = "thrust1c", light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 4, length = 22, piece = "thrust2a", light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 4, length = 22, piece = "thrust2b", light = 1 }, }, - ["corcrw"] = { + corcrw = { { color = { 0.1, 0.4, 0.6 }, width = 12, length = 36, piece = "thrustrra", emitVector = { 0, 1, -1 }, light = 0.6 }, { color = { 0.1, 0.4, 0.6 }, width = 12, length = 36, piece = "thrustrla", emitVector = { 0, 1, -1 }, light = 0.6 }, { color = { 0.1, 0.4, 0.6 }, width = 10, length = 30, piece = "thrustfra", emitVector = { 0, 1, -1 }, light = 0.6 }, { color = { 0.1, 0.4, 0.6 }, width = 10, length = 30, piece = "thrustfla", emitVector = { 0, 1, -1 }, light = 0.6 }, }, - ["corcrwh"] = { + corcrwh = { { color = { 0.1, 0.4, 0.6 }, width = 12, length = 36, piece = "thrustrra", emitVector = { 0, 1, -1 }, light = 0.6 }, { color = { 0.1, 0.4, 0.6 }, width = 12, length = 36, piece = "thrustrla", emitVector = { 0, 1, -1 }, light = 0.6 }, { color = { 0.1, 0.4, 0.6 }, width = 10, length = 30, piece = "thrustfra", emitVector = { 0, 1, -1 }, light = 0.6 }, { color = { 0.1, 0.4, 0.6 }, width = 10, length = 30, piece = "thrustfla", emitVector = { 0, 1, -1 }, light = 0.6 }, }, - ["corcrwt4"] = { + corcrwt4 = { { color = { 0.1, 0.4, 0.6 }, width = 19, length = 50, piece = "thrustrra", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.1, 0.4, 0.6 }, width = 19, length = 50, piece = "thrustrla", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.1, 0.4, 0.6 }, width = 17, length = 44, piece = "thrustfra", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.1, 0.4, 0.6 }, width = 17, length = 44, piece = "thrustfla", emitVector = { 0, 1, 0 }, light = 0.6 }, }, - ["legfort"] = { + legfort = { { color = { 0.2, 0.8, 0.2 }, width = 3, length = 24, piece = "thrust1", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.2, 0.8, 0.2 }, width = 3, length = 24, piece = "thrust2", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.2, 0.8, 0.2 }, width = 3, length = 24, piece = "thrust3", emitVector = { 0, 1, 0 }, light = 0.6 }, @@ -220,7 +220,7 @@ return { { color = { 0.2, 0.8, 0.2 }, width = 6, length = 32, piece = "thrust9", emitVector = { 1, 1, 0 }, light = 0.6 }, { color = { 0.2, 0.8, 0.2 }, width = 6, length = 32, piece = "thrust10", emitVector = { 1, 1, 0 }, light = 0.6 }, }, - ["legfortt4"] = { + legfortt4 = { { color = { 0.1, 0.8, 0.1 }, width = 6, length = 48, piece = "thrust1", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.1, 0.8, 0.1 }, width = 6, length = 48, piece = "thrust2", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.1, 0.8, 0.1 }, width = 6, length = 48, piece = "thrust3", emitVector = { 0, 1, 0 }, light = 0.6 }, @@ -233,177 +233,177 @@ return { { color = { 0.1, 0.8, 0.1 }, width = 12, length = 64, piece = "thrust9", emitVector = { 1, 1, 0 }, light = 0.6 }, { color = { 0.1, 0.8, 0.1 }, width = 12, length = 64, piece = "thrust10", emitVector = { 1, 1, 0 }, light = 0.6 }, }, - ["legsptorpgunship"] = { + legsptorpgunship = { { color = { 0.1, 0.6, 0.4 }, width = 3, length = 20, piece = "smallThurst1", emitVector = { 0, -1, 0 }, light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 3, length = 20, piece = "smallThurst2", emitVector = { 0, -1, 0 }, light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 5, length = 26, piece = "mainThrust", light = 1 }, }, - ["legspsurfacegunship"] = { + legspsurfacegunship = { { color = { 0.1, 0.6, 0.4 }, width = 3, length = 18, piece = "smallThrust1", emitVector = { 0, -1, 0 }, light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 3, length = 18, piece = "smallThrust2", emitVector = { 0, -1, 0 }, light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 4, length = 24, piece = "mainThrust", light = 1 }, }, - ["corcut"] = { + corcut = { { color = { 0.2, 0.8, 0.2 }, width = 3.7, length = 15, piece = "thrusta", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 3.7, length = 15, piece = "thrustb", light = 1 }, }, -- bladewing - ["corbw"] = { + corbw = { { color = { 0.1, 0.4, 0.6 }, width = 1.8, length = 7.5, piece = "thrusta" }, { color = { 0.1, 0.4, 0.6 }, width = 1.8, length = 7.5, piece = "thrustb" }, }, - ["cordroneold"] = { + cordroneold = { { color = { 0.1, 0.4, 0.6 }, width = 1.2, length = 5, piece = "thrusta" }, { color = { 0.1, 0.4, 0.6 }, width = 1.2, length = 5, piece = "thrustb" }, }, - ["cordrone"] = { + cordrone = { { color = { 0.1, 0.4, 0.6 }, width = 1.2, length = 5, piece = "thrusta" }, { color = { 0.1, 0.4, 0.6 }, width = 1.2, length = 5, piece = "thrustb" }, }, - ["cortdrone"] = { + cortdrone = { { color = { 0.1, 0.4, 0.6 }, width = 1.2, length = 5, piece = "thrusta" }, { color = { 0.1, 0.4, 0.6 }, width = 1.2, length = 5, piece = "thrustb" }, }, -- bombers - ["armstil"] = { + armstil = { { color = { 0.1, 0.4, 0.6 }, width = 3.5, length = 40, piece = "thrusta", light = 1 }, { color = { 0.1, 0.4, 0.6 }, width = 3.5, length = 40, piece = "thrustb", light = 1 }, }, - ["armthund"] = { + armthund = { { color = { 0.7, 0.4, 0.1 }, width = 2, length = 17, piece = "thrust1", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 2, length = 17, piece = "thrust2" }, { color = { 0.7, 0.4, 0.1 }, width = 2, length = 17, piece = "thrust3" }, { color = { 0.7, 0.4, 0.1 }, width = 2, length = 17, piece = "thrust4", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 4, length = 25, piece = "thrustc", light = 1.3 }, }, - ["armthundt4"] = { + armthundt4 = { { color = { 0.7, 0.4, 0.1 }, width = 9, length = 60, piece = "thrust1", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 9, length = 60, piece = "thrust2" }, { color = { 0.7, 0.4, 0.1 }, width = 9, length = 60, piece = "thrust3" }, { color = { 0.7, 0.4, 0.1 }, width = 9, length = 60, piece = "thrust4", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 13, length = 85, piece = "thrustc", light = 1.3 }, }, - ["armpnix"] = { + armpnix = { { color = { 0.1, 0.4, 0.6 }, width = 7, length = 35, piece = "thrusta", light = 1 }, { color = { 0.1, 0.4, 0.6 }, width = 7, length = 35, piece = "thrustb", light = 1 }, }, - ["corshad"] = { + corshad = { { color = { 0.7, 0.4, 0.1 }, width = 4, length = 24, piece = "thrusta1", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 4, length = 24, piece = "thrusta2", light = 1 }, { color = { 0.7, 0.4, 0.1 }, width = 5, length = 33, piece = "thrustb", light = 1 }, }, - ["armliche"] = { + armliche = { { color = { 0.8, 0.15, 0.15 }, width = 3.5, length = 44, piece = "thrusta", light = 1 }, { color = { 0.8, 0.15, 0.15 }, width = 3.5, length = 44, piece = "thrustb", light = 1 }, { color = { 0.8, 0.15, 0.15 }, width = 3.5, length = 44, piece = "thrustc", light = 1 }, }, - ["armlichet4"] = { + armlichet4 = { { color = { 0.8, 0.15, 0.15 }, width = 10.5, length = 132, piece = "thrusta", light = 1.5 }, { color = { 0.8, 0.15, 0.15 }, width = 10.5, length = 132, piece = "thrustb", light = 1.5 }, { color = { 0.8, 0.15, 0.15 }, width = 10.5, length = 132, piece = "thrustc", light = 1.5 }, }, - ["cortitan"] = { + cortitan = { { color = { 0.1, 0.4, 0.6 }, width = 5, length = 35, piece = "thrusta1", light = 1 }, { color = { 0.1, 0.4, 0.6 }, width = 5, length = 35, piece = "thrusta2", light = 1 }, { color = { 0.1, 0.4, 0.6 }, width = 5, length = 35, piece = "thrustb1", light = 1 }, { color = { 0.1, 0.4, 0.6 }, width = 5, length = 35, piece = "thrustb2", light = 1 }, }, - ["armlance"] = { + armlance = { { color = { 0.1, 0.4, 0.6 }, width = 5, length = 40, piece = "thrust1", light = 1 }, }, - ["corhurc"] = { + corhurc = { { color = { 0.1, 0.4, 0.6 }, width = 8, length = 50, piece = "thrustb", light = 1 }, { color = { 0.1, 0.4, 0.6 }, width = 5, length = 35, piece = "thrusta1" }, { color = { 0.1, 0.4, 0.6 }, width = 5, length = 35, piece = "thrusta2" }, }, - ["legnap"] = { + legnap = { { color = { 0.1, 0.4, 0.6 }, width = 8, length = 50, piece = "thrustb", light = 1 }, { color = { 0.1, 0.4, 0.6 }, width = 5, length = 35, piece = "thrusta1" }, { color = { 0.1, 0.4, 0.6 }, width = 5, length = 35, piece = "thrusta2" }, }, - ["legcib"] = { + legcib = { { color = { 0.2, 0.4, 0.2 }, width = 4, length = 25, piece = "lThrust", light = 1.3 }, { color = { 0.2, 0.4, 0.2 }, width = 4, length = 25, piece = "rThrust", light = 1.3 }, }, - ["legkam"] = { + legkam = { { color = { 0.2, 0.4, 0.2 }, width = 4, length = 25, piece = "thrust", light = 1 }, }, - ["legatorpbomber"] = { + legatorpbomber = { { color = { 0.2, 0.8, 0.2 }, width = 4, length = 25, piece = "rightAJet", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 4, length = 25, piece = "leftAJet", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 3, length = 19, piece = "rightBJet", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 3, length = 19, piece = "leftBJet", light = 1 }, }, - ["legaca"] = { + legaca = { { color = { 0.2, 0.8, 0.2 }, width = 5, length = 15, piece = "airjet1", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 5, length = 15, piece = "airjet2", light = 1 }, }, - ["armsb"] = { + armsb = { { color = { 0.2, 0.8, 0.2 }, width = 4, length = 36, piece = "thrustc", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 2.2, length = 18, piece = "thrusta", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 2.2, length = 18, piece = "thrustb", light = 1 }, }, - ["corsb"] = { + corsb = { { color = { 0.2, 0.8, 0.2 }, width = 3.3, length = 40, piece = "thrusta", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 3.3, length = 40, piece = "thrustb", light = 1 }, }, - ["legspbomber"] = { + legspbomber = { { color = { 0.1, 0.6, 0.4 }, width = 2, length = 48, piece = "microThrust1", light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 2, length = 48, piece = "microThrust2", light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 3, length = 28, piece = "sideThrust1", light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 3, length = 28, piece = "sideThrust2", light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 4, length = 24, piece = "mainThrust", light = 1 }, }, - ["legmineb"] = { + legmineb = { { color = { 0.2, 0.8, 0.2 }, width = 3.3, length = 40, piece = "lthrusttrail", light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 3.3, length = 40, piece = "rthrusttrail", light = 1 }, }, - ["cords"] = { + cords = { { color = { 0.1, 0.4, 0.6 }, width = 10, length = 25, piece = "flarefl", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.1, 0.4, 0.6 }, width = 10, length = 25, piece = "flarefr", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.1, 0.4, 0.6 }, width = 10, length = 25, piece = "flarebl", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.1, 0.4, 0.6 }, width = 10, length = 25, piece = "flarebr", emitVector = { 0, 1, 0 }, light = 0.6 }, }, - ["legphoenix"] = { + legphoenix = { { color = { 0.2, 0.8, 0.2 }, width = 5, length = 36, piece = "rthrust", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.2, 0.8, 0.2 }, width = 5, length = 36, piece = "rrthrust", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.2, 0.8, 0.2 }, width = 5, length = 36, piece = "lthrust", emitVector = { 0, 1, 0 }, light = 0.6 }, { color = { 0.2, 0.8, 0.2 }, width = 5, length = 36, piece = "llthrust", emitVector = { 0, 1, 0 }, light = 0.6 }, }, - ["leglts"] = { + leglts = { { color = { 0.2, 0.4, 0.2 }, width = 5, length = 32, piece = "lthrust", emitVector = { 0, 1, 0 }, light = 0.5 }, { color = { 0.2, 0.4, 0.2 }, width = 5, length = 32, piece = "rthrust", emitVector = { 0, 1, 0 }, light = 0.5 }, }, -- construction - ["armca"] = { + armca = { { color = { 0.7, 0.4, 0.1 }, width = 6, length = 24, piece = "thrust", xzVelocity = 1.2 }, }, - ["armaca"] = { + armaca = { { color = { 0.1, 0.4, 0.6 }, width = 6, length = 22, piece = "thrust", xzVelocity = 1.2 }, }, - ["corca"] = { + corca = { { color = { 0.1, 0.4, 0.6 }, width = 4, length = 15, piece = "thrust", xzVelocity = 1.2 }, }, - ["legca"] = { + legca = { { color = { 0.2, 0.4, 0.2 }, width = 4, length = 15, piece = "mainThrust", xzVelocity = 1.2 }, { color = { 0.2, 0.4, 0.2 }, width = 2, length = 7, piece = "thrustA", xzVelocity = 1.2 }, { color = { 0.2, 0.4, 0.2 }, width = 2, length = 7, piece = "thrustB", xzVelocity = 1.2 }, }, - ["coraca"] = { + coraca = { { color = { 0.1, 0.4, 0.6 }, width = 6, length = 22, piece = "thrust", xzVelocity = 1.2 }, }, - ["armcsa"] = { + armcsa = { { color = { 0.2, 0.8, 0.2 }, width = 5, length = 17, piece = "thrusta" }, { color = { 0.2, 0.8, 0.2 }, width = 5, length = 17, piece = "thrustb" }, }, - ["corcsa"] = { + corcsa = { { color = { 0.2, 0.8, 0.2 }, width = 5, length = 17, piece = "thrust1" }, { color = { 0.2, 0.8, 0.2 }, width = 5, length = 17, piece = "thrust2" }, }, - ["legspcon"] = { + legspcon = { { color = { 0.1, 0.6, 0.4 }, width = 4, length = 16, piece = "smallThrust1", emitVector = { 0, -1, 0 }, light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 3, length = 16, piece = "smallThrust2", emitVector = { 0, -1, 0 }, light = 1 }, { color = { 0.1, 0.6, 0.4 }, width = 4, length = 18, piece = "mainThrust1", light = 1 }, @@ -411,30 +411,30 @@ return { }, -- Legion t2 subs - ["leganavyheavysub"] = { + leganavyheavysub = { { color = { 0.2, 0.8, 0.2 }, width = 3, length = 20, piece = "thrust1", emitVector = { 0, 0, -1 }, xzVelocity = 1.5, light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 3, length = 20, piece = "thrust2", emitVector = { 0, 0, -1 }, xzVelocity = 1.5, light = 1 }, { color = { 0.2, 0.8, 0.2 }, width = 3, length = 20, piece = "thrust3", emitVector = { 0, 0, -1 }, xzVelocity = 1.5, light = 1 }, }, - ["leganavybattlesub"] = { + leganavybattlesub = { { color = { 0.2, 0.8, 0.2 }, width = 3, length = 20, piece = "thrusttrail", emitVector = { 0, 0, -1 }, xzVelocity = 1.5, light = 1 }, }, -- flying ships - ["armfepocht4"] = { + armfepocht4 = { { color = { 0.7, 0.4, 0.1 }, width = 13, length = 27, piece = "thrustl1", light = 0.62 }, { color = { 0.7, 0.4, 0.1 }, width = 13, length = 27, piece = "thrustr1", light = 0.62 }, { color = { 0.7, 0.4, 0.1 }, width = 17, length = 38, piece = "thrustl2", light = 0.62 }, { color = { 0.7, 0.4, 0.1 }, width = 17, length = 38, piece = "thrustr2", light = 0.62 }, }, - ["corfblackhyt4"] = { + corfblackhyt4 = { { color = { 0.7, 0.4, 0.1 }, width = 14, length = 27, piece = "thrustl1", light = 0.62 }, { color = { 0.7, 0.4, 0.1 }, width = 14, length = 27, piece = "thrustr1", light = 0.62 }, { color = { 0.7, 0.4, 0.1 }, width = 19, length = 38, piece = "thrustl2", light = 0.62 }, { color = { 0.7, 0.4, 0.1 }, width = 19, length = 38, piece = "thrustr2", light = 0.62 }, }, - ["cordronecarryair"] = { + cordronecarryair = { { color = { 0.7, 0.4, 0.1 }, width = 13, length = 25, piece = "thrustl1", light = 0.58 }, { color = { 0.7, 0.4, 0.1 }, width = 13, length = 25, piece = "thrustr1", light = 0.58 }, { color = { 0.7, 0.4, 0.1 }, width = 13, length = 25, piece = "thrustl2", light = 0.58 }, diff --git a/luaui/configs/buildmenu_sorting.lua b/luaui/configs/buildmenu_sorting.lua index cc41ea7e6e5..7fcb6df7640 100644 --- a/luaui/configs/buildmenu_sorting.lua +++ b/luaui/configs/buildmenu_sorting.lua @@ -2,360 +2,360 @@ local unitOrderTable = { -- UNITS --CONSTRUCTORS - ['armck'] = 001100, --BOTS - ['corck'] = 001110, - ['legck'] = 001115, + armck = 001100, --BOTS + corck = 001110, + legck = 001115, - ['armcv'] = 001120, --VEH - ['corcv'] = 001130, - ['legcv'] = 001135, - ['armbeaver'] = 001140, - ['cormuskrat'] = 001150, - ['legotter'] = 001155, + armcv = 001120, --VEH + corcv = 001130, + legcv = 001135, + armbeaver = 001140, + cormuskrat = 001150, + legotter = 001155, - ['armca'] = 001160, --AIR - ['corca'] = 001165, - ['legca'] = 001166, + armca = 001160, --AIR + corca = 001165, + legca = 001166, - ['legassistdrone'] = 001167, - ['armassistdrone'] = 001168, --ASSISTDRONES - ['corassistdrone'] = 001169, + legassistdrone = 001167, + armassistdrone = 001168, --ASSISTDRONES + corassistdrone = 001169, - ['armcsa'] = 001170, --SEAPLANES - ['corcsa'] = 001175, - ['legspcon'] = 001176, + armcsa = 001170, --SEAPLANES + corcsa = 001175, + legspcon = 001176, - ['armcs'] = 001180, --SHIPS - ['corcs'] = 001190, - ['legnavyconship'] = 001191, + armcs = 001180, --SHIPS + corcs = 001190, + legnavyconship = 001191, - ['armch'] = 002000, --HOVER - ['corch'] = 002050, - ['legch'] = 002060, + armch = 002000, --HOVER + corch = 002050, + legch = 002060, - ['armrectr'] = 002100, --REZ BOTS - ['cornecro'] = 002150, - ['legrezbot'] = 002151, + armrectr = 002100, --REZ BOTS + cornecro = 002150, + legrezbot = 002151, - ['armmlv'] = 002200, --MINELAYERS - ['cormlv'] = 002250, - ['legmlv'] = 002250, + armmlv = 002200, --MINELAYERS + cormlv = 002250, + legmlv = 002250, - ['armrecl'] = 002300, --REZ SUBS - ['correcl'] = 002350, - ['legnavyrezsub'] = 002351, + armrecl = 002300, --REZ SUBS + correcl = 002350, + legnavyrezsub = 002351, - ['armack'] = 002400, - ['corack'] = 002450, - ['legack'] = 002455, + armack = 002400, + corack = 002450, + legack = 002455, - ['armacv'] = 002500, - ['coracv'] = 002550, - ['legacv'] = 002555, + armacv = 002500, + coracv = 002550, + legacv = 002555, - ['armaca'] = 002600, - ['coraca'] = 002650, - ['legaca'] = 002660, + armaca = 002600, + coraca = 002650, + legaca = 002660, - ['armacsub'] = 002700, - ['coracsub'] = 002750, - ['leganavyconsub'] = 002760, + armacsub = 002700, + coracsub = 002750, + leganavyconsub = 002760, --NANO SUPPORT - ['armfark'] = 003100, --BOTS - ['corfast'] = 003200, - ['legaceb'] = 003250, + armfark = 003100, --BOTS + corfast = 003200, + legaceb = 003250, - ['armconsul'] = 003300, --VEH - ['legafcv'] = 003305, --VEH - ['corprinter'] = 003325, --VEH - ['corvac'] = 003326, --VEH - ['corvacct'] = 003327, --VEH - ['corforge'] = 003350, --VEH + armconsul = 003300, --VEH + legafcv = 003305, --VEH + corprinter = 003325, --VEH + corvac = 003326, --VEH + corvacct = 003327, --VEH + corforge = 003350, --VEH - ['armmls'] = 003400, --SHIP - ['cormls'] = 003500, --SHIP - ['leganavyengineer'] = 003510, --SHIP + armmls = 003400, --SHIP + cormls = 003500, --SHIP + leganavyengineer = 003510, --SHIP - ['armdecom'] = 003600, --SUPPORT COMS - ['legdecom'] = 003650, - ['cordecom'] = 003700, + armdecom = 003600, --SUPPORT COMS + legdecom = 003650, + cordecom = 003700, - ['cormando'] = 003800, --COMMANDO + cormando = 003800, --COMMANDO - ['armspy'] = 003900, --SPIES - ['corspy'] = 004000, - ['legaspy'] = 004001, - ['corphantom'] = 004010, + armspy = 003900, --SPIES + corspy = 004000, + legaspy = 004001, + corphantom = 004010, -- AIR SCOUTS LAND UNARMED - ['armpeep'] = 004030, --AIR - ['corfink'] = 004040, - ['armsehak'] = 004050, --SEAPLANES - ['corhunt'] = 004051, - ['legspradarsonarplane'] = 004052, - ['armawac'] = 004060, - ['corawac'] = 004061, - ['legwhisper'] = 004062, + armpeep = 004030, --AIR + corfink = 004040, + armsehak = 004050, --SEAPLANES + corhunt = 004051, + legspradarsonarplane = 004052, + armawac = 004060, + corawac = 004061, + legwhisper = 004062, -- SCOUTS/UTILITY LAND - ['armmark'] = 004100, - ['corvoyr'] = 004110, - ['legaradk'] = 004115, - ['armaser'] = 004120, - ['corspec'] = 004130, - ['legajamk'] = 004135, - - ['armseer'] = 004200, - ['corvrad'] = 004210, - ['armjam'] = 004220, - ['coreter'] = 004230, - ['legavrad'] = 004221, - ['legavjam'] = 004222, - - ['armsjam'] = 004250, - ['corsjam'] = 004260, + armmark = 004100, + corvoyr = 004110, + legaradk = 004115, + armaser = 004120, + corspec = 004130, + legajamk = 004135, + + armseer = 004200, + corvrad = 004210, + armjam = 004220, + coreter = 004230, + legavrad = 004221, + legavjam = 004222, + + armsjam = 004250, + corsjam = 004260, -- AIRCRAFT - ['armfig'] = 004300, --FIGHTERS - ['corveng'] = 004305, - ['legfig'] = 004306, - ['armhawk'] = 004310, --FIGHTERS T2 - ['corvamp'] = 004315, - ['legionnaire'] = 004316, - ['legafigdef'] = 004316, - ['legvenator'] = 004317, - ['armsfig2'] = 004316, -- T2 Heavy Fighter (air rework mod) - ['corsfig2'] = 004317, - - ['armkam'] = 004320, --GUNSHIPS - ['legmos'] = 004322, - ['armsaber'] = 004325, - ['corcut'] = 004330, - ['legspsurfacegunship'] = 004331, - ['legstronghold'] = 004332, - - ['armbrawl'] = 004335, --GUNSHIPS T2 - ['corape'] = 004340, - ['armblade'] = 004345, - ['corcrw'] = 004348, - ['corcrwh'] = 004347, - ['legfort'] = 004349, - - ['armthund'] = 004350, --BOMBERS - ['corshad'] = 004355, - ['legcib'] = 004356, - ['legkam'] = 004357, - ['armsb'] = 004360, - ['corsb'] = 004365, - ['legspbomber'] = 004366, - - ['armpnix'] = 004370, --BOMBERS T2 - ['corhurc'] = 004380, - ['legnap'] = 004381, - ['legmineb'] = 004382, - ['legphoenix'] = 004383, - ['armliche'] = 004385, - ['armstil'] = 004390, + armfig = 004300, --FIGHTERS + corveng = 004305, + legfig = 004306, + armhawk = 004310, --FIGHTERS T2 + corvamp = 004315, + legionnaire = 004316, + legafigdef = 004316, + legvenator = 004317, + armsfig2 = 004316, -- T2 Heavy Fighter (air rework mod) + corsfig2 = 004317, + + armkam = 004320, --GUNSHIPS + legmos = 004322, + armsaber = 004325, + corcut = 004330, + legspsurfacegunship = 004331, + legstronghold = 004332, + + armbrawl = 004335, --GUNSHIPS T2 + corape = 004340, + armblade = 004345, + corcrw = 004348, + corcrwh = 004347, + legfort = 004349, + + armthund = 004350, --BOMBERS + corshad = 004355, + legcib = 004356, + legkam = 004357, + armsb = 004360, + corsb = 004365, + legspbomber = 004366, + + armpnix = 004370, --BOMBERS T2 + corhurc = 004380, + legnap = 004381, + legmineb = 004382, + legphoenix = 004383, + armliche = 004385, + armstil = 004390, -- SCOUTS LAND ARMED - ['armflea'] = 004400, --BOTS + armflea = 004400, --BOTS - ['armfav'] = 004410, --VEH - ['corfav'] = 004420, - ['legscout'] = 004430, + armfav = 004410, --VEH + corfav = 004420, + legscout = 004430, - ['armsh'] = 004500, --HOVER - ['corsh'] = 004510, - ['legsh'] = 004520, + armsh = 004500, --HOVER + corsh = 004510, + legsh = 004520, -- EMP - ['corbw'] = 004800, --EMP - ['armspid'] = 004810, --EMP + corbw = 004800, --EMP + armspid = 004810, --EMP -- T1 LAND ATTACK - ['armpw'] = 005000, --FAST - ['corak'] = 005010, - ['leggob'] = 005015, - ['leglob'] = 005016, - ['armflash'] = 005020, - ['corgator'] = 005030, - ['leghades'] = 005031, - ['legcen'] = 005032, - - ['armjanus'] = 005200, --MAIN BATTLE - ['corlevlr'] = 005210, - ['armstump'] = 005220, - ['corraid'] = 005230, - ['leghelios'] = 005231, - ['leggat'] = 005232, - ['armanac'] = 005240, - ['corsnap'] = 005250, - ['legner'] = 005255, - - ['armrock'] = 005300, --ROCKETS - ['corstorm'] = 005310, - ['legbal'] = 005311, - - ['armham'] = 005400, --ARTILLERY - ['corthud'] = 005410, - ['armart'] = 005420, - ['corwolv'] = 005430, - ['legbar'] = 005435, - ['armmh'] = 005440, - ['cormh'] = 005450, - ['legmh'] = 005460, - - - ['armwar'] = 005600, --STRONK - ['legkark'] = 005610, - ['corkark'] = 005620, - - ['armsam'] = 005800, --LAND + AA - ['cormist'] = 005810, - ['legrail'] = 005811, - - ['armpincer'] = 005900, --LAND + AMPHIBIOUS - ['corgarp'] = 005910, - ['legamphtank'] = 005920, + armpw = 005000, --FAST + corak = 005010, + leggob = 005015, + leglob = 005016, + armflash = 005020, + corgator = 005030, + leghades = 005031, + legcen = 005032, + + armjanus = 005200, --MAIN BATTLE + corlevlr = 005210, + armstump = 005220, + corraid = 005230, + leghelios = 005231, + leggat = 005232, + armanac = 005240, + corsnap = 005250, + legner = 005255, + + armrock = 005300, --ROCKETS + corstorm = 005310, + legbal = 005311, + + armham = 005400, --ARTILLERY + corthud = 005410, + armart = 005420, + corwolv = 005430, + legbar = 005435, + armmh = 005440, + cormh = 005450, + legmh = 005460, + + + armwar = 005600, --STRONK + legkark = 005610, + corkark = 005620, + + armsam = 005800, --LAND + AA + cormist = 005810, + legrail = 005811, + + armpincer = 005900, --LAND + AMPHIBIOUS + corgarp = 005910, + legamphtank = 005920, -- T2 LAND ATTACK - ['armgremlin'] = 006005, - - ['armfast'] = 006100, --FAST - ['legstr'] = 006105, - ['corpyro'] = 006110, - ['armlatnk'] = 006120, - ['cortorch'] = 006125, - ['legmrv'] = 006130, - - ['armzeus'] = 006300, --MAIN BATTLE - ['armmav'] = 006310, - ['armbull'] = 006320, - ['corftiger'] = 006325, - ['correap'] = 006330, - ['legaskirmtank'] = 006335, - ['armmanni'] = 006340, - ['corgatreap'] = 006350, - - ['corhrk'] = 006400, --ROCKETS - ['leghrk'] = 006410, - ['corvroc'] = 006420, - ['armmerl'] = 006430, - ['legavroc'] = 006435, - ['corban'] = 006440, - ['legmed'] = 006450, - - ['armfido'] = 006500, --ARTILLERY - ['cormort'] = 006510, - ['legbart'] = 006515, - ['legvcarry'] = 006516, - ['legspcarrier'] = 006517, - ['armmart'] = 006520, - ['cormart'] = 006530, - ['legamcluster'] = 006535, - ['cortrem'] = 006540, - ['leginf'] = 006550, - - ['armsptk'] = 006600, --ALL-TERRAIN - ['cortermite'] = 006610, - ['leginfestor'] = 006614, - ['legsrail'] = 006615, - ['legsrailt4'] = 006616, - - ['armfboy'] = 006700, --STRONK - ['corcan'] = 006710, - ['legshot'] = 006715, - ['armsnipe'] = 006720, - ['cordeadeye'] = 006725, - ['corsumo'] = 006730, - ['corgol'] = 006740, - ['leginc'] = 006750, - ['legaheattank'] = 006760, - - ['armvader'] = 006810, --AMPHIBIOUS KAMIKAZE BOMBS - ['corroach'] = 006820, - ['legsnapper'] = 006825, - ['corsktl'] = 006830, - - ['armamph'] = 006900, --LAND + AMPHIBIOUS - ['coramph'] = 006910, - ['legamph'] = 006915, - ['armcroc'] = 006920, - ['corseal'] = 006930, - ['corsala'] = 006935, - ['corparrow'] = 006940, - ['legfloat'] = 006941, + armgremlin = 006005, + + armfast = 006100, --FAST + legstr = 006105, + corpyro = 006110, + armlatnk = 006120, + cortorch = 006125, + legmrv = 006130, + + armzeus = 006300, --MAIN BATTLE + armmav = 006310, + armbull = 006320, + corftiger = 006325, + correap = 006330, + legaskirmtank = 006335, + armmanni = 006340, + corgatreap = 006350, + + corhrk = 006400, --ROCKETS + leghrk = 006410, + corvroc = 006420, + armmerl = 006430, + legavroc = 006435, + corban = 006440, + legmed = 006450, + + armfido = 006500, --ARTILLERY + cormort = 006510, + legbart = 006515, + legvcarry = 006516, + legspcarrier = 006517, + armmart = 006520, + cormart = 006530, + legamcluster = 006535, + cortrem = 006540, + leginf = 006550, + + armsptk = 006600, --ALL-TERRAIN + cortermite = 006610, + leginfestor = 006614, + legsrail = 006615, + legsrailt4 = 006616, + + armfboy = 006700, --STRONK + corcan = 006710, + legshot = 006715, + armsnipe = 006720, + cordeadeye = 006725, + corsumo = 006730, + corgol = 006740, + leginc = 006750, + legaheattank = 006760, + + armvader = 006810, --AMPHIBIOUS KAMIKAZE BOMBS + corroach = 006820, + legsnapper = 006825, + corsktl = 006830, + + armamph = 006900, --LAND + AMPHIBIOUS + coramph = 006910, + legamph = 006915, + armcroc = 006920, + corseal = 006930, + corsala = 006935, + corparrow = 006940, + legfloat = 006941, -- T2 HOVER - ['corhal'] = 006950, + corhal = 006950, --T3 LAND ATTACK - ['armmar'] = 007000, - ['legjav'] = 007005, - ['corcat'] = 007010, - ['legbunk'] = 007015, - ['armraz'] = 007020, - ['corkarg'] = 007030, - ['armvang'] = 007040, - ['legeallterrainmech'] = 007041, - ['legelrpcmech'] = 007042, - ['corshiva'] = 007050, - ['legkeres'] = 007051, - ['legerailtank'] = 007052, - ['legpede'] = 007055, - ['armthor'] = 007060, - ['legeshotgunmech'] = 007065, - ['leegmech'] = 007066, - ['corkorg'] = 007070, - ['legeheatraymech'] = 007071, - ['armbanth'] = 007080, - ['corjugg'] = 007090, + armmar = 007000, + legjav = 007005, + corcat = 007010, + legbunk = 007015, + armraz = 007020, + corkarg = 007030, + armvang = 007040, + legeallterrainmech = 007041, + legelrpcmech = 007042, + corshiva = 007050, + legkeres = 007051, + legerailtank = 007052, + legpede = 007055, + armthor = 007060, + legeshotgunmech = 007065, + leegmech = 007066, + corkorg = 007070, + legeheatraymech = 007071, + armbanth = 007080, + corjugg = 007090, --T3 HOVER - ['armlun'] = 007100, --hover - ['corsok'] = 007110, --hover - ['legehovertank'] = 007111, --hover + armlun = 007100, --hover + corsok = 007110, --hover + legehovertank = 007111, --hover --T4 LAND ATTACK (SCAVS) - ['armmeatball'] = 007200, - ['armlunchbox'] = 007210, - ['armassimilator'] = 007220, - - ['armpwt4'] = 007300, - ['corakt4'] = 007310, - ['leggobt3'] = 007315, - ['armsptkt4'] = 007320, - ['cordemon'] = 007330, - ['corkarganetht4'] = 007340, - ['corthermite'] = 007341, - - ['armvadert4'] = 007400, - ['armrattet4'] = 007410, - ['corgolt4'] = 007420, - - ['armthundt4'] = 007500, - ['armfepocht4'] = 007510, - ['corfblackhyt4'] = 007520, - ['legmost3'] = 007525, - ['corcrwt4'] = 007530, - ['legfortt4'] = 007540, + armmeatball = 007200, + armlunchbox = 007210, + armassimilator = 007220, + + armpwt4 = 007300, + corakt4 = 007310, + leggobt3 = 007315, + armsptkt4 = 007320, + cordemon = 007330, + corkarganetht4 = 007340, + corthermite = 007341, + + armvadert4 = 007400, + armrattet4 = 007410, + corgolt4 = 007420, + + armthundt4 = 007500, + armfepocht4 = 007510, + corfblackhyt4 = 007520, + legmost3 = 007525, + corcrwt4 = 007530, + legfortt4 = 007540, -- LAND AA - ['armjeth'] = 008000, - ['corcrash'] = 008010, - ['legaabot'] = 008011, - ['armaak'] = 008020, - ['coraak'] = 008030, - ['legadvaabot'] = 008031, + armjeth = 008000, + corcrash = 008010, + legaabot = 008011, + armaak = 008020, + coraak = 008030, + legadvaabot = 008031, - ['armyork'] = 008200, - ['corsent'] = 008210, - ['legvflak'] = 008220, + armyork = 008200, + corsent = 008210, + legvflak = 008220, - ['armah'] = 008300, - ['corah'] = 008310, - ['legah'] = 008320, + armah = 008300, + corah = 008310, + legah = 008320, -- -- T2 AA -- ['armaak'] = 008500, @@ -368,479 +368,479 @@ local unitOrderTable = { -- ['corvamp'] = 008550, -- WATER SCOUTS - ['armpt'] = 009000, --SCOUTS AA - ['coresupp'] = 009010, - ['legnavyaaship'] = 009015, + armpt = 009000, --SCOUTS AA + coresupp = 009010, + legnavyaaship = 009015, -- T1 WATER ATTACK - ['armdecade'] = 009100, --FAST - ['corpt'] = 009110, - ['legnavyscout'] = 009120, + armdecade = 009100, --FAST + corpt = 009110, + legnavyscout = 009120, - ['armpship'] = 009200, --MAIN BATTLE - ['corpship'] = 009210, - ['legnavyfrigate'] = 009211, - ['legnavydestro'] = 009212, - ['armroy'] = 009220, - ['corroy'] = 009230, + armpship = 009200, --MAIN BATTLE + corpship = 009210, + legnavyfrigate = 009211, + legnavydestro = 009212, + armroy = 009220, + corroy = 009230, - ['legnavyartyship'] = 009231, + legnavyartyship = 009231, -- T2 WATER ATTACK - ['armlship'] = 009280, --ANTISWARM - ['corfship'] = 009290, - ['leganavyantiswarm'] = 009295, - - ['armcrus'] = 009300, --MAIN BATTLE - ['corcrus'] = 009310, - ['leganavycruiser'] = 009320, - - ['armmship'] = 009340, --ROCKETS - ['cormship'] = 009350, - ['leganavymissileship'] = 009355, - - ['armdronecarry'] = 009360, --DRONE CARRIERS - ['cordronecarry'] = 009361, - ['armdtrident'] = 009362, --DEPTH CHARGE DRONE CARRIERS - ['corsentinel'] = 009363, - - ['armbats'] = 009370, --STRONK - ['corbats'] = 009380, - ['leganavybattleship'] = 009380, - - ['armepoch'] = 009400, --FLAGSHIPS - ['corblackhy'] = 009410, - ['leganavyartyship'] = 009420, - ['leganavyflagship'] = 009430, - - ['armdecadet3'] = 009450, --SCAV SHIPS - ['coresuppt3'] = 009460, - ['corprince'] = 009461, - ['armpshipt3'] = 009470, - ['corslrpc'] = 009480, + armlship = 009280, --ANTISWARM + corfship = 009290, + leganavyantiswarm = 009295, + + armcrus = 009300, --MAIN BATTLE + corcrus = 009310, + leganavycruiser = 009320, + + armmship = 009340, --ROCKETS + cormship = 009350, + leganavymissileship = 009355, + + armdronecarry = 009360, --DRONE CARRIERS + cordronecarry = 009361, + armdtrident = 009362, --DEPTH CHARGE DRONE CARRIERS + corsentinel = 009363, + + armbats = 009370, --STRONK + corbats = 009380, + leganavybattleship = 009380, + + armepoch = 009400, --FLAGSHIPS + corblackhy = 009410, + leganavyartyship = 009420, + leganavyflagship = 009430, + + armdecadet3 = 009450, --SCAV SHIPS + coresuppt3 = 009460, + corprince = 009461, + armpshipt3 = 009470, + corslrpc = 009480, -- T1 AA - ['armsfig'] = 009500, - ['corsfig'] = 009510, - ['legspfighter'] = 009520, + armsfig = 009500, + corsfig = 009510, + legspfighter = 009520, -- T2 AA - ['armaas'] = 009600, - ['corarch'] = 009610, - ['leganavyaaship'] = 009610, + armaas = 009600, + corarch = 009610, + leganavyaaship = 009610, -- UNDERWATER ATTACK - ['armseap'] = 009800, - ['corseap'] = 009810, - ['legsptorpgunship'] = 009815, - ['armsub'] = 009820, - ['corsub'] = 009830, - ['legnavysub'] = 009831, - - ['armlance'] = 009900, - ['cortitan'] = 009910, - ['legatorpbomber'] = 009915, - ['armsubk'] = 009920, - ['corshark'] = 009930, - ['armserp'] = 009940, - ['corssub'] = 009941, - ['coronager'] = 009950, - ['armexcalibur'] = 009951, - ['cordesolator'] = 009952, - ['armseadragon'] = 009953, - - - ['armserpt3'] = 009960, - ['armptt2'] = 009962, + armseap = 009800, + corseap = 009810, + legsptorpgunship = 009815, + armsub = 009820, + corsub = 009830, + legnavysub = 009831, + + armlance = 009900, + cortitan = 009910, + legatorpbomber = 009915, + armsubk = 009920, + corshark = 009930, + armserp = 009940, + corssub = 009941, + coronager = 009950, + armexcalibur = 009951, + cordesolator = 009952, + armseadragon = 009953, + + + armserpt3 = 009960, + armptt2 = 009962, -- TRANSPORTS - ['armatlas'] = 010500, - ['corvalk'] = 010505, - ['corhvytrans'] = 010510, - ['armhvytrans'] = 010515, - ['leglts'] = 010520, - ['legatrans'] = 010525, + armatlas = 010500, + corvalk = 010505, + corhvytrans = 010510, + armhvytrans = 010515, + leglts = 010520, + legatrans = 010525, - ['armdfly'] = 010610, - ['corseah'] = 010620, + armdfly = 010610, + corseah = 010620, -- ANTINUKES - ['armscab'] = 020000, - ['cormabm'] = 020010, - ['legavantinuke'] = 020011, + armscab = 020000, + cormabm = 020010, + legavantinuke = 020011, - ['armcarry'] = 020100, - ['armantiship'] = 020101, - ['corcarry'] = 020110, - ['corantiship'] = 020111, - ['leganavyantinukecarrier'] = 020112, - ['leganavyradjamship'] = 020120, + armcarry = 020100, + armantiship = 020101, + corcarry = 020110, + corantiship = 020111, + leganavyantinukecarrier = 020112, + leganavyradjamship = 020120, -- BUILDINGS --ECO METAL MEX - ['armmex'] = 100000, - ['cormex'] = 100050, - ['legmex'] = 100060, - ['armamex'] = 100100, - ['corexp'] = 100150, - ['legmext15'] = 100160, - - ['armmoho'] = 100200, - ['cormoho'] = 100250, - ['legmoho'] = 100260, - ['armshockwave'] = 100290, - ['cormexp'] = 100300, - ['legmohocon'] = 100310, + armmex = 100000, + cormex = 100050, + legmex = 100060, + armamex = 100100, + corexp = 100150, + legmext15 = 100160, + + armmoho = 100200, + cormoho = 100250, + legmoho = 100260, + armshockwave = 100290, + cormexp = 100300, + legmohocon = 100310, --ECO ENERGY CONVERTERS - ['armmakr'] = 100500, - ['cormakr'] = 100550, - ['legeconv'] = 100550, - ['armmmkr'] = 100600, - ['cormmkr'] = 100650, - ['legadveconv'] = 100651, + armmakr = 100500, + cormakr = 100550, + legeconv = 100550, + armmmkr = 100600, + cormmkr = 100650, + legadveconv = 100651, --ECO METAL STORAGE - ['armmstor'] = 100800, - ['cormstor'] = 100850, - ['legmstor'] = 100860, - ['armuwadvms'] = 100900, - ['coruwadvms'] = 100950, - ['legamstor'] = 100960, + armmstor = 100800, + cormstor = 100850, + legmstor = 100860, + armuwadvms = 100900, + coruwadvms = 100950, + legamstor = 100960, --ECO NRG GENS - ['armwin'] = 101000, - ['corwin'] = 101020, - ['legwin'] = 101060, - ['armwint2'] = 101040, --scavengers - ['corwint2'] = 101050, --scavengers - ['legwint2'] = 101060, --scavengers - ['armsolar'] = 101070, - ['corsolar'] = 101080, - ['legsolar'] = 101090, - ['armadvsol'] = 101100, - ['coradvsol'] = 101150, - ['legadvsol'] = 101170, + armwin = 101000, + corwin = 101020, + legwin = 101060, + armwint2 = 101040, --scavengers + corwint2 = 101050, --scavengers + legwint2 = 101060, --scavengers + armsolar = 101070, + corsolar = 101080, + legsolar = 101090, + armadvsol = 101100, + coradvsol = 101150, + legadvsol = 101170, --ECO NRG GEOS - ['armgeo'] = 101200, + armgeo = 101200, --['armuwgeo'] = 101201, - ['corgeo'] = 101250, + corgeo = 101250, --['coruwgeo'] = 101251, - ['leggeo'] = 101275, - ['armgmm'] = 101300, - ['legageo'] = 101325, - ['corageo'] = 101350, + leggeo = 101275, + armgmm = 101300, + legageo = 101325, + corageo = 101350, --['coruwageo'] = 101351, - ['armageo'] = 101400, + armageo = 101400, --['armuwageo'] = 101401, - ['corbhmth'] = 101450, - ['legrampart'] = 101475, + corbhmth = 101450, + legrampart = 101475, --ECO NRG FUSIONS - ['armfus'] = 101525, - ['armckfus'] = 101550, - ['corfus'] = 101600, - ['legfus'] = 101650, - ['armafus'] = 101700, - ['corafus'] = 101750, - ['legafus'] = 101780, + armfus = 101525, + armckfus = 101550, + corfus = 101600, + legfus = 101650, + armafus = 101700, + corafus = 101750, + legafus = 101780, --ECO NRG STORAGE - ['armestor'] = 101800, - ['corestor'] = 101850, - ['legestor'] = 101875, - ['armuwadves'] = 101900, - ['coruwadves'] = 101950, - ['legadvestore'] = 101951, + armestor = 101800, + corestor = 101850, + legestor = 101875, + armuwadves = 101900, + coruwadves = 101950, + legadvestore = 101951, --NANOS - ['armnanotc'] = 102010, - ['cornanotc'] = 102020, - ['legnanotc'] = 102030, - ['armnanotct2'] = 102010, - ['cornanotct2'] = 102020, - ['legnanotct2'] = 102030, + armnanotc = 102010, + cornanotc = 102020, + legnanotc = 102030, + armnanotct2 = 102010, + cornanotct2 = 102020, + legnanotct2 = 102030, --FACTORIES - ['armlab'] = 102100, - ['corlab'] = 102125, - ['leglab'] = 102126, - ['armvp'] = 102150, - ['corvp'] = 102175, - ['legvp'] = 102176, - ['armap'] = 102200, - ['corap'] = 102225, - ['legap'] = 102230, - ['armhp'] = 102250, - ['corhp'] = 102275, - ['leghp'] = 102278, - - ['armalab'] = 102400, - ['coralab'] = 102425, - ['legalab'] = 102426, - ['armavp'] = 102450, - ['coravp'] = 102475, - ['legavp'] = 102477, - ['armaap'] = 102500, - ['coraap'] = 102525, - ['legaap'] = 102530, - ['armshltx'] = 102550, - ['corgant'] = 102575, - ['leggant'] = 102576, - ['armapt3'] = 102700, --scavengers - ['corapt3'] = 102725, --scavengers + armlab = 102100, + corlab = 102125, + leglab = 102126, + armvp = 102150, + corvp = 102175, + legvp = 102176, + armap = 102200, + corap = 102225, + legap = 102230, + armhp = 102250, + corhp = 102275, + leghp = 102278, + + armalab = 102400, + coralab = 102425, + legalab = 102426, + armavp = 102450, + coravp = 102475, + legavp = 102477, + armaap = 102500, + coraap = 102525, + legaap = 102530, + armshltx = 102550, + corgant = 102575, + leggant = 102576, + armapt3 = 102700, --scavengers + corapt3 = 102725, --scavengers --UTILITIES - ['armeyes'] = 103000, - ['coreyes'] = 103050, - ['legeyes'] = 103075, - ['armrad'] = 103100, - ['corrad'] = 103150, - ['legrad'] = 103160, - ['armarad'] = 103200, - ['corarad'] = 103250, - ['legarad'] = 103251, - ['armjamt'] = 103300, - ['corjamt'] = 103350, - ['legjam'] = 103360, - ['armveil'] = 103400, - ['corshroud'] = 103450, - ['legajam'] = 103451, - ['armjuno'] = 103500, - ['corjuno'] = 103550, - ['legjuno'] = 103551, - - ['armsd'] = 103600, - ['corsd'] = 103625, - ['legsd'] = 103626, - ['armtarg'] = 103650, - ['cortarg'] = 103675, - ['legtarg'] = 103676, - ['armgate'] = 103700, - ['legdeflector'] = 103701, - ['corgate'] = 103725, - ['armdf'] = 103750, --Fake Fusion + armeyes = 103000, + coreyes = 103050, + legeyes = 103075, + armrad = 103100, + corrad = 103150, + legrad = 103160, + armarad = 103200, + corarad = 103250, + legarad = 103251, + armjamt = 103300, + corjamt = 103350, + legjam = 103360, + armveil = 103400, + corshroud = 103450, + legajam = 103451, + armjuno = 103500, + corjuno = 103550, + legjuno = 103551, + + armsd = 103600, + corsd = 103625, + legsd = 103626, + armtarg = 103650, + cortarg = 103675, + legtarg = 103676, + armgate = 103700, + legdeflector = 103701, + corgate = 103725, + armdf = 103750, --Fake Fusion --DEFENSES LAND (WALLS) - ['armdrag'] = 104000, - ['cordrag'] = 104100, - ['corscavdrag'] = 104205, --scavengers - ['legdrag'] = 104206, --exscavengers - ['armfort'] = 104300, - ['corfort'] = 104400, - ['corscavfort'] = 104505, --scavengers - ['legforti'] = 104506, --exscavengers - ['armclaw'] = 104600, - ['armlwall'] = 104650, - ['legdtr'] = 104704, --legion - ['corscavdtl'] = 104705, --scavengers - ['legdtl'] = 104706, --exscavengers - ['cormaw'] = 104800, - ['cormwall'] = 104850, - ['legrwall'] = 104875, - ['corscavdtf'] = 104905, --scavengers - ['legdtf'] = 104906, --exscavengers - ['corscavdtm'] = 104915, --scavengers - ['legdtm'] = 104916, --exscavengers + armdrag = 104000, + cordrag = 104100, + corscavdrag = 104205, --scavengers + legdrag = 104206, --exscavengers + armfort = 104300, + corfort = 104400, + corscavfort = 104505, --scavengers + legforti = 104506, --exscavengers + armclaw = 104600, + armlwall = 104650, + legdtr = 104704, --legion + corscavdtl = 104705, --scavengers + legdtl = 104706, --exscavengers + cormaw = 104800, + cormwall = 104850, + legrwall = 104875, + corscavdtf = 104905, --scavengers + legdtf = 104906, --exscavengers + corscavdtm = 104915, --scavengers + legdtm = 104916, --exscavengers --MINES - ['armmine1'] = 105100, - ['cormine1'] = 105200, - ['legmine1'] = 105250, - ['armmine2'] = 105300, - ['cormine2'] = 105400, - ['legmine2'] = 105450, - ['cormine4'] = 105500, --cormando - ['armmine3'] = 105600, - ['cormine3'] = 105700, - ['legmine3'] = 105750, + armmine1 = 105100, + cormine1 = 105200, + legmine1 = 105250, + armmine2 = 105300, + cormine2 = 105400, + legmine2 = 105450, + cormine4 = 105500, --cormando + armmine3 = 105600, + cormine3 = 105700, + legmine3 = 105750, --DEFENSES LAND T1 - ['armllt'] = 106100, - ['corllt'] = 106200, - ['leglht'] = 106250, - ['armbeamer'] = 106300, - ['corhllt'] = 106400, - ['corhllllt'] = 106500, --scavengers - ['armhlt'] = 106600, - ['corhlt'] = 106700, - ['leghive'] = 106800, - ['armguard'] = 106800, - ['corpun'] = 106900, - ['legcluster'] = 106950, + armllt = 106100, + corllt = 106200, + leglht = 106250, + armbeamer = 106300, + corhllt = 106400, + corhllllt = 106500, --scavengers + armhlt = 106600, + corhlt = 106700, + leghive = 106800, + armguard = 106800, + corpun = 106900, + legcluster = 106950, --DEFENSES LAND T2 - ['legmg'] = 107000, --land/AA machinegun - ['armpb'] = 107100, - ['corvipe'] = 107200, - ['legbombard'] = 107250, - ['legapopupdef'] = 107251, - ['armamb'] = 107300, - ['cortoast'] = 107400, - ['legacluster'] = 107450, - ['armanni'] = 107500, - ['cordoom'] = 107600, - ['legbastion'] = 107650, - ['armannit3'] = 107700, --scavengers - ['cordoomt3'] = 107800, --scavengers + legmg = 107000, --land/AA machinegun + armpb = 107100, + corvipe = 107200, + legbombard = 107250, + legapopupdef = 107251, + armamb = 107300, + cortoast = 107400, + legacluster = 107450, + armanni = 107500, + cordoom = 107600, + legbastion = 107650, + armannit3 = 107700, --scavengers + cordoomt3 = 107800, --scavengers --DEFENSES LAND LRPC - ['armbrtha'] = 110100, - ['corint'] = 110200, - ['leglrpc'] = 110300, - ['armminivulc'] = 120100, --scavengers - ['corminibuzz'] = 120200, --scavengers - ['legministarfall']= 120250, --scavengers - ['armvulc'] = 120300, - ['corbuzz'] = 120400, - ['legstarfall'] = 120450, - ['armbotrail'] = 120500, --scavengers + armbrtha = 110100, + corint = 110200, + leglrpc = 110300, + armminivulc = 120100, --scavengers + corminibuzz = 120200, --scavengers + legministarfall= 120250, --scavengers + armvulc = 120300, + corbuzz = 120400, + legstarfall = 120450, + armbotrail = 120500, --scavengers --DEFENSES AA - ['armrl'] = 130100, - ['corrl'] = 130200, - ['legrl'] = 130250, - ['armferret'] = 130300, - ['cormadsam'] = 130400, - ['legrhapsis'] = 130450, - ['armcir'] = 130500, - ['corerad'] = 130600, - ['leglupara'] = 130700, - - ['armflak'] = 153000, - ['corflak'] = 153500, - ['legflak'] = 153600, - ['armmercury'] = 154000, - ['corscreamer'] = 154500, - ['leglraa'] = 154600, + armrl = 130100, + corrl = 130200, + legrl = 130250, + armferret = 130300, + cormadsam = 130400, + legrhapsis = 130450, + armcir = 130500, + corerad = 130600, + leglupara = 130700, + + armflak = 153000, + corflak = 153500, + legflak = 153600, + armmercury = 154000, + corscreamer = 154500, + leglraa = 154600, --DEFENSES TO WATER - ['armdl'] = 155000, - ['cordl'] = 155500, - ['legctl'] = 155501, + armdl = 155000, + cordl = 155500, + legctl = 155501, --DEFENSES MISSILE LAUNCHERS - ['armemp'] = 165000, - ['cortron'] = 165500, - ['legperdition'] = 165600, - ['armamd'] = 166000, - ['legabm'] = 166250, - ['corfmd'] = 166500, - ['armsilo'] = 180000, - ['corsilo'] = 180500, - ['legsilo'] = 180600, + armemp = 165000, + cortron = 165500, + legperdition = 165600, + armamd = 166000, + legabm = 166250, + corfmd = 166500, + armsilo = 180000, + corsilo = 180500, + legsilo = 180600, --WATER ECO METAL - ['armuwmme'] = 200000, - ['coruwmme'] = 200100, + armuwmme = 200000, + coruwmme = 200100, --WATER ECO NRG CONVERTERS - ['armfmkr'] = 200400, - ['corfmkr'] = 200500, - ['legfeconv'] = 200550, - ['armuwmmm'] = 200600, - ['coruwmmm'] = 200700, + armfmkr = 200400, + corfmkr = 200500, + legfeconv = 200550, + armuwmmm = 200600, + coruwmmm = 200700, --WATER ECO METAL STORAGE - ['armuwms'] = 201000, - ['coruwms'] = 201500, - ['leguwmstore'] = 201501, + armuwms = 201000, + coruwms = 201500, + leguwmstore = 201501, --WATER ECO NRG GENS - ['armtide'] = 203000, - ['cortide'] = 203100, - ['legtide'] = 203200, + armtide = 203000, + cortide = 203100, + legtide = 203200, --WATER ECO NRG GEOS - ['armuwgeo'] = 204000, - ['coruwgeo'] = 204100, - ['leguwgeo'] = 204101, - ['armuwageo'] = 204500, - ['coruwageo'] = 204600, + armuwgeo = 204000, + coruwgeo = 204100, + leguwgeo = 204101, + armuwageo = 204500, + coruwageo = 204600, --WATER ECO NRG FUSIONS - ['armuwfus'] = 205000, - ['coruwfus'] = 205500, + armuwfus = 205000, + coruwfus = 205500, --WATER ECO NRG STORAGE - ['armuwes'] = 207000, - ['coruwes'] = 207500, - ['leguwestore'] = 207501, + armuwes = 207000, + coruwes = 207500, + leguwestore = 207501, --WATER CONSTRUCTION - ['armnanotcplat'] = 210000, - ['cornanotcplat'] = 210500, - ['legnanotcplat'] = 210550, - - ['armsy'] = 211100, - ['corsy'] = 211200, - ['legsy'] = 211300, - ['armfhp'] = 212100, - ['corfhp'] = 212200, - ['legfhp'] = 212250, - ['armamsub'] = 213100, - ['coramsub'] = 213200, - ['legamphlab'] = 213250, - ['armplat'] = 214100, - ['corplat'] = 214200, - ['legsplab'] = 214300, + armnanotcplat = 210000, + cornanotcplat = 210500, + legnanotcplat = 210550, + + armsy = 211100, + corsy = 211200, + legsy = 211300, + armfhp = 212100, + corfhp = 212200, + legfhp = 212250, + armamsub = 213100, + coramsub = 213200, + legamphlab = 213250, + armplat = 214100, + corplat = 214200, + legsplab = 214300, --T2 - ['armasy'] = 215000, - ['corasy'] = 215100, - ['legadvshipyard'] = 215200, + armasy = 215000, + corasy = 215100, + legadvshipyard = 215200, --T3 - ['armshltxuw'] = 216100, - ['corgantuw'] = 216200, - ['leggantuw'] = 216300, + armshltxuw = 216100, + corgantuw = 216200, + leggantuw = 216300, --WATER MINES - ['armfmine3'] = 217100, - ['corfmine3'] = 217200, + armfmine3 = 217100, + corfmine3 = 217200, --WATER UTILITIES - ['armfrad'] = 220100, - ['legfrad'] = 220101, - ['corfrad'] = 220150, - ['armason'] = 220200, - ['corason'] = 220250, - ['armfatf'] = 220400, - ['corfatf'] = 220450, + armfrad = 220100, + legfrad = 220101, + corfrad = 220150, + armason = 220200, + corason = 220250, + armfatf = 220400, + corfatf = 220450, --WATER DEFENSES LAND - ['armfdrag'] = 230100, - ['corfdrag'] = 230200, - ['legfdrag'] = 230250, - ['armfhlt'] = 230300, - ['corfhlt'] = 230400, - ['legfmg'] = 230401, + armfdrag = 230100, + corfdrag = 230200, + legfdrag = 230250, + armfhlt = 230300, + corfhlt = 230400, + legfmg = 230401, - ['armnavaldefturret'] = 230301, - ['cornavaldefturret'] = 230401, - ['legnavaldefturret'] = 230402, + armnavaldefturret = 230301, + cornavaldefturret = 230401, + legnavaldefturret = 230402, - ['legfhive'] = 230450, - ['armkraken'] = 230500, - ['corfdoom'] = 230600, + legfhive = 230450, + armkraken = 230500, + corfdoom = 230600, - ['armanavaldefturret'] = 230451, - ['coranavaldefturret'] = 230501, - ['leganavaldefturret'] = 230601, + armanavaldefturret = 230451, + coranavaldefturret = 230501, + leganavaldefturret = 230601, --WATER DEFENSES AA - ['armfrt'] = 255100, - ['corfrt'] = 255200, - ['legfrl'] = 255200, - ['armfflak'] = 255300, - ['corenaa'] = 255400, + armfrt = 255100, + corfrt = 255200, + legfrl = 255200, + armfflak = 255300, + corenaa = 255400, --WATER DEFENSES NAVAL - ['armtl'] = 260300, - ['cortl'] = 260400, - ['legtl'] = 260401, - ['armatl'] = 260500, - ['coratl'] = 260600, + armtl = 260300, + cortl = 260400, + legtl = 260401, + armatl = 260500, + coratl = 260600, } ---@type table diff --git a/luaui/configs/gridmenu_layouts.lua b/luaui/configs/gridmenu_layouts.lua index 6fd940cb8ea..1145cef302f 100644 --- a/luaui/configs/gridmenu_layouts.lua +++ b/luaui/configs/gridmenu_layouts.lua @@ -2521,7 +2521,7 @@ local unitGrids = { }, } -unitGrids["dummycom"] = unitGrids["armcom"] +unitGrids.dummycom = unitGrids.armcom if Spring.GetModOptions().experimentalextraunits or Spring.GetModOptions().scavunitsforplayers then for _, builder in pairs({"armaca", "coraca", "legaca", "armack", "corack", "legack", "armacv", "coracv", "legacv"}) do @@ -2530,8 +2530,8 @@ if Spring.GetModOptions().experimentalextraunits or Spring.GetModOptions().scavu unitGrids[builder][4][1][2] = faction .. "apt3" unitGrids[builder][4][1][3] = faction .. "nanotct2" end - unitGrids["armacsub"][4][1][3] = "armnanotc2plat" - unitGrids["coracsub"][4][1][3] = "cornanotc2plat" + unitGrids.armacsub [4][1][3] = "armnanotc2plat" + unitGrids.coracsub [4][1][3] = "cornanotc2plat" end @@ -2584,7 +2584,7 @@ if Spring.GetModOptions().techsplit then -- Unit Grids - unitGrids["armck"] = { + unitGrids.armck = { { { "armmex", "armsolar", "armwin", "", }, -- mex, solar, wind, adv. solar { "armmakr", "armgeo", "armamex", }, -- T1 converter, geo, twilight, (tidal) @@ -2607,7 +2607,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["armcs"] = { + unitGrids.armcs = { { { "armmex", "armtide", }, -- mex, tidal { "armfmkr", "", }, -- floating T1 converter, geo @@ -2630,7 +2630,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["armcv"] = { + unitGrids.armcv = { { { "armmex", "armsolar", "armwin", "", }, -- mex, solar, wind, adv. solar { "armmakr", "armgeo", "armamex", }, -- T1 converter, geo, twilight, (tidal) @@ -2653,7 +2653,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["armbeaver"] = { + unitGrids.armbeaver = { { { "armmex", "armsolar", "armwin", "armtide", }, -- mex, solar, wind, adv. solar { "armmakr", "armgeo", "armamex", "armfmkr", }, -- T1 converter, geo, twilight, (tidal) @@ -2676,7 +2676,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["armca"] = { + unitGrids.armca = { { { "armmex", "armsolar", "armwin", "", }, -- mex, solar, wind, adv. solar { "armmakr", "armgeo", "armamex", }, -- T1 converter, geo, twilight, (tidal) @@ -2699,7 +2699,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["armack"] = { + unitGrids.armack = { { { "armmoho", "armfus", "", "armadvsol", }, { "armmakr", "armageo", "armckfus", "armgmm", }, @@ -2722,7 +2722,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["armacv"] = { + unitGrids.armacv = { { { "armmoho", "armfus", "", "armadvsol", }, { "armmakr", "armageo", "armckfus", "armgmm", }, @@ -2745,7 +2745,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["armch"] = { + unitGrids.armch = { { { "armmoho", "armfus", "", "armadvsol", }, { "armmakr", "armageo", "armckfus", "armgmm", }, @@ -2768,7 +2768,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["armaca"] = { + unitGrids.armaca = { { { "armmoho", "armfus", "", "armadvsol", }, { "armmakr", "armageo", "armckfus", "armgmm", }, @@ -2791,7 +2791,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["armacsub"] = { + unitGrids.armacsub = { { { "armuwmme", "armtide", "armuwfus", }, -- uw moho, uw fusion, { "armuwmmm", "armuwageo" }, -- floating T2 converter, adv geo powerplant @@ -2814,7 +2814,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["corck"] = { + unitGrids.corck = { { { "cormex", "corsolar", "corwin", "", }, -- mex, solar, wind, adv. solar { "cormakr", "corgeo", "corexp", }, -- T1 converter, geo, exploiter, (tidal) @@ -2837,7 +2837,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["corcv"] = { + unitGrids.corcv = { { { "cormex", "corsolar", "corwin", "", }, -- mex, solar, wind, adv. solar { "cormakr", "corgeo", "corexp", }, -- T1 converter, geo, exploiter, (tidal) @@ -2860,7 +2860,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["cormuskrat"] = { + unitGrids.cormuskrat = { { { "cormex", "corsolar", "corwin", "", }, -- mex, solar, wind, adv. solar { "cormakr", "corgeo", "corexp", }, -- T1 converter, geo, exploiter, (tidal) @@ -2883,7 +2883,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["corca"] = { + unitGrids.corca = { { { "cormex", "corsolar", "corwin", "", }, -- mex, solar, wind, adv. solar { "cormakr", "corgeo", "corexp", }, -- T1 converter, geo, exploiter, (tidal) @@ -2906,7 +2906,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["corcs"] = { + unitGrids.corcs = { { { "cormex", "cortide", }, -- mex, tidal { "corfmkr", "coruwgeo", }, -- floating T1 converter, geo @@ -2931,7 +2931,7 @@ if Spring.GetModOptions().techsplit then - unitGrids["corack"] = { + unitGrids.corack = { { {"cormoho","corfus","","coradvsol",}, {"cormakr","corageo","","corbhmth",}, @@ -2954,7 +2954,7 @@ if Spring.GetModOptions().techsplit then }, } - unitGrids["coracv"] = { + unitGrids.coracv = { { {"cormoho","corfus","","coradvsol",}, {"cormakr","corageo","","corbhmth",}, @@ -2977,7 +2977,7 @@ if Spring.GetModOptions().techsplit then }, } - unitGrids["corch"] = { + unitGrids.corch = { { {"cormoho","corfus","","coradvsol",}, {"cormakr","corageo","","corbhmth",}, @@ -3000,7 +3000,7 @@ if Spring.GetModOptions().techsplit then }, } - unitGrids["coraca"] = { + unitGrids.coraca = { { {"cormoho","corfus","","coradvsol",}, {"cormakr","corageo","","corbhmth",}, @@ -3023,7 +3023,7 @@ if Spring.GetModOptions().techsplit then }, } - unitGrids["coracsub"] = { + unitGrids.coracsub = { { {"cormoho","corfus","","coradvsol",}, {"cormakr","corageo","","corbhmth",}, @@ -3045,7 +3045,7 @@ if Spring.GetModOptions().techsplit then }, } - unitGrids["legck"] = { + unitGrids.legck = { { { "legmex", "legsolar", "legwin", "legadvsol", }, -- mex, solar, wind, adv. solar { "legeconv", "leggeo", "legmext15", }, -- T1 converter, geo, T1.5 legion mex, (tidal) @@ -3068,7 +3068,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["legca"] = { + unitGrids.legca = { { { "legmex", "legsolar", "legwin", "legadvsol", }, -- mex, solar, wind, adv. solar { "legeconv", "leggeo", "legmext15", }, -- T1 converter, geo, T1.5 legion mex, (tidal) @@ -3091,7 +3091,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["legcv"] = { + unitGrids.legcv = { { { "legmex", "legsolar", "legwin", "legadvsol", }, -- mex, solar, wind, adv. solar { "legeconv", "leggeo", "legmext15", }, -- T1 converter, geo, T1.5 legion mex, (tidal) @@ -3114,7 +3114,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["legotter"] = { + unitGrids.legotter = { { { "legmex", "legsolar", "legwin", "legadvsol", }, -- mex, solar, wind, adv. solar { "legeconv", "leggeo", "legmext15", }, -- T1 converter, geo, T1.5 legion mex, (tidal) @@ -3137,7 +3137,7 @@ if Spring.GetModOptions().techsplit then } } - unitGrids["legack"] = { + unitGrids.legack = { { {"legmoho","legfus","","legadvsol",}, {"legeconv","legageo","","legrampart",}, @@ -3160,7 +3160,7 @@ if Spring.GetModOptions().techsplit then }, } - unitGrids["legacv"] = { + unitGrids.legacv = { { {"legmoho","legfus","","legadvsol",}, {"legeconv","legageo","","legrampart",}, @@ -3183,7 +3183,7 @@ if Spring.GetModOptions().techsplit then }, } - unitGrids["legch"] = { + unitGrids.legch = { { {"legmoho","legfus","","legadvsol",}, {"legeconv","legageo","","legrampart",}, @@ -3206,7 +3206,7 @@ if Spring.GetModOptions().techsplit then }, } - unitGrids["legaca"] = { + unitGrids.legaca = { { {"legmoho","legfus","","legadvsol",}, {"legeconv","legageo","","legrampart",}, @@ -3230,85 +3230,85 @@ if Spring.GetModOptions().techsplit then } -- Lab Grids - labGrids["armlab"] = { + labGrids.armlab = { "armck", "armrectr", "armpw", "armflea", -- T1 con, rez bot, peewee, flea "armrock", "armwar", "armham", "", -- rocko, hammer, warrior "", "", "armjeth", } - labGrids["armvp"] = { + labGrids.armvp = { "armcv", "armmlv", "armflash", "armfav", -- T1 con, minelayer, flash, scout "armart", "armjanus", "armstump", "", -- stumpy, janus, arty "armbeaver", "armpincer", "armsam", "", -- amphib con, amphib tank, missile truck } - labGrids["corvp"] = { + labGrids.corvp = { "corcv", "cormlv", "corgator", "corfav", -- T1 con, minelayer, gator, scout "corwolv", "corlevlr", "corraid", "", -- raider, leveler, art "cormuskrat", "corgarp", "cormist", "", -- amphib con, amphib tank, missile truck } - labGrids["armalab"] = { + labGrids.armalab = { "armack", "armspid", "armfast", "armmark", "armsptk", "armfido", "armzeus", "armspy", "armvader", "armamph", "armaak", "armmav", } - labGrids["coralab"] = { + labGrids.coralab = { "corack", "cormando", "corpyro", "corvoyr", "corhrk", "cormort", "corcan", "corspy", "", "coramph", "coraak", "cortermite", } - labGrids["legalab"] = { + labGrids.legalab = { "legack", "leginfestor", "legstr", "legaradk", "leghrk", "legbart", "legshot", "legaspy", "legsnapper", "legamph", "legadvaabot", "", } - labGrids["armavp"] = { + labGrids.armavp = { "armacv", "armch", "armlatnk", "armseer", "armmart", "armmh", "armmanac", "armsh", "", "armcroc", "armah", "armgremlin", } - labGrids["coravp"] = { + labGrids.coravp = { "coracv", "corch", "corsala", "corvrad", "cormart", "corban", "correap", "corsh", "corsnap", "corhal", "corah", "cormh", } - labGrids["legavp"] = { + labGrids.legavp = { "legacv", "legvcarry", "legmrv", "legavrad", "legamcluster", "legaskirmtank", "legner", "legnavyconship", "legch", "legfloat", "legah", "legmh", } - labGrids["armasy"] = { + labGrids.armasy = { "armacsub", "armch", "armlship", "armsjam", "armmship", "armcrus", "armanac", "armsh", "armsubk", "armcroc", "armah", "armmh", } - labGrids["corasy"] = { + labGrids.corasy = { "coracsub", "corch", "corfship", "corsjam", "cormship", "corcrus", "corsnap", "corsh", "corshark", "corsala", "corah", "cormh", } - labGrids["coraap"] = { + labGrids.coraap = { "coraca", "corsfig", "corcut", "corsb", "corawac", "corhvytrans", "corseap", "", "", "", "", "", } - labGrids["armaap"] = { + labGrids.armaap = { "armaca", "armsfig", "armsaber", "armsb", "armsehak", "armhvytrans", "armseap", "", "", "", "", "", } - labGrids["legaap"] ={ + labGrids.legaap ={ "legaca", "corsfig", "corcut", "corsb", "corawac", "corhvytrans", "corseap", "", "", "", "", "", diff --git a/luaui/configs/keyboard_layouts.lua b/luaui/configs/keyboard_layouts.lua index b935a5d1aa0..e255f4f4d0d 100644 --- a/luaui/configs/keyboard_layouts.lua +++ b/luaui/configs/keyboard_layouts.lua @@ -1,42 +1,42 @@ local scanToCode = { qwerty = {}, azerty = {}, qwertz = {} } for c in string.gmatch("QWERTYUIOPASDFGHJKLZXCVBNM[];',./`-=\\", ".") do - scanToCode["qwerty"][c] = c - scanToCode["qwertz"][c] = c - scanToCode["azerty"][c] = c + scanToCode.qwerty [c] = c + scanToCode.qwertz [c] = c + scanToCode.azerty [c] = c end -scanToCode["qwertz"]["Y"] = "Z" -scanToCode["qwertz"]["Z"] = "Y" +scanToCode.qwertz .Y = "Z" +scanToCode.qwertz .Z = "Y" -- NEEDS CORRECTION BELOW -scanToCode["qwertz"][";"] = ";" -scanToCode["qwertz"]["'"] = "'" -scanToCode["qwertz"][","] = "," -scanToCode["qwertz"]["."] = "." -scanToCode["qwertz"]["/"] = "/" -scanToCode["qwertz"]["`"] = "`" -scanToCode["qwertz"]["-"] = "-" -scanToCode["qwertz"]["="] = "=" -scanToCode["qwertz"]["\\"] = "\\" +scanToCode.qwertz [";"] = ";" +scanToCode.qwertz ["'"] = "'" +scanToCode.qwertz [","] = "," +scanToCode.qwertz ["."] = "." +scanToCode.qwertz ["/"] = "/" +scanToCode.qwertz ["`"] = "`" +scanToCode.qwertz ["-"] = "-" +scanToCode.qwertz ["="] = "=" +scanToCode.qwertz ["\\"] = "\\" -- NEEDS CORRECTION ABOVE -scanToCode["azerty"]["Z"] = "W" -scanToCode["azerty"]["A"] = "Q" -scanToCode["azerty"]["Q"] = "A" -scanToCode["azerty"]["W"] = "Z" +scanToCode.azerty .Z = "W" +scanToCode.azerty .A = "Q" +scanToCode.azerty .Q = "A" +scanToCode.azerty .W = "Z" -- NEEDS CORRECTION BELOW -scanToCode["azerty"][";"] = ";" -scanToCode["azerty"]["'"] = "'" -scanToCode["azerty"][","] = "," -scanToCode["azerty"]["."] = "." -scanToCode["azerty"]["/"] = "/" -scanToCode["azerty"]["`"] = "`" -scanToCode["azerty"]["-"] = "-" -scanToCode["azerty"]["="] = "=" -scanToCode["azerty"]["\\"] = "\\" +scanToCode.azerty [";"] = ";" +scanToCode.azerty ["'"] = "'" +scanToCode.azerty [","] = "," +scanToCode.azerty ["."] = "." +scanToCode.azerty ["/"] = "/" +scanToCode.azerty ["`"] = "`" +scanToCode.azerty ["-"] = "-" +scanToCode.azerty ["="] = "=" +scanToCode.azerty ["\\"] = "\\" -- NEEDS CORRECTION ABOVE -scanToCode["colemak"] = { +scanToCode.colemak = { Q = "Q", W = "W", E = "F", @@ -113,7 +113,7 @@ scanToCode["colemak-dh"] = { } -scanToCode["canary"] = { +scanToCode.canary = { Q = "W", W = "L", E = "Y", @@ -191,7 +191,7 @@ scanToCode["canary-ortho"] = { } -scanToCode["dvorak"] = { +scanToCode.dvorak = { Q = "'", W = ",", E = ".", @@ -275,7 +275,7 @@ scanToCode["de-neo"] = { -- NEEDS CORRECTION ABOVE } -scanToCode["workman"] = { +scanToCode.workman = { Q = "Q", W = "D", E = "R", diff --git a/luaui/savetable.lua b/luaui/savetable.lua index ce2fdea01b6..4adc3d19d0c 100644 --- a/luaui/savetable.lua +++ b/luaui/savetable.lua @@ -57,16 +57,16 @@ end local keyTypes = { - ['string'] = true, - ['number'] = true, - ['boolean'] = true, + string = true, + number = true, + boolean = true, } local valueTypes = { - ['string'] = true, - ['number'] = true, - ['boolean'] = true, - ['table'] = true, + string = true, + number = true, + boolean = true, + table = true, } diff --git a/modelmaterials/001_units_s3o_assimp.lua b/modelmaterials/001_units_s3o_assimp.lua index fe57675874b..9f0f11cd3fe 100644 --- a/modelmaterials/001_units_s3o_assimp.lua +++ b/modelmaterials/001_units_s3o_assimp.lua @@ -347,12 +347,12 @@ local cusUnitMaterials = GG.CUS.unitMaterialDefs local unitMaterials = {} local wreckAtlases = { - ["arm"] = { + arm = { "unittextures/Arm_wreck_color.dds", "unittextures/Arm_wreck_other.dds", "unittextures/Arm_wreck_color_normal.dds", }, - ["cor"] = { + cor = { "unittextures/cor_color_wreck.dds", "unittextures/cor_other_wreck.dds", "unittextures/cor_color_wreck_normal.dds", @@ -375,7 +375,7 @@ for id = 1, #UnitDefs do local wreckAtlas = wreckAtlases[facName] - if udef.modCategories["tank"] then + if udef.modCategories.tank then if facName == "arm" then unitMaterials[id] = {"unitsNormalMapArmTanks", NORMALTEX = normalTex, TEXW1 = wreckAtlas[1], TEXW2 = wreckAtlas[2], NORMALTEX2 = wreckAtlas[3]} elseif facName == "cor" then diff --git a/modelmaterials/Templates/defaultMaterialTemplate.lua b/modelmaterials/Templates/defaultMaterialTemplate.lua index 7859eeee7a3..a1bac3ad788 100644 --- a/modelmaterials/Templates/defaultMaterialTemplate.lua +++ b/modelmaterials/Templates/defaultMaterialTemplate.lua @@ -1625,32 +1625,32 @@ local shaderPlugins = { -- bit = (index - 1) local knownBitOptions = { - ["shadowmapping"] = 0, - ["normalmapping"] = 1, - ["normalmap_flip"] = 2, - ["vertex_ao"] = 3, - ["flashlights"] = 4, + shadowmapping = 0, + normalmapping = 1, + normalmap_flip = 2, + vertex_ao = 3, + flashlights = 4, - ["treads_arm"] = 5, - ["treads_core"] = 6, + treads_arm = 5, + treads_core = 6, - ["health_texturing"] = 7, - ["health_displace"] = 8, - ["health_texraptors"] = 9, + health_texturing = 7, + health_displace = 8, + health_texraptors = 9, - ["modelsfog"] = 10, + modelsfog = 10, - ["treewind"] = 11, - ["autonormal"] = 21, + treewind = 11, + autonormal = 21, } local knownIntOptions = { - ["shadowsQuality"] = 1, - ["materialIndex"] = 1, + shadowsQuality = 1, + materialIndex = 1, } local knownFloatOptions = { - ["autoNormalParams"] = 2, + autoNormalParams = 2, } local allOptions = nil diff --git a/modelmaterials_gl4/001_units_s3o_assimp.lua b/modelmaterials_gl4/001_units_s3o_assimp.lua index 8bbe5ab1c2f..fa977174c12 100644 --- a/modelmaterials_gl4/001_units_s3o_assimp.lua +++ b/modelmaterials_gl4/001_units_s3o_assimp.lua @@ -347,24 +347,24 @@ local cusUnitMaterials = GG.CUS.unitMaterialDefs local unitMaterials = {} local wreckAtlases = { - ["arm"] = { + arm = { "unittextures/Arm_wreck_color.dds", "unittextures/Arm_wreck_other.dds", "unittextures/Arm_wreck_color_normal.dds", }, - ["cor"] = { + cor = { "unittextures/cor_color_wreck.dds", "unittextures/cor_other_wreck.dds", "unittextures/cor_color_wreck_normal.dds", }, } local wreckAtlases = { - ["arm"] = { + arm = { "unittextures/Arm_wreck_color.dds", "unittextures/Arm_wreck_other.dds", "unittextures/Arm_wreck_color_normal.dds", }, - ["cor"] = { + cor = { "unittextures/cor_color_wreck.dds", "unittextures/cor_other_wreck.dds", "unittextures/cor_color_wreck_normal.dds", @@ -387,7 +387,7 @@ for id = 1, #UnitDefs do local wreckAtlas = wreckAtlases[facName] - if udef.modCategories["tank"] then + if udef.modCategories.tank then if facName == "arm" then unitMaterials[id] = {"unitsNormalMapArmTanks", NORMALTEX = normalTex, TEXW1 = wreckAtlas[1], TEXW2 = wreckAtlas[2], NORMALTEX2 = wreckAtlas[3]} elseif facName == "cor" then diff --git a/modelmaterials_gl4/known_feature_trees.lua b/modelmaterials_gl4/known_feature_trees.lua index 9f4eec32859..ac0fa394c3a 100644 --- a/modelmaterials_gl4/known_feature_trees.lua +++ b/modelmaterials_gl4/known_feature_trees.lua @@ -71,15 +71,15 @@ local knowntrees = { ad0_bush_2_l = 'bush', ad0_bush_2_m = 'bush', ad0_bush_2_s = 'bush', - ['ad0_bushes_l_1'] = 'bushLarge', - ['ad0_bushes_l_2'] = 'bushLarge', - ['ad0_bushes_l_3'] = 'bushLarge', - ['ad0_bushes_l_4'] = 'bushLarge', - ['ad0_bushes_l_5'] = 'bushLarge', - ['ad0_bushes_l_6'] = 'bushLarge', - ['ad0_bushes_l_7'] = 'bushLarge', - ['ad0_bushes_l_8'] = 'bushLarge', - ['ad0_bushes_xl_1'] = 'bushLarger', + ad0_bushes_l_1 = 'bushLarge', + ad0_bushes_l_2 = 'bushLarge', + ad0_bushes_l_3 = 'bushLarge', + ad0_bushes_l_4 = 'bushLarge', + ad0_bushes_l_5 = 'bushLarge', + ad0_bushes_l_6 = 'bushLarge', + ad0_bushes_l_7 = 'bushLarge', + ad0_bushes_l_8 = 'bushLarge', + ad0_bushes_xl_1 = 'bushLarger', ad0_bushes_xl_2 = 'bushLarger', ad0_bushes_xl_3 = 'bushLarger', ad0_bushes_xl_4 = 'bushLarger', diff --git a/modules/graphics/LuaShader.lua b/modules/graphics/LuaShader.lua index 3c33dc33572..b3ee295ce85 100644 --- a/modules/graphics/LuaShader.lua +++ b/modules/graphics/LuaShader.lua @@ -569,9 +569,9 @@ local function CheckShaderUpdates(shadersourcecache, delaytime) glslvarcount = 4 end if not printf then printf = {} end - printf["vars"] = printf["vars"] or {} - local vardata = {name = glslvariable, count = glslvarcount, line = i, index = #printf["vars"], swizzle = swizzle, shaderstage = 'f'} - table.insert(printf["vars"], vardata) + printf.vars = printf.vars or {} + local vardata = {name = glslvariable, count = glslvarcount, line = i, index = #printf.vars , swizzle = swizzle, shaderstage = 'f'} + table.insert(printf.vars , vardata) local replacementstring = string.format('if (all(lessThan(abs(mouseScreenPos.xy- (gl_FragCoord.xy + vec2(0.5, -1.5))),vec2(0.25) ))) { printfData[%i].%s = %s;} //printfData[INDEX] = vertexPos.xyzw;', vardata.index, string.sub('xyzw', 1, vardata.count), vardata.name ) @@ -583,7 +583,7 @@ local function CheckShaderUpdates(shadersourcecache, delaytime) -- If any substitutions were made, reassemble the shader source if printf then -- Define the shader storage buffer object, with at most SSBOSize entries - printf.SSBOSize = math.max(#printf['vars'], 16) + printf.SSBOSize = math.max(#printf.vars , 16) --Spring.Echo("SSBOSize", printf.SSBOSize) printf.SSBO = gl.GetVBO(GL.SHADER_STORAGE_BUFFER) printf.SSBO:Define(printf.SSBOSize, {{id = 0, name = "printfData", size = 4}}) diff --git a/modules/i18n/i18nlib/i18n/init.lua b/modules/i18n/i18nlib/i18n/init.lua index ac61fe5d7f4..ebe54b6cde6 100644 --- a/modules/i18n/i18nlib/i18n/init.lua +++ b/modules/i18n/i18nlib/i18n/init.lua @@ -161,9 +161,9 @@ function i18n.translate(key, data) missingTranslations[key] = { } end local missingTranslation = missingTranslations[key] - if not missingTranslation["_all"] and data.default == nil then + if not missingTranslation._all and data.default == nil then Spring.Log("i18n", "notice", "No translation found for \"" .. key .. "\"") - missingTranslation["_all"] = true + missingTranslation._all = true end return data.default or key end diff --git a/modules/i18n/i18nlib/i18n/plural.lua b/modules/i18n/i18nlib/i18n/plural.lua index 5d5d6b5b94d..5aa1df9697a 100644 --- a/modules/i18n/i18nlib/i18n/plural.lua +++ b/modules/i18n/i18nlib/i18n/plural.lua @@ -272,7 +272,7 @@ function plural.setDefaultFunction(f) end function plural.reset() - defaultFunction = pluralizationFunctions['en'] + defaultFunction = pluralizationFunctions.en end plural.reset() diff --git a/singleplayer/scenarios/scenarioscripts/Begin06.lua b/singleplayer/scenarios/scenarioscripts/Begin06.lua index e5368604107..016746bfa3c 100644 --- a/singleplayer/scenarios/scenarioscripts/Begin06.lua +++ b/singleplayer/scenarios/scenarioscripts/Begin06.lua @@ -594,7 +594,7 @@ local function Loadout() local unitID = Spring.CreateUnit(unit.name, unit.x, unit.y, unit.z, unit.rot, unit.teamID) for i = 1, #unit.queue do local order = unit.queue[i] - local position = {order.position["px"], order.position["py"], order.position["pz"]} + local position = {order.position.px , order.position.py , order.position.pz } Spring.GiveOrderToUnit(unitID, order.cmdID, position, CMD.OPT_SHIFT) end end @@ -611,7 +611,7 @@ function ObjectiveLoadout() objectiveUnits[unitID] = unit.objectiveUnitID end for k, order in ipairs(unit.queue) do - local position = {order.position["px"], order.position["py"], order.position["pz"]} + local position = {order.position.px , order.position.py , order.position.pz } Spring.GiveOrderToUnit(unitID, order.cmdID, position, CMD.OPT_SHIFT) end end @@ -642,7 +642,7 @@ local function BackupOne() local unitID = Spring.CreateUnit(unit.name, unit.x, unit.y, unit.z, unit.rot, unit.teamID) for i = 1, #unit.queue do local order = unit.queue[i] - local position = {order.position["px"], order.position["py"], order.position["pz"]} + local position = {order.position.px , order.position.py , order.position.pz } Spring.GiveOrderToUnit(unitID, order.cmdID, position, CMD.OPT_SHIFT) end end @@ -656,7 +656,7 @@ local function BackupTwo() local unitID = Spring.CreateUnit(unit.name, unit.x, unit.y, unit.z, unit.rot, unit.teamID) for i = 1, #unit.queue do local order = unit.queue[i] - local position = {order.position["px"], order.position["py"], order.position["pz"]} + local position = {order.position.px , order.position.py , order.position.pz } Spring.GiveOrderToUnit(unitID, order.cmdID, position, CMD.OPT_SHIFT) end end @@ -670,7 +670,7 @@ local function Timed() local unitID = Spring.CreateUnit(unit.name, unit.x, unit.y, unit.z, unit.rot, unit.teamID) for i = 1, #unit.queue do local order = unit.queue[i] - local position = {order.position["px"], order.position["py"], order.position["pz"]} + local position = {order.position.px , order.position.py , order.position.pz } Spring.GiveOrderToUnit(unitID, order.cmdID, position, CMD.OPT_SHIFT) end end @@ -684,7 +684,7 @@ local function Special() local unitID = Spring.CreateUnit(unit.name, unit.x, unit.y, unit.z, unit.rot, unit.teamID) for i = 1, #unit.queue do local order = unit.queue[i] - local position = {order.position["px"], order.position["py"], order.position["pz"]} + local position = {order.position.px , order.position.py , order.position.pz } Spring.GiveOrderToUnit(unitID, order.cmdID, position, CMD.OPT_SHIFT) end end diff --git a/singleplayer/test_mission.lua b/singleplayer/test_mission.lua index 46eaff4f5a8..901bc3ae90b 100644 --- a/singleplayer/test_mission.lua +++ b/singleplayer/test_mission.lua @@ -1,5 +1,5 @@ -local triggerTypes = GG['MissionAPI'].TriggerTypes -local actionTypes = GG['MissionAPI'].ActionTypes +local triggerTypes = GG.MissionAPI .TriggerTypes +local actionTypes = GG.MissionAPI .ActionTypes local triggers = { testTime = { diff --git a/unitbasedefs/techsplit_defs.lua b/unitbasedefs/techsplit_defs.lua index b3354de8569..30c687e46a9 100644 --- a/unitbasedefs/techsplit_defs.lua +++ b/unitbasedefs/techsplit_defs.lua @@ -413,7 +413,7 @@ local function techsplitTweaks(name, uDef) uDef.customparams.buildinggrounddecaltype = "decals/armamsub_aoplane.dds" uDef.customparams.buildinggrounddecalsizex = 13 uDef.customparams.buildinggrounddecalsizey = 13 - uDef.featuredefs.dead["object"] = "Units/armaaplat_dead.s3o" + uDef.featuredefs.dead.object = "Units/armaaplat_dead.s3o" uDef.buildoptions = { [1] = "armaca", [2] = "armseap", @@ -465,7 +465,7 @@ local function techsplitTweaks(name, uDef) [6] = "corsfig", [7] = "corhvytrans", } - uDef.featuredefs.dead["object"] = "Units/coraaplat_dead.s3o" + uDef.featuredefs.dead.object = "Units/coraaplat_dead.s3o" uDef.customparams.buildinggrounddecaltype = "decals/coraap_aoplane.dds" uDef.customparams.buildinggrounddecalsizex = 6 uDef.customparams.buildinggrounddecalsizey = 6 diff --git a/units/Legion/Legion EvoCom/legcombabyunits.lua b/units/Legion/Legion EvoCom/legcombabyunits.lua index 32693243035..fcf287e3ff1 100644 --- a/units/Legion/Legion EvoCom/legcombabyunits.lua +++ b/units/Legion/Legion EvoCom/legcombabyunits.lua @@ -1,51 +1,51 @@ --special unit variations used in EvoCom local unitsTable = {} --Legion Lobber, for Legion Commander Botcannon -unitsTable['babyleglob'] = VFS.Include('units/Legion/Bots/leglob.lua').leglob --if this filepath is changed, the unit will no longer work! -unitsTable['babyleglob'].corpse = "" -unitsTable['babyleglob'].selfdestructas = "" -unitsTable['babyleglob'].mass = 150 -unitsTable['babyleglob'].metalcost = 0 -unitsTable['babyleglob'].movestate = 2 -unitsTable['babyleglob'].power = 66 -unitsTable['babyleglob'].customparams.i18nfromunit = 'leglob' +unitsTable.babyleglob = VFS.Include('units/Legion/Bots/leglob.lua').leglob --if this filepath is changed, the unit will no longer work! +unitsTable.babyleglob .corpse = "" +unitsTable.babyleglob .selfdestructas = "" +unitsTable.babyleglob .mass = 150 +unitsTable.babyleglob .metalcost = 0 +unitsTable.babyleglob .movestate = 2 +unitsTable.babyleglob .power = 66 +unitsTable.babyleglob .customparams.i18nfromunit = 'leglob' --Legion Goblin, for Legion Commander Botcannon -unitsTable['babyleggob'] = VFS.Include('units/Legion/Bots/leggob.lua').leggob --if this filepath is changed, the unit will no longer work! -unitsTable['babyleggob'].corpse = "" -unitsTable['babyleggob'].selfdestructas = "" -unitsTable['babyleggob'].mass = 25 -unitsTable['babyleggob'].metalcost = 0 -unitsTable['babyleggob'].movestate = 2 -unitsTable['babyleggob'].power = 33 -unitsTable['babyleggob'].customparams.i18nfromunit = 'leggob' +unitsTable.babyleggob = VFS.Include('units/Legion/Bots/leggob.lua').leggob --if this filepath is changed, the unit will no longer work! +unitsTable.babyleggob .corpse = "" +unitsTable.babyleggob .selfdestructas = "" +unitsTable.babyleggob .mass = 25 +unitsTable.babyleggob .metalcost = 0 +unitsTable.babyleggob .movestate = 2 +unitsTable.babyleggob .power = 33 +unitsTable.babyleggob .customparams.i18nfromunit = 'leggob' --Legion Phalanx, for Legion Commander Botcannon -unitsTable['babylegshot'] = VFS.Include('units/Legion/Bots/T2 Bots/legshot.lua').legshot --if this filepath is changed, the unit will no longer work! -unitsTable['babylegshot'].corpse = "" -unitsTable['babylegshot'].selfdestructas = "" -unitsTable['babylegshot'].metalcost = 0 -unitsTable['babylegshot'].mass = 630 -unitsTable['babylegshot'].movestate = 2 -unitsTable['babylegshot'].power = 735 -unitsTable['babylegshot'].customparams.i18nfromunit = 'legshot' +unitsTable.babylegshot = VFS.Include('units/Legion/Bots/T2 Bots/legshot.lua').legshot --if this filepath is changed, the unit will no longer work! +unitsTable.babylegshot .corpse = "" +unitsTable.babylegshot .selfdestructas = "" +unitsTable.babylegshot .metalcost = 0 +unitsTable.babylegshot .mass = 630 +unitsTable.babylegshot .movestate = 2 +unitsTable.babylegshot .power = 735 +unitsTable.babylegshot .customparams.i18nfromunit = 'legshot' --Legion Heavy Drone, for Legion Commander Botcannon -unitsTable['babylegheavydrone'] = VFS.Include('units/Legion/Air/T2 Air/legheavydrone.lua').legheavydrone --if this filepath is changed, the unit will no longer work! -unitsTable['babylegheavydrone'].corpse = "" -unitsTable['babylegheavydrone'].selfdestructas = "" -unitsTable['babylegheavydrone'].metalcost = 0 -unitsTable['babylegheavydrone'].movestate = 2 -unitsTable['babylegheavydrone'].power = 1000 -unitsTable['babylegheavydrone'].customparams.i18nfromunit = 'legheavydrone' +unitsTable.babylegheavydrone = VFS.Include('units/Legion/Air/T2 Air/legheavydrone.lua').legheavydrone --if this filepath is changed, the unit will no longer work! +unitsTable.babylegheavydrone .corpse = "" +unitsTable.babylegheavydrone .selfdestructas = "" +unitsTable.babylegheavydrone .metalcost = 0 +unitsTable.babylegheavydrone .movestate = 2 +unitsTable.babylegheavydrone .power = 1000 +unitsTable.babylegheavydrone .customparams.i18nfromunit = 'legheavydrone' --Legion Drone, for Legion Commander Botcannon -unitsTable['babylegdrone'] = VFS.Include('units/Legion/Air/legdrone.lua').legdrone --if this filepath is changed, the unit will no longer work! -unitsTable['babylegdrone'].corpse = "" -unitsTable['babylegdrone'].selfdestructas = "" -unitsTable['babylegdrone'].metalcost = 0 -unitsTable['babylegdrone'].movestate = 2 -unitsTable['babylegdrone'].power = 500 -unitsTable['babylegdrone'].customparams.i18nfromunit = 'legdrone' +unitsTable.babylegdrone = VFS.Include('units/Legion/Air/legdrone.lua').legdrone --if this filepath is changed, the unit will no longer work! +unitsTable.babylegdrone .corpse = "" +unitsTable.babylegdrone .selfdestructas = "" +unitsTable.babylegdrone .metalcost = 0 +unitsTable.babylegdrone .movestate = 2 +unitsTable.babylegdrone .power = 500 +unitsTable.babylegdrone .customparams.i18nfromunit = 'legdrone' return unitsTable diff --git a/units/Legion/Legion EvoCom/legevodecom.lua b/units/Legion/Legion EvoCom/legevodecom.lua index ee476fc55c9..9d322c5bd3d 100644 --- a/units/Legion/Legion EvoCom/legevodecom.lua +++ b/units/Legion/Legion EvoCom/legevodecom.lua @@ -1,48 +1,48 @@ local unitsTable = {} -unitsTable['legdecomlvl3'] = VFS.Include('units/Legion/Legion EvoCom/legcomlvl3.lua').legcomlvl3 --if this filepath is changed, the unit will no longer work! -unitsTable['legdecomlvl3'].selfdestructas = "decoycommander" -unitsTable['legdecomlvl3'].explodeas = "decoycommander" -unitsTable['legdecomlvl3'].corpse = nil -unitsTable['legdecomlvl3'].customparams.evolution_target = nil -unitsTable['legdecomlvl3'].customparams.iscommander = nil -unitsTable['legdecomlvl3'].customparams.effigy = nil -unitsTable['legdecomlvl3'].customparams.i18nfromunit = "legcomlvl3" -unitsTable['legdecomlvl3'].customparams.isdecoycommander = true -unitsTable['legdecomlvl3'].decoyfor = "legcomlvl3" -unitsTable['legdecomlvl3'].customparams.decoyfor = "legcomlvl3" -unitsTable['legdecomlvl3'].health = math.ceil(unitsTable['legdecomlvl3'].health*0.5) -unitsTable['legdecomlvl3'].weapondefs.disintegrator.damage.default = 40 -unitsTable['legdecomlvl3'].weapondefs.botcannon.customparams.stockpilelimit = 1 +unitsTable.legdecomlvl3 = VFS.Include('units/Legion/Legion EvoCom/legcomlvl3.lua').legcomlvl3 --if this filepath is changed, the unit will no longer work! +unitsTable.legdecomlvl3 .selfdestructas = "decoycommander" +unitsTable.legdecomlvl3 .explodeas = "decoycommander" +unitsTable.legdecomlvl3 .corpse = nil +unitsTable.legdecomlvl3 .customparams.evolution_target = nil +unitsTable.legdecomlvl3 .customparams.iscommander = nil +unitsTable.legdecomlvl3 .customparams.effigy = nil +unitsTable.legdecomlvl3 .customparams.i18nfromunit = "legcomlvl3" +unitsTable.legdecomlvl3 .customparams.isdecoycommander = true +unitsTable.legdecomlvl3 .decoyfor = "legcomlvl3" +unitsTable.legdecomlvl3 .customparams.decoyfor = "legcomlvl3" +unitsTable.legdecomlvl3 .health = math.ceil(unitsTable.legdecomlvl3 .health*0.5) +unitsTable.legdecomlvl3 .weapondefs.disintegrator.damage.default = 40 +unitsTable.legdecomlvl3 .weapondefs.botcannon.customparams.stockpilelimit = 1 -unitsTable['legdecomlvl6'] = VFS.Include('units/Legion/Legion EvoCom/legcomlvl6.lua').legcomlvl6 --if this filepath is changed, the unit will no longer work! -unitsTable['legdecomlvl6'].selfdestructas = "decoycommander" -unitsTable['legdecomlvl6'].explodeas = "decoycommander" -unitsTable['legdecomlvl6'].corpse = nil -unitsTable['legdecomlvl6'].customparams.evolution_target = nil -unitsTable['legdecomlvl6'].customparams.iscommander = nil -unitsTable['legdecomlvl6'].customparams.effigy = nil -unitsTable['legdecomlvl6'].customparams.i18nfromunit = "legcomlvl6" -unitsTable['legdecomlvl6'].decoyfor = "legcomlvl6" -unitsTable['legdecomlvl6'].customparams.decoyfor = "legcomlvl6" -unitsTable['legdecomlvl6'].customparams.isdecoycommander = true -unitsTable['legdecomlvl6'].health = math.ceil(unitsTable['legdecomlvl6'].health*0.5) -unitsTable['legdecomlvl6'].weapondefs.disintegrator.damage.default = 40 -unitsTable['legdecomlvl6'].weapondefs.botcannon.customparams.stockpilelimit = 2 +unitsTable.legdecomlvl6 = VFS.Include('units/Legion/Legion EvoCom/legcomlvl6.lua').legcomlvl6 --if this filepath is changed, the unit will no longer work! +unitsTable.legdecomlvl6 .selfdestructas = "decoycommander" +unitsTable.legdecomlvl6 .explodeas = "decoycommander" +unitsTable.legdecomlvl6 .corpse = nil +unitsTable.legdecomlvl6 .customparams.evolution_target = nil +unitsTable.legdecomlvl6 .customparams.iscommander = nil +unitsTable.legdecomlvl6 .customparams.effigy = nil +unitsTable.legdecomlvl6 .customparams.i18nfromunit = "legcomlvl6" +unitsTable.legdecomlvl6 .decoyfor = "legcomlvl6" +unitsTable.legdecomlvl6 .customparams.decoyfor = "legcomlvl6" +unitsTable.legdecomlvl6 .customparams.isdecoycommander = true +unitsTable.legdecomlvl6 .health = math.ceil(unitsTable.legdecomlvl6 .health*0.5) +unitsTable.legdecomlvl6 .weapondefs.disintegrator.damage.default = 40 +unitsTable.legdecomlvl6 .weapondefs.botcannon.customparams.stockpilelimit = 2 -unitsTable['legdecomlvl10'] = VFS.Include('units/Legion/Legion EvoCom/legcomlvl10.lua').legcomlvl10 --if this filepath is changed, the unit will no longer work! -unitsTable['legdecomlvl10'].selfdestructas = "decoycommander" -unitsTable['legdecomlvl10'].explodeas = "decoycommander" -unitsTable['legdecomlvl10'].corpse = nil -unitsTable['legdecomlvl10'].customparams.evolution_target = nil -unitsTable['legdecomlvl10'].customparams.iscommander = nil -unitsTable['legdecomlvl10'].customparams.effigy = nil -unitsTable['legdecomlvl10'].customparams.i18nfromunit = "legcomlvl10" -unitsTable['legdecomlvl10'].decoyfor = "legcomlvl10" -unitsTable['legdecomlvl10'].customparams.decoyfor = "legcomlvl10" -unitsTable['legdecomlvl10'].customparams.isdecoycommander = true -unitsTable['legdecomlvl10'].health = math.ceil(unitsTable['legdecomlvl10'].health*0.5) -unitsTable['legdecomlvl10'].weapondefs.disintegrator.damage.default = 40 -unitsTable['legdecomlvl10'].weapondefs.botcannon.customparams.stockpilelimit = 3 +unitsTable.legdecomlvl10 = VFS.Include('units/Legion/Legion EvoCom/legcomlvl10.lua').legcomlvl10 --if this filepath is changed, the unit will no longer work! +unitsTable.legdecomlvl10 .selfdestructas = "decoycommander" +unitsTable.legdecomlvl10 .explodeas = "decoycommander" +unitsTable.legdecomlvl10 .corpse = nil +unitsTable.legdecomlvl10 .customparams.evolution_target = nil +unitsTable.legdecomlvl10 .customparams.iscommander = nil +unitsTable.legdecomlvl10 .customparams.effigy = nil +unitsTable.legdecomlvl10 .customparams.i18nfromunit = "legcomlvl10" +unitsTable.legdecomlvl10 .decoyfor = "legcomlvl10" +unitsTable.legdecomlvl10 .customparams.decoyfor = "legcomlvl10" +unitsTable.legdecomlvl10 .customparams.isdecoycommander = true +unitsTable.legdecomlvl10 .health = math.ceil(unitsTable.legdecomlvl10 .health*0.5) +unitsTable.legdecomlvl10 .weapondefs.disintegrator.damage.default = 40 +unitsTable.legdecomlvl10 .weapondefs.botcannon.customparams.stockpilelimit = 3 return unitsTable diff --git a/units/Scavengers/Boss/armscavengerbossv2.lua b/units/Scavengers/Boss/armscavengerbossv2.lua index 329b3031e8e..d7553d4b6ad 100644 --- a/units/Scavengers/Boss/armscavengerbossv2.lua +++ b/units/Scavengers/Boss/armscavengerbossv2.lua @@ -1,5 +1,5 @@ local difficultyParams = { - ["veryeasy"] = { + veryeasy = { health = 400000, autoHeal = 0, dgunStockpile = 60, @@ -7,7 +7,7 @@ local difficultyParams = { minigunDamage = 100, topTurretsDamage = 3300, }, - ["easy"] = { + easy = { health = 600000, autoHeal = 5, dgunStockpile = 50, @@ -15,7 +15,7 @@ local difficultyParams = { minigunDamage = 150, topTurretsDamage = 4400, }, - ["normal"] = { + normal = { health = 800000, autoHeal = 10, dgunStockpile = 40, @@ -23,7 +23,7 @@ local difficultyParams = { minigunDamage = 200, topTurretsDamage = 5500, }, - ["hard"] = { + hard = { health = 1000000, autoHeal = 15, dgunStockpile = 30, @@ -31,7 +31,7 @@ local difficultyParams = { minigunDamage = 250, topTurretsDamage = 6600, }, - ["veryhard"] = { + veryhard = { health = 1500000, autoHeal = 20, dgunStockpile = 20, @@ -39,7 +39,7 @@ local difficultyParams = { minigunDamage = 350, topTurretsDamage = 8000, }, - ["epic"] = { + epic = { health = 2000000, autoHeal = 25, dgunStockpile = 10, diff --git a/units/Scavengers/Boss/babyscavbossunits.lua b/units/Scavengers/Boss/babyscavbossunits.lua index 3eb316589ac..a6b87f2d55c 100644 --- a/units/Scavengers/Boss/babyscavbossunits.lua +++ b/units/Scavengers/Boss/babyscavbossunits.lua @@ -1,14 +1,14 @@ --special unit variations used for scavengerbossv4.lua local unitsTable = {} --Epic Pawn Squad -unitsTable['squadarmpwt4'] = VFS.Include('units/Scavengers/Bots/armpwt4.lua').armpwt4 --if this filepath is changed, the unit will no longer work! -unitsTable['squadarmpwt4'].selfdestructas = "" -unitsTable['squadarmpwt4'].movestate = 2 -unitsTable['squadarmpwt4'].customparams.i18nfromunit = 'armpwt4' -unitsTable['squadarmpwt4'].customparams.inheritxpratemultiplier = 1 -unitsTable['squadarmpwt4'].customparams.childreninheritxp = "DRONE" -unitsTable['squadarmpwt4'].customparams.parentsinheritxp = "DRONE" -unitsTable['squadarmpwt4'].weapondefs.dronespawner = { +unitsTable.squadarmpwt4 = VFS.Include('units/Scavengers/Bots/armpwt4.lua').armpwt4 --if this filepath is changed, the unit will no longer work! +unitsTable.squadarmpwt4 .selfdestructas = "" +unitsTable.squadarmpwt4 .movestate = 2 +unitsTable.squadarmpwt4 .customparams.i18nfromunit = 'armpwt4' +unitsTable.squadarmpwt4 .customparams.inheritxpratemultiplier = 1 +unitsTable.squadarmpwt4 .customparams.childreninheritxp = "DRONE" +unitsTable.squadarmpwt4 .customparams.parentsinheritxp = "DRONE" +unitsTable.squadarmpwt4 .weapondefs.dronespawner = { areaofeffect = 4, avoidfeature = false, craterareaofeffect = 0, @@ -50,32 +50,32 @@ unitsTable['squadarmpwt4'].weapondefs.dronespawner = { holdfireradius = 300 } } -unitsTable['squadarmpwt4'].weapons[2] = { +unitsTable.squadarmpwt4 .weapons[2] = { badtargetcategory = "VTOL", def = "dronespawner", onlytargetcategory = "NOTSUB", } --Epic Pawn's Babies -unitsTable['squadarmpw'] = VFS.Include('units/ArmBots/armpw.lua').armpw --if this filepath is changed, the unit will no longer work! -unitsTable['squadarmpw'].corpse = "" -unitsTable['squadarmpw'].energycost = 1 -unitsTable['squadarmpw'].metalcost = 1 -unitsTable['squadarmpw'].movestate = 2 -unitsTable['squadarmpw'].power = 50 -unitsTable['squadarmpw'].mass = 50 -unitsTable['squadarmpw'].speed = unitsTable['squadarmpw'].speed*1.5 -unitsTable['squadarmpw'].customparams.i18nfromunit = 'armpw' +unitsTable.squadarmpw = VFS.Include('units/ArmBots/armpw.lua').armpw --if this filepath is changed, the unit will no longer work! +unitsTable.squadarmpw .corpse = "" +unitsTable.squadarmpw .energycost = 1 +unitsTable.squadarmpw .metalcost = 1 +unitsTable.squadarmpw .movestate = 2 +unitsTable.squadarmpw .power = 50 +unitsTable.squadarmpw .mass = 50 +unitsTable.squadarmpw .speed = unitsTable.squadarmpw .speed*1.5 +unitsTable.squadarmpw .customparams.i18nfromunit = 'armpw' --Epic Recluse Squad -unitsTable['squadarmsptkt4'] = VFS.Include('units/Scavengers/Bots/armsptkt4.lua').armsptkt4 --if this filepath is changed, the unit will no longer work! -unitsTable['squadarmsptkt4'].selfdestructas = "" -unitsTable['squadarmsptkt4'].movestate = 2 -unitsTable['squadarmsptkt4'].customparams.i18nfromunit = 'armsptkt4' -unitsTable['squadarmsptkt4'].customparams.inheritxpratemultiplier = 1 -unitsTable['squadarmsptkt4'].customparams.childreninheritxp = "DRONE" -unitsTable['squadarmsptkt4'].customparams.parentsinheritxp = "DRONE" -unitsTable['squadarmsptkt4'].weapondefs.dronespawner = { +unitsTable.squadarmsptkt4 = VFS.Include('units/Scavengers/Bots/armsptkt4.lua').armsptkt4 --if this filepath is changed, the unit will no longer work! +unitsTable.squadarmsptkt4 .selfdestructas = "" +unitsTable.squadarmsptkt4 .movestate = 2 +unitsTable.squadarmsptkt4 .customparams.i18nfromunit = 'armsptkt4' +unitsTable.squadarmsptkt4 .customparams.inheritxpratemultiplier = 1 +unitsTable.squadarmsptkt4 .customparams.childreninheritxp = "DRONE" +unitsTable.squadarmsptkt4 .customparams.parentsinheritxp = "DRONE" +unitsTable.squadarmsptkt4 .weapondefs.dronespawner = { areaofeffect = 4, avoidfeature = false, craterareaofeffect = 0, @@ -118,33 +118,33 @@ unitsTable['squadarmsptkt4'].weapondefs.dronespawner = { holdfireradius = 300 } } -unitsTable['squadarmsptkt4'].weapons[2] = { +unitsTable.squadarmsptkt4 .weapons[2] = { badtargetcategory = "VTOL", def = "dronespawner", onlytargetcategory = "NOTSUB", } --Epic Recluse's Babies -unitsTable['squadarmsptk'] = VFS.Include('units/ArmBots/T2/armsptk.lua').armsptk --if this filepath is changed, the unit will no longer work! -unitsTable['squadarmsptk'].corpse = "" -unitsTable['squadarmsptk'].energycost = 1 -unitsTable['squadarmsptk'].metalcost = 1 -unitsTable['squadarmsptk'].movestate = 2 -unitsTable['squadarmsptk'].power = 500 -unitsTable['squadarmsptk'].mass = 500 -unitsTable['squadarmsptk'].speed = unitsTable['squadarmsptk'].speed*1.5 -unitsTable['squadarmsptk'].customparams.i18nfromunit = 'armsptk' +unitsTable.squadarmsptk = VFS.Include('units/ArmBots/T2/armsptk.lua').armsptk --if this filepath is changed, the unit will no longer work! +unitsTable.squadarmsptk .corpse = "" +unitsTable.squadarmsptk .energycost = 1 +unitsTable.squadarmsptk .metalcost = 1 +unitsTable.squadarmsptk .movestate = 2 +unitsTable.squadarmsptk .power = 500 +unitsTable.squadarmsptk .mass = 500 +unitsTable.squadarmsptk .speed = unitsTable.squadarmsptk .speed*1.5 +unitsTable.squadarmsptk .customparams.i18nfromunit = 'armsptk' --Epic Grunt Squad -unitsTable['squadcorakt4'] = VFS.Include('units/Scavengers/Bots/corakt4.lua').corakt4 --if this filepath is changed, the unit will no longer work! -unitsTable['squadcorakt4'].corpse = "" -unitsTable['squadcorakt4'].selfdestructas = "" -unitsTable['squadcorakt4'].movestate = 2 -unitsTable['squadcorakt4'].customparams.i18nfromunit = 'corakt4' -unitsTable['squadcorakt4'].customparams.inheritxpratemultiplier = 1 -unitsTable['squadcorakt4'].customparams.childreninheritxp = "DRONE" -unitsTable['squadcorakt4'].customparams.parentsinheritxp = "DRONE" -unitsTable['squadcorakt4'].weapondefs.dronespawner = { +unitsTable.squadcorakt4 = VFS.Include('units/Scavengers/Bots/corakt4.lua').corakt4 --if this filepath is changed, the unit will no longer work! +unitsTable.squadcorakt4 .corpse = "" +unitsTable.squadcorakt4 .selfdestructas = "" +unitsTable.squadcorakt4 .movestate = 2 +unitsTable.squadcorakt4 .customparams.i18nfromunit = 'corakt4' +unitsTable.squadcorakt4 .customparams.inheritxpratemultiplier = 1 +unitsTable.squadcorakt4 .customparams.childreninheritxp = "DRONE" +unitsTable.squadcorakt4 .customparams.parentsinheritxp = "DRONE" +unitsTable.squadcorakt4 .weapondefs.dronespawner = { areaofeffect = 4, avoidfeature = false, craterareaofeffect = 0, @@ -186,32 +186,32 @@ unitsTable['squadcorakt4'].weapondefs.dronespawner = { holdfireradius = 300 } } -unitsTable['squadcorakt4'].weapons[2] = { +unitsTable.squadcorakt4 .weapons[2] = { badtargetcategory = "VTOL", def = "dronespawner", onlytargetcategory = "NOTSUB", } --Epic Grunt's Babies -unitsTable['squadcorak'] = VFS.Include('units/CorBots/corak.lua').corak --if this filepath is changed, the unit will no longer work! -unitsTable['squadcorak'].corpse = "" -unitsTable['squadcorak'].energycost = 1 -unitsTable['squadcorak'].metalcost = 1 -unitsTable['squadcorak'].movestate = 2 -unitsTable['squadcorak'].power = 50 -unitsTable['squadcorak'].mass = 50 -unitsTable['squadcorak'].speed = unitsTable['squadcorak'].speed*1.5 -unitsTable['squadcorak'].customparams.i18nfromunit = 'corak' +unitsTable.squadcorak = VFS.Include('units/CorBots/corak.lua').corak --if this filepath is changed, the unit will no longer work! +unitsTable.squadcorak .corpse = "" +unitsTable.squadcorak .energycost = 1 +unitsTable.squadcorak .metalcost = 1 +unitsTable.squadcorak .movestate = 2 +unitsTable.squadcorak .power = 50 +unitsTable.squadcorak .mass = 50 +unitsTable.squadcorak .speed = unitsTable.squadcorak .speed*1.5 +unitsTable.squadcorak .customparams.i18nfromunit = 'corak' --Epic Karganeth Squad -unitsTable['squadcorkarganetht4'] = VFS.Include('units/Scavengers/Bots/corkarganetht4.lua').corkarganetht4 --if this filepath is changed, the unit will no longer work! -unitsTable['squadcorkarganetht4'].selfdestructas = "" -unitsTable['squadcorkarganetht4'].movestate = 2 -unitsTable['squadcorkarganetht4'].customparams.i18nfromunit = 'corkarganetht4' -unitsTable['squadcorkarganetht4'].customparams.inheritxpratemultiplier = 1 -unitsTable['squadcorkarganetht4'].customparams.childreninheritxp = "DRONE" -unitsTable['squadcorkarganetht4'].customparams.parentsinheritxp = "DRONE" -unitsTable['squadcorkarganetht4'].weapondefs.dronespawner = { +unitsTable.squadcorkarganetht4 = VFS.Include('units/Scavengers/Bots/corkarganetht4.lua').corkarganetht4 --if this filepath is changed, the unit will no longer work! +unitsTable.squadcorkarganetht4 .selfdestructas = "" +unitsTable.squadcorkarganetht4 .movestate = 2 +unitsTable.squadcorkarganetht4 .customparams.i18nfromunit = 'corkarganetht4' +unitsTable.squadcorkarganetht4 .customparams.inheritxpratemultiplier = 1 +unitsTable.squadcorkarganetht4 .customparams.childreninheritxp = "DRONE" +unitsTable.squadcorkarganetht4 .customparams.parentsinheritxp = "DRONE" +unitsTable.squadcorkarganetht4 .weapondefs.dronespawner = { areaofeffect = 4, avoidfeature = false, craterareaofeffect = 0, @@ -254,22 +254,22 @@ unitsTable['squadcorkarganetht4'].weapondefs.dronespawner = { holdfireradius = 300 } } -unitsTable['squadcorkarganetht4'].weapons[4] = { +unitsTable.squadcorkarganetht4 .weapons[4] = { badtargetcategory = "VTOL", def = "dronespawner", onlytargetcategory = "NOTSUB", } --Epic Tzar's Babies -unitsTable['squadcorkarg'] = VFS.Include('units/CorGantry/corkarg.lua').corkarg --if this filepath is changed, the unit will no longer work! -unitsTable['squadcorkarg'].corpse = "" -unitsTable['squadcorkarg'].energycost = 1 -unitsTable['squadcorkarg'].metalcost = 1 -unitsTable['squadcorkarg'].movestate = 2 -unitsTable['squadcorkarg'].power = 1800 -unitsTable['squadcorkarg'].mass = 500 -unitsTable['squadcorkarg'].speed = unitsTable['squadcorkarg'].speed*1.5 -unitsTable['squadcorkarg'].customparams.i18nfromunit = 'corkarg' +unitsTable.squadcorkarg = VFS.Include('units/CorGantry/corkarg.lua').corkarg --if this filepath is changed, the unit will no longer work! +unitsTable.squadcorkarg .corpse = "" +unitsTable.squadcorkarg .energycost = 1 +unitsTable.squadcorkarg .metalcost = 1 +unitsTable.squadcorkarg .movestate = 2 +unitsTable.squadcorkarg .power = 1800 +unitsTable.squadcorkarg .mass = 500 +unitsTable.squadcorkarg .speed = unitsTable.squadcorkarg .speed*1.5 +unitsTable.squadcorkarg .customparams.i18nfromunit = 'corkarg' return unitsTable diff --git a/units/Scavengers/Other/scavmists.lua b/units/Scavengers/Other/scavmists.lua index dccfcf19696..5f9002be4ba 100644 --- a/units/Scavengers/Other/scavmists.lua +++ b/units/Scavengers/Other/scavmists.lua @@ -21,7 +21,7 @@ local lvlParams = { landturretburst = 4, --same here waterburst = 8, --remember, around 50% actually ends up spawning on average due to burnblow+sprayangle interaction }, - ["xl"] = { + xl = { autoheal = 250, buildtime = 17000, explodeas = "",--"mistexploxl", @@ -43,7 +43,7 @@ local lvlParams = { landturretburst = 4, --same here waterburst = 10, --remember, around 50% actually ends up spawning on average due to burnblow+sprayangle interaction }, - ["xxl"] = { + xxl = { autoheal = 500, buildtime = 25500, explodeas = "",--"mistexploxxl", diff --git a/units/other/evocom/armcorevodecom.lua b/units/other/evocom/armcorevodecom.lua index b16ba68c82e..d4c268145e9 100644 --- a/units/other/evocom/armcorevodecom.lua +++ b/units/other/evocom/armcorevodecom.lua @@ -1,93 +1,93 @@ local unitsTable = {} -unitsTable['armdecomlvl3'] = VFS.Include('units/other/evocom/armcomlvl3.lua').armcomlvl3 --if this filepath is changed, the unit will no longer work! -unitsTable['armdecomlvl3'].selfdestructas = "decoycommander" -unitsTable['armdecomlvl3'].explodeas = "decoycommander" -unitsTable['armdecomlvl3'].corpse = nil -unitsTable['armdecomlvl3'].customparams.evolution_target = nil -unitsTable['armdecomlvl3'].customparams.iscommander = nil -unitsTable['armdecomlvl3'].customparams.effigy = nil -unitsTable['armdecomlvl3'].customparams.i18nfromunit = "armcomlvl3" -unitsTable['armdecomlvl3'].decoyfor = "armcomlvl3" -unitsTable['armdecomlvl3'].customparams.decoyfor = "armcomlvl3" -unitsTable['armdecomlvl3'].customparams.isdecoycommander = true -unitsTable['armdecomlvl3'].health = math.ceil(unitsTable['armdecomlvl3'].health*0.5) -unitsTable['armdecomlvl3'].weapondefs.disintegrator.damage.default = 40 -unitsTable['armdecomlvl3'].weapondefs.backlauncher.customparams.stockpilelimit = 1 +unitsTable.armdecomlvl3 = VFS.Include('units/other/evocom/armcomlvl3.lua').armcomlvl3 --if this filepath is changed, the unit will no longer work! +unitsTable.armdecomlvl3 .selfdestructas = "decoycommander" +unitsTable.armdecomlvl3 .explodeas = "decoycommander" +unitsTable.armdecomlvl3 .corpse = nil +unitsTable.armdecomlvl3 .customparams.evolution_target = nil +unitsTable.armdecomlvl3 .customparams.iscommander = nil +unitsTable.armdecomlvl3 .customparams.effigy = nil +unitsTable.armdecomlvl3 .customparams.i18nfromunit = "armcomlvl3" +unitsTable.armdecomlvl3 .decoyfor = "armcomlvl3" +unitsTable.armdecomlvl3 .customparams.decoyfor = "armcomlvl3" +unitsTable.armdecomlvl3 .customparams.isdecoycommander = true +unitsTable.armdecomlvl3 .health = math.ceil(unitsTable.armdecomlvl3 .health*0.5) +unitsTable.armdecomlvl3 .weapondefs.disintegrator.damage.default = 40 +unitsTable.armdecomlvl3 .weapondefs.backlauncher.customparams.stockpilelimit = 1 -unitsTable['armdecomlvl6'] = VFS.Include('units/other/evocom/armcomlvl6.lua').armcomlvl6 --if this filepath is changed, the unit will no longer work! -unitsTable['armdecomlvl6'].selfdestructas = "decoycommander" -unitsTable['armdecomlvl6'].explodeas = "decoycommander" -unitsTable['armdecomlvl6'].corpse = nil -unitsTable['armdecomlvl6'].customparams.evolution_target = nil -unitsTable['armdecomlvl6'].customparams.iscommander = nil -unitsTable['armdecomlvl6'].customparams.effigy = nil -unitsTable['armdecomlvl6'].customparams.i18nfromunit = "armcomlvl6" -unitsTable['armdecomlvl6'].decoyfor = "armcomlvl6" -unitsTable['armdecomlvl6'].customparams.decoyfor = "armcomlvl6" -unitsTable['armdecomlvl6'].customparams.isdecoycommander = true -unitsTable['armdecomlvl6'].health = math.ceil(unitsTable['armdecomlvl6'].health*0.5) -unitsTable['armdecomlvl6'].weapondefs.disintegrator.damage.default = 40 -unitsTable['armdecomlvl6'].weapondefs.backlauncher.customparams.stockpilelimit = 2 +unitsTable.armdecomlvl6 = VFS.Include('units/other/evocom/armcomlvl6.lua').armcomlvl6 --if this filepath is changed, the unit will no longer work! +unitsTable.armdecomlvl6 .selfdestructas = "decoycommander" +unitsTable.armdecomlvl6 .explodeas = "decoycommander" +unitsTable.armdecomlvl6 .corpse = nil +unitsTable.armdecomlvl6 .customparams.evolution_target = nil +unitsTable.armdecomlvl6 .customparams.iscommander = nil +unitsTable.armdecomlvl6 .customparams.effigy = nil +unitsTable.armdecomlvl6 .customparams.i18nfromunit = "armcomlvl6" +unitsTable.armdecomlvl6 .decoyfor = "armcomlvl6" +unitsTable.armdecomlvl6 .customparams.decoyfor = "armcomlvl6" +unitsTable.armdecomlvl6 .customparams.isdecoycommander = true +unitsTable.armdecomlvl6 .health = math.ceil(unitsTable.armdecomlvl6 .health*0.5) +unitsTable.armdecomlvl6 .weapondefs.disintegrator.damage.default = 40 +unitsTable.armdecomlvl6 .weapondefs.backlauncher.customparams.stockpilelimit = 2 -unitsTable['armdecomlvl10'] = VFS.Include('units/other/evocom/armcomlvl10.lua').armcomlvl10 --if this filepath is changed, the unit will no longer work! -unitsTable['armdecomlvl10'].selfdestructas = "decoycommander" -unitsTable['armdecomlvl10'].explodeas = "decoycommander" -unitsTable['armdecomlvl10'].corpse = nil -unitsTable['armdecomlvl10'].customparams.evolution_target = nil -unitsTable['armdecomlvl10'].customparams.iscommander = nil -unitsTable['armdecomlvl10'].customparams.effigy = nil -unitsTable['armdecomlvl10'].customparams.i18nfromunit = "armcomlvl10" -unitsTable['armdecomlvl10'].decoyfor = "armcomlvl10" -unitsTable['armdecomlvl10'].customparams.decoyfor = "armcomlvl10" -unitsTable['armdecomlvl10'].customparams.isdecoycommander = true -unitsTable['armdecomlvl10'].health = math.ceil(unitsTable['armdecomlvl10'].health*0.5) -unitsTable['armdecomlvl10'].weapondefs.disintegrator.damage.default = 40 -unitsTable['armdecomlvl10'].weapondefs.backlauncher.customparams.stockpilelimit = 2 +unitsTable.armdecomlvl10 = VFS.Include('units/other/evocom/armcomlvl10.lua').armcomlvl10 --if this filepath is changed, the unit will no longer work! +unitsTable.armdecomlvl10 .selfdestructas = "decoycommander" +unitsTable.armdecomlvl10 .explodeas = "decoycommander" +unitsTable.armdecomlvl10 .corpse = nil +unitsTable.armdecomlvl10 .customparams.evolution_target = nil +unitsTable.armdecomlvl10 .customparams.iscommander = nil +unitsTable.armdecomlvl10 .customparams.effigy = nil +unitsTable.armdecomlvl10 .customparams.i18nfromunit = "armcomlvl10" +unitsTable.armdecomlvl10 .decoyfor = "armcomlvl10" +unitsTable.armdecomlvl10 .customparams.decoyfor = "armcomlvl10" +unitsTable.armdecomlvl10 .customparams.isdecoycommander = true +unitsTable.armdecomlvl10 .health = math.ceil(unitsTable.armdecomlvl10 .health*0.5) +unitsTable.armdecomlvl10 .weapondefs.disintegrator.damage.default = 40 +unitsTable.armdecomlvl10 .weapondefs.backlauncher.customparams.stockpilelimit = 2 -unitsTable['cordecomlvl3'] = VFS.Include('units/other/evocom/corcomlvl3.lua').corcomlvl3 --if this filepath is changed, the unit will no longer work! -unitsTable['cordecomlvl3'].selfdestructas = "decoycommander" -unitsTable['cordecomlvl3'].explodeas = "decoycommander" -unitsTable['cordecomlvl3'].corpse = nil -unitsTable['cordecomlvl3'].customparams.evolution_target = nil -unitsTable['cordecomlvl3'].customparams.iscommander = nil -unitsTable['cordecomlvl3'].customparams.effigy = nil -unitsTable['cordecomlvl3'].customparams.i18nfromunit = "corcomlvl3" -unitsTable['cordecomlvl3'].decoyfor = "corcomlvl3" -unitsTable['cordecomlvl3'].customparams.decoyfor = "corcomlvl3" -unitsTable['cordecomlvl3'].customparams.isdecoycommander = true -unitsTable['cordecomlvl3'].health = math.ceil(unitsTable['cordecomlvl3'].health*0.5) -unitsTable['cordecomlvl3'].weapondefs.disintegrator.damage.default = 40 -unitsTable['cordecomlvl3'].weapondefs.repulsor.shield.power = unitsTable['cordecomlvl3'].weapondefs.repulsor.shield.power*0.25 +unitsTable.cordecomlvl3 = VFS.Include('units/other/evocom/corcomlvl3.lua').corcomlvl3 --if this filepath is changed, the unit will no longer work! +unitsTable.cordecomlvl3 .selfdestructas = "decoycommander" +unitsTable.cordecomlvl3 .explodeas = "decoycommander" +unitsTable.cordecomlvl3 .corpse = nil +unitsTable.cordecomlvl3 .customparams.evolution_target = nil +unitsTable.cordecomlvl3 .customparams.iscommander = nil +unitsTable.cordecomlvl3 .customparams.effigy = nil +unitsTable.cordecomlvl3 .customparams.i18nfromunit = "corcomlvl3" +unitsTable.cordecomlvl3 .decoyfor = "corcomlvl3" +unitsTable.cordecomlvl3 .customparams.decoyfor = "corcomlvl3" +unitsTable.cordecomlvl3 .customparams.isdecoycommander = true +unitsTable.cordecomlvl3 .health = math.ceil(unitsTable.cordecomlvl3 .health*0.5) +unitsTable.cordecomlvl3 .weapondefs.disintegrator.damage.default = 40 +unitsTable.cordecomlvl3 .weapondefs.repulsor.shield.power = unitsTable.cordecomlvl3 .weapondefs.repulsor.shield.power*0.25 -unitsTable['cordecomlvl6'] = VFS.Include('units/other/evocom/corcomlvl6.lua').corcomlvl6 --if this filepath is changed, the unit will no longer work! -unitsTable['cordecomlvl6'].selfdestructas = "decoycommander" -unitsTable['cordecomlvl6'].explodeas = "decoycommander" -unitsTable['cordecomlvl6'].corpse = nil -unitsTable['cordecomlvl6'].customparams.evolution_target = nil -unitsTable['cordecomlvl6'].customparams.iscommander = nil -unitsTable['cordecomlvl6'].customparams.effigy = nil -unitsTable['cordecomlvl6'].customparams.i18nfromunit = "corcomlvl6" -unitsTable['cordecomlvl6'].decoyfor = "corcomlvl6" -unitsTable['cordecomlvl6'].customparams.decoyfor = "corcomlvl6" -unitsTable['cordecomlvl6'].customparams.isdecoycommander = true -unitsTable['cordecomlvl6'].health = math.ceil(unitsTable['cordecomlvl6'].health*0.5) -unitsTable['cordecomlvl6'].weapondefs.disintegrator.damage.default = 40 -unitsTable['cordecomlvl6'].weapondefs.repulsor.shield.power = unitsTable['cordecomlvl6'].weapondefs.repulsor.shield.power*0.25 +unitsTable.cordecomlvl6 = VFS.Include('units/other/evocom/corcomlvl6.lua').corcomlvl6 --if this filepath is changed, the unit will no longer work! +unitsTable.cordecomlvl6 .selfdestructas = "decoycommander" +unitsTable.cordecomlvl6 .explodeas = "decoycommander" +unitsTable.cordecomlvl6 .corpse = nil +unitsTable.cordecomlvl6 .customparams.evolution_target = nil +unitsTable.cordecomlvl6 .customparams.iscommander = nil +unitsTable.cordecomlvl6 .customparams.effigy = nil +unitsTable.cordecomlvl6 .customparams.i18nfromunit = "corcomlvl6" +unitsTable.cordecomlvl6 .decoyfor = "corcomlvl6" +unitsTable.cordecomlvl6 .customparams.decoyfor = "corcomlvl6" +unitsTable.cordecomlvl6 .customparams.isdecoycommander = true +unitsTable.cordecomlvl6 .health = math.ceil(unitsTable.cordecomlvl6 .health*0.5) +unitsTable.cordecomlvl6 .weapondefs.disintegrator.damage.default = 40 +unitsTable.cordecomlvl6 .weapondefs.repulsor.shield.power = unitsTable.cordecomlvl6 .weapondefs.repulsor.shield.power*0.25 -unitsTable['cordecomlvl10'] = VFS.Include('units/other/evocom/corcomlvl10.lua').corcomlvl10 --if this filepath is changed, the unit will no longer work! -unitsTable['cordecomlvl10'].selfdestructas = "decoycommander" -unitsTable['cordecomlvl10'].explodeas = "decoycommander" -unitsTable['cordecomlvl10'].corpse = nil -unitsTable['cordecomlvl10'].customparams.evolution_target = nil -unitsTable['cordecomlvl10'].customparams.iscommander = nil -unitsTable['cordecomlvl10'].customparams.effigy = nil -unitsTable['cordecomlvl10'].customparams.i18nfromunit = "corcomlvl10" -unitsTable['cordecomlvl10'].decoyfor = "corcomlvl10" -unitsTable['cordecomlvl10'].customparams.decoyfor = "corcomlvl10" -unitsTable['cordecomlvl10'].customparams.isdecoycommander = true -unitsTable['cordecomlvl10'].health = math.ceil(unitsTable['cordecomlvl10'].health*0.5) -unitsTable['cordecomlvl10'].weapondefs.disintegrator.damage.default = 40 -unitsTable['cordecomlvl10'].weapondefs.repulsor.shield.power = unitsTable['cordecomlvl10'].weapondefs.repulsor.shield.power*0.25 +unitsTable.cordecomlvl10 = VFS.Include('units/other/evocom/corcomlvl10.lua').corcomlvl10 --if this filepath is changed, the unit will no longer work! +unitsTable.cordecomlvl10 .selfdestructas = "decoycommander" +unitsTable.cordecomlvl10 .explodeas = "decoycommander" +unitsTable.cordecomlvl10 .corpse = nil +unitsTable.cordecomlvl10 .customparams.evolution_target = nil +unitsTable.cordecomlvl10 .customparams.iscommander = nil +unitsTable.cordecomlvl10 .customparams.effigy = nil +unitsTable.cordecomlvl10 .customparams.i18nfromunit = "corcomlvl10" +unitsTable.cordecomlvl10 .decoyfor = "corcomlvl10" +unitsTable.cordecomlvl10 .customparams.decoyfor = "corcomlvl10" +unitsTable.cordecomlvl10 .customparams.isdecoycommander = true +unitsTable.cordecomlvl10 .health = math.ceil(unitsTable.cordecomlvl10 .health*0.5) +unitsTable.cordecomlvl10 .weapondefs.disintegrator.damage.default = 40 +unitsTable.cordecomlvl10 .weapondefs.repulsor.shield.power = unitsTable.cordecomlvl10 .weapondefs.repulsor.shield.power*0.25 return unitsTable