Update planet triggers for recent planet AI change

This commit is contained in:
Matt Wagner 2021-08-06 11:37:24 -07:00
parent a74a1f3ec7
commit ba79ab2e5e
4 changed files with 13 additions and 11 deletions

2
mfile
View File

@ -1,4 +1,4 @@
{ {
"package": "lotj-ui", "package": "lotj-ui",
"version": "v2.1.1" "version": "v2.1.2"
} }

View File

@ -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")

View File

@ -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])
lotj.galaxyMap.recordSystem(systemName, xCoord, yCoord) if xCoord >= -100 and xCoord <= 100 and yCoord >= -100 and yCoord <= 100 then
lotj.galaxyMap.recordSystem(systemName, xCoord, yCoord)
end
setTriggerStayOpen("gather-starsystems", 1) setTriggerStayOpen("gather-starsystems", 1)
deleteLine() deleteLine()

View File

@ -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\""