Various improvements, added sounds

master
Alois Wohlschlager 2017-10-07 15:58:03 +02:00
parent 5a9bec1b63
commit a359d7e7e9
41 changed files with 205 additions and 34 deletions

View File

@ -1 +1,11 @@
0.2:
* Water can now be crafted by burning hydrogen
* Updated README to reflect changes in the uses for some items
* Salt is now less common, it's mostly useless anyway
* Added small chemical symbols to most chemicals to make them more distinguishable
* Made coal less easily obtainable from wood
* Added magnesium torch
* Mesecon compatibility/support
* Added sounds
0.1: Initial testing version

View File

@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
License for Textures
--------------------
License for Textures and Sounds
-------------------------------
CC-BY-SA 3.0 UNPORTED. Created by Alois Wohlschlager

View File

@ -1,14 +1,15 @@
Adds ores, a lab, various lab equipment, chemicals and more tools, building materials and lights. The most comprehensive chemistry mod for Minetest.
License: LGPLv2.1 or later for code, CC-BY-SA 3.0 for textures
License: LGPLv2.1 or later for code, CC-BY-SA 3.0 for textures and sounds
Version: 0.1
Version: 0.2
Installation:
GNU/Linux with system-wide installation: copy the mod folder to ~/.minetest/mods/
Other: copy the mod folder to minetest/mods/ in your installation folder
Dependencies: Nothing outside of the Minetest game, so everything needed should be already in place. We need only default, vessels, bucket and fire.
Mesecons will only add some support/compatibility features.
Contact: alois1@gmx-topmail.de
@ -34,7 +35,7 @@ Lab Equipment
Chemicals
---------
GASES
* Hydrogen: Used for lamps and to make hydrochloric acid, starting point for nuclear reactions
* Hydrogen: Used for lamps and to make hydrochloric acid, starting point for nuclear reactions, burn it to make water
* Helium: Used for lamps and in nuclear reactions
* Oxygen: Used for lamps and in nuclear reactions
* Neon: Used for lamps and in nuclear reactions
@ -43,7 +44,7 @@ GASES
* Hydrogen Chloride: Make hydrochloric acid
METALS
* Sodium: Used for lamps and for sodium hydroxide
* Magnesium: Used in nuclear reactions
* Magnesium: Used to make magnesium torches
* Silicon: Used in nuclear reactions and to make sand
OTHER
* Sulfur Trioxide: Make sulfuric acid
@ -61,7 +62,9 @@ Misc
----
* Stainless Steel Ingot: Make tools
* Collection Of Interstellar Gas: Cook it for five minutes to start a star
* Charcoal: Intermediate product to make coal from trees
* Compressed Coal: Make diamond renewable
* Refined lava: Make lava tools
Tools
-----
@ -77,5 +80,6 @@ Blocks
Lights
------
* Stinking Torch: Torch with sulfur instead of coal
* Magnesium Torch: Torch with magnesium instead of coal (or sulfur), slightly brighter
* Arc Lamp
* Discharge Lamps: Hydrogen, Helium, Oxygen, Neon, Sodium, Sulfur

View File

@ -64,7 +64,7 @@ minetest.register_abm({
})
minetest.register_abm({
nodenames = {"air"},
nodenames = {"air", "chemistry:star_radiation_zone_1", "chemistry_star_radiation_zone_2", "chemistry:star_radiation_zone_3", "chemistry:star_convection_zone"},
neighbors = {"chemistry:star"},
interval = 2.0,
chance = 10,
@ -85,7 +85,7 @@ minetest.register_abm({
})
minetest.register_abm({
nodenames = {"air"},
nodenames = {"air", "chemistry:star_radiation_zone_1", "chemistry_star_radiation_zone_2", "chemistry:star_radiation_zone_3", "chemistry:star_convection_zone"},
neighbors = {"chemistry:star_radiation_zone_1"},
interval = 2.0,
chance = 20,
@ -106,7 +106,7 @@ minetest.register_abm({
})
minetest.register_abm({
nodenames = {"air"},
nodenames = {"air", "chemistry:star_radiation_zone_1", "chemistry_star_radiation_zone_2", "chemistry:star_radiation_zone_3", "chemistry:star_convection_zone"},
neighbors = {"chemistry:star_radiation_zone_2"},
interval = 2.0,
chance = 30,
@ -127,7 +127,7 @@ minetest.register_abm({
})
minetest.register_abm({
nodenames = {"air"},
nodenames = {"air", "chemistry:star_radiation_zone_1", "chemistry_star_radiation_zone_2", "chemistry:star_radiation_zone_3", "chemistry:star_convection_zone"},
neighbors = {"chemistry:star_radiation_zone_3"},
interval = 2.0,
chance = 40,

View File

@ -6,10 +6,18 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'chemistry:magnesium_torch 4',
recipe = {
{'chemistry:magnesium'},
{'group:stick'},
}
})
minetest.register_craft({
output = 'chemistry:pick_lava',
recipe = {
{'default:lava_source', 'default:lava_source', 'default:lava_source'},
{'chemistry:refined_lava', 'chemistry:refined_lava', 'chemistry:refined_lava'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
}
@ -18,7 +26,7 @@ minetest.register_craft({
minetest.register_craft({
output = 'chemistry:shovel_lava',
recipe = {
{'default:lava_source'},
{'chemistry:refined_lava'},
{'group:stick'},
{'group:stick'},
}
@ -27,8 +35,8 @@ minetest.register_craft({
minetest.register_craft({
output = 'chemistry:axe_lava',
recipe = {
{'default:lava_source', 'default:lava_source'},
{'default:lava_source', 'group:stick'},
{'chemistry:refined_lava', 'chemistry:refined_lava'},
{'chemistry:refined_lava', 'group:stick'},
{'', 'group:stick'},
}
})
@ -36,8 +44,8 @@ minetest.register_craft({
minetest.register_craft({
output = 'chemistry:sword_lava',
recipe = {
{'default:lava_source'},
{'default:lava_source'},
{'chemistry:refined_lava'},
{'chemistry:refined_lava'},
{'group:stick'},
}
})
@ -246,3 +254,32 @@ minetest.register_craft({
{"", "default:clay_brick", ""},
}
})
minetest.register_craft({
output = "default:coal_lump",
recipe = {
{"chemistry:charcoal", "chemistry:charcoal", "chemistry:charcoal"},
{"chemistry:charcoal", "chemistry:charcoal", "chemistry:charcoal"},
{"chemistry:charcoal", "chemistry:charcoal", "chemistry:charcoal"},
}
})
minetest.register_craft({
type = "shapeless",
output = "chemistry:refined_lava",
recipe = {"default:lava_source", "default:steel_ingot"}
})
-- Mesecon compatibility/support
if minetest.get_modpath("mesecons") ~= nil then
minetest.register_craft({
type = "shapeless",
output = "mesecons_materials:silicon",
recipe = {"chemistry:silicon"},
})
minetest.register_craft({
type = "shapeless",
output = "chemistry:silicon",
recipe = {"mesecons_materials:silicon"},
})
end

View File

@ -137,3 +137,13 @@ minetest.register_craftitem("chemistry:mortar", {
description = "Mortar",
inventory_image = "chemistry_mortar.png",
})
minetest.register_craftitem("chemistry:charcoal", {
description = "Charcoal",
inventory_image = "chemistry_charcoal.png",
})
minetest.register_craftitem("chemistry:refined_lava", {
description = "Refined Lava",
inventory_image = "chemistry_refined_lava.png",
})

View File

@ -2,3 +2,4 @@ default
vessels
bucket
fire
mesecons?

82
lab.lua
View File

@ -71,6 +71,44 @@ local function get_node_group(name, group)
return minetest.registered_nodes[name].groups[group]
end
local function bunsen_sound(pos)
minetest.sound_play("chemistry_bunsen", {
pos = pos,
max_hear_distance = 32,
gain = 1.0,
})
end
local function explosion_sound(pos)
minetest.sound_play("chemistry_explosion", {
gain = 1.0,
})
end
local function mortar_sound(pos)
minetest.sound_play("chemistry_mortar", {
pos = pos,
max_hear_distance = 32,
gain = 1.0,
})
end
local function pouring_sound(pos)
minetest.sound_play("chemistry_pouring", {
pos = pos,
max_hear_distance = 32,
gain = 1.0,
})
end
local function stirring_sound(pos)
minetest.sound_play("chemistry_stirring", {
pos = pos,
max_hear_distance = 32,
gain = 1.0,
})
end
local function lab_node_timer(pos, elapsed)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
@ -93,6 +131,7 @@ local function lab_node_timer(pos, elapsed)
if r1:get_name() == "chemistry:vanadium_ingot" and r1:get_count() >= 2 and tool:get_name() == "chemistry:bunsen" then
local item = ItemStack("chemistry:vanadium_v_oxide", 1)
if reaction_possible(pos) then
bunsen_sound(pos)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 2)
inv:set_stack("reactant", 1, r1)
@ -102,6 +141,7 @@ local function lab_node_timer(pos, elapsed)
if r1:get_name() == "chemistry:sulfur_lump" and tool:get_name() == "chemistry:bunsen" then
local item = ItemStack("chemistry:sulfur_dioxide", 1)
if reaction_possible(pos) then
bunsen_sound(pos)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 1)
inv:set_stack("reactant", 1, r1)
@ -111,6 +151,7 @@ local function lab_node_timer(pos, elapsed)
if r1:get_name() == "chemistry:sulfur_dioxide" and r1:get_count() >= 2 and tool:get_name() == "chemistry:bunsen" and catalyst:get_name() == "chemistry:vanadium_v_oxide" then
local item = ItemStack("chemistry:sulfur_trioxide", 1) -- just using two here doesn't work for some reason
if reaction_possible(pos) then
bunsen_sound(pos)
inv:add_item("product", item)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 2)
@ -122,6 +163,7 @@ local function lab_node_timer(pos, elapsed)
local item = ItemStack("default:water_source", 1)
local bucket = ItemStack("bucket:bucket_empty", 1)
if reaction_possible(pos) then
pouring_sound(pos)
inv:add_item("product", item)
inv:set_stack("reactant", 1, bucket)
result = true
@ -131,6 +173,7 @@ local function lab_node_timer(pos, elapsed)
local item = ItemStack("default:lava_source", 1)
local bucket = ItemStack("bucket:bucket_empty", 1)
if reaction_possible(pos) then
pouring_sound(pos)
inv:add_item("product", item)
inv:set_stack("reactant", 1, bucket)
result = true
@ -222,6 +265,7 @@ local function lab_node_timer(pos, elapsed)
if r1:get_name() == "chemistry:silicon" and tool:get_name() == "chemistry:bunsen" then
local item = ItemStack("default:sand", 1)
if reaction_possible(pos) then
bunsen_sound(pos)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 1)
inv:set_stack("reactant", 1, r1)
@ -231,6 +275,7 @@ local function lab_node_timer(pos, elapsed)
if r1:get_name() == "default:cobble" and tool:get_name() == "chemistry:mortar" then
local item = ItemStack("default:gravel", 1)
if reaction_possible(pos) then
mortar_sound(pos)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 1)
inv:set_stack("reactant", 1, r1)
@ -240,6 +285,7 @@ local function lab_node_timer(pos, elapsed)
if r1:get_name() == "default:sand" and tool:get_name() == "chemistry:mortar" then
local item = ItemStack("default:clay", 1)
if reaction_possible(pos) then
mortar_sound(pos)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 1)
inv:set_stack("reactant", 1, r1)
@ -249,6 +295,7 @@ local function lab_node_timer(pos, elapsed)
if get_node_group(r1:get_name(), "tree") ~= 0 and tool:get_name() == "chemistry:mortar" then
local item = ItemStack("default:dirt", 1)
if reaction_possible(pos) then
mortar_sound(pos)
inv:add_item("product", item)
inv:add_item("product", item)
inv:add_item("product", item)
@ -265,6 +312,7 @@ local function lab_node_timer(pos, elapsed)
if get_node_group(r1:get_name(), "wood") ~= 0 and tool:get_name() == "chemistry:mortar" then
local item = ItemStack("default:dirt", 1)
if reaction_possible(pos) then
mortar_sound(pos)
inv:add_item("product", item)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 1)
@ -273,12 +321,9 @@ local function lab_node_timer(pos, elapsed)
end
end
if get_node_group(r1:get_name(), "tree") ~= 0 and tool:get_name() == "chemistry:bunsen" then
local item = ItemStack("default:coal_lump", 1)
local item = ItemStack("chemistry:charcoal", 1)
if reaction_possible(pos) then
inv:add_item("product", item)
inv:add_item("product", item)
inv:add_item("product", item)
inv:add_item("product", item)
bunsen_sound(pos)
inv:add_item("product", item)
inv:add_item("product", item)
inv:add_item("product", item)
@ -289,9 +334,9 @@ local function lab_node_timer(pos, elapsed)
end
end
if get_node_group(r1:get_name(), "wood") ~= 0 and tool:get_name() == "chemistry:bunsen" then
local item = ItemStack("default:coal_lump", 1)
local item = ItemStack("chemistry:charcoal", 1)
if reaction_possible(pos) then
inv:add_item("product", item)
bunsen_sound(pos)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 1)
inv:set_stack("reactant", 1, r1)
@ -304,6 +349,7 @@ local function lab_node_timer(pos, elapsed)
local value = math.random()
if (value < 0.4) then
if reaction_possible(pos) then
explosion_sound(pos)
local copper = ItemStack("default:copper_lump", 1)
inv:add_item("product", copper)
r1:set_count(r1:get_count() - 1)
@ -312,6 +358,7 @@ local function lab_node_timer(pos, elapsed)
end
elseif (value < 0.8) then
if reaction_possible(pos) then
explosion_sound(pos)
local vanadium = ItemStack("chemistry:vanadium_lump", 1)
inv:add_item("product", vanadium)
r1:set_count(r1:get_count() - 1)
@ -320,6 +367,7 @@ local function lab_node_timer(pos, elapsed)
end
elseif (value < 0.93) then
if reaction_possible(pos) then
explosion_sound(pos)
local gold = ItemStack("default:gold_lump", 1)
inv:add_item("product", gold)
r1:set_count(r1:get_count() - 1)
@ -328,6 +376,7 @@ local function lab_node_timer(pos, elapsed)
end
else
if reaction_possible(pos) then
explosion_sound(pos)
local mese = ItemStack("default:mese_crystal", 1)
inv:add_item("product", mese)
r1:set_count(r1:get_count() - 1)
@ -339,6 +388,7 @@ local function lab_node_timer(pos, elapsed)
if r1:get_name() == "chemistry:copper_sulfate_wet" and tool:get_name() == "chemistry:bunsen" then
local item = ItemStack("default:copper_sulfate_dry", 1)
if reaction_possible(pos) then
bunsen_sound(pos)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 1)
inv:set_stack("reactant", 1, r1)
@ -348,12 +398,23 @@ local function lab_node_timer(pos, elapsed)
if r1:get_name() == "default:water_source" and r1:get_count() >= 10 and tool:get_name() == "chemistry:bunsen" then
local item = ItemStack("chemistry:salt", 1)
if reaction_possible(pos) then
bunsen_sound(pos)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 10)
inv:set_stack("reactant", 1, r1)
result = true
end
end
if r1:get_name() == "chemistry:hydrogen" and tool:get_name() == "chemistry:bunsen" then
local item = ItemStack("default:water_source", 1)
if reaction_possible(pos) then
explosion_sound(pos)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 1)
inv:set_stack("reactant", 1, r1)
result = true
end
end
end -- r1 switch
else
if r1:get_name() == "chemistry:sulfur_trioxide" and r2:get_name() == "default:water_source" and tool:get_name() == "chemistry:stir_stick" then
@ -393,6 +454,8 @@ local function lab_node_timer(pos, elapsed)
if r1:get_name() == "chemistry:hydrogen" and r2:get_name() == "chemistry:chlorine" and tool:get_name() == "chemistry:bunsen" then
local item = ItemStack("chemistry:hydrogen_chloride", 1)
if reaction_possible(pos) then
explosion_sound(pos)
inv:add_item("product", item)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 1)
r2:set_count(r2:get_count() - 1)
@ -404,6 +467,7 @@ local function lab_node_timer(pos, elapsed)
if r1:get_name() == "chemistry:hydrogen_chloride" and r2:get_name() == "default:water_source" and tool:get_name() == "chemistry:stir_stick" then
local item = ItemStack("chemistry:hydrochloric_acid", 1)
if reaction_possible(pos) then
stirring_sound(pos)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 1)
r2:set_count(r2:get_count() - 1)
@ -416,6 +480,7 @@ local function lab_node_timer(pos, elapsed)
local item = ItemStack("chemistry:sodium_hydroxide", 1)
local hydrogen = ItemStack("chemistry:hydrogen", 1)
if reaction_possible(pos) then
stirring_sound(pos)
inv:add_item("product", item)
inv:add_item("product", item)
inv:add_item("product", hydrogen)
@ -429,6 +494,7 @@ local function lab_node_timer(pos, elapsed)
if r1:get_name() == "chemistry:sodium_hydroxide" and r2:get_name() == "default:water_source" and tool:get_name() == "chemistry:stir_stick" then
local item = ItemStack("chemistry:caustic_soda", 1)
if reaction_possible(pos) then
stirring_sound(pos)
inv:add_item("product", item)
r1:set_count(r1:get_count() - 1)
r2:set_count(r2:get_count() - 1)
@ -474,6 +540,7 @@ local function lab_node_timer(pos, elapsed)
local cuso4 = ItemStack("chemistry:copper_ii_sulfate_dry", 1)
local hydrogen = ItemStack("chemistry:hydrogen", 1)
if reaction_possible(pos) then
stirring_sound(pos)
inv:add_item("product", cuso4)
inv:add_item("product", hydrogen)
r1:set_count(r1:get_count() - 1)
@ -486,6 +553,7 @@ local function lab_node_timer(pos, elapsed)
if (get_node_group(r1:get_name(), "stone") ~= 0 or r1:get_name() == "default:gravel") and r2:get_name() == "chemistry:sulfuric_acid" and tool:get_name() == "chemistry:stir_stick" then
local gypsum = ItemStack("chemistry:gypsum", 1)
if reaction_possible(pos) then
stirring_sound(pos)
inv:add_item("product", gypsum)
r1:set_count(r1:get_count() - 1)
r2:set_count(r2:get_count() - 1)

View File

@ -57,6 +57,33 @@ minetest.register_node("chemistry:torch", {
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("chemistry:magnesium_torch", {
description = "Magnesium Torch",
drawtype = "torchlike",
inventory_image = "chemistry_magnesium_torch_floor.png",
wield_image = "chemistry_magnesium_torch_floor.png",
tiles = {
"chemistry_magnesium_torch_floor.png",
"chemistry_magnesium_torch_ceiling.png",
"chemistry_magnesium_torch_wall.png",
},
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
walkable = false,
liquids_pointable = false,
light_source = 14,
groups = {choppy=2, dig_immediate=3, flammable=1, attached_node=1, torch=1},
drop = "chemistry:magnesium_torch",
selection_box = {
type = "wallmounted",
wall_bottom = {-1/8, -1/2, -1/8, 1/8, 2/16, 1/8},
wall_top = {-1/8, -1/16, -5/16, 1/8, 1/2, 1/8},
wall_side = {-1/2, -1/2, -1/8, -1/8, 1/8, 1/8},
},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("chemistry:star", {
description = "Star",
tiles = {"chemistry_star.png"},

View File

@ -3,7 +3,7 @@ function chemistry.register_ores()
ore_type = "blob",
ore = "chemistry:salt",
wherein = {"default:stone"},
clust_scarcity = 8 * 8 * 8,
clust_scarcity = 16 * 16 * 16,
clust_size = 5,
y_min = -31000,
y_max = 31000,

BIN
sounds/chemistry_bunsen.ogg Normal file

Binary file not shown.

BIN
sounds/chemistry_bunsen.wav Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
sounds/chemistry_mortar.ogg Normal file

Binary file not shown.

BIN
sounds/chemistry_mortar.wav Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 268 B

View File

@ -95,6 +95,25 @@ function minetest.handle_node_drops(pos, drops, digger)
table.insert(newdrops, ItemStack("default:obsidian_glass", stack:get_count()))
elseif stack:get_name() == "default:desert_cobble" then
table.insert(newdrops, ItemStack("default:desert_stone", stack:get_count()))
elseif minetest.get_modpath("mesecons") ~= nil and stack:get_name() == "default:mese_crystal" then
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
table.insert(newdrops, ItemStack("mesecons:mesecon_off", stack:get_count()))
else
table.insert(newdrops, stack)
end
@ -116,17 +135,12 @@ function minetest.handle_node_drops(pos, drops, digger)
for _, drop in ipairs(drops) do
local stack = ItemStack(drop)
if get_node_group(stack:get_name(), "tree") ~= 0 then
table.insert(newdrops, ItemStack("default:coal_lump", stack:get_count()))
table.insert(newdrops, ItemStack("default:coal_lump", stack:get_count()))
table.insert(newdrops, ItemStack("default:coal_lump", stack:get_count()))
table.insert(newdrops, ItemStack("default:coal_lump", stack:get_count()))
table.insert(newdrops, ItemStack("default:coal_lump", stack:get_count()))
table.insert(newdrops, ItemStack("default:coal_lump", stack:get_count()))
table.insert(newdrops, ItemStack("default:coal_lump", stack:get_count()))
table.insert(newdrops, ItemStack("default:coal_lump", stack:get_count()))
table.insert(newdrops, ItemStack("chemistry:charcoal", stack:get_count()))
table.insert(newdrops, ItemStack("chemistry:charcoal", stack:get_count()))
table.insert(newdrops, ItemStack("chemistry:charcoal", stack:get_count()))
table.insert(newdrops, ItemStack("chemistry:charcoal", stack:get_count()))
elseif get_node_group(stack:get_name(), "wood") ~= 0 then
table.insert(newdrops, ItemStack("default:coal_lump", stack:get_count()))
table.insert(newdrops, ItemStack("default:coal_lump", stack:get_count()))
table.insert(newdrops, ItemStack("chemistry:charcoal", stack:get_count()))
else
table.insert(newdrops, stack)
end