Shitting added
This commit is contained in:
parent
31df071956
commit
0397a7a911
@ -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,
|
||||
})
|
BIN
mods/amogus_items/sounds/shitting1.ogg
Normal file
BIN
mods/amogus_items/sounds/shitting1.ogg
Normal file
Binary file not shown.
BIN
mods/amogus_items/sounds/shitting2.ogg
Normal file
BIN
mods/amogus_items/sounds/shitting2.ogg
Normal file
Binary file not shown.
BIN
mods/amogus_items/sounds/shitting3.ogg
Normal file
BIN
mods/amogus_items/sounds/shitting3.ogg
Normal file
Binary file not shown.
2
mods/amogus_items/sounds/sounds_numbers.config
Normal file
2
mods/amogus_items/sounds/sounds_numbers.config
Normal file
@ -0,0 +1,2 @@
|
||||
shit_packing=3
|
||||
shitting=3
|
BIN
mods/amogus_items/textures/Poop.png
Normal file
BIN
mods/amogus_items/textures/Poop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
mods/amogus_items/textures/Poop2.png
Normal file
BIN
mods/amogus_items/textures/Poop2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 516 B |
BIN
mods/amogus_items/textures/SHITitem.png
Normal file
BIN
mods/amogus_items/textures/SHITitem.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 318 B |
Loading…
Reference in New Issue
Block a user