From 8fcc82c3bcbc1c1763805db63b8ff621910ec821 Mon Sep 17 00:00:00 2001 From: kacperks Date: Sun, 20 Nov 2022 21:59:55 +0100 Subject: [PATCH] Better everything! --- mods/poop/init.lua | 85 +++++++++++++++++++++++++++--- mods/poop/music.lua | 0 mods/poop/nodes.lua | 50 ------------------ mods/poop/textures/flashlight.png | Bin 0 -> 158 bytes mods/poop/textures/logo.png | Bin 0 -> 2675 bytes mods/poop/tools.lua | 0 6 files changed, 77 insertions(+), 58 deletions(-) delete mode 100644 mods/poop/music.lua delete mode 100644 mods/poop/nodes.lua create mode 100644 mods/poop/textures/flashlight.png create mode 100644 mods/poop/textures/logo.png delete mode 100644 mods/poop/tools.lua diff --git a/mods/poop/init.lua b/mods/poop/init.lua index 2c1d114..19379db 100644 --- a/mods/poop/init.lua +++ b/mods/poop/init.lua @@ -1,10 +1,6 @@ -minetest.register_on_joinplayer(function(player) - minetest.sound_play("pooping_together", { - gain = 1, - pitch = 1, - loop = true, - }) -end) +-- add item called plumba +-- and let it destroy only the poop to change it to box + minetest.register_node("poop:box", { description = "cardboard box", tiles = {"BOX.png"}, @@ -96,5 +92,78 @@ minetest.register_node("poop:flux_capacitor", { drop = 'poop:Poop', }) +minetest.register_alias("mapgen_stone", "poop:floor") -minetest.register_alias("mapgen_stone", "poop:Poop") \ No newline at end of file +local pooped_things = 0 + +minetest.register_craftitem("poop:plumba", { + description = "Plumba", + inventory_image = "plumba.png", + on_use = function(itemstack, user, pointed_thing) + -- check if pointing at a node + if pointed_thing.type ~= "node" then + return + end + minetest.add_node(pointed_thing.under, {name="poop:box"}) + pooped_things = pooped_things + 1 + -- make a GUI box that shows how many poops you have changed to boxes with button to escape + local formspec = "size[8,8]".. + "button_exit[0,0;8,8;exit;You have changed "..pooped_things.." poops to boxes!]" + minetest.show_formspec(user:get_player_name(), "poop:plumba", formspec) + return itemstack + end, +}) + +-- add item called pooper + +minetest.register_craftitem("poop: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 + minetest.add_node(pointed_thing.under, {name="poop:Poop"}) + else + minetest.add_node(pointed_thing.under, {name="poop:Poop2"}) + end + return itemstack + end, +}) + +minetest.register_on_joinplayer(function(player) + -- make a GUI box that tells you how to play the game + local formspec = "size[8,8]".. + "button_exit[0,0;8,8;exit;Welcome to Poop Simulator! To play, poop on the ground using pooper and then use the plumba to change it to a box!]" + minetest.show_formspec(player:get_player_name(), "poop:welcome", formspec) + player:get_inventory():set_list("main", {}) + + player:setpos({x=0, y=10, z=0}) + -- set time to day + minetest.set_timeofday(0.5) + minetest.sound_play("pooping_together", { + gain = 1, + pitch = 1, + loop = true, + }) + player:get_inventory():add_item("main", "poop:plumba") + player:get_inventory():add_item("main", "poop:pooper") + + -- give the player all the possible nodes in this mod 2000 times + --for i = 1, 2000 do + -- player:get_inventory():add_item("main", "poop:floor") + -- player:get_inventory():add_item("main", "poop:tv") + -- player:get_inventory():add_item("main", "poop:bricks") + -- player:get_inventory():add_item("main", "poop:grey_bricks") +--player:get_inventory():add_item("main", "poop:planks") + -- player:get_inventory():add_item("main", "poop:purpleblock") + -- player:get_inventory():add_item("main", "poop:redblock") + -- player:get_inventory():add_item("main", "poop:aquablock") + -- player:get_inventory():add_item("main", "poop:glass") + -- player:get_inventory():add_item("main", "poop:flux_capacitor") + --end +end) \ No newline at end of file diff --git a/mods/poop/music.lua b/mods/poop/music.lua deleted file mode 100644 index e69de29..0000000 diff --git a/mods/poop/nodes.lua b/mods/poop/nodes.lua deleted file mode 100644 index 1192557..0000000 --- a/mods/poop/nodes.lua +++ /dev/null @@ -1,50 +0,0 @@ -minetest.register_node("poop:box", { - description = "cardboard box", - tiles = {"BOX.png"}, - - drop = 'poop:box', - legacy_mineral = true, -}) - -minetest.register_node("poop:floor", { - description = "Floor", - tiles = {"floor.png"}, - - drop = 'poop:floor', - legacy_mineral = true, -}) - -minetest.register_node("poop:Poop", { - description = "Just Shit", - tiles = {"Poop.png"}, - drop = 'poop:PoopItem', -}) - -minetest.register_node("poop:tv", { - description = "CRTV", - tiles = {"PC2.png", "PC2.png","PC2.png","PC.png","PC2.png","PC2.png"}, - - drop = 'poop:Poop', -}) - -minetest.register_node("poop:bricks", { - description = "Bricks", - tiles = {"Bricks.png"}, - - drop = 'poop:grey_bricks', -}) -minetest.register_node("poop:grey_bricks", { - description = "Bricks 2", - tiles = {"Bricks2.png"}, - - drop = 'poop:grey_bricks', -}) -minetest.register_node("poop:planks", { - description = "Planks", - tiles = {"Planks.png"}, - - drop = 'poop:planks', -}) - - -minetest.register_alias("mapgen_stone", "poop:Poop") \ No newline at end of file diff --git a/mods/poop/textures/flashlight.png b/mods/poop/textures/flashlight.png new file mode 100644 index 0000000000000000000000000000000000000000..acac85e57efd888d415841d767063277f885a448 GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|B0OCjLoEE0 zQx*sqEP7qe=l`ew{F%Ml&lkT~xQ|icws6+&gX=14UQ69D+>{lSP~}*x+14t-6k^Db z!ci5m;J2)pUqmcJG3zGr4VLmt@~$*oG&nGuujA}fhOg<7f)EX>4Tx04R}tkv&MmKpe$iQ>CI62Rn!eW~fdUL`4J_sbUclA>%qQu! zmKHt&`nG|K>y{?(0hc?#z>_W+k|X(P3i&+nen#Jv1^RD+?lrf!<~~jzfHZZrd;=UD z0;2`WUiWx+S9@>&o@w^?1KXu?(Yz)Be*gdg32;bRa{vG?BLDy{BLR4&KXw2B00(qQ zO+^Rh3lt3;3*8^IU;qFB8FWQhbVF}#ZDnqB07G(RVRU6=Aa`kWXdp*PO;A^X4i^9b z2wX`-K~#9!?Ojc1R96%}GkwXBIu=7@HbR6h8Ypz3P29BLrmhMuhG-UUif(jM1TBgS z7cRsS1rbWz)P=-_MpJOpg>DL6nP`?J?hJGjlt`TzUM6Z6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