Warning: You are not logged in. Once you make an edit, a temporary account will be created for you.
Learn more.
Log in or
create an account to continue receiving notifications after this account expires, and to access other features.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision |
Your text |
| Line 3: |
Line 3: |
| local theme_data = mw.loadJsonData("Data:Sandbox/Samlovesmath/Infobox_hero.json") | | local theme_data = mw.loadJsonData("Data:Sandbox/Samlovesmath/Infobox_hero.json") |
| local heroes_data_module = require('Module:HeroData') | | local heroes_data_module = require('Module:HeroData') |
|
| |
| function p.hero_has_scalars(frame)
| |
| local frameHero = frame.args[1]
| |
| local frameStat = frame.args[2]
| |
| local frame = mw.getCurrentFrame()
| |
| newFrameSpirit = frame:newChild{title = "Module:HeroData", args = {frameHero, "Spirit", frameStat}}
| |
| newFrameLevel = frame:newChild{title = "Module:HeroData", args = {frameHero, "Level", frameStat}}
| |
|
| |
| spiritResult = heroes_data_module.get_hero_scalar(newFrameSpirit)
| |
| levelResult = heroes_data_module.get_hero_scalar(newFrameLevel)
| |
| if (spiritResult ~= nil and spiritResult ~= "") or (levelResult ~= nil and levelResult ~= "") then
| |
| return true
| |
| end
| |
| return false
| |
| end
| |
|
| |
|
| function p.hero_has_tags(frame) | | function p.hero_has_tags(frame) |