Tremor Mod Wiki
Explore
Main Page
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Admin noticeboard
Mod Content
NPCs
Bosses
Enemies
Weapons
Tools
Accessories
Armor
Vanity items
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
FANDOM
Explore
Current Wiki
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Tremor Mod Wiki
969
pages
Explore
Main Page
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Admin noticeboard
Mod Content
NPCs
Bosses
Enemies
Weapons
Tools
Accessories
Armor
Vanity items
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
Editing
Module:Crafts/ingredient
Back to page
Edit source
View history
Talk (0)
Edit Page
Module:Crafts/ingredient
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 metals = { ['Copper/Tin'] = 1, ['Silver/Tungsten'] = 1, ['Gold/Platinum'] = 1, ['Iron/Lead'] = 1, ['Demonite/Crimtane'] = 1, ['Cobalt/Palladium'] = 1, ['Mythril/Orichalcum'] = 1, ['Adamantite/Titanium'] = 1, ['Tin/Copper'] = 2, ['Tungsten/Silver'] = 2, ['Platinum/Gold'] = 2, ['Lead/Iron'] = 2, ['Palladium/Cobalt'] = 2, ['Orichalcum/Mythril'] = 2, ['Titanium/Adamantite'] = 2, } local function split(name) local item1a, item1b, item2a, item2b = name:match("^(%S+)%s*(.-)/(%S+)%s*(.-)$") if item1a then local x = metals[item1a..'/'..item2a] if tostring(item1b) == '' and x then item1b = item2b end if x == 2 then return item2a..' '..item2b, item1a..' '..item1b else return item1a..' '..item1b, item2a..' '..item2b end else return name end end -- main return object return { go = function(frame) local _input = mw.text.trim(frame.args[1]) local _basepage = mw.text.trim(frame.args[2]) local icons local result = '' for name, amount in _input:gmatch("(.-)Β¦(.-)ΒΆ") do local li = '' item1, item2 = split(name) if item2 then li = li .. frame:expandTemplate{ title = 'item', args = {item1} } li = li .. " ''or'' " li = li .. frame:expandTemplate{ title = 'item', args = {item2} } else li = li .. frame:expandTemplate{ title = 'item', args = {name} } end result = result .. mw.text.tag('li', nil, li .. amount) end return mw.text.tag('ul', nil, result) end }
Summary:
Please note that all contributions to the Tremor Mod Wiki are considered to be released under the CC BY-SA 3.0
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Crafts/ingredient/doc
(
edit
)
Follow on IG
TikTok
Join Fan Lab