New flavors
This commit is contained in:
parent
7b2af51ed2
commit
984ad5dda5
29
init.lua
29
init.lua
@ -16,12 +16,22 @@ playereffects.register_effect_type("cigarettehighjump", "Cigarette High Jump", "
|
||||
end
|
||||
)
|
||||
|
||||
playereffects.register_effect_type("cigarettelowgrav", "Cigarette Low Gravity", "ecigarettes_ecigarette_lowgrav.png", {"gravity"},
|
||||
function(player)
|
||||
player:set_physics_override({gravity=0.6})
|
||||
end,
|
||||
function(effect, player)
|
||||
player:set_physics_override({gravity=1})
|
||||
end
|
||||
)
|
||||
|
||||
--E-Cigarettes
|
||||
minetest.register_tool("ecigarettes:ecigarette_speed", {
|
||||
description = "E-Cigarette [Speed]",
|
||||
inventory_image = "ecigarettes_ecigarette_speed.png",
|
||||
on_use = function(itemstack, player, pointed_thing)
|
||||
playereffects.apply_effect_type("cigarettespeed", 190, player)
|
||||
itemstack:take_item()
|
||||
itemstack:replace("ecigarettes:ecigarette")
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
@ -31,7 +41,17 @@ minetest.register_tool("ecigarettes:ecigarette_highjump", {
|
||||
inventory_image = "ecigarettes_ecigarette_highjump.png",
|
||||
on_use = function(itemstack, player, pointed_thing)
|
||||
playereffects.apply_effect_type("cigarettehighjump", 40, player)
|
||||
itemstack:take_item()
|
||||
itemstack:replace("ecigarettes:ecigarette")
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_tool("ecigarettes:ecigarette_lowgrav", {
|
||||
description = "E-Cigarette [Low Gravity]",
|
||||
inventory_image = "ecigarettes_ecigarette_lowgrav.png",
|
||||
on_use = function(itemstack, player, pointed_thing)
|
||||
playereffects.apply_effect_type("cigarettelowgrav", 65, player)
|
||||
itemstack:replace("ecigarettes:ecigarette")
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
@ -52,6 +72,11 @@ minetest.register_craftitem("ecigarettes:eliquid_highjump", {
|
||||
inventory_image = "ecigarettes_eliquid_highjump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("ecigarettes:eliquid_lowgrav", {
|
||||
description = "E-Cigarette Low Gravity Liquid",
|
||||
inventory_image = "ecigarettes_eliquid_lowgrav.png",
|
||||
})
|
||||
|
||||
--E-Cigarettes
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:ecigarette",
|
||||
|
BIN
textures/ecigarettes_ecigarette_antigrav.png
Normal file
BIN
textures/ecigarettes_ecigarette_antigrav.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 268 B |
BIN
textures/ecigarettes_ecigarette_highgrav.png
Normal file
BIN
textures/ecigarettes_ecigarette_highgrav.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 267 B |
BIN
textures/ecigarettes_ecigarette_lowgrav.png
Normal file
BIN
textures/ecigarettes_ecigarette_lowgrav.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 270 B |
Loading…
x
Reference in New Issue
Block a user