7c019aadad
new file: characters new file: depends.txt new file: documentation.txt new file: electric_nodes.lua new file: init.lua new file: models/chasseur.blend new file: models/chasseur.blend1 new file: models/chasseur.blend2 new file: models/chasseur.x new file: models/hunter.x new file: models/patrouilleur-closed.blend1 new file: models/patrouilleur-closed.blend2 new file: models/patrouilleur-opened.blend1 new file: models/patrouilleur.blend new file: models/patrouilleur.blend1 new file: models/patrouilleur.blend2 new file: models/patrouilleur.x new file: models/patrouilleur_close.blend new file: models/patrouilleur_close.x new file: models/patrouilleur_open.blend new file: models/patrouilleur_open.blend1 new file: models/patrouilleur_open.blend2 new file: models/patrouilleur_open.x new file: screen.lua new file: sounds/cps-vflSymP2Q.swf new file: sounds/jackhammer_sound.ogg new file: sounds/metal_footstep.1.ogg new file: sounds/metal_footstep.2.ogg new file: sounds/metal_footstep.3.ogg new file: sounds/metal_footstep.4.ogg new file: structures.lua new file: textures/battery_back.png new file: textures/battery_side.png new file: textures/battery_top.png new file: textures/bronze_ingot.png new file: textures/bronze_lump.png new file: textures/button_item.png new file: textures/edge_side.png new file: textures/electronic_card_item.png new file: textures/floor_bottom.png new file: textures/floor_side.png new file: textures/floor_top.png new file: textures/hydro_generator_front.png new file: textures/jackhammer.png new file: textures/jackhammer_side.png new file: textures/jackhammer_top.png new file: textures/lamp_box.png new file: textures/lamp_box_on.png new file: textures/lamp_small.png new file: textures/lamp_small_ceiling.png new file: textures/lamp_small_floor.png new file: textures/lamp_small_on.png new file: textures/lamp_small_on_ceiling.png new file: textures/lamp_small_on_floor.png new file: textures/lamp_small_only.png new file: textures/patrouilleur.png new file: textures/plastic_item.png new file: textures/resistor_item.png new file: textures/resistor_side.png new file: textures/resistor_top.png new file: textures/screen_flat_back.png new file: textures/screen_flat_bottom.png new file: textures/screen_flat_front_2columns.png new file: textures/screen_flat_front_bigtext.png new file: textures/screen_flat_front_cybertronic.png new file: textures/screen_flat_front_map.png new file: textures/screen_flat_front_off.png new file: textures/screen_flat_front_smalltext.png new file: textures/screen_flat_left.png new file: textures/screen_flat_right.png new file: textures/screen_flat_top.png new file: textures/steel_armature_h_side.png new file: textures/steel_armature_top.png new file: textures/steel_armature_v_side.png new file: textures/steel_wrench.png new file: textures/structure_armature_h_wielded.png new file: textures/structures_concrete.png new file: textures/switch_side.png new file: textures/switch_top_off.png new file: textures/switch_top_on.png new file: textures/technology_ladder.png new file: textures/triangle_left.png new file: textures/triangle_right.png new file: textures/triangle_side.png new file: textures/wire_item.png new file: textures/wire_side.png new file: textures/wire_top.png new file: textures/wire_top_wall.png new file: tools.lua
80 lines
2.3 KiB
Lua
Executable File
80 lines
2.3 KiB
Lua
Executable File
|
|
minetest.register_craft({
|
|
output = 'technology:wrench',
|
|
recipe = {
|
|
{'default:steel_ingot', '', 'default:steel_ingot'},
|
|
{'', 'default:steel_ingot', ''},
|
|
{'', 'default:steel_ingot', ''},
|
|
}
|
|
})
|
|
|
|
minetest.register_tool("technology:wrench", {
|
|
description = "Wrench",
|
|
inventory_image = "steel_wrench.png",
|
|
tool_capabilities = {
|
|
max_drop_level=1,
|
|
groupcaps={
|
|
mecanic={times={[1]=1.00, [2]=2.60, [3]=4.00}, uses=0, maxlevel=3},
|
|
}
|
|
},
|
|
})
|
|
|
|
minetest.register_craft({
|
|
output = 'technology:jackhammer',
|
|
recipe = {
|
|
{'', '', 'technology:plastic'},
|
|
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
|
{'', '', 'technology:plastic'},
|
|
}
|
|
})
|
|
|
|
minetest.register_tool("technology:jackhammer", {
|
|
description = "Jackhammer",
|
|
inventory_image = "jackhammer.png",
|
|
tool_capabilities = {
|
|
max_drop_level=1,
|
|
groupcaps={
|
|
cracky={times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=160, maxlevel=2}
|
|
}
|
|
},
|
|
})
|
|
|
|
minetest.register_node("technology:jackhammer", {
|
|
description = "Jackhammer",
|
|
inventory_image = "jackhammer.png",
|
|
wield_image = "jackhammer.png",
|
|
stack_max = 1,
|
|
node_placement_prediction = "",
|
|
paramtype = "light",
|
|
paramtype2 = "facedir",
|
|
drawtype = "nodebox",
|
|
node_box = {type = "fixed", fixed = {
|
|
{-0.2, -0.0, -0.2, 0.2, 0.5, 0.2},
|
|
{-0.08, -0.7, -0.05, 0.08, -0.0, 0.05},
|
|
}},
|
|
selection_box = {type = "fixed", fixed = {
|
|
{-0.2, -0.0, -0.2, 0.2, 0.5, 0.2},
|
|
{-0.08, -0.7, -0.05, 0.08, -0.0, 0.05},
|
|
}},
|
|
tiles = {"jackhammer_top.png", "jackhammer_bottom.png", "jackhammer_side.png", "jackhammer_side.png", "jackhammer_side.png", "jackhammer_side.png"},
|
|
walkable = true,
|
|
groups = {dig_immediate=3},
|
|
on_use = function(item, player, pointed_thing)
|
|
if pointed_thing.under and minetest.env:find_node_near(pointed_thing.under, 1, {"group:cracky"}) then
|
|
local node = minetest.env:get_node(pointed_thing.under)
|
|
minetest.env:dig_node(pointed_thing.under)
|
|
local inventory = player:get_inventory()
|
|
local nodename = minetest.registered_nodes[node.name].drop or node.name
|
|
inventory:add_item("main", nodename)
|
|
end
|
|
local toplay = {
|
|
gain = 3.0,
|
|
pos = pointed_thing.above,
|
|
max_hear_distance = 600,
|
|
loop = false,
|
|
}
|
|
minetest.sound_play("jackhammer_sound", toplay)
|
|
end,
|
|
})
|
|
|