add the first superpower of 5

This commit is contained in:
Jordach 2015-01-31 19:05:57 +00:00
parent 229ac09447
commit 122fee0d21
9 changed files with 88 additions and 2 deletions

1
mods/jd_tech/depends.txt Normal file
View File

@ -0,0 +1 @@
default

77
mods/jd_tech/init.lua Normal file
View File

@ -0,0 +1,77 @@
--init.lua
-- jd_tech
-- for BFD
minetest.register_tool("jd_tech:gravity_flip_off", {
description = "Flip Gravity to up",
inventory_image = "tool_j_pick.png",
on_place = function(itemstack, user, pointed_thing)
if user:is_player() == nil then
return nil
end
local pname = user:get_player_name()
if itemstack:get_wear() < 65528 then
itemstack:add_wear(65535/8-1)
user:set_physics_override({
speed = 1.0,
jump = -1.0,
gravity = -1.0,
sneak = true,
sneak_glitch = true,
})
local item = itemstack:to_table()
item["name"] = "jd_tech:gravity_flip_on"
itemstack:replace(item)
minetest.chat_send_player(pname, "Inverting gravity now.")
return itemstack
else
minetest.chat_send_player(pname, "No charge remaining. Refuel me using Hadronium.")
return nil
end
end,
})
minetest.register_tool("jd_tech:gravity_flip_on", {
description = "Flip Gravity to off",
inventory_image = "tool_j_sword.png",
on_place = function(itemstack, user, pointed_thing)
if user:is_player() == nil then
return nil
end
local pname = user:get_player_name()
if itemstack:get_wear() < 65528 then
itemstack:add_wear(65535/8-1)
user:set_physics_override({
speed = 1.0,
jump = 1.0,
gravity = 1.0,
sneak = true,
sneak_glitch = true,
})
local item = itemstack:to_table()
item["name"] = "jd_tech:gravity_flip_off"
itemstack:replace(item)
minetest.chat_send_player(pname, "Inverting gravity now.")
return itemstack
else
minetest.chat_send_player(pname, "No charge remaining. Refuel me using Hadronium.")
return nil
end
end,
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

View File

@ -37,10 +37,18 @@ minetest.register_craftitem("paths_api:path_tool", {
minetest.add_node(pointed_thing.under,{name="paths_api:grass_path"})
elseif node.name == "mapgen:dirt" then
minetest.add_node(pointed_thing.under,{name="paths_api:dirt_path"})
elseif node.name == "deco:stone_tile" then
minetest.add_node(pointed_thing.under,{name="paths_api:stone_tile"})
elseif node.name == "deco:stone_brick" then
minetest.add_node(pointed_thing.under,{name="paths_api:stone_brick"})
end
end,
})
register_path_node("grass_path", {"paths_grass_top.png", "mapgen_dirt.png", "mapgen_dirt.png^paths_grass_side.png"}, "Grass Path", default.node_sound_dirt_defaults(), {crumbly=3}, "mapgen:dirt 1")
register_path_node("grass_path", {"mapgen_grass_rot1.png", "paths_dirt.png", "paths_dirt.png^mapgen_grass_side_1.png"}, "Grass Path", default.node_sound_dirt_defaults(), {crumbly=3}, "mapgen:dirt 1")
register_path_node("dirt_path", {"paths_dirt.png"}, "Dirt Path", default.node_sound_dirt_defaults(), {crumbly=3}, "mapgen:dirt 1")
register_path_node("dirt_path", {"paths_dirt.png"}, "Dirt Path", default.node_sound_dirt_defaults(), {crumbly=3}, "mapgen:dirt 1")
register_path_node("stone_tile", {"deco_stone_tile.png"}, "Stone Tile Path", default.node_sound_stone_defaults(), {cracky=3}, "deco:cobble 1")
register_path_node("stone_brick", {"deco_stone_brick.png"}, "Stone Brick Path", default.node_sound_stone_defaults(), {cracky=3}, "deco:stone_brick 1")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B