fixed mob gravity
@ -897,8 +897,16 @@ minetest.register_node("default:rail", {
|
||||
inventory_image = "default_rail.png",
|
||||
wield_image = "default_rail.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
walkable = true,
|
||||
groups = {choppy = 1, cracky= 1, attached_node = 1},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}
|
||||
},
|
||||
})
|
||||
|
||||
-- fences
|
||||
|
@ -1,3 +1,15 @@
|
||||
fishing = {}
|
||||
fishing.fish = {}
|
||||
|
||||
function fishing.register_fish(name, def)
|
||||
minetest.register_craftitem(name, def)
|
||||
table.insert(fishing.fish, name)
|
||||
end
|
||||
|
||||
function fishing.get_fish()
|
||||
return fishing.fish[math.random(#fishing.fish)]
|
||||
end
|
||||
|
||||
minetest.register_craftitem("fishing:fishing_rod", {
|
||||
description = "Fishing rod",
|
||||
inventory_image = "fishing_fishing_rod.png",
|
||||
@ -7,13 +19,17 @@ minetest.register_craftitem("fishing:fishing_rod", {
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
if minetest.get_node(pointed_thing.under).name == "default:water_source" then
|
||||
if skills.lvls[user:get_player_name()] and skills.lvls[user:get_player_name()]["hunter"] and skills.lvls[user:get_player_name()]["hunter"] > 3 then
|
||||
if skills.lvls[user:get_player_name()] and
|
||||
(skills.lvls[user:get_player_name()]["hunter"] and
|
||||
skills.lvls[user:get_player_name()]["hunter"] > 3) or
|
||||
(skills.lvls[user:get_player_name()]["farmer"] and
|
||||
skills.lvls[user:get_player_name()]["farmer"] > 3) then
|
||||
if math.random(6) == 2 then
|
||||
user:get_inventory():add_item("main", "fishing:fish")
|
||||
user:get_inventory():add_item("main", fishing.get_fish())
|
||||
end
|
||||
else
|
||||
if math.random(10) == 2 then
|
||||
user:get_inventory():add_item("main", "fishing:fish")
|
||||
user:get_inventory():add_item("main", fishing.get_fish())
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -31,8 +47,20 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("fishing:fish", {
|
||||
fishing.register_fish("fishing:fish", {
|
||||
description = "Fish",
|
||||
inventory_image = "fishing_fish.png",
|
||||
on_use = minetest.item_eat(3),
|
||||
})
|
||||
|
||||
fishing.register_fish("fishing:fish_1", {
|
||||
description = "Fish",
|
||||
inventory_image = "fishing_fish_1.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
})
|
||||
|
||||
fishing.register_fish("fishing:fish_2", {
|
||||
description = "Fish",
|
||||
inventory_image = "fishing_fish_2.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
})
|
||||
|
BIN
mods/fishing/textures/fishing_fish_1.png
Normal file
After Width: | Height: | Size: 251 B |
BIN
mods/fishing/textures/fishing_fish_2.png
Normal file
After Width: | Height: | Size: 253 B |
@ -50,10 +50,20 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname == "money:shop" then
|
||||
if fields.btn_next then
|
||||
money.shop.page[player:get_player_name()] = money.shop.page[player:get_player_name()] + 1
|
||||
|
||||
if money.shop.page[player:get_player_name()] > #money.shop.offers then
|
||||
money.shop.page[player:get_player_name()] = #money.shop.offers
|
||||
end
|
||||
|
||||
minetest.show_formspec(player:get_player_name(), "money:shop", money.shop.get_formspec(money.shop.page[player:get_player_name()]))
|
||||
end
|
||||
if fields.btn_back then
|
||||
money.shop.page[player:get_player_name()] = money.shop.page[player:get_player_name()] - 1
|
||||
|
||||
if money.shop.page[player:get_player_name()] < 1 then
|
||||
money.shop.page[player:get_player_name()] = 1
|
||||
end
|
||||
|
||||
minetest.show_formspec(player:get_player_name(), "money:shop", money.shop.get_formspec(money.shop.page[player:get_player_name()]))
|
||||
end
|
||||
if fields.btn_trade then
|
||||
@ -67,18 +77,9 @@ end)
|
||||
|
||||
minetest.register_node("money:shop", {
|
||||
description = "Shop",
|
||||
tiles = {"money_shop_top.png","money_shop.png","money_shop.png"},
|
||||
tiles = {"money_shop_top.png", "money_shop_bottom.png", "money_shop.png","money_shop.png"},
|
||||
groups = {choppy = 3},
|
||||
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-6/16, -0.5, -6/16, 6/16,4/16, 6/16},
|
||||
},
|
||||
},
|
||||
|
||||
on_rightclick = function(pos, node, player, pointed_thing)
|
||||
money.shop.page[player:get_player_name()] = 1
|
||||
|
Before Width: | Height: | Size: 363 B After Width: | Height: | Size: 346 B |
BIN
mods/money/textures/money_shop_bottom.png
Normal file
After Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 275 B |
@ -226,7 +226,7 @@ function quests.update_hud(player,name)
|
||||
|
||||
local txt = ""
|
||||
for _, quest in pairs(player_quests) do
|
||||
if not(quest.done) then
|
||||
if not(quest.done) and not(quest.hidden) then
|
||||
txt = txt .. " -> " .. (quest.title or "[NO TITLE]") .. "\n"
|
||||
for _, goal in pairs(quest.goals) do
|
||||
if (not goal.requires or goal.requires.done) and not(goal.done) then
|
||||
@ -385,6 +385,7 @@ minetest.register_on_newplayer(function(player)
|
||||
q5.xp = xp.get_xp(5, 1)
|
||||
|
||||
quest.xp = 0
|
||||
quest.hidden = true
|
||||
quests.add_quest(name, quest)
|
||||
end
|
||||
end)
|
||||
|