bugfixes
@ -264,7 +264,7 @@ minetest.register_craft({
|
||||
recipe = {
|
||||
{"group:wood", "default:diamond", "group:wood"},
|
||||
{"techage:tubeS", "basic_materials:gear_steel", "techage:tubeS"},
|
||||
{"group:wood", "techage:steel_ingot", "group:wood"},
|
||||
{"group:wood", "default:steel_ingot", "group:wood"},
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -50,6 +50,14 @@ local function start_burner(pos, height)
|
||||
end
|
||||
end
|
||||
|
||||
local function remove_coal(pos, height)
|
||||
local pos1 = {x=pos.x-1, y=pos.y+1, z=pos.z-1}
|
||||
local pos2 = {x=pos.x+1, y=pos.y+height, z=pos.z+1}
|
||||
for _,p in ipairs(minetest.find_nodes_in_area(pos1, pos2, "techage:charcoal_burn")) do
|
||||
minetest.remove_node(p)
|
||||
end
|
||||
end
|
||||
|
||||
local function remove_flame(pos, height)
|
||||
local idx
|
||||
pos = {x=pos.x, y=pos.y+height, z=pos.z}
|
||||
@ -194,9 +202,15 @@ function techage.keep_running_burner(pos)
|
||||
if num_air(pos) == 0 then
|
||||
-- pause the burner
|
||||
meta:set_int("ignite", meta:get_int("ignite") + CYCLE_TIME)
|
||||
meta:set_int("paused", 1)
|
||||
return true
|
||||
end
|
||||
flame(pos, height, num, false)
|
||||
if meta:get_int("paused") == 1 then
|
||||
flame(pos, height, num, true)
|
||||
meta:set_int("paused", 0)
|
||||
else
|
||||
flame(pos, height, num, false)
|
||||
end
|
||||
handle = minetest.sound_play("techage_gasflare", {
|
||||
pos = {x=pos.x, y=pos.y+height, z=pos.z},
|
||||
max_hear_distance = 32,
|
||||
@ -205,6 +219,7 @@ function techage.keep_running_burner(pos)
|
||||
meta:set_int("handle", handle)
|
||||
else
|
||||
minetest.swap_node(pos, {name="techage:ash"})
|
||||
remove_coal(pos, height)
|
||||
return false
|
||||
end
|
||||
return true
|
||||
@ -216,6 +231,7 @@ function techage.stop_burner(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local height = meta:get_int("height")
|
||||
remove_flame(pos, height)
|
||||
remove_coal(pos, height)
|
||||
local handle = meta:get_int("handle")
|
||||
minetest.sound_stop(handle)
|
||||
end
|
||||
|
@ -26,8 +26,23 @@ local function handler(player_name, node, itemstack, digparams)
|
||||
end
|
||||
|
||||
if minetest.get_item_group(node.name, "stone") > 0 then
|
||||
-- Remove item from players inventory or from the world
|
||||
local ndef = minetest.registered_nodes[node.name]
|
||||
if ndef and ndef.drop then
|
||||
local item = ItemStack(ndef.drop)
|
||||
local inv = minetest.get_inventory({type="player", name=player_name})
|
||||
if inv:room_for_item("main", item) then
|
||||
local taken = inv:remove_item("main", item)
|
||||
else
|
||||
for _,obj in ipairs(minetest.get_objects_inside_radius(pos, 1)) do
|
||||
obj:remove()
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
node.name = "default:gravel"
|
||||
minetest.swap_node(pos, node)
|
||||
minetest.check_single_for_falling(pos)
|
||||
end
|
||||
end
|
||||
|
||||
@ -38,13 +53,13 @@ minetest.register_tool("techage:hammer_bronze", {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
cracky = {times={[1]=5.00, [2]=2.0, [3]=1.0}, uses=50, maxlevel=2},
|
||||
cracky = {times={[1]=5.00, [2]=2.0, [3]=1.0}, uses=40, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
after_use = function(itemstack, user, node, digparams)
|
||||
minetest.after(0.05, handler, user:get_player_name(), node)
|
||||
minetest.after(0.01, handler, user:get_player_name(), node)
|
||||
itemstack:add_wear(digparams.wear)
|
||||
return itemstack
|
||||
end,
|
||||
@ -57,13 +72,13 @@ minetest.register_tool("techage:hammer_steel", {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=60, maxlevel=2},
|
||||
cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=50, maxlevel=2},
|
||||
},
|
||||
damage_groups = {fleshy=4},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
after_use = function(itemstack, user, node, digparams)
|
||||
minetest.after(0.05, handler, user:get_player_name(), node)
|
||||
minetest.after(0.01, handler, user:get_player_name(), node)
|
||||
itemstack:add_wear(digparams.wear)
|
||||
return itemstack
|
||||
end,
|
||||
@ -76,13 +91,13 @@ minetest.register_tool("techage:hammer_mese", {
|
||||
full_punch_interval = 0.9,
|
||||
max_drop_level=3,
|
||||
groupcaps={
|
||||
cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=80, maxlevel=3},
|
||||
cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=60, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=5},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
after_use = function(itemstack, user, node, digparams)
|
||||
minetest.after(0.05, handler, user:get_player_name(), node)
|
||||
minetest.after(0.01, handler, user:get_player_name(), node)
|
||||
itemstack:add_wear(digparams.wear)
|
||||
return itemstack
|
||||
end,
|
||||
@ -95,13 +110,13 @@ minetest.register_tool("techage:hammer_diamond", {
|
||||
full_punch_interval = 0.9,
|
||||
max_drop_level=3,
|
||||
groupcaps={
|
||||
cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=100, maxlevel=3},
|
||||
cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=70, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=5},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
after_use = function(itemstack, user, node, digparams)
|
||||
minetest.after(0.05, handler, user:get_player_name(), node)
|
||||
minetest.after(0.01, handler, user:get_player_name(), node)
|
||||
itemstack:add_wear(digparams.wear)
|
||||
return itemstack
|
||||
end,
|
||||
|
@ -58,7 +58,7 @@ minetest.register_node("techage:coal_lighter_burn", {
|
||||
drop = "",
|
||||
light_source = 10,
|
||||
is_ground_content = false,
|
||||
groups = {crumbly = 2, not_in_creative_inventory=1},
|
||||
groups = {not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
|
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 220 B |
Before Width: | Height: | Size: 301 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 406 B |