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",
"version": "v2.1.1"
"version": "v2.1.2"
}

View File

@ -13,10 +13,10 @@ end
line = line:gsub("%(UFG%)", "")
line = line:gsub(" +", ";")
local startIdx, _, planet, system, gov, support = line:find("([^;]+);([^;]+);([^;]+);([^;]+)")
local startIdx, _, planet, system, gov, support, military = line:find("([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)")
if not startIdx then
gov = "None"
startIdx, _, planet, system, support = line:find("([^;]+);([^;]+);([^;]+)")
startIdx, _, planet, system, support, military = line:find("([^;]+);([^;]+);([^;]+);([^;]+)")
end
if not startIdx then
echo("\n")

View File

@ -2,7 +2,9 @@ local systemName = matches[2]:match "^%s*(.-)%s*$"
local xCoord = tonumber(matches[3])
local yCoord = tonumber(matches[4])
if xCoord >= -100 and xCoord <= 100 and yCoord >= -100 and yCoord <= 100 then
lotj.galaxyMap.recordSystem(systemName, xCoord, yCoord)
end
setTriggerStayOpen("gather-starsystems", 1)
deleteLine()

View File

@ -9,7 +9,7 @@
"fireLength": 1,
"patterns": [
{
"pattern": "Planet\\s+Starsystem\\s+Governed By\\s+Popular Support",
"pattern": "Planet\\s+Starsystem\\s+Governed By\\s+Opinion\\s+Military",
"type": "regex"
}
],
@ -36,8 +36,8 @@
"type": "substring"
},
{
"pattern": "--Planet Data: -------------------------------",
"type": "substring"
"pattern": "--Planet Data: -+",
"type": "regex"
}
],
"children": [
@ -84,8 +84,8 @@
"name": "planet-description-hdr",
"patterns": [
{
"pattern": "--Planetary Information: ---------------------",
"type": "substring"
"pattern": "--General Details: -+",
"type": "regex"
}
],
"script": "gatherPlanetState.section = \"description\""
@ -94,8 +94,8 @@
"name": "planet-resources-hdr",
"patterns": [
{
"pattern": "--Planetary Resources: -----------------------",
"type": "substring"
"pattern": "--Planetary Resources: -+",
"type": "regex"
}
],
"script": "gatherPlanetState.section = \"resources-basic\""