chemistry/init.lua

151 lines
2.4 KiB
Lua
Raw Normal View History

2013-02-16 11:30:48 -08:00
--element format = {"El",<group>,<period>}
local groups = {
{"alkali metals",{
{"Li",1,2,3},
{"Na",1,3,11},
{"K" ,1,4,19},
{"Rb",1,5,37},
{"Cs",1,6,55},
{"Fr",1,7,87},
}},
{"alkaline earth metals",{
{"Be",2,2,4},
{"Mg",2,3,12},
{"Ca",2,4,20},
{"Sr",2,5,38},
{"Ba",2,6,56},
{"Ra",2,7,88},
}},
{"coinage metals",{
{"Sc",3,4,21},
{"Y" ,3,5,39},
{"Ti",4,4,22},
{"Zr",4,5,40},
{"Hf",4,6,72},
{"Rf",4,7,104},
{"V" ,5,4,23},
{"Nb",5,5,41},
{"Ta",5,6,73},
{"Db",5,7,105},
{"Cr",6,4,24},
{"Mo",6,5,42},
{"W" ,6,6,74},
{"Sg",6,7,106},
{"Mn",7,4,25},
{"Tc",7,5,43},
{"Re",7,6,75},
{"Bh",7,7,106},
{"Fe",8,4,26},
{"Ru",8,5,44},
{"Os",8,6,76},
{"Hs",8,7,107},
{"Co",9,4,27},
{"Rh",9,5,45},
{"Ir",9,6,77},
{"Ni",10,4,28},
{"Pd",10,5,46},
{"Pt",10,6,78},
{"Cu",11,4,29},
{"Ag",11,5,47},
{"Au",11,6,79},
}},
{"volatile metals",{
{"Zn",12,4,30},
{"Cd",12,5,48},
{"Hg",12,6,80},
{"Cn",12,7,112},
}},
{"icosagens",{
{"B" ,13,2,5},
{"Al" ,13,3,13},
{"Ga" ,13,4,31},
{"In" ,13,5,49},
{"Tl" ,13,6,81},
{"Uut",13,7,113},
}},
{"crystallogens",{
{"C" ,14,2,6},
{"Si",14,3,14},
{"Ge",14,4,32},
{"Sn",14,5,50},
{"Pb",14,6,82},
{"Fl",14,7,114},
}},
{"pnictogens",{
{"N" ,15,2,7},
{"P" ,15,3,15},
{"As" ,15,4,33},
{"Sb" ,15,5,51},
{"Bi" ,15,6,83},
{"Uup",15,7,115},
}},
{"chalcogens",{
{"O" ,16,2,8},
{"S" ,16,3,16},
{"Se",16,4,34},
{"Te",16,5,52},
{"Po",16,6,84},
{"Lv",16,7,116},
}},
{"halogens", {
{"F" ,17,2,9},
{"CL" ,17,3,17},
{"Br" ,17,4,35},
{"I" ,17,5,53},
{"At" ,17,6,85},
{"Uus",17,7,117},
}},
{"noble gases",{
{"He" ,18,1,2},
{"Ne" ,18,2,10},
{"Ar" ,18,3,18},
{"Kr" ,18,4,36},
{"Xe" ,18,5,54},
{"Rn" ,18,6,86},
{"Uuo",18,7,118},
}}
}
for i, group in ipairs(groups) do
--print(i.." "..group[1])
for ii, element in ipairs(group[2]) do
print(element[1].." "..element[4])
minetest.register_node("chemistry:"..element[1], {
description = element[1],
tiles = {element[1]..".png"},
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,wool=1},
})
end
end