Update planet triggers for recent planet AI change
This commit is contained in:
		
							
								
								
									
										2
									
								
								mfile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								mfile
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "package": "lotj-ui",
 | 
					  "package": "lotj-ui",
 | 
				
			||||||
  "version": "v2.1.1"
 | 
					  "version": "v2.1.2"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -13,10 +13,10 @@ end
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
line = line:gsub("%(UFG%)", "")
 | 
					line = line:gsub("%(UFG%)", "")
 | 
				
			||||||
line = line:gsub("  +", ";")
 | 
					line = line:gsub("  +", ";")
 | 
				
			||||||
local startIdx, _, planet, system, gov, support = line:find("([^;]+);([^;]+);([^;]+);([^;]+)")
 | 
					local startIdx, _, planet, system, gov, support, military = line:find("([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)")
 | 
				
			||||||
if not startIdx then
 | 
					if not startIdx then
 | 
				
			||||||
  gov = "None"
 | 
					  gov = "None"
 | 
				
			||||||
  startIdx, _, planet, system, support = line:find("([^;]+);([^;]+);([^;]+)")
 | 
					  startIdx, _, planet, system, support, military = line:find("([^;]+);([^;]+);([^;]+);([^;]+)")
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
if not startIdx then
 | 
					if not startIdx then
 | 
				
			||||||
  echo("\n")
 | 
					  echo("\n")
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,9 @@ local systemName = matches[2]:match "^%s*(.-)%s*$"
 | 
				
			|||||||
local xCoord = tonumber(matches[3])
 | 
					local xCoord = tonumber(matches[3])
 | 
				
			||||||
local yCoord = tonumber(matches[4])
 | 
					local yCoord = tonumber(matches[4])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if xCoord >= -100 and xCoord <= 100 and yCoord >= -100 and yCoord <= 100 then
 | 
				
			||||||
  lotj.galaxyMap.recordSystem(systemName, xCoord, yCoord)
 | 
					  lotj.galaxyMap.recordSystem(systemName, xCoord, yCoord)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
setTriggerStayOpen("gather-starsystems", 1)
 | 
					setTriggerStayOpen("gather-starsystems", 1)
 | 
				
			||||||
deleteLine()
 | 
					deleteLine()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,7 +9,7 @@
 | 
				
			|||||||
        "fireLength": 1,
 | 
					        "fireLength": 1,
 | 
				
			||||||
        "patterns": [
 | 
					        "patterns": [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            "pattern": "Planet\\s+Starsystem\\s+Governed By\\s+Popular Support",
 | 
					            "pattern": "Planet\\s+Starsystem\\s+Governed By\\s+Opinion\\s+Military",
 | 
				
			||||||
            "type": "regex"
 | 
					            "type": "regex"
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
@@ -36,8 +36,8 @@
 | 
				
			|||||||
            "type": "substring"
 | 
					            "type": "substring"
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            "pattern": "--Planet Data: -------------------------------",
 | 
					            "pattern": "--Planet Data: -+",
 | 
				
			||||||
            "type": "substring"
 | 
					            "type": "regex"
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        "children": [
 | 
					        "children": [
 | 
				
			||||||
@@ -84,8 +84,8 @@
 | 
				
			|||||||
            "name": "planet-description-hdr",
 | 
					            "name": "planet-description-hdr",
 | 
				
			||||||
            "patterns": [
 | 
					            "patterns": [
 | 
				
			||||||
              {
 | 
					              {
 | 
				
			||||||
                "pattern": "--Planetary Information: ---------------------",
 | 
					                "pattern": "--General Details: -+",
 | 
				
			||||||
                "type": "substring"
 | 
					                "type": "regex"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            ],
 | 
					            ],
 | 
				
			||||||
            "script": "gatherPlanetState.section = \"description\""
 | 
					            "script": "gatherPlanetState.section = \"description\""
 | 
				
			||||||
@@ -94,8 +94,8 @@
 | 
				
			|||||||
            "name": "planet-resources-hdr",
 | 
					            "name": "planet-resources-hdr",
 | 
				
			||||||
            "patterns": [
 | 
					            "patterns": [
 | 
				
			||||||
              {
 | 
					              {
 | 
				
			||||||
                "pattern": "--Planetary Resources: -----------------------",
 | 
					                "pattern": "--Planetary Resources: -+",
 | 
				
			||||||
                "type": "substring"
 | 
					                "type": "regex"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            ],
 | 
					            ],
 | 
				
			||||||
            "script": "gatherPlanetState.section = \"resources-basic\""
 | 
					            "script": "gatherPlanetState.section = \"resources-basic\""
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user