EigeenLoader/eigeen_modules/fast_gathering.lua

36 lines
774 B
Lua
Raw Permalink Normal View History

2023-12-21 18:23:59 +08:00
-- 加速挖素材 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
}