This commit is contained in:
Lizzy Fleckenstein 2022-01-27 19:56:16 +01:00
parent 20c73d99e0
commit ae4cc373f1
Signed by untrusted user: 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) mobs.make_baby_grow_faster(self,clicker)
return return
end end
local item = clicker:get_wielded_item() local item = clicker:get_wielded_item()
if item:get_name() == mobs_mc.items.bucket and clicker:get_inventory() then if item:get_name() == mobs_mc.items.bucket and clicker:get_inventory() then
local inv = clicker:get_inventory() local inv = clicker:get_inventory()
inv:remove_item("main", mobs_mc.items.bucket) 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 room add bucket of milk to inventory, otherwise drop as item
if inv:room_for_item("main", {name=mobs_mc.items.milk}) then if inv:room_for_item("main", {name=mobs_mc.items.milk}) then
clicker:get_inventory():add_item("main", mobs_mc.items.milk) 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[current_player;main]"
.."listring["..tradeinv..";input]" .."listring["..tradeinv..";input]"
.."listring[current_player;main]" .."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) minetest.show_formspec(playername, tradeinv_name, formspec)
end end
@ -594,13 +594,13 @@ local update_offer = function(inv, player, sound)
(trade.locked == false)) then (trade.locked == false)) then
inv:set_stack("output", 1, inv:get_stack("offered", 1)) inv:set_stack("output", 1, inv:get_stack("offered", 1))
if sound then if sound then
minetest.sound_play("mobs_mc_villager_accept", {to_player = name}, true) minetest.sound_play("mcl_moan", {to_player = name}, true)
end end
return true return true
else else
inv:set_stack("output", 1, ItemStack("")) inv:set_stack("output", 1, ItemStack(""))
if sound then if sound then
minetest.sound_play("mobs_mc_villager_deny", {to_player = name}, true) minetest.sound_play("mcl_moan", {to_player = name}, true)
end end
return false return false
end end
@ -795,7 +795,7 @@ local trade_inventory = {
if not wanted2:is_empty() then if not wanted2:is_empty() then
inv:remove_item("input", inv:get_stack("wanted", 2)) inv:remove_item("input", inv:get_stack("wanted", 2))
end 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 end
update_offer(inv, player, true) update_offer(inv, player, true)
end, end,
@ -901,9 +901,9 @@ local trade_inventory = {
update_offer(inv, player, false) update_offer(inv, player, false)
end end
if accept then if accept then
minetest.sound_play("mobs_mc_villager_accept", {to_player = name}, true) minetest.sound_play("mcl_moan", {to_player = name}, true)
else else
minetest.sound_play("mobs_mc_villager_deny", {to_player = name}, true) minetest.sound_play("mcl_moan", {to_player = name}, true)
end end
end, end,
} }
@ -971,9 +971,9 @@ mobs:register_mob("mobs_mc:villager", {
can_despawn = false, can_despawn = false,
-- TODO: sounds -- TODO: sounds
sounds = { sounds = {
random = "mobs_mc_villager", random = "mcl_moan",
damage = "mobs_mc_villager_hurt", damage = "mcl_moan",
death = "mobs_mc_villager_hurt", death = "mcl_moan",
distance = 10, distance = 10,
}, },
animation = { 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 if item:get_name() == "mcl_buckets:bucket_empty" and clicker:get_inventory() then
local inv = clicker:get_inventory() local inv = clicker:get_inventory()
inv:remove_item("main", "mcl_buckets:bucket_empty") 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 room add bucket of cum to inventory, otherwise drop as item
if inv:room_for_item("main", {name="mcl_mobitems:cum_bucket"}) then if inv:room_for_item("main", {name="mcl_mobitems:cum_bucket"}) then
clicker:get_inventory():add_item("main", "mcl_mobitems:cum_bucket") clicker:get_inventory():add_item("main", "mcl_mobitems:cum_bucket")