36 lines
774 B
Lua
36 lines
774 B
Lua
|
-- 加速挖素材 8273 8274
|
||
|
-- 挖矿 8377-8379
|
||
|
-- 采集 8276-8278,8281
|
||
|
local GATHERING_LMT_ID = {8273, 8274, 8377, 8378, 8379, 8276, 8277, 8278, 8281}
|
||
|
|
||
|
local function isIn(tbl, target)
|
||
|
for key, value in pairs(tbl) do
|
||
|
if target == value then
|
||
|
return true
|
||
|
end
|
||
|
end
|
||
|
return false
|
||
|
end
|
||
|
|
||
|
local function isGatheringLmtID(lmtID)
|
||
|
return isIn(GATHERING_LMT_ID, lmtID)
|
||
|
end
|
||
|
|
||
|
local function onTime(ctx)
|
||
|
local playerData = ctx.playerData
|
||
|
|
||
|
if isGatheringLmtID(playerData.Action.lmtID) then
|
||
|
ctx.Speed:setSpeedMutex(5, "加速挖素材")
|
||
|
else
|
||
|
ctx.Speed:resetSpeedMutex("加速挖素材")
|
||
|
end
|
||
|
end
|
||
|
|
||
|
return {
|
||
|
version = 1,
|
||
|
name = "fast_gathering",
|
||
|
onTime = onTime,
|
||
|
conditions = nil,
|
||
|
priority = 10
|
||
|
}
|