mirror of
https://codeberg.org/Duvelcorp/MetaHunt.git
synced 2026-10-09 10:00:01 +00:00
zTrap: show trap arming cooldown (spiral + seconds) with a toggle
This commit is contained in:
@@ -303,6 +303,13 @@ local function MTH_ZB_EnsureButtonOptionDefaults(buttonName)
|
||||
saved["showammoname"] = saved["showammoname"] and true or false
|
||||
end
|
||||
|
||||
if buttonName == "zButtonTrap" then
|
||||
if saved["cooldown"] == nil then
|
||||
saved["cooldown"] = true
|
||||
end
|
||||
saved["cooldown"] = saved["cooldown"] and true or false
|
||||
end
|
||||
|
||||
return saved
|
||||
end
|
||||
|
||||
@@ -557,6 +564,18 @@ local function MTH_SetupButtonOptions(containerName, buttonName, displayName, ma
|
||||
buttonObj.tooltip = saved["tooltip"] and true or false
|
||||
end
|
||||
|
||||
if buttonName == "zButtonTrap" then
|
||||
childrenBox:Checkbox(containerName.."ShowCooldown", MTH_ZB_L("ZB_LABEL_SHOW_TRAP_COOLDOWN", "Show cooldown"), {
|
||||
checked = saved["cooldown"] and true or false,
|
||||
onClick = function()
|
||||
if not this then return end
|
||||
local checked = this:GetChecked() == 1
|
||||
if not (ZHunterMod_Saved and ZHunterMod_Saved[buttonName]) then return end
|
||||
ZHunterMod_Saved[buttonName]["cooldown"] = checked
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
if buttonName == "zButtonAmmo" then
|
||||
childrenBox:Checkbox(containerName.."ShowAmmoName", MTH_ZB_L("ZB_LABEL_SHOW_AMMO_NAME", "Show ammo name"), {
|
||||
checked = saved["showammoname"],
|
||||
|
||||
Reference in New Issue
Block a user