Add more flavors
BIN
happysmoking.png
Normal file
After Width: | Height: | Size: 266 KiB |
67
init.lua
@ -1,4 +1,4 @@
|
||||
playereffects.register_effect_type("cigarettespeed", "Cigarette Speed", "ecigarettes_ecigarette.png", {"speed"},
|
||||
playereffects.register_effect_type("cigarettespeed", "Cigarette Speed", "ecigarettes_ecigarette_speed.png", {"speed"},
|
||||
function(player)
|
||||
player:set_physics_override({speed=3})
|
||||
end,
|
||||
@ -7,9 +7,18 @@ playereffects.register_effect_type("cigarettespeed", "Cigarette Speed", "ecigare
|
||||
end
|
||||
)
|
||||
|
||||
minetest.register_tool("ecigarettes:ecigarette", {
|
||||
description = "E-Cigarette",
|
||||
inventory_image = "ecigarettes_ecigarette.png",
|
||||
playereffects.register_effect_type("cigarettehighjump", "Cigarette High Jump", "ecigarettes_ecigarette_highjump.png", {"jump"},
|
||||
function(player)
|
||||
player:set_physics_override({jump=3})
|
||||
end,
|
||||
function(effect, player)
|
||||
player:set_physics_override({jump=1})
|
||||
end
|
||||
)
|
||||
|
||||
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()
|
||||
@ -17,23 +26,65 @@ minetest.register_tool("ecigarettes:ecigarette", {
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_craftitem("ecigarettes:speed_eliquid", {
|
||||
minetest.register_tool("ecigarettes:ecigarette_highjump", {
|
||||
description = "E-Cigarette [High Jump]",
|
||||
inventory_image = "ecigarettes_ecigarette_highjump.png",
|
||||
on_use = function(itemstack, player, pointed_thing)
|
||||
playereffects.apply_effect_type("cigarettehighjump", 40, player)
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_craftitem("ecigarettes:ecigarette", {
|
||||
description = "E-Cigarette",
|
||||
inventory_image = "ecigarettes_ecigarette.png",
|
||||
})
|
||||
|
||||
--E-Liquids
|
||||
minetest.register_craftitem("ecigarettes:eliquid_speed", {
|
||||
description = "E-Cigarette Speed Liquid",
|
||||
inventory_image = "ecigarettes_eliquid_speed.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("ecigarettes:eliquid_highjump", {
|
||||
description = "E-Cigarette High Jump Liquid",
|
||||
inventory_image = "ecigarettes_eliquid_highjump.png",
|
||||
})
|
||||
|
||||
--E-Cigarettes
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:ecigarette",
|
||||
recipe = {
|
||||
{"", "ecigarettes:speed_eliquid", ""},
|
||||
{"", "default:steel_ingot", ""},
|
||||
{"", "electronics:motor_dc", ""},
|
||||
{"electronics:coil_copper", "electronics:wire_copper_insulated", "electronics:battery_li_ion_aaa"},
|
||||
{"", "", ""},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:speed_eliquid",
|
||||
output = "ecigarettes:ecigarette_speed",
|
||||
recipe = {
|
||||
{"", "ecigarettes:ecigarette", ""},
|
||||
{"", "ecigarettes:eliquid_speed", ""},
|
||||
{"", "", ""},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:ecigarette_highjump",
|
||||
recipe = {
|
||||
{"", "ecigarettes:ecigarette", ""},
|
||||
{"", "ecigarettes:eliquid_highjump", ""},
|
||||
{"", "", ""},
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ecigarettes:eliquid_speed",
|
||||
recipe = {
|
||||
{"", "default:obsidian_shard", ""},
|
||||
{"", "default:steel_ingot", ""},
|
||||
|
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 266 B |
BIN
textures/ecigarettes_ecigarette_highjump.png
Normal file
After Width: | Height: | Size: 268 B |
BIN
textures/ecigarettes_ecigarette_speed.png
Normal file
After Width: | Height: | Size: 269 B |
BIN
textures/ecigarettes_eliquid_antigrav.png
Normal file
After Width: | Height: | Size: 324 B |
BIN
textures/ecigarettes_eliquid_highgrav.png
Normal file
After Width: | Height: | Size: 301 B |
BIN
textures/ecigarettes_eliquid_highjump.png
Normal file
After Width: | Height: | Size: 322 B |
BIN
textures/ecigarettes_eliquid_lowgrav.png
Normal file
After Width: | Height: | Size: 328 B |