Merge pull request 'Release 0.71.13' (#92) from testing into production

Reviewed-on: MineClone5/MineClone5#92
This commit is contained in:
kay27 2022-01-03 04:23:51 +00:00
commit 219981081b
8 changed files with 148 additions and 6 deletions

View File

@ -105,6 +105,7 @@
## Textures ## Textures
* XSSheep * XSSheep
* Nova_Wostra
* Wuzzy * Wuzzy
* kingoscargames * kingoscargames
* leorockway * leorockway

View File

@ -43,6 +43,11 @@ mobs.float = function(self)
self.object:set_acceleration({x=0, y=0, z=0}) self.object:set_acceleration({x=0, y=0, z=0})
end end
if self.jump_only then
self.object:set_acceleration({x=acceleration.x, y=-5, z=acceleration.z})
return
end
local current_velocity = self.object:get_velocity() local current_velocity = self.object:get_velocity()
local new_velocity_addition = DEFAULT_FLOAT_SPEED - current_velocity.y local new_velocity_addition = DEFAULT_FLOAT_SPEED - current_velocity.y

View File

@ -21,14 +21,14 @@ local psdef= {
} }
local function check_player(player) local function check_player(player)
local name=player:get_player_name(name) local name=player:get_player_name(player)
if mcl_worlds.has_dust(player:get_pos()) and not mcl_weather.nether_dust.particlespawners[name] then if mcl_worlds.has_dust(player:get_pos()) and not mcl_weather.nether_dust.particlespawners[name] then
return true return true
end end
end end
mcl_weather.nether_dust.add_particlespawners = function(player) mcl_weather.nether_dust.add_particlespawners = function(player)
local name=player:get_player_name(name) local name=player:get_player_name(player)
mcl_weather.nether_dust.particlespawners[name]={} mcl_weather.nether_dust.particlespawners[name]={}
psdef.playername = name psdef.playername = name
psdef.attached = player psdef.attached = player
@ -40,7 +40,7 @@ mcl_weather.nether_dust.add_particlespawners = function(player)
end end
mcl_weather.nether_dust.delete_particlespawners = function(player) mcl_weather.nether_dust.delete_particlespawners = function(player)
local name=player:get_player_name(name) local name=player:get_player_name(player)
if mcl_weather.nether_dust.particlespawners[name] then if mcl_weather.nether_dust.particlespawners[name] then
for i=1,3 do for i=1,3 do
minetest.delete_particlespawner(mcl_weather.nether_dust.particlespawners[name][i]) minetest.delete_particlespawner(mcl_weather.nether_dust.particlespawners[name][i])

View File

@ -186,8 +186,12 @@ function mcl_buckets.register_liquid(def)
local undernode = get_node(pointed_thing.under) local undernode = get_node(pointed_thing.under)
local abovenode = get_node(pointed_thing.above) local abovenode = get_node(pointed_thing.above)
local buildable1 = minetest.registered_nodes[undernode.name] and minetest.registered_nodes[undernode.name].buildable_to local name1, name2 = undernode.name, abovenode.name
local buildable2 = minetest.registered_nodes[abovenode.name] and minetest.registered_nodes[abovenode.name].buildable_to local regnode1, regnode2 = minetest.registered_nodes[name1], minetest.registered_nodes[name2]
local buildable1 = regnode1 and (regnode1.buildable_to or regnode1.groups.cauldron == 1)
local buildable2 = regnode2 and (regnode2.buildable_to or regnode2.groups.cauldron == 1)
if not buildable1 and not buildable2 then return itemstack end --if both nodes aren't buildable_to, skip if not buildable1 and not buildable2 then return itemstack end --if both nodes aren't buildable_to, skip
if buildable1 then if buildable1 then

View File

@ -1,5 +1,6 @@
dofile(minetest.get_modpath("mcl_mushrooms").."/small.lua") dofile(minetest.get_modpath("mcl_mushrooms").."/small.lua")
dofile(minetest.get_modpath("mcl_mushrooms").."/huge.lua") dofile(minetest.get_modpath("mcl_mushrooms").."/huge.lua")
dofile(minetest.get_modpath("mcl_mushrooms").."/suspicious_stew.lua")
-- Aliases for old MCL2 versions -- Aliases for old MCL2 versions
minetest.register_alias("mcl_farming:mushroom_red", "mcl_mushrooms:mushroom_red") minetest.register_alias("mcl_farming:mushroom_red", "mcl_mushrooms:mushroom_red")

View File

@ -1,3 +1,3 @@
name = mcl_mushrooms name = mcl_mushrooms
depends = mcl_sounds, mcl_util depends = mcl_sounds, mcl_util, mcl_core, mcl_flowers, mcl_potions, mcl_hunger
optional_depends = doc optional_depends = doc

View File

@ -0,0 +1,131 @@
-- ____________________________
--_________________________________________/ Variables & Functions \_________
local eat = minetest.item_eat(6, "mcl_core:bowl") --6 hunger points, player receives mcl_core:bowl after eating
local function poison(itemstack, placer, pointed_thing)
local hunger = mcl_hunger.get_hunger(placer)
if hunger < 20 then
mcl_potions.poison_func(placer, 1, 12)
return eat(itemstack, placer, pointed_thing)
end
end
local function hunger(itemstack, placer, pointed_thing, player)
local hunger = mcl_hunger.get_hunger(placer)
if hunger < 20 then
return eat(itemstack, placer, pointed_thing)
end
end
local function jump_boost(itemstack, placer, pointed_thing)
local hunger = mcl_hunger.get_hunger(placer)
if hunger < 20 then
mcl_potions.leaping_func(placer, 1, 6)
return eat(itemstack, placer, pointed_thing)
end
end
local function regeneration(itemstack, placer, pointed_thing)
local hunger = mcl_hunger.get_hunger(placer)
if hunger < 20 then
mcl_potions.regeneration_func(placer, 1, 8)
return eat(itemstack, placer, pointed_thing)
end
end
local function night_vision(itemstack, placer, pointed_thing)
local hunger = mcl_hunger.get_hunger(placer)
if hunger < 20 then
mcl_potions.night_vision_func(placer, 1, 5)
return eat(itemstack, placer, pointed_thing)
end
end
-- ________________________
--_________________________________________/ Item Regestration \_________________
minetest.register_craftitem("mcl_mushrooms:poison_stew",{
description = "Suspicious Stew",
inventory_image = "suspicious_stew.png",
stack_max = 1,
on_place = poison,
groups = { food = 2, eatable = 4, not_in_creative_inventory=1,},
_mcl_saturation = 7.2,
})
minetest.register_craftitem("mcl_mushrooms:hunger_stew",{
description = "Suspicious Stew",
inventory_image = "suspicious_stew.png",
stack_max = 1,
on_place = hunger,
groups = { food = 2, eatable = 4, not_in_creative_inventory=1,},
_mcl_saturation = 7.2,
})
minetest.register_craftitem("mcl_mushrooms:jump_boost_stew",{
description = "Suspicious Stew",
inventory_image = "suspicious_stew.png",
stack_max = 1,
on_place = jump_boost,
groups = { food = 2, eatable = 4, not_in_creative_inventory=1,},
_mcl_saturation = 7.2,
})
minetest.register_craftitem("mcl_mushrooms:regneration_stew",{
description = "Suspicious Stew",
inventory_image = "suspicious_stew.png",
stack_max = 1,
on_place = regeneration,
groups = { food = 2, eatable = 4, not_in_creative_inventory=1,},
_mcl_saturation = 7.2,
})
minetest.register_craftitem("mcl_mushrooms:night_vision_stew",{
description = "Suspicious Stew",
inventory_image = "suspicious_stew.png",
stack_max = 1,
on_place = night_vision,
groups = { food = 2, eatable = 4, not_in_creative_inventory=1,},
_mcl_saturation = 7.2,
})
-- ____________________________
--______________________________________/ Using mcl_hunger API \______________________
mcl_hunger.register_food("mcl_mushrooms:hunger_stew",6, "mcl_core:bowl", 3.5, 0, 100) -- Register it using mcl_hunger so i can use its poison feature
-- ______________
--_________________________________________/ Crafts \________________________________
minetest.register_craft({
output = "mcl_mushrooms:poison_stew",
recipe = { {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}, {"mcl_core:bowl", "mcl_flowers:tulip_white"} },
})
minetest.register_craft({
output = "mcl_mushrooms:hunger_stew",
recipe = { {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}, {"mcl_core:bowl", "mcl_flowers:blue_orchid"} },
})
minetest.register_craft({
output = "mcl_mushrooms:hunger_stew",
recipe = { {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}, {"mcl_core:bowl", "mcl_flowers:dandelion"} },
})
minetest.register_craft({
output = "mcl_mushrooms:jump_boost_stew",
recipe = { {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}, {"mcl_core:bowl", "mcl_flowers:peony"} },
})
minetest.register_craft({
output = "mcl_mushrooms:regeneration_stew",
recipe = { {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}, {"mcl_core:bowl", "mcl_flowers:oxeye_daisy"} },
})
minetest.register_craft({
output = "mcl_mushrooms:night_vision_stew",
recipe = { {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}, {"mcl_core:bowl", "mcl_flowers:poppy"} },
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B