From 49572aa75784c31d26a86cb46186779eaa3a5305 Mon Sep 17 00:00:00 2001 From: Martin Doege Date: Wed, 29 Apr 2015 12:21:53 +0200 Subject: [PATCH] add water lily; fix 180 deg rotation of imported maps --- mods/lilypad/depends.txt | 1 + mods/lilypad/init.lua | 41 ++++++++++++++++++++++++++++ mods/lilypad/textures/waterlily.png | Bin 0 -> 504 bytes tools/tomtweschem.py | 3 +- 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 mods/lilypad/depends.txt create mode 100644 mods/lilypad/init.lua create mode 100644 mods/lilypad/textures/waterlily.png diff --git a/mods/lilypad/depends.txt b/mods/lilypad/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/mods/lilypad/depends.txt @@ -0,0 +1 @@ +default diff --git a/mods/lilypad/init.lua b/mods/lilypad/init.lua new file mode 100644 index 0000000..d63bace --- /dev/null +++ b/mods/lilypad/init.lua @@ -0,0 +1,41 @@ +-- adapted from plantlife modpack + +minetest.register_node("lilypad:waterlily", { + description = "Lily Pad", + drawtype = "nodebox", + tiles = { + "waterlily.png" + }, + inventory_image = "waterlily.png", + wield_image = "waterlily.png", + sunlight_propagates = true, + paramtype = "light", + walkable = true, + groups = {snappy = 3,flammable=2}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 }, + }, + node_box = { + type = "fixed", + fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 }, + }, + buildable_to = true, + liquids_pointable = true, + on_place = function(itemstack, placer, pointed_thing) + local pt = pointed_thing + local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z} + local under_node = minetest.get_node(pt.under) + + if under_node.name ~= "default:water_source" then return end + + minetest.set_node(top_pos, {name = "lilypad:waterlily"}) + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + return itemstack + end +}) + + diff --git a/mods/lilypad/textures/waterlily.png b/mods/lilypad/textures/waterlily.png new file mode 100644 index 0000000000000000000000000000000000000000..d774235a5d196ee31a7cc1bf1338047d26997f9f GIT binary patch literal 504 zcmVCzqm;CXwI_9Ou9 zOf`e?-UR})mzM(xLWExKJGQ-Q1~^@h1})Jd#2nhGSC4Uh735VmrKOCDUKWCt1y%;s zV>BPj;S89F+7*oSU2GT^f(4di=ghz?zQyIT5G<$K#+8Y*lpi!mpED|@nufHL#&=u+ zuC4+jJ7O@` z8WNV3O?rVAW9VPb*2wCa&<4Q)f<^9|ioJV5TX%`>;l|8o51*Dsw1%Sh0@uQ!!Sr80 uzaYLx2w7l)0l2_~Ub+c@f3uwK4&V*?eHV%uz((u<0000