Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion common/configs/unit_restrictions_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions common/holidays.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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}
},
Expand Down
2 changes: 1 addition & 1 deletion common/lib_startpoint_guesser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions common/testing/mocha_json_reporter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
24 changes: 12 additions & 12 deletions common/upgets/api_resource_spot_finder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion effects/antinuke.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-- burngreen

return {
["antinuke"] = {
antinuke = {
explosion = {
air = true,
class = [[CSimpleParticleSystem]],
Expand Down
Loading
Loading