add creative tool for admins
This commit is contained in:
parent
0d5dcbd4d1
commit
b93550aed4
@ -32,6 +32,11 @@ minetest.register_entity(
|
||||
if itemtable then
|
||||
itemname = stack:to_table().name
|
||||
end
|
||||
|
||||
if itemname ~= nil and itemname == "default:creative_tool" then
|
||||
self.object:remove()
|
||||
end
|
||||
|
||||
local item_texture = nil
|
||||
local item_type = ""
|
||||
if minetest.registered_items[itemname] then
|
||||
|
BIN
mods/default/textures/default_creative_tool.png
Normal file
BIN
mods/default/textures/default_creative_tool.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 504 B |
BIN
mods/default/textures/default_creative_tool.xcf
Normal file
BIN
mods/default/textures/default_creative_tool.xcf
Normal file
Binary file not shown.
@ -85,6 +85,29 @@ else
|
||||
})
|
||||
end
|
||||
|
||||
-- "Creative" Tool
|
||||
|
||||
minetest.register_tool(
|
||||
"default:creative_tool",
|
||||
{
|
||||
inventory_image = "default_creative_tool.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.5,
|
||||
max_drop_level = 0,
|
||||
groupcaps = {
|
||||
fleshy = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
||||
crumbly = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
||||
choppy = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
||||
cracky = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
||||
snappy = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
||||
oddly_breakable_by_hand = {times={[1]=creative_digtime,[2]=creative_digtime,[3]=creative_digtime}, uses=0, maxlevel=3},
|
||||
},
|
||||
range = 20.8,
|
||||
damage_groups = {fleshy = 1}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- Pickaxes
|
||||
|
||||
minetest.register_tool(
|
||||
|
Loading…
Reference in New Issue
Block a user