Editing
Module:HeroData/headcount
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local p = {} local heroes_data = mw.loadJsonData("Data:HeroData.json") -- {{Heroes count}} access point function p.get_headcount(frame) local hero_type = frame.args[1] local iter = 0 for _, v in pairs(heroes_data) do if hero_type == 'Released' then if (v["InDevelopment"] == false and v["IsDisabled"] == false and v["Name"] ~= nil) then iter = iter + 1 end elseif hero_type == 'HeroLabs' then if (v["InHeroLabs"] == true and v["Name"] ~= nil) then iter = iter + 1 end else return "get_headcount()'s hero_type parameter must be either 'Released' or 'HeroLabs'" end end return iter end return p
Summary:
Please note that all contributions to Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Deadlock:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Preview page with this template
Template used on this page:
Module:HeroData/headcount/doc
(
edit
)
Navigation menu
Personal tools
English
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Module
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Discord community
Recent changes
Random page
Tools
What links here
Related changes
Special pages
Page information
Languages