This commit is contained in:
Lizzy Fleckenstein 2022-01-27 19:56:16 +01:00
parent 20c73d99e0
commit ae4cc373f1
Signed by: LizzyFleckenstein03
GPG Key ID: 06927A5199D6C9B2
18 changed files with 19 additions and 12 deletions

View File

@ -0,0 +1,5 @@
mcl_moans = {}
function mcl_moans.moan(spec)
minetest.sound_play("mcl_moan", spec)
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -60,12 +60,13 @@ local cow_def = {
mobs.make_baby_grow_faster(self,clicker)
return
end
local item = clicker:get_wielded_item()
if item:get_name() == mobs_mc.items.bucket and clicker:get_inventory() then
local inv = clicker:get_inventory()
inv:remove_item("main", mobs_mc.items.bucket)
minetest.sound_play("mobs_mc_cow_milk", {pos=self.object:get_pos(), gain=0.6})
mcl_moans.moan({object = self.object})
minetest.sound_play("mobs_mc_cow_milk", {object = player, gain = 0.6})
-- if room add bucket of milk to inventory, otherwise drop as item
if inv:room_for_item("main", {name=mobs_mc.items.milk}) then
clicker:get_inventory():add_item("main", mobs_mc.items.milk)

View File

@ -532,7 +532,7 @@ local function show_trade_formspec(playername, trader, tradenum)
.."listring[current_player;main]"
.."listring["..tradeinv..";input]"
.."listring[current_player;main]"
minetest.sound_play("mobs_mc_villager_trade", {to_player = playername}, true)
minetest.sound_play("mcl_moan", {to_player = playername}, true)
minetest.show_formspec(playername, tradeinv_name, formspec)
end
@ -594,13 +594,13 @@ local update_offer = function(inv, player, sound)
(trade.locked == false)) then
inv:set_stack("output", 1, inv:get_stack("offered", 1))
if sound then
minetest.sound_play("mobs_mc_villager_accept", {to_player = name}, true)
minetest.sound_play("mcl_moan", {to_player = name}, true)
end
return true
else
inv:set_stack("output", 1, ItemStack(""))
if sound then
minetest.sound_play("mobs_mc_villager_deny", {to_player = name}, true)
minetest.sound_play("mcl_moan", {to_player = name}, true)
end
return false
end
@ -795,7 +795,7 @@ local trade_inventory = {
if not wanted2:is_empty() then
inv:remove_item("input", inv:get_stack("wanted", 2))
end
minetest.sound_play("mobs_mc_villager_accept", {to_player = player:get_player_name()}, true)
minetest.sound_play("mcl_moan", {to_player = player:get_player_name()}, true)
end
update_offer(inv, player, true)
end,
@ -901,9 +901,9 @@ local trade_inventory = {
update_offer(inv, player, false)
end
if accept then
minetest.sound_play("mobs_mc_villager_accept", {to_player = name}, true)
minetest.sound_play("mcl_moan", {to_player = name}, true)
else
minetest.sound_play("mobs_mc_villager_deny", {to_player = name}, true)
minetest.sound_play("mcl_moan", {to_player = name}, true)
end
end,
}
@ -971,9 +971,9 @@ mobs:register_mob("mobs_mc:villager", {
can_despawn = false,
-- TODO: sounds
sounds = {
random = "mobs_mc_villager",
damage = "mobs_mc_villager_hurt",
death = "mobs_mc_villager_hurt",
random = "mcl_moan",
damage = "mcl_moan",
death = "mcl_moan",
distance = 10,
},
animation = {

View File

@ -189,7 +189,8 @@ minetest.register_on_rightclickplayer(function(player, clicker)
if item:get_name() == "mcl_buckets:bucket_empty" and clicker:get_inventory() then
local inv = clicker:get_inventory()
inv:remove_item("main", "mcl_buckets:bucket_empty")
minetest.sound_play("mobs_mc_cow_milk", {pos=player:get_pos(), gain=0.6})
mcl_moans.moan({object = player})
minetest.sound_play("mobs_mc_cow_milk", {object = player, gain = 0.6})
-- if room add bucket of cum to inventory, otherwise drop as item
if inv:room_for_item("main", {name="mcl_mobitems:cum_bucket"}) then
clicker:get_inventory():add_item("main", "mcl_mobitems:cum_bucket")