From 46394e7e1f82856c9c9de262857bb08c2d8ea820 Mon Sep 17 00:00:00 2001 From: Nils Dagsson Moskopp Date: Wed, 17 Nov 2021 18:03:45 +0100 Subject: [PATCH] Add obsidian boat that always sinks --- mods/ENTITIES/mcl_boats/init.lua | 11 ++++++----- .../textures/mcl_boats_obsidian_boat.png | Bin 0 -> 264 bytes .../textures/mcl_boats_texture_obsidian_boat.png | Bin 0 -> 535 bytes 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 mods/ENTITIES/mcl_boats/textures/mcl_boats_obsidian_boat.png create mode 100644 mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_obsidian_boat.png diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua index f46c14d467..beff5fb52e 100644 --- a/mods/ENTITIES/mcl_boats/init.lua +++ b/mods/ENTITIES/mcl_boats/init.lua @@ -342,7 +342,8 @@ function boat.on_step(self, dtime, moveresult) self.object:get_velocity().y) else p.y = p.y + 1 - if is_water(p) then + local is_obsidian_boat = self.object:get_luaentity()._itemstring == "mcl_boats:boat_obsidian" + if is_water(p) or is_obsidian_boat then -- Inside water: Slowly sink local y = self.object:get_velocity().y y = y - 0.01 @@ -382,13 +383,13 @@ end -- Register one entity for all boat types minetest.register_entity("mcl_boats:boat", boat) -local boat_ids = { "boat", "boat_spruce", "boat_birch", "boat_jungle", "boat_acacia", "boat_dark_oak" } -local names = { S("Oak Boat"), S("Spruce Boat"), S("Birch Boat"), S("Jungle Boat"), S("Acacia Boat"), S("Dark Oak Boat") } +local boat_ids = { "boat", "boat_spruce", "boat_birch", "boat_jungle", "boat_acacia", "boat_dark_oak", "boat_obsidian" } +local names = { S("Oak Boat"), S("Spruce Boat"), S("Birch Boat"), S("Jungle Boat"), S("Acacia Boat"), S("Dark Oak Boat"), S("Obsidian Boat") } local craftstuffs = {} if minetest.get_modpath("mcl_core") then - craftstuffs = { "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood" } + craftstuffs = { "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood", "mcl_core:obsidian" } end -local images = { "oak", "spruce", "birch", "jungle", "acacia", "dark_oak" } +local images = { "oak", "spruce", "birch", "jungle", "acacia", "dark_oak", "obsidian" } for b=1, #boat_ids do local itemstring = "mcl_boats:"..boat_ids[b] diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_obsidian_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_obsidian_boat.png new file mode 100644 index 0000000000000000000000000000000000000000..6ae10c0c4b4dfd9e13a5008aa3a60c15d85b2930 GIT binary patch literal 264 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDUWnt!GW8vjw7vbj<6Xi2d zmkKS7o4>X9B}5!9sH39;5nrED<_XlxQ4-`A45Yze`}3fMKt{c%i(?3ftmwgwoJ@ui ztPif=c-}efU4n(*27z}61VyG7a$J78Q1Zb82c7&jorJD>=5~Xhb|uf(y)4`@;Z9HX zmo@L?+0T0&Jox_1lrs;yS6vrZH`P3JX383uGm)3_J1d?m*@_yT+_Z%KnQQOiC2AHv oTq@g{`yQ35$bO5s%XZ-}V|t54)E+nOa*&%mUHx3vIVCg!0P{jy^8f$< literal 0 HcmV?d00001 diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_obsidian_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_obsidian_boat.png new file mode 100644 index 0000000000000000000000000000000000000000..af3c24b30e5fa0fa9937cf9f874aa43651924013 GIT binary patch literal 535 zcmeAS@N?(olHy`uVBq!ia0vp^4M6O`!VDx8ekAz-DT4r?5LXsvE;bfkPIeJ~J~2@~ z19hp;(zy9sdtc%bm*bgZ1=Pz?666;Qq`_eO^Pq(c42*rAE{-7)hu>b`>vcFmB&)BTM(WJn$tN6`~Ce68JJ%+6dvU?1dC3sEtQoH{C zd;GU~xl;o<9tg#6^V-b#U|GB3vx?W}_R9x1tYJ=(iDs4f)*yRBi{Y4f85d83(gX!b zld_*DmOP)3!*^gGbF?eNgLUlL_D&)nId5o1vMVy&(E4`YzUYtiX1}I=t5&U={^gD! zgQ|Mf{HaD#droHnrDt9`d3m;_#ir7iwi#PbtHj@wYMuDjNWD5>_T1vDHLlsKR{cD6 z$o50%?BlCSeW>F z^0(Cj;o%$Q4RY`8e0wnK9QR{ehv&C%&l5LGv5)xu`H=jJgXZyfO;s;w_FM)