Rename mod to “magicbeans_w”

master
Wuzzy 2014-07-07 01:21:45 +02:00
parent 5ef4431d73
commit fa12a6436a
13 changed files with 27 additions and 24 deletions

5
README
View File

@ -1,6 +1,9 @@
Magic Beans (magicbeans) mod for Minetest
Magic Beans (magicbeans_w) mod for Minetest
by thefamilygrog66
Forked by Wuzzy
Original README by thefamilygrog66 follows:
Description: This mod randomly spawns four different types of magic beans: running, jumping and flying - which when eaten, give the player that magical ability for 30 seconds - and beanstalk beans, which when planted (dropped) will grow a magic beanstalk up to the clouds! It's highly recommended that this mod is only used with 'enable damage' unchecked!

View File

@ -1,6 +1,6 @@
--Register beanstalk nodes
minetest.register_node("magicbeans:leaves", {
tiles = {"magicbeans_leaves.png"},
minetest.register_node("magicbeans_w:leaves", {
tiles = {"magicbeans_w_leaves.png"},
drawtype = "plantlike",
walkable = false,
climbable = true,
@ -8,8 +8,8 @@ minetest.register_node("magicbeans:leaves", {
groups = {dig_immediate = 3},
})
minetest.register_node("magicbeans:blank", {
tiles = {"magicbeans_blank.png"},
minetest.register_node("magicbeans_w:blank", {
tiles = {"magicbeans_w_blank.png"},
drawtype = "plantlike",
walkable = false,
climbable = true,
@ -17,13 +17,13 @@ minetest.register_node("magicbeans:blank", {
groups = {dig_immediate = 3},
})
minetest.register_node("magicbeans:stem", {
tiles = {"magicbeans_stem.png"},
minetest.register_node("magicbeans_w:stem", {
tiles = {"magicbeans_w_stem.png"},
paramtype = "light",
groups = {dig_immediate = 3},
})
minetest.register_node("magicbeans:cloud", {
minetest.register_node("magicbeans_w:cloud", {
tiles = {"default_cloud.png"},
walkable = false,
climbable = true,
@ -32,29 +32,29 @@ minetest.register_node("magicbeans:cloud", {
groups = {dig_immediate = 3},
})
magicbeans_list = {
magicbeans_w_list = {
{ "Magic Jumping Beans", "jumping", 1, 5, 1},
{ "Magic Flying Beans", "flying", 2, 1, 0.02},
{ "Magic Running Beans", "running", 3, 1, 1},
{ "Magic Beanstalk Beans", "beanstalk", 1, 1, 1},
}
for i in ipairs(magicbeans_list) do
for i in ipairs(magicbeans_w_list) do
local beandesc = magicbeans_list[i][1]
local bean = magicbeans_list[i][2]
local beanspeed = magicbeans_list[i][3]
local beanjump = magicbeans_list[i][4]
local beangrav = magicbeans_list[i][5]
local beandesc = magicbeans_w_list[i][1]
local bean = magicbeans_w_list[i][2]
local beanspeed = magicbeans_w_list[i][3]
local beanjump = magicbeans_w_list[i][4]
local beangrav = magicbeans_w_list[i][5]
--Register beans
minetest.register_craftitem("magicbeans:"..bean, {
minetest.register_craftitem("magicbeans_w:"..bean, {
description = beandesc,
inventory_image = "magicbeans_"..bean..".png",
inventory_image = "magicbeans_w_"..bean..".png",
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.above then
if bean ~= "beanstalk" then
minetest.env:add_item(pointed_thing.above, {name="magicbeans:"..bean})
minetest.env:add_item(pointed_thing.above, {name="magicbeans_w:"..bean})
else
-- Grow Beanstalk
minetest.chat_send_player(placer:get_player_name(),"It's gonna grow - wait for it!")
@ -80,10 +80,10 @@ for i in ipairs(magicbeans_list) do
ex = 1
end
if c[i] == 1 then
node = "magicbeans:leaves"
if i == d[blank] or i == e[blank] then node = "magicbeans:blank" end
node = "magicbeans_w:leaves"
if i == d[blank] or i == e[blank] then node = "magicbeans_w:blank" end
else
node = "magicbeans:stem"
node = "magicbeans_w:stem"
end
ex1 = stalk.x + ex
zed1 = stalk.z + zed
@ -96,7 +96,7 @@ for i in ipairs(magicbeans_list) do
for zed = -10,20 do
ex1 = stalk.x + ex
zed1 = stalk.z + zed
minetest.set_node({x=ex1, y=why1, z=zed1},{name="magicbeans:cloud"})
minetest.set_node({x=ex1, y=why1, z=zed1},{name="magicbeans_w:cloud"})
end
end
end
@ -132,7 +132,7 @@ minetest.register_abm(
pos.y = pos.y + 1
math.randomseed(os.time())
local j = math.random(4)
local bean = magicbeans_list[j][2]
minetest.env:add_item(pos, {name="magicbeans:"..bean})
local bean = magicbeans_w_list[j][2]
minetest.env:add_item(pos, {name="magicbeans_w:"..bean})
end,
})

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 633 B

After

Width:  |  Height:  |  Size: 633 B

View File

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 661 B

After

Width:  |  Height:  |  Size: 661 B

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 623 B

After

Width:  |  Height:  |  Size: 623 B

View File

Before

Width:  |  Height:  |  Size: 982 B

After

Width:  |  Height:  |  Size: 982 B

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 622 B

View File

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 432 B