From 71bc502560ad8db2ed51dfe1afe98bc9e5b789c6 Mon Sep 17 00:00:00 2001 From: Looki2000 Date: Sun, 8 Jan 2023 00:11:47 +0100 Subject: [PATCH] added sussy AMOGUS sussy baka uwu --- .../entities/amogus_entity.lua | 57 +++++++ mods/amogus_entities/init.lua | 2 + mods/amogus_entities/models/amogus_entity.obj | 154 ++++++++++++++++++ .../textures/amogus_entity.png | Bin 0 -> 596 bytes mods/amogus_items/init.lua | 21 ++- 5 files changed, 233 insertions(+), 1 deletion(-) create mode 100644 mods/amogus_entities/entities/amogus_entity.lua create mode 100644 mods/amogus_entities/init.lua create mode 100644 mods/amogus_entities/models/amogus_entity.obj create mode 100644 mods/amogus_entities/textures/amogus_entity.png diff --git a/mods/amogus_entities/entities/amogus_entity.lua b/mods/amogus_entities/entities/amogus_entity.lua new file mode 100644 index 0000000..2174d18 --- /dev/null +++ b/mods/amogus_entities/entities/amogus_entity.lua @@ -0,0 +1,57 @@ +local entity = { + physical = true, + collisionbox = {-0.5, 0, -0.5, 0.5, 1, 0.5}, + + visual = "mesh", + visual_size = {x=10, y=10, z=10}, + + mesh = "amogus_entity.obj", + textures = {"amogus_entity.png"}, + + on_rightclick = function(self, clicker) + minetest.chat_send_player(clicker:get_player_name(), "AMOGUS") + end, + + is_going_forward = true, + gravity = 9.81/60, + speed = 0.1, + + on_step = function(self, dtime) + -- Switch "is_going_forward" 1% chance randomly between true and false + if math.random(200) == 1 then + self.is_going_forward = not self.is_going_forward + end + + -- Go forward if "is_going_forward" is true + if self.is_going_forward then + local pos = self.object:get_pos() + local dir = self.object:get_yaw() + pos.x = pos.x + math.cos(dir) * self.speed + pos.z = pos.z + math.sin(dir) * self.speed + self.object:set_pos(pos) + end + + -- some chance of turning left or right + if math.random(50) == 1 then + self.object:set_yaw(self.object:get_yaw() + math.pi/2) + elseif math.random(50) == 1 then + self.object:set_yaw(self.object:get_yaw() - math.pi/2) + end + + -- Make it also jump when running into some block + local pos = self.object:get_pos() + local bnode = minetest.get_node(pos) + if bnode.name ~= "air" then + local vel = self.object:get_velocity() + vel.y = vel.y + 5 + self.object:set_velocity(vel) + end + + -- change velocity by gravity + local vel = self.object:get_velocity() + vel.y = vel.y - self.gravity + self.object:set_velocity(vel) + + end +} +minetest.register_entity("amogus_entities:amogus", entity) \ No newline at end of file diff --git a/mods/amogus_entities/init.lua b/mods/amogus_entities/init.lua new file mode 100644 index 0000000..87d8ff0 --- /dev/null +++ b/mods/amogus_entities/init.lua @@ -0,0 +1,2 @@ +-- Load the entity's lua file +dofile(minetest.get_modpath("amogus_entities") .. "/entities/amogus_entity.lua") diff --git a/mods/amogus_entities/models/amogus_entity.obj b/mods/amogus_entities/models/amogus_entity.obj new file mode 100644 index 0000000..7d6fccf --- /dev/null +++ b/mods/amogus_entities/models/amogus_entity.obj @@ -0,0 +1,154 @@ +# Blender v3.4.0 OBJ File: 'amogus.blend' +# www.blender.org +o body +v 0.250000 1.312500 -0.250000 +v 0.250000 1.312500 -0.375000 +v 0.250000 1.000000 -0.250000 +v 0.250000 1.000000 -0.375000 +v -0.250000 1.312500 -0.375000 +v -0.250000 1.312500 -0.250000 +v -0.250000 1.000000 -0.375000 +v -0.250000 1.000000 -0.250000 +v 0.312500 1.125000 0.437500 +v 0.312500 1.125000 0.250000 +v 0.312500 0.375000 0.437500 +v 0.312500 0.375000 0.250000 +v -0.312500 1.125000 0.250000 +v -0.312500 1.125000 0.437500 +v -0.312500 0.375000 0.250000 +v -0.312500 0.375000 0.437500 +v 0.375000 1.437500 0.250000 +v 0.375000 1.437500 -0.250000 +v 0.375000 0.312500 0.250000 +v 0.375000 0.312500 -0.250000 +v -0.375000 1.437500 -0.250000 +v -0.375000 1.437500 0.250000 +v -0.375000 0.312500 -0.250000 +v -0.375000 0.312500 0.250000 +vt 0.000000 0.687500 +vt 0.500000 0.687500 +vt 0.500000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.687500 +vt 0.125000 0.687500 +vt 0.125000 1.000000 +vt 0.000000 1.000000 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.125000 1.000000 +vt 0.000000 1.000000 +vt -0.000000 0.687500 +vt 0.125000 0.687500 +vt 0.500000 1.000000 +vt 0.000000 0.875000 +vt 0.500000 0.875000 +vt 0.000000 0.875000 +vt 0.500000 0.875000 +vt 0.500000 1.000000 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn -0.0000 -0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 -0.0000 +s off +f 4/1/1 7/2/1 5/3/1 2/4/1 +f 3/5/2 4/6/2 2/7/2 1/8/2 +f 12/9/3 19/10/3 17/11/3 10/12/3 +f 7/13/4 8/14/4 6/15/4 5/16/4 +f 6/17/5 1/8/5 2/18/5 5/19/5 +f 7/20/6 4/21/6 3/22/6 8/14/6 +f 13/23/3 10/12/3 17/11/3 22/24/3 +f 11/25/2 12/9/2 10/12/2 9/26/2 +f 16/27/3 11/25/3 9/26/3 14/28/3 +f 15/29/4 16/27/4 14/28/4 13/23/4 +f 14/28/5 9/26/5 10/12/5 13/23/5 +f 15/29/6 12/9/6 11/25/6 16/27/6 +f 15/29/3 13/23/3 22/24/3 24/30/3 +f 19/10/2 20/31/2 18/32/2 17/11/2 +f 23/33/4 24/30/4 22/24/4 21/34/4 +f 22/24/5 17/11/5 18/32/5 21/34/5 +f 23/33/6 20/31/6 19/10/6 24/30/6 +f 15/29/3 24/30/3 19/10/3 12/9/3 +f 6/35/1 21/34/1 18/32/1 1/36/1 +f 8/37/1 23/33/1 21/34/1 6/35/1 +f 3/38/1 1/36/1 18/32/1 20/31/1 +f 8/37/1 3/38/1 20/31/1 23/33/1 +o left_leg +v -0.062500 0.437500 0.187500 +v -0.062500 0.437500 -0.187500 +v -0.062500 -0.000000 0.187500 +v -0.062500 0.000000 -0.187500 +v -0.312500 0.437500 -0.187500 +v -0.312500 0.437500 0.187500 +v -0.312500 0.000000 -0.187500 +v -0.312500 -0.000000 0.187500 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 -0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 -0.0000 +s off +f 28/39/7 31/40/7 29/41/7 26/42/7 +f 27/43/8 28/39/8 26/42/8 25/44/8 +f 32/45/9 27/43/9 25/44/9 30/46/9 +f 31/40/10 32/45/10 30/46/10 29/41/10 +f 30/46/11 25/44/11 26/42/11 29/41/11 +f 31/40/12 28/39/12 27/43/12 32/45/12 +o right_leg +v 0.312500 0.437500 0.187500 +v 0.312500 0.437500 -0.187500 +v 0.312500 -0.000000 0.187500 +v 0.312500 0.000000 -0.187500 +v 0.062500 0.437500 -0.187500 +v 0.062500 0.437500 0.187500 +v 0.062500 0.000000 -0.187500 +v 0.062500 -0.000000 0.187500 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vt 0.968971 0.969702 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 -0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 -0.0000 +s off +f 36/47/13 39/48/13 37/49/13 34/50/13 +f 35/51/14 36/47/14 34/50/14 33/52/14 +f 40/53/15 35/51/15 33/52/15 38/54/15 +f 39/48/16 40/53/16 38/54/16 37/49/16 +f 38/54/17 33/52/17 34/50/17 37/49/17 +f 39/48/18 36/47/18 35/51/18 40/53/18 diff --git a/mods/amogus_entities/textures/amogus_entity.png b/mods/amogus_entities/textures/amogus_entity.png new file mode 100644 index 0000000000000000000000000000000000000000..fc50eee9adfd7dc3d70fd821674e1e8065e6539c GIT binary patch literal 596 zcmV-a0;~OrP)EX>4Tx04R}tkv&MmP!xqvQ%glE3U&|?%ut;yh>AE$6^me@v=v%)FnQ@8G-*gu zTpR`0f`dPcRRqpci*4YtK>}v_(bA4rW+RV2Jy_M zrE}gV4zrS^5T6r|8+1Y9N3P2*zi}=)Ebz>*kx9)Hhl#~v2g@DIN`^{2O&n2Fjq-)8 z%L?Z$&T6H`TKD8H4CS?zG}mbjBaS5`kc0>sHIz|-g(&SBDJD{M9`o=IIsPQMWO9|k z$gzMbR7j2={11N5)+|g-x=EoJ5O}fek5M4F3pDGt{e5iP%@e@?3|wh#f3*S3ev)2q zYmp+e)kfB*E-v9@P zz*v#8*FE0d-8r{^ds_4R0UHW(gu;KxbpQYW32;bRa{vG?BLDy{BLR4&KXw2B00(qQ zO+^Ri0R<2UD#CBLwg3PC8FWQhbVF}#ZDnqB07G(RVRU6=Aa`kWXdp*PO;A^X4i^9b z06j@WK~yNuV`P~4p8*^ApNCD9k&%Ugfq_9C#=prx0Q~>YLab64U?NF1Oam!^@&Et- iBxxYohEWYeR09ACH44w5Sqh*40000 0 then + -- yaw = yaw + math.pi + -- end + -- minetest.add_entity(pos, "amogus_entities:amogus", yaw) + --end + + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type == "node" then + local pos = pointed_thing.above + minetest.add_entity(pos, "amogus_entities:amogus") + end + return itemstack + end }) \ No newline at end of file