Reworked spiketape and added surgical tape
This commit is contained in:
parent
1c937e0571
commit
65d42b9ec1
44
init.lua
44
init.lua
@ -1,10 +1,20 @@
|
||||
minetest.register_tool("tapes:ducttape_black", {
|
||||
description = "Black Duct Tape",
|
||||
inventory_image = "tapes_ducttape_black.png"
|
||||
inventory_image = "tapes_ducttape_black.png",
|
||||
})
|
||||
|
||||
minetest.register_tool("tapes:surgicaltape", {
|
||||
description = "Surgical Tape",
|
||||
inventory_image = "tapes_surgicaltape.png",
|
||||
on_use = function(itemstack, player, pointed_thing)
|
||||
player:set_hp(player:get_hp() + 10)
|
||||
itemstack:add_wear(20000)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
--Spiketapes
|
||||
minetest.register_node("tapes:spiketape_orange", {
|
||||
minetest.register_node("tapes:piece_spiketape_orange", {
|
||||
description = "Orange Spiketape",
|
||||
drawtype = "raillike",
|
||||
paramtype = "light",
|
||||
@ -17,8 +27,8 @@ minetest.register_node("tapes:spiketape_orange", {
|
||||
"tapes_piece_spiketape_orange_t.png",
|
||||
"tapes_piece_spiketape_orange_cross.png"
|
||||
},
|
||||
inventory_image = "tapes_spiketape_orange.png",
|
||||
wield_image = "tapes_spiketape_orange.png",
|
||||
inventory_image = "tapes_piece_spiketape_orange.png",
|
||||
wield_image = "tapes_piece_spiketape_orange.png",
|
||||
groups = {snappy = 3, oddly_breakable_by_hand = 1, connect_to_raillike = minetest.raillike_group("spiketape_orange")},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
@ -28,7 +38,7 @@ minetest.register_node("tapes:spiketape_orange", {
|
||||
|
||||
})
|
||||
|
||||
minetest.register_node("tapes:spiketape_black", {
|
||||
minetest.register_node("tapes:piece_spiketape_black", {
|
||||
description = "Black Spiketape",
|
||||
drawtype = "raillike",
|
||||
paramtype = "light",
|
||||
@ -41,8 +51,8 @@ minetest.register_node("tapes:spiketape_black", {
|
||||
"tapes_piece_spiketape_black_t.png",
|
||||
"tapes_piece_spiketape_black_cross.png"
|
||||
},
|
||||
inventory_image = "tapes_spiketape_black.png",
|
||||
wield_image = "tapes_spiketape_black.png",
|
||||
inventory_image = "tapes_piece_spiketape_black.png",
|
||||
wield_image = "tapes_piece_spiketape_black.png",
|
||||
groups = {snappy = 3, oddly_breakable_by_hand = 1, connect_to_raillike = minetest.raillike_group("spiketape_black")},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
@ -51,3 +61,23 @@ minetest.register_node("tapes:spiketape_black", {
|
||||
|
||||
|
||||
})
|
||||
|
||||
minetest.register_tool("tapes:spiketape_orange", {
|
||||
description = "Orange Spiketape",
|
||||
inventory_image = "tapes_spiketape_orange.png",
|
||||
on_use = function(itemstack, player, pointed_thing)
|
||||
minetest.set_node(pointed_thing.above, {name = "tapes:piece_spiketape_orange"})
|
||||
itemstack:add_wear(2000)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_tool("tapes:spiketape_black", {
|
||||
description = "Black Spiketape",
|
||||
inventory_image = "tapes_spiketape_black.png",
|
||||
on_use = function(itemstack, player, pointed_thing)
|
||||
minetest.set_node(pointed_thing.above, {name = "tapes:piece_spiketape_black"})
|
||||
itemstack:add_wear(2000)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user