diff --git a/mods/amogus_items/init.lua b/mods/amogus_items/init.lua index 6496f7d..51c311b 100644 --- a/mods/amogus_items/init.lua +++ b/mods/amogus_items/init.lua @@ -750,4 +750,60 @@ minetest.register_craftitem("amogus_items:mogus", { description = "Mogus", inventory_image = "mogus.png", on_use = minetest.item_eat(1), +}) + +function sraj_dzwiek() + --make random sound + local sounds = { + "shitting1", + "shitting2", + "shitting3"} + local sound = sounds[math.random(1, #sounds)] + minetest.sound_play(sound, {pos = pos, gain = 2.0, max_hear_distance = 10}) + +end + +minetest.register_node("amogus_items:Poop", { + description = "Just Shit", + tiles = {"Poop.png"}, + drop = 'amogus_items:PoopItem', groups = {falling_node = 1, cracky=3, stone=1}, +}) +minetest.register_node("amogus_items:Poop2", { + description = "Just Shit", + tiles = {"Poop2.png"}, + drop = 'amogus_items:PoopItem', groups = {falling_node = 1, cracky=3, stone=1}, +}) + +minetest.register_craftitem("amogus_items:pooper", { + description = "Pooper", + inventory_image = "SHITitem.png", + on_use = function(itemstack, user, pointed_thing) + -- check if pointing at a node + if pointed_thing.type ~= "node" then + return + end + -- make a random number between 1 and 10 + local random_number = math.random(1, 10) + if random_number < 5 then + local node = minetest.get_node(pointed_thing.above) + if node.name == "air" then + minetest.add_node(pointed_thing.above, {name="amogus_items:Poop"}) + minetest.check_for_falling(pointed_thing.above) + else + minetest.add_node(pointed_thing.under, {name="amogus_items:Poop"}) + minetest.check_for_falling(pointed_thing.under) + end + else + local node = minetest.get_node(pointed_thing.above) + if node.name == "air" then + minetest.add_node(pointed_thing.above, {name="amogus_items:Poop2"}) + minetest.check_for_falling(pointed_thing.above) + else + minetest.add_node(pointed_thing.under, {name="amogus_items:Poop2"}) + minetest.check_for_falling(pointed_thing.under) + end + end + sraj_dzwiek() + return itemstack + end, }) \ No newline at end of file diff --git a/mods/amogus_items/sounds/shitting1.ogg b/mods/amogus_items/sounds/shitting1.ogg new file mode 100644 index 0000000..16182d2 Binary files /dev/null and b/mods/amogus_items/sounds/shitting1.ogg differ diff --git a/mods/amogus_items/sounds/shitting2.ogg b/mods/amogus_items/sounds/shitting2.ogg new file mode 100644 index 0000000..9a663e4 Binary files /dev/null and b/mods/amogus_items/sounds/shitting2.ogg differ diff --git a/mods/amogus_items/sounds/shitting3.ogg b/mods/amogus_items/sounds/shitting3.ogg new file mode 100644 index 0000000..56aa7b7 Binary files /dev/null and b/mods/amogus_items/sounds/shitting3.ogg differ diff --git a/mods/amogus_items/sounds/sounds_numbers.config b/mods/amogus_items/sounds/sounds_numbers.config new file mode 100644 index 0000000..751f581 --- /dev/null +++ b/mods/amogus_items/sounds/sounds_numbers.config @@ -0,0 +1,2 @@ +shit_packing=3 +shitting=3 \ No newline at end of file diff --git a/mods/amogus_items/textures/Poop.png b/mods/amogus_items/textures/Poop.png new file mode 100644 index 0000000..ed9bc5a Binary files /dev/null and b/mods/amogus_items/textures/Poop.png differ diff --git a/mods/amogus_items/textures/Poop2.png b/mods/amogus_items/textures/Poop2.png new file mode 100644 index 0000000..4aa5db7 Binary files /dev/null and b/mods/amogus_items/textures/Poop2.png differ diff --git a/mods/amogus_items/textures/SHITitem.png b/mods/amogus_items/textures/SHITitem.png new file mode 100644 index 0000000..1388e4c Binary files /dev/null and b/mods/amogus_items/textures/SHITitem.png differ