chore(自定义节点等级):去除多余的判断
This commit is contained in:
parent
3370ba5d0f
commit
036725f697
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user