Add 2 new flavors and crafting recipes
This commit is contained in:
parent
984ad5dda5
commit
47fabeaf87
124
init.lua
124
init.lua
@ -1,3 +1,4 @@
|
||||
--Effects
|
||||
playereffects.register_effect_type("cigarettespeed", "Cigarette Speed", "ecigarettes_ecigarette_speed.png", {"speed"},
|
||||
function(player)
|
||||
player:set_physics_override({speed=3})
|
||||
@ -18,7 +19,25 @@ playereffects.register_effect_type("cigarettehighjump", "Cigarette High Jump", "
|
||||
|
||||
playereffects.register_effect_type("cigarettelowgrav", "Cigarette Low Gravity", "ecigarettes_ecigarette_lowgrav.png", {"gravity"},
|
||||
function(player)
|
||||
player:set_physics_override({gravity=0.6})
|
||||
player:set_physics_override({gravity=0.3})
|
||||
end,
|
||||
function(effect, player)
|
||||
player:set_physics_override({gravity=1})
|
||||
end
|
||||
)
|
||||
|
||||
playereffects.register_effect_type("cigaretteantigrav", "Cigarette Anti-Gravity", "ecigarettes_ecigarette_antigrav.png", {"gravity"},
|
||||
function(player)
|
||||
player:set_physics_override({gravity=-1})
|
||||
end,
|
||||
function(effect, player)
|
||||
player:set_physics_override({gravity=1})
|
||||
end
|
||||
)
|
||||
|
||||
playereffects.register_effect_type("cigarettehighgrav", "Cigarette High-Gravity", "ecigarettes_ecigarette_highgrav.png", {"gravity"},
|
||||
function(player)
|
||||
player:set_physics_override({gravity=4})
|
||||
end,
|
||||
function(effect, player)
|
||||
player:set_physics_override({gravity=1})
|
||||
@ -56,6 +75,26 @@ minetest.register_tool("ecigarettes:ecigarette_lowgrav", {
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_tool("ecigarettes:ecigarette_antigrav", {
|
||||
description = "E-Cigarette [Anti-Gravity]",
|
||||
inventory_image = "ecigarettes_ecigarette_antigrav.png",
|
||||
on_use = function(itemstack, player, pointed_thing)
|
||||
playereffects.apply_effect_type("cigaretteantigrav", 10, player)
|
||||
itemstack:replace("ecigarettes:ecigarette")
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_tool("ecigarettes:ecigarette_highgrav", {
|
||||
description = "E-Cigarette [High Gravity]",
|
||||
inventory_image = "ecigarettes_ecigarette_highgrav.png",
|
||||
on_use = function(itemstack, player, pointed_thing)
|
||||
playereffects.apply_effect_type("cigarettehighgrav", 40, player)
|
||||
itemstack:replace("ecigarettes:ecigarette")
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_craftitem("ecigarettes:ecigarette", {
|
||||
description = "E-Cigarette",
|
||||
inventory_image = "ecigarettes_ecigarette.png",
|
||||
@ -77,7 +116,17 @@ minetest.register_craftitem("ecigarettes:eliquid_lowgrav", {
|
||||
inventory_image = "ecigarettes_eliquid_lowgrav.png",
|
||||
})
|
||||
|
||||
--E-Cigarettes
|
||||
minetest.register_craftitem("ecigarettes:eliquid_antigrav", {
|
||||
description = "E-Cigarette Anti-Gravity Liquid",
|
||||
inventory_image = "ecigarettes_eliquid_antigrav.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("ecigarettes:eliquid_highgrav", {
|
||||
description = "E-Cigarette High Gravity Liquid",
|
||||
inventory_image = "ecigarettes_eliquid_highgrav.png",
|
||||
})
|
||||
|
||||
--E-Cigarette Recipes
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:ecigarette",
|
||||
recipe = {
|
||||
@ -108,6 +157,37 @@ recipe = {
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:ecigarette_lowgrav",
|
||||
recipe = {
|
||||
{"", "ecigarettes:ecigarette", ""},
|
||||
{"", "ecigarettes:eliquid_lowgrav", ""},
|
||||
{"", "", ""},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:ecigarette_antigrav",
|
||||
recipe = {
|
||||
{"", "ecigarettes:ecigarette", ""},
|
||||
{"", "ecigarettes:eliquid_antigrav", ""},
|
||||
{"", "", ""},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:ecigarette_highgrav",
|
||||
recipe = {
|
||||
{"", "ecigarettes:ecigarette", ""},
|
||||
{"", "ecigarettes:eliquid_highgrav", ""},
|
||||
{"", "", ""},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
--E-Liquid Recipes
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:eliquid_speed",
|
||||
recipe = {
|
||||
@ -117,3 +197,43 @@ recipe = {
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:eliquid_highjump",
|
||||
recipe = {
|
||||
{"", "default:mese_crystal_fragment", ""},
|
||||
{"", "default:steel_ingot", ""},
|
||||
{"", "", ""},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:eliquid_lowgrav",
|
||||
recipe = {
|
||||
{"", "default:diamond", ""},
|
||||
{"", "default:steel_ingot", ""},
|
||||
{"", "", ""},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:eliquid_antigrav",
|
||||
recipe = {
|
||||
{"", "default:diamondblock", ""},
|
||||
{"", "default:steel_ingot", ""},
|
||||
{"", "", ""},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:eliquid_highgrav",
|
||||
recipe = {
|
||||
{"", "default:mese_crystal", ""},
|
||||
{"", "default:steel_ingot", ""},
|
||||
{"", "", ""},
|
||||
},
|
||||
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user