Difference between revisions of "Module:Availability/active"
(Slight refactoring to support cases (and renamed, since it's being repurposed)) |
m |
||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
'103', '105', '109', | '103', '105', '109', | ||
'110', '111', '112', '113', '114', '115', '116', | '110', '111', '112', '113', '114', '115', '116', | ||
− | ' | + | '144', |
} | } | ||
Line 15: | Line 15: | ||
end | end | ||
return false | return false | ||
+ | end | ||
+ | |||
+ | function crate_link(num) | ||
+ | if is_active(num) then | ||
+ | return 'Mann Co. Supply Crate/Active series' | ||
+ | else | ||
+ | return 'Mann Co. Supply Crate/Retired series' | ||
+ | end | ||
+ | end | ||
+ | |||
+ | function case_link(num) | ||
+ | if is_active(num) then | ||
+ | return 'Mann Co. Supply Crate/Active series' | ||
+ | else | ||
+ | return 'Mann Co. Supply Crate/Retired case series' | ||
+ | end | ||
end | end |
Latest revision as of 19:50, 18 July 2024
Helper page for Module:Availability. This page only houses some relatively minor (and therefore safe to touch) logic around which crate/case series are active.
-- These crate and case numbers should exactly match the ones listed on [[Mann Co. Supply Crate/Active series]] local active = { '62', '63', '64', '65', '66', '67', '68', '69', '92', '103', '105', '109', '110', '111', '112', '113', '114', '115', '116', '144', } function is_active(num) for _, n in ipairs(active) do if n == num then return true end end return false end function crate_link(num) if is_active(num) then return 'Mann Co. Supply Crate/Active series' else return 'Mann Co. Supply Crate/Retired series' end end function case_link(num) if is_active(num) then return 'Mann Co. Supply Crate/Active series' else return 'Mann Co. Supply Crate/Retired case series' end end