Skip to content

Commit

Permalink
Fix not being able to damage players in minimal (#5266)
Browse files Browse the repository at this point in the history
  • Loading branch information
red-001 authored and nerzhul committed Feb 18, 2017
1 parent d988f9b commit 5db41d4
Showing 1 changed file with 47 additions and 14 deletions.
61 changes: 47 additions & 14 deletions games/minimal/mods/default/init.lua
Expand Up @@ -39,18 +39,24 @@ minetest.register_item(":", {
crumbly = {times={[2]=3.00, [3]=0.70}, uses=0, maxlevel=1},
snappy = {times={[3]=0.40}, uses=0, maxlevel=1},
oddly_breakable_by_hand = {times={[1]=7.00,[2]=4.00,[3]=1.40}, uses=0, maxlevel=3},
}
},
damage_groups = {fleshy=1},
}
})

--
-- Picks
--

minetest.register_tool("default:pick_wood", {
description = "Wooden Pickaxe",
inventory_image = "default_tool_woodpick.png",
tool_capabilities = {
max_drop_level=0,
groupcaps={
cracky={times={[2]=2.00, [3]=1.20}, uses=10, maxlevel=1}
}
},
damage_groups = {fleshy=2},
},
})
minetest.register_tool("default:pick_stone", {
Expand All @@ -60,7 +66,8 @@ minetest.register_tool("default:pick_stone", {
max_drop_level=0,
groupcaps={
cracky={times={[1]=2.00, [2]=1.20, [3]=0.80}, uses=20, maxlevel=1}
}
},
damage_groups = {fleshy=3},
},
})
minetest.register_tool("default:pick_steel", {
Expand All @@ -70,7 +77,8 @@ minetest.register_tool("default:pick_steel", {
max_drop_level=1,
groupcaps={
cracky={times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=10, maxlevel=2}
}
},
damage_groups = {fleshy=4},
},
})
minetest.register_tool("default:pick_mese", {
Expand All @@ -83,17 +91,24 @@ minetest.register_tool("default:pick_mese", {
cracky={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=20, maxlevel=3},
crumbly={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=20, maxlevel=3},
snappy={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=20, maxlevel=3}
}
},
damage_groups = {fleshy=4},
},
})

--
-- Shovels
--

minetest.register_tool("default:shovel_wood", {
description = "Wooden Shovel",
inventory_image = "default_tool_woodshovel.png",
tool_capabilities = {
max_drop_level=0,
groupcaps={
crumbly={times={[1]=2.00, [2]=0.80, [3]=0.50}, uses=10, maxlevel=1}
}
},
damage_groups = {fleshy=2},
},
})
minetest.register_tool("default:shovel_stone", {
Expand All @@ -103,7 +118,8 @@ minetest.register_tool("default:shovel_stone", {
max_drop_level=0,
groupcaps={
crumbly={times={[1]=1.20, [2]=0.50, [3]=0.30}, uses=20, maxlevel=1}
}
},
damage_groups = {fleshy=3},
},
})
minetest.register_tool("default:shovel_steel", {
Expand All @@ -113,9 +129,15 @@ minetest.register_tool("default:shovel_steel", {
max_drop_level=1,
groupcaps={
crumbly={times={[1]=1.00, [2]=0.70, [3]=0.60}, uses=10, maxlevel=2}
}
},
damage_groups = {fleshy=4},
},
})

--
-- Axes
--

minetest.register_tool("default:axe_wood", {
description = "Wooden Axe",
inventory_image = "default_tool_woodaxe.png",
Expand All @@ -124,7 +146,8 @@ minetest.register_tool("default:axe_wood", {
groupcaps={
choppy={times={[2]=1.40, [3]=0.80}, uses=10, maxlevel=1},
fleshy={times={[2]=1.50, [3]=0.80}, uses=10, maxlevel=1}
}
},
damage_groups = {fleshy=2},
},
})
minetest.register_tool("default:axe_stone", {
Expand All @@ -135,7 +158,8 @@ minetest.register_tool("default:axe_stone", {
groupcaps={
choppy={times={[1]=1.50, [2]=1.00, [3]=0.60}, uses=20, maxlevel=1},
fleshy={times={[2]=1.30, [3]=0.70}, uses=20, maxlevel=1}
}
},
damage_groups = {fleshy=3},
},
})
minetest.register_tool("default:axe_steel", {
Expand All @@ -146,9 +170,15 @@ minetest.register_tool("default:axe_steel", {
groupcaps={
choppy={times={[1]=2.00, [2]=1.60, [3]=1.00}, uses=10, maxlevel=2},
fleshy={times={[2]=1.10, [3]=0.60}, uses=40, maxlevel=1}
}
},
damage_groups = {fleshy=3},
},
})

--
-- Swords
--

minetest.register_tool("default:sword_wood", {
description = "Wooden Sword",
inventory_image = "default_tool_woodsword.png",
Expand All @@ -159,7 +189,8 @@ minetest.register_tool("default:sword_wood", {
fleshy={times={[2]=1.10, [3]=0.60}, uses=10, maxlevel=1},
snappy={times={[2]=1.00, [3]=0.50}, uses=10, maxlevel=1},
choppy={times={[3]=1.00}, uses=20, maxlevel=0}
}
},
damage_groups = {fleshy=2},
}
})
minetest.register_tool("default:sword_stone", {
Expand All @@ -172,7 +203,8 @@ minetest.register_tool("default:sword_stone", {
fleshy={times={[2]=0.80, [3]=0.40}, uses=20, maxlevel=1},
snappy={times={[2]=0.80, [3]=0.40}, uses=20, maxlevel=1},
choppy={times={[3]=0.90}, uses=20, maxlevel=0}
}
},
damage_groups = {fleshy=4},
}
})
minetest.register_tool("default:sword_steel", {
Expand All @@ -185,7 +217,8 @@ minetest.register_tool("default:sword_steel", {
fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=10, maxlevel=2},
snappy={times={[2]=0.70, [3]=0.30}, uses=40, maxlevel=1},
choppy={times={[3]=0.70}, uses=40, maxlevel=0}
}
},
damage_groups = {fleshy=6},
}
})

Expand Down

0 comments on commit 5db41d4

Please sign in to comment.