chore(自定义节点等级):去除多余的判断

This commit is contained in:
wxhn1225 2025-10-12 09:09:22 +08:00
parent 3370ba5d0f
commit 036725f697

View File

@ -18,13 +18,8 @@ local function launchNode(nodeId, minLevel, maxLevel, hardMode)
infoStr = infoStr:gsub("}", " tier=1\r\n}")
end
if minLevel then
infoStr = infoStr:gsub("minEnemyLevel=%d+", $"minEnemyLevel={minLevel}")
end
if maxLevel then
infoStr = infoStr:gsub("maxEnemyLevel=%d+", $"maxEnemyLevel={maxLevel}")
end
infoStr = infoStr:gsub("minEnemyLevel=%d+", $"minEnemyLevel={minLevel}")
infoStr = infoStr:gsub("maxEnemyLevel=%d+", $"maxEnemyLevel={maxLevel}")
args:SetLevel(info.levelOverride:GetFullName())
args:AddContextTag(infoStr)
@ -43,14 +38,12 @@ end
local commands = {}
commands["节点"] = function(text)
local parts = text:split(" ")
local nodeId = regionNames[parts[2]] or parts[2]
launchNode(nodeId, tonumber(parts[3]), tonumber(parts[4]), false)
launchNode(regionNames[parts[2]], tonumber(parts[3]), tonumber(parts[4]), false)
end
commands["钢铁"] = function(text)
local parts = text:split(" ")
local nodeId = regionNames[parts[2]] or parts[2]
launchNode(nodeId, tonumber(parts[3]), tonumber(parts[4]), true)
launchNode(regionNames[parts[2]], tonumber(parts[3]), tonumber(parts[4]), true)
end
for prefix in commands do