From 59ff1d3650be49357ecf6c99a2165e5e9d501850 Mon Sep 17 00:00:00 2001 From: maikerumine Date: Thu, 27 Oct 2016 19:48:19 -0400 Subject: [PATCH] Seasons for Minetest select a variety of "seasons" to convert your worlds. --- README.md | 16 + autumn.lua | 391 +++++++++++++++++ depends.txt | 3 + init.lua | 48 +++ nodes.lua | 305 ++++++++++++++ spring.lua | 353 ++++++++++++++++ summer.lua | 4 + textures/aikerum_block.png | Bin 0 -> 503 bytes textures/autumn_jungleleaves.png | Bin 0 -> 220 bytes textures/autumn_jungleleaves_simple.png | Bin 0 -> 220 bytes textures/autumn_leaves.png | Bin 0 -> 504 bytes textures/autumn_leaves_simple.png | Bin 0 -> 504 bytes textures/banners_stripe1.png | Bin 0 -> 156 bytes textures/farming_pumpkin_1.png | Bin 0 -> 159 bytes textures/farming_pumpkin_2.png | Bin 0 -> 182 bytes textures/farming_pumpkin_3.png | Bin 0 -> 199 bytes textures/farming_pumpkin_4.png | Bin 0 -> 230 bytes textures/farming_pumpkin_5.png | Bin 0 -> 259 bytes textures/farming_pumpkin_6.png | Bin 0 -> 263 bytes textures/farming_pumpkin_7.png | Bin 0 -> 271 bytes textures/farming_pumpkin_8.png | Bin 0 -> 275 bytes textures/farming_pumpkin_bread.png | Bin 0 -> 200 bytes textures/farming_pumpkin_dough.png | Bin 0 -> 193 bytes textures/farming_pumpkin_face_off.png | Bin 0 -> 259 bytes textures/farming_pumpkin_face_on.png | Bin 0 -> 269 bytes textures/farming_pumpkin_side.png | Bin 0 -> 231 bytes textures/farming_pumpkin_slice.png | Bin 0 -> 204 bytes textures/farming_pumpkin_top.png | Bin 0 -> 272 bytes winter.lua | 539 ++++++++++++++++++++++++ 29 files changed, 1659 insertions(+) create mode 100644 README.md create mode 100644 autumn.lua create mode 100644 depends.txt create mode 100644 init.lua create mode 100644 nodes.lua create mode 100644 spring.lua create mode 100644 summer.lua create mode 100644 textures/aikerum_block.png create mode 100644 textures/autumn_jungleleaves.png create mode 100644 textures/autumn_jungleleaves_simple.png create mode 100644 textures/autumn_leaves.png create mode 100644 textures/autumn_leaves_simple.png create mode 100644 textures/banners_stripe1.png create mode 100644 textures/farming_pumpkin_1.png create mode 100644 textures/farming_pumpkin_2.png create mode 100644 textures/farming_pumpkin_3.png create mode 100644 textures/farming_pumpkin_4.png create mode 100644 textures/farming_pumpkin_5.png create mode 100644 textures/farming_pumpkin_6.png create mode 100644 textures/farming_pumpkin_7.png create mode 100644 textures/farming_pumpkin_8.png create mode 100644 textures/farming_pumpkin_bread.png create mode 100644 textures/farming_pumpkin_dough.png create mode 100644 textures/farming_pumpkin_face_off.png create mode 100644 textures/farming_pumpkin_face_on.png create mode 100644 textures/farming_pumpkin_side.png create mode 100644 textures/farming_pumpkin_slice.png create mode 100644 textures/farming_pumpkin_top.png create mode 100644 winter.lua diff --git a/README.md b/README.md new file mode 100644 index 0000000..09632c8 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +Minetest 0.4 mod: holiday +========================= + +License of source code: +----------------------- +maikerumine's mod for minetest + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +http://www.gnu.org/licenses/lgpl-2.1.html + + +Holiday lets you make gifts and other decorations that are seasonal in Minetest. diff --git a/autumn.lua b/autumn.lua new file mode 100644 index 0000000..7ee3f89 --- /dev/null +++ b/autumn.lua @@ -0,0 +1,391 @@ +-- Minetest 0.4 mod: mt_seasons +-- +-- See README.txt for licensing and other information. + + + +--OVERRIDE IMAGES +--example: +--[[ +minetest.override_item("default:mese", { + light_source = LIGHT_MAX, + groups = {unbreakable=1}, +}) +]] + +--AUTUMN + +minetest.override_item("default:dirt_with_grass", { + description = "Dirt with Grass", + tiles = {"default_dry_grass.png", "default_dirt.png", + {name = "default_dirt.png^default_dry_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1}, + drop = 'default:dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + + + +minetest.override_item("default:leaves", { + description = "Leaves", + drawtype = "allfaces_optional", + waving = 1, + visual_scale = 1.3, + tiles = {"autumn_leaves.png"}, + special_tiles = {"autumn_leaves_simple.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + { + -- player will get sapling with 1/20 chance + items = {'default:sapling'}, + rarity = 20, + }, + { + -- player will get leaves only if he get no saplings, + -- this is because max_items is 1 + items = {'default:leaves'}, + } + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = default.after_place_leaves, +}) + + +minetest.override_item("default:jungleleaves", { + description = "Jungle Leaves", + drawtype = "allfaces_optional", + waving = 1, + visual_scale = 1.3, + tiles = {"autumn_jungleleaves.png"}, + special_tiles = {"autumn_jungleleaves_simple.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {'default:junglesapling'}, rarity = 20}, + {items = {'default:jungleleaves'}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = default.after_place_leaves, +}) + +minetest.override_item("default:pine_needles",{ + description = "Pine Needles", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tiles = {"default_pine_needles.png^[colorize:white:80"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:pine_sapling"}, rarity = 20}, + {items = {"default:pine_needles"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = default.after_place_leaves, +}) + + +minetest.override_item("default:acacia_leaves", { + description = "Acacia Leaves", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tiles = {"default_acacia_leaves.png^[colorize:brown:120"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:acacia_sapling"}, rarity = 20}, + {items = {"default:acacia_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = default.after_place_leaves, +}) + +minetest.override_item("default:aspen_leaves", { + description = "Aspen Leaves", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tiles = {"default_aspen_leaves.png^[colorize:brown:80"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:aspen_sapling"}, rarity = 20}, + {items = {"default:aspen_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = default.after_place_leaves, +}) + +-- +-- Plantlife (non-cubic) +-- + +minetest.override_item("default:cactus", { + description = "Cactus", + tiles = {"default_cactus_top.png^[colorize:brown:80", "default_cactus_top.png^[colorize:brown:80", + "default_cactus_side.png^[colorize:brown:80"}, + paramtype2 = "facedir", + groups = {snappy = 1, choppy = 3}, + sounds = default.node_sound_wood_defaults(), + on_place = minetest.rotate_node, + + after_dig_node = function(pos, node, metadata, digger) + default.dig_up(pos, node, digger) + end, +}) + +minetest.override_item("default:papyrus", { + description = "Papyrus", + drawtype = "plantlike", + tiles = {"default_papyrus.png^[colorize:brown:120"}, + inventory_image = "default_papyrus.png^[colorize:brown:120", + wield_image = "default_papyrus.png^[colorize:brown:120", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, + groups = {snappy = 3, flammable = 2}, + sounds = default.node_sound_leaves_defaults(), + + after_dig_node = function(pos, node, metadata, digger) + default.dig_up(pos, node, digger) + end, +}) + +minetest.override_item("default:junglegrass", { + description = "Jungle Grass", + drawtype = "plantlike", + waving = 1, + visual_scale = 1.3, + tiles = {"default_junglegrass.png^[colorize:brown:80"}, + inventory_image = "default_junglegrass.png^[colorize:brown:80", + wield_image = "default_junglegrass.png^[colorize:brown:80", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, + }, +}) + + +minetest.override_item("default:grass_1", { + description = "Grass", + drawtype = "plantlike", + waving = 1, + tiles = {"default_grass_1.png^[colorize:brown:80"}, + -- Use texture of a taller grass stage in inventory + inventory_image = "default_grass_3.png^[colorize:brown:80", + wield_image = "default_grass_3.png^[colorize:brown:80", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, + }, + + on_place = function(itemstack, placer, pointed_thing) + -- place a random grass node + local stack = ItemStack("default:grass_" .. math.random(1,5)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack("default:grass_1 " .. + itemstack:get_count() - (1 - ret:get_count())) + end, +}) + +for i = 2, 5 do + minetest.override_item("default:grass_" .. i, { + description = "Grass", + drawtype = "plantlike", + waving = 1, + tiles = {"default_grass_" .. i .. ".png^[colorize:brown:80"}, + inventory_image = "default_grass_" .. i .. ".png^[colorize:brown:80", + wield_image = "default_grass_" .. i .. ".png^[colorize:brown:80", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "default:grass_1", + groups = {snappy = 3, flora = 1, attached_node = 1, + not_in_creative_inventory = 1, grass = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, + }, + }) +end + +-- +-- Waterlily +-- + +minetest.override_item("flowers:waterlily", { + description = "Waterlily", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = {"flowers_waterlily.png^[colorize:brown:80", "flowers_waterlily_bottom.png^[colorize:brown:80"}, + inventory_image = "flowers_waterlily.png^[colorize:brown:80", + wield_image = "flowers_waterlily.png^[colorize:brown:80", + liquids_pointable = true, + walkable = false, + buildable_to = true, + sunlight_propagates = true, + floodable = true, + groups = {snappy = 3, flower = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + node_placement_prediction = "", + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.46875, 0.5} + }, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5} + }, + + on_place = function(itemstack, placer, pointed_thing) + local pos = pointed_thing.above + local node = minetest.get_node(pointed_thing.under).name + local def = minetest.registered_nodes[node] + local player_name = placer:get_player_name() + + if def and def.liquidtype == "source" and + minetest.get_item_group(node, "water") > 0 then + if not minetest.is_protected(pos, player_name) then + minetest.set_node(pos, {name = "flowers:waterlily", + param2 = math.random(0, 3)}) + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + else + minetest.chat_send_player(player_name, "Node is protected") + minetest.record_protection_violation(pos, player_name) + end + end + + return itemstack + end +}) + +--flowers +local function add_simple_flower(name, desc, box, f_groups) + -- Common flowers' groups + f_groups.snappy = 3 + f_groups.flower = 1 + f_groups.flora = 1 + f_groups.attached_node = 1 + + minetest.override_item("flowers:" .. name, { + description = desc, + drawtype = "plantlike", + waving = 1, + tiles = {"flowers_" .. name .. ".png^[colorize:brown:140"}, + inventory_image = "flowers_" .. name .. ".png^[colorize:brown:140", + wield_image = "flowers_" .. name .. ".png^[colorize:brown:140", + sunlight_propagates = true, + paramtype = "light", + walkable = false, + buildable_to = true, + stack_max = 99, + groups = f_groups, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = box + } + }) +end + +flowers.datas = { + {"rose", "Rose", {-0.15, -0.5, -0.15, 0.15, 0.3, 0.15}, {color_red = 1, flammable = 1}}, + {"tulip", "Orange Tulip", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_orange = 1, flammable = 1}}, + {"dandelion_yellow", "Yellow Dandelion", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_yellow = 1, flammable = 1}}, + {"geranium", "Blue Geranium", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_blue = 1, flammable = 1}}, + {"viola", "Viola", {-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}, {color_violet = 1, flammable = 1}}, + {"dandelion_white", "White dandelion", {-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}, {color_white = 1, flammable = 1}} +} + +for _,item in pairs(flowers.datas) do + add_simple_flower(unpack(item)) +end + + + +--AUTUMN CRAFTS +minetest.register_craft({ + output = "mt_seasons:jackolantern", + recipe = { + {"", "", ""}, + {"", "default:torch", ""}, + {"", "mt_seasons:pumpkin", ""}, + } +}) + +-- pumpkin bread +minetest.register_craftitem("mt_seasons:pumpkin_bread", { + description = "Pumpkin Bread", + inventory_image = "farming_pumpkin_bread.png", + on_use = minetest.item_eat(8) +}) + +minetest.register_craftitem("mt_seasons:pumpkin_dough", { + description = "Pumpkin Dough", + inventory_image = "farming_pumpkin_dough.png", +}) + +minetest.register_craft({ + output = "mt_seasons:pumpkin_dough", + type = "shapeless", + recipe = {"farming:flour", "default:pumpkin_slice", "default:pumpkin_slice"} +}) + +minetest.register_craft({ + type = "cooking", + output = "mt_seasons:pumpkin_bread", + recipe = "mt_seasons:pumpkin_dough", + cooktime = 10 +}) + diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..403b8ba --- /dev/null +++ b/depends.txt @@ -0,0 +1,3 @@ +default +flowers +wool diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..70ecd6f --- /dev/null +++ b/init.lua @@ -0,0 +1,48 @@ +-- Minetest 0.4 mod: mt_seasons +-- +-- See README.txt for licensing and other information. + +local season = tonumber(minetest.setting_getbool("season_set")) --or 2 + +dofile(minetest.get_modpath("mt_seasons").."/autumn.lua") +dofile(minetest.get_modpath("mt_seasons").."/nodes.lua") + +--[[ +if minetest.setting_getbool("season_set") == 1 then +dofile(minetest.get_modpath("mt_seasons").."/spring.lua") else +--return +end + +if minetest.setting_getbool("season_set") == 2 then +dofile(minetest.get_modpath("mt_seasons").."/summer.lua") else +--return +end + +if minetest.setting_getbool("season_set") == 3 then +dofile(minetest.get_modpath("mt_seasons").."/autumn.lua") else +--return +end + +if minetest.setting_getbool("season_set") == 4 then +dofile(minetest.get_modpath("mt_seasons").."/winter.lua") --else +return +end +]] + + + + +minetest.register_alias("default:pumpkin", "mt_seasons:pumpkin") +minetest.register_alias("default:pumpkin_1", "mt_seasons:pumpkin_1") +minetest.register_alias("default:pumpkin_2", "mt_seasons:pumpkin_2") +minetest.register_alias("default:pumpkin_3", "mt_seasons:pumpkin_3") +minetest.register_alias("default:pumpkin_4", "mt_seasons:pumpkin_4") +minetest.register_alias("default:pumpkin_5", "mt_seasons:pumpkin_5") +minetest.register_alias("default:pumpkin_6", "mt_seasons:pumpkin_6") +minetest.register_alias("default:pumpkin_7", "mt_seasons:pumpkin_7") +minetest.register_alias("default:pumpkin_8", "mt_seasons:pumpkin_8") +minetest.register_alias("default:pumpkin_slice", "mt_seasons:pumpkin_slice") +minetest.register_alias("default:pumpkin_bread", "mt_seasons:pumpkin_bread") +minetest.register_alias("default:pumpkin_dough", "mt_seasons:pumpkin_dough") +minetest.register_alias("default:jackolantern", "mt_seasons:jackolantern") +minetest.register_alias("default:jackolantern_on", "mt_seasons:jackolantern_on") diff --git a/nodes.lua b/nodes.lua new file mode 100644 index 0000000..66bf9ee --- /dev/null +++ b/nodes.lua @@ -0,0 +1,305 @@ +-- Minetest 0.4 mod: mt_seasons +-- +-- See README.txt for licensing and other information. +--NODE DEFS + +local clrs = { + {"black", "Black", "#000000b0"}, + {"blue", "Blue", "#015dbbcc"}, + {"brown", "Brown", "#a78c45cc"}, + {"cyan", "Cyan", "#01ffd8cc"}, + {"dark_green", "Dark Green", "#005b07cc"}, + {"dark_grey", "Dark Grey", "#303030b0"}, + {"green", "Green", "#61ff01cc"}, + {"grey", "Grey", "#5b5b5bb0"}, + {"magenta", "Magenta", "#ff05bbcc"}, + {"orange", "Orange", "#ff8401cc"}, + {"pink", "Pink", "#ff65b5cc"}, + {"red", "Red", "#ff0000cc"}, + {"violet", "Violet", "#2000c9cc"}, + {"white", "White", "#abababc0"}, + {"yellow", "Yellow", "#e3ff00cc"}, +} + +for i = 1, #clrs, 1 do + +minetest.register_node("mt_seasons:gift_box_" .. clrs[i][1], { + description = clrs[i][2] .. "Gift Block - Punch for random gift", + tiles = { + --"wool_white.png^default_apple.png^[transform2", + "aikerum_block.png^[colorize:" .. clrs[i][3], + "wool_white.png^[colorize:" .. clrs[i][3], + "wool_white.png^banners_stripe1.png^[colorize:" .. clrs[i][3], + "wool_white.png^banners_stripe1.png^[colorize:" .. clrs[i][3], + "wool_white.png^banners_stripe1.png^[colorize:" .. clrs[i][3], + "wool_white.png^banners_stripe1.png^[colorize:" .. clrs[i][3] + }, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {crumbly=2,}, + paramtype2 = "facedir", + drop = { + max_items = 2, + items = { + {items = {'mt_seasons:gift_box'}, rarity = 80}, + {items = {'default:sword_diamond'}, rarity = 50}, + {items = {'default:sword_mese'}, rarity = 30}, + {items = {'default:sword_bronze'}, rarity = 10}, + {items = {'default:sword_steel'}, rarity = 5}, + + {items = {'default:pick_diamond'}, rarity = 50}, + {items = {'default:pick_mese'}, rarity = 30}, + {items = {'default:pick_bronze'}, rarity = 10}, + {items = {'default:pick_steel'}, rarity = 5}, + + {items = {'farming:bread 60'}, rarity = 3}, + {items = {'default:cobble 10'}, rarity = 3}, + {items = {'default:gold_lump 10'}, rarity = 10}, + {items = {'default:iron_lump 10'}, rarity = 5}, + {items = {'default:apple 30'}, rarity = 5}, + {items = {'default:coal_lump 10'}, rarity = 1}, + } + }, + + after_place_node = function(pos, placer) + local meta = minetest.get_meta(pos) + meta:set_string("owner", placer:get_player_name() or "") + meta:set_string("infotext", "Christmas Present (placed by " .. + meta:get_string("owner") .. ")") + meta:set_string("formspec", "field[text;;${text}]") + end, + + on_receive_fields = function(pos, formname, fields, sender) + --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) + local player_name = sender:get_player_name() + if minetest.is_protected(pos, player_name) then + minetest.record_protection_violation(pos, player_name) + return + end + local meta = minetest.get_meta(pos) + if not fields.text then return end + minetest.log("action", (player_name or "") .. " wrote \"" .. + fields.text .. "\" to present at " .. minetest.pos_to_string(pos)) + meta:set_string("text", fields.text) + meta:set_string("infotext", '"' .. fields.text .. '"') --would like to keep the info from placer + end, + + sounds = default.node_sound_dirt_defaults(), +}) +--[[ +--sent to winter +minetest.register_craft({ + output = "mt_seasons:gift_box_".. clrs[i][1] .. " 1", + recipe = { + {'default:paper', 'default:apple', 'default:paper'}, + {'default:paper', 'default:diamond', 'default:paper'}, + { "dye:" .. clrs[i][1], 'group:wool' , "dye:" .. clrs[i][1]}, + + } +}) +]] +end + + +--More seasonal nodes + +--[[ + Big thanks to PainterlyPack.net for allowing me to use these textures +]] + + +-- pumpkin +minetest.register_node("mt_seasons:pumpkin", { + description = "Pumpkin", + tiles = { + "farming_pumpkin_top.png", + "farming_pumpkin_top.png", + "farming_pumpkin_side.png" + }, + groups = { + choppy = 1, oddly_breakable_by_hand = 1, + flammable = 2, plant = 1 + }, + drop = { + items = { + {items = {'mt_seasons:pumpkin_slice 9'}, rarity = 1}, + } + }, + sounds = default.node_sound_wood_defaults(), +}) + +-- pumpkin slice +minetest.register_craftitem("mt_seasons:pumpkin_slice", { + description ="Pumpkin Slice", + inventory_image = "farming_pumpkin_slice.png", + --[[ + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "default:pumpkin_1") + end, + ]] + on_use = minetest.item_eat(2), +}) + +minetest.register_craft({ + output = "mt_seasons:pumpkin", + recipe = { + {"mt_seasons:pumpkin_slice", "mt_seasons:pumpkin_slice", "mt_seasons:pumpkin_slice"}, + {"mt_seasons:pumpkin_slice", "mt_seasons:pumpkin_slice", "mt_seasons:pumpkin_slice"}, + {"mt_seasons:pumpkin_slice", "mt_seasons:pumpkin_slice", "mt_seasons:pumpkin_slice"}, + } +}) + +minetest.register_craft({ + output = "mt_seasons:pumpkin_slice 9", + recipe = { + {"", "mt_seasons:pumpkin", ""}, + } +}) + +-- jack 'o lantern +minetest.register_node("mt_seasons:jackolantern", { + description = "Jack 'O Lantern", + tiles = { + "farming_pumpkin_top.png", + "farming_pumpkin_top.png", + "farming_pumpkin_side.png", + "farming_pumpkin_side.png", + "farming_pumpkin_side.png", + "farming_pumpkin_face_off.png" + }, + paramtype2 = "facedir", + groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + on_punch = function(pos, node, puncher) + node.name = "mt_seasons:jackolantern_on" + minetest.swap_node(pos, node) + end, +}) + +minetest.register_node("mt_seasons:jackolantern_on", { + tiles = { + "farming_pumpkin_top.png", + "farming_pumpkin_top.png", + "farming_pumpkin_side.png", + "farming_pumpkin_side.png", + "farming_pumpkin_side.png", + "farming_pumpkin_face_on.png" + }, + light_source = default.LIGHT_MAX - 1, + paramtype2 = "facedir", + groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + drop = "mt_seasons:jackolantern", + on_punch = function(pos, node, puncher) + node.name = "mt_seasons:jackolantern" + minetest.swap_node(pos, node) + end, +}) + + +--[[ +--moved to autumn +minetest.register_craft({ + output = "mt_seasons:jackolantern", + recipe = { + {"", "", ""}, + {"", "default:torch", ""}, + {"", "mt_seasons:pumpkin", ""}, + } +}) + +-- pumpkin bread +minetest.register_craftitem("mt_seasons:pumpkin_bread", { + description = "Pumpkin Bread", + inventory_image = "farming_pumpkin_bread.png", + on_use = minetest.item_eat(8) +}) + +minetest.register_craftitem("mt_seasons:pumpkin_dough", { + description = "Pumpkin Dough", + inventory_image = "farming_pumpkin_dough.png", +}) + +minetest.register_craft({ + output = "mt_seasons:pumpkin_dough", + type = "shapeless", + recipe = {"farming:flour", "default:pumpkin_slice", "default:pumpkin_slice"} +}) + +minetest.register_craft({ + type = "cooking", + output = "mt_seasons:pumpkin_bread", + recipe = "mt_seasons:pumpkin_dough", + cooktime = 10 +}) +]] +-- pumpkin definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_pumpkin_1.png"}, + paramtype = "light", + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + --selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} +--[[ +-- stage 1 +minetest.register_node("mt_seasons:pumpkin_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_pumpkin_2.png"} +minetest.register_node("mt_seasons:pumpkin_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_pumpkin_3.png"} +minetest.register_node("mt_seasons:pumpkin_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_pumpkin_4.png"} +minetest.register_node("mt_seasons:pumpkin_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_pumpkin_5.png"} +minetest.register_node("mt_seasons:pumpkin_5", table.copy(crop_def)) + +-- stage 6 +crop_def.tiles = {"farming_pumpkin_6.png"} +minetest.register_node("mt_seasons:pumpkin_6", table.copy(crop_def)) + +-- stage 7 +crop_def.tiles = {"farming_pumpkin_7.png"} +minetest.register_node("mt_seasons:pumpkin_7", table.copy(crop_def)) +]] +-- stage 8 (final) +crop_def.tiles = {"farming_pumpkin_8.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'mt_seasons:pumpkin_slice 9'}, rarity = 1}, + } +} +minetest.register_node("mt_seasons:pumpkin_8", table.copy(crop_def)) + +minetest.register_alias("default:pumpkin", "mt_seasons:pumpkin") +minetest.register_alias("default:pumpkin_1", "mt_seasons:pumpkin_1") +minetest.register_alias("default:pumpkin_2", "mt_seasons:pumpkin_2") +minetest.register_alias("default:pumpkin_3", "mt_seasons:pumpkin_3") +minetest.register_alias("default:pumpkin_4", "mt_seasons:pumpkin_4") +minetest.register_alias("default:pumpkin_5", "mt_seasons:pumpkin_5") +minetest.register_alias("default:pumpkin_6", "mt_seasons:pumpkin_6") +minetest.register_alias("default:pumpkin_7", "mt_seasons:pumpkin_7") +minetest.register_alias("default:pumpkin_8", "mt_seasons:pumpkin_8") +minetest.register_alias("default:pumpkin_slice", "mt_seasons:pumpkin_slice") +minetest.register_alias("default:pumpkin_bread", "mt_seasons:pumpkin_bread") +minetest.register_alias("default:pumpkin_dough", "mt_seasons:pumpkin_dough") +minetest.register_alias("default:jackolantern", "mt_seasons:jackolantern") +minetest.register_alias("default:jackolantern_on", "mt_seasons:jackolantern_on") diff --git a/spring.lua b/spring.lua new file mode 100644 index 0000000..6c3e150 --- /dev/null +++ b/spring.lua @@ -0,0 +1,353 @@ +-- Minetest 0.4 mod: mt_seasons +-- +-- See README.txt for licensing and other information. + + + +--OVERRIDE IMAGES +--example: +--[[ +minetest.override_item("default:mese", { + light_source = LIGHT_MAX, + groups = {unbreakable=1}, +}) +]] + +--AUTUMN + +minetest.override_item("default:dirt_with_grass", { + description = "Dirt with Grass", + tiles = {"default_grass.png^[colorize:yellow:80", "default_dirt.png", + {name = "default_dirt.png^default_grass_side.png^[colorize:yellow:80", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1}, + drop = 'default:dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + + + +minetest.override_item("default:leaves", { + description = "Leaves", + drawtype = "allfaces_optional", + waving = 1, + visual_scale = 1.3, + tiles = {"autumn_leaves.png^[colorize:yellow:80"}, + special_tiles = {"autumn_leaves_simple.png^[colorize:yellow:80"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + { + -- player will get sapling with 1/20 chance + items = {'default:sapling'}, + rarity = 20, + }, + { + -- player will get leaves only if he get no saplings, + -- this is because max_items is 1 + items = {'default:leaves'}, + } + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = default.after_place_leaves, +}) + + +minetest.override_item("default:jungleleaves", { + description = "Jungle Leaves", + drawtype = "allfaces_optional", + waving = 1, + visual_scale = 1.3, + tiles = {"autumn_jungleleaves.png^[colorize:yellow:80"}, + special_tiles = {"autumn_jungleleaves_simple.png^[colorize:yellow:80"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {'default:junglesapling'}, rarity = 20}, + {items = {'default:jungleleaves'}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = default.after_place_leaves, +}) + +minetest.override_item("default:pine_needles",{ + description = "Pine Needles", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tiles = {"default_pine_needles.png^[colorize:yellow:80"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:pine_sapling"}, rarity = 20}, + {items = {"default:pine_needles"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = default.after_place_leaves, +}) + + +minetest.override_item("default:acacia_leaves", { + description = "Acacia Leaves", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tiles = {"default_acacia_leaves.png^[colorize:yellow:120"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:acacia_sapling"}, rarity = 20}, + {items = {"default:acacia_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = default.after_place_leaves, +}) + +minetest.override_item("default:aspen_leaves", { + description = "Aspen Leaves", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tiles = {"default_aspen_leaves.png^[colorize:yellow:80"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:aspen_sapling"}, rarity = 20}, + {items = {"default:aspen_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = default.after_place_leaves, +}) + +-- +-- Plantlife (non-cubic) +-- + +minetest.override_item("default:cactus", { + description = "Cactus", + tiles = {"default_cactus_top.png^[colorize:yellow:80", "default_cactus_top.png^[colorize:yellow:80", + "default_cactus_side.png^[colorize:yellow:80"}, + paramtype2 = "facedir", + groups = {snappy = 1, choppy = 3}, + sounds = default.node_sound_wood_defaults(), + on_place = minetest.rotate_node, + + after_dig_node = function(pos, node, metadata, digger) + default.dig_up(pos, node, digger) + end, +}) + +minetest.override_item("default:papyrus", { + description = "Papyrus", + drawtype = "plantlike", + tiles = {"default_papyrus.png^[colorize:yellow:120"}, + inventory_image = "default_papyrus.png^[colorize:yellow:120", + wield_image = "default_papyrus.png^[colorize:yellow:120", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, + groups = {snappy = 3, flammable = 2}, + sounds = default.node_sound_leaves_defaults(), + + after_dig_node = function(pos, node, metadata, digger) + default.dig_up(pos, node, digger) + end, +}) + +minetest.override_item("default:junglegrass", { + description = "Jungle Grass", + drawtype = "plantlike", + waving = 1, + visual_scale = 1.3, + tiles = {"default_junglegrass.png^[colorize:yellow:80"}, + inventory_image = "default_junglegrass.png^[colorize:yellow:80", + wield_image = "default_junglegrass.png^[colorize:yellow:80", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, + }, +}) + + +minetest.override_item("default:grass_1", { + description = "Grass", + drawtype = "plantlike", + waving = 1, + tiles = {"default_grass_1.png^[colorize:yellow:80"}, + -- Use texture of a taller grass stage in inventory + inventory_image = "default_grass_3.png^[colorize:yellow:80", + wield_image = "default_grass_3.png^[colorize:yellow:80", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, + }, + + on_place = function(itemstack, placer, pointed_thing) + -- place a random grass node + local stack = ItemStack("default:grass_" .. math.random(1,5)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack("default:grass_1 " .. + itemstack:get_count() - (1 - ret:get_count())) + end, +}) + +for i = 2, 5 do + minetest.override_item("default:grass_" .. i, { + description = "Grass", + drawtype = "plantlike", + waving = 1, + tiles = {"default_grass_" .. i .. ".png^[colorize:yellow:80"}, + inventory_image = "default_grass_" .. i .. ".png^[colorize:yellow:80", + wield_image = "default_grass_" .. i .. ".png^[colorize:yellow:80", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "default:grass_1", + groups = {snappy = 3, flora = 1, attached_node = 1, + not_in_creative_inventory = 1, grass = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, + }, + }) +end + +-- +-- Waterlily +-- + +minetest.override_item("flowers:waterlily", { + description = "Waterlily", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = {"flowers_waterlily.png^[colorize:yellow:80", "flowers_waterlily_bottom.png^[colorize:yellow:80"}, + inventory_image = "flowers_waterlily.png^[colorize:yellow:80", + wield_image = "flowers_waterlily.png^[colorize:yellow:80", + liquids_pointable = true, + walkable = false, + buildable_to = true, + sunlight_propagates = true, + floodable = true, + groups = {snappy = 3, flower = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + node_placement_prediction = "", + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.46875, 0.5} + }, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5} + }, + + on_place = function(itemstack, placer, pointed_thing) + local pos = pointed_thing.above + local node = minetest.get_node(pointed_thing.under).name + local def = minetest.registered_nodes[node] + local player_name = placer:get_player_name() + + if def and def.liquidtype == "source" and + minetest.get_item_group(node, "water") > 0 then + if not minetest.is_protected(pos, player_name) then + minetest.set_node(pos, {name = "flowers:waterlily", + param2 = math.random(0, 3)}) + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + else + minetest.chat_send_player(player_name, "Node is protected") + minetest.record_protection_violation(pos, player_name) + end + end + + return itemstack + end +}) + +--flowers +local function add_simple_flower(name, desc, box, f_groups) + -- Common flowers' groups + f_groups.snappy = 3 + f_groups.flower = 1 + f_groups.flora = 1 + f_groups.attached_node = 1 + + minetest.override_item("flowers:" .. name, { + description = desc, + drawtype = "plantlike", + waving = 1, + tiles = {"flowers_" .. name .. ".png^[colorize:yellow:140"}, + inventory_image = "flowers_" .. name .. ".png^[colorize:yellow:140", + wield_image = "flowers_" .. name .. ".png^[colorize:yellow:140", + sunlight_propagates = true, + paramtype = "light", + walkable = false, + buildable_to = true, + stack_max = 99, + groups = f_groups, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = box + } + }) +end + +flowers.datas = { + {"rose", "Rose", {-0.15, -0.5, -0.15, 0.15, 0.3, 0.15}, {color_red = 1, flammable = 1}}, + {"tulip", "Orange Tulip", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_orange = 1, flammable = 1}}, + {"dandelion_yellow", "Yellow Dandelion", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_yellow = 1, flammable = 1}}, + {"geranium", "Blue Geranium", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_blue = 1, flammable = 1}}, + {"viola", "Viola", {-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}, {color_violet = 1, flammable = 1}}, + {"dandelion_white", "White dandelion", {-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}, {color_white = 1, flammable = 1}} +} + +for _,item in pairs(flowers.datas) do + add_simple_flower(unpack(item)) +end diff --git a/summer.lua b/summer.lua new file mode 100644 index 0000000..fd6f283 --- /dev/null +++ b/summer.lua @@ -0,0 +1,4 @@ +-- Minetest 0.4 mod: holiday +-- +-- See README.txt for licensing and other information. + diff --git a/textures/aikerum_block.png b/textures/aikerum_block.png new file mode 100644 index 0000000000000000000000000000000000000000..33caf2b1fb28c24f3d1b6591b242010de26ee720 GIT binary patch literal 503 zcmVxkT*P5jz5Bqp?dwvV z7NkXmO(%?o%oBi4#}b~uvEF}b%7m~$fr7ALbjakWh|~3@X5#=XRq_0#7UxxZGU0fv zf1GW0=eLyHR>x@$ym_r}?U}&Wv94OnRXJ_5Y028P933qDmR;KtmoLXQyoLb6NF~YQ z=dY+~EvuGe)c_@<;&qZNsu@nRUXXVKx84Dmg*w%_lvPnm@%d!kYvVO!4KNFJ7%9MU z94UpA!f_m6^eO9i*}YcD~t-lQdp@l$$iNF8=002ovPDHLkV1hvdZim5fu-3X*uOM?7@fB*mgpMlS8#blsBx~Gd{2*-8N-h;f%1{}+S!y4>Z}Q8zhW?DTHGWHsH@BMArKFa@T-KEI$OvK@^LsIGFzRZt*U){J^->E6V(DEud7HB1d Mr>mdKI;Vst0IX6?U;qFB literal 0 HcmV?d00001 diff --git a/textures/autumn_jungleleaves_simple.png b/textures/autumn_jungleleaves_simple.png new file mode 100644 index 0000000000000000000000000000000000000000..794be6adb4977aad5f6ac72dbef9045d52afa15d GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFZim5fu-3X*uOM?7@fB*mgpMlS8#blsBx~Gd{2*-8N-h;f%1{}+S!y4>Z}Q8zhW?DTHGWHsH@BMArKFa@T-KEI$OvK@^LsIGFzRZt*U){J^->E6V(DEud7HB1d Mr>mdKI;Vst0IX6?U;qFB literal 0 HcmV?d00001 diff --git a/textures/autumn_leaves.png b/textures/autumn_leaves.png new file mode 100644 index 0000000000000000000000000000000000000000..64de6acc5aa2d706c6f3c742b7fb2279706323f6 GIT binary patch literal 504 zcmVl0#?4{EyWJ#659km4l9{XohL&nCCIYT;n>5~7UqahIR z;4vDitlF|Tpyh!EL0i5Kjf8BuZV%paci+3a@4ExwVmwy+0B)~mlBT-7o=K000~Tf8 z>*VapnmZ-d>MlL)KFhpU=DkJ$zogN-qa!v=qtrRBZk7gS z0=T+an$_G1VDa=!Vy%i0%(|*bog*sinsrrC*7cyhKOaH4o^bj8?I2#(H72oElQ?G6 zG)&@{!6>hmSgXaSH(Y-GK@mcSi;56TAFvM$Y;~}jI~5_AP16jk{Eh9F#JluV{k*83 zRD@s-Nw#=;=Ab3ks%898&ek6E=lWmJKWFUwGw+pHtIYc?zckf=gI&8Ak5$%nCvOLS zMC3WrRA#q}K9Q}~0Gp=iNKUNP_lE$$sCA^ywMy)&qDdU@Rmgn6MC}CvtgEVl0#?4{EyWJ#659km4l9{XohL&nCCIYT;n>5~7UqahIR z;4vDitlF|Tpyh!EL0i5Kjf8BuZV%paci+3a@4ExwVmwy+0B)~mlBT-7o=K000~Tf8 z>*VapnmZ-d>MlL)KFhpU=DkJ$zogN-qa!v=qtrRBZk7gS z0=T+an$_G1VDa=!Vy%i0%(|*bog*sinsrrC*7cyhKOaH4o^bj8?I2#(H72oElQ?G6 zG)&@{!6>hmSgXaSH(Y-GK@mcSi;56TAFvM$Y;~}jI~5_AP16jk{Eh9F#JluV{k*83 zRD@s-Nw#=;=Ab3ks%898&ek6E=lWmJKWFUwGw+pHtIYc?zckf=gI&8Ak5$%nCvOLS zMC3WrRA#q}K9Q}~0Gp=iNKUNP_lE$$sCA^ywMy)&qDdU@Rmgn6MC}CvtgEVMuc@u@VxW+wr;B5V#p&c9|Nq-N*Vg|1|LfPU t|3HwgF!lTq2So|fgewh!%xv9^4D*&~Kc8aUmkrd!;OXk;vd$@?2>^$qF&Y2> literal 0 HcmV?d00001 diff --git a/textures/farming_pumpkin_1.png b/textures/farming_pumpkin_1.png new file mode 100644 index 0000000000000000000000000000000000000000..e5b9a2bf946b3957a96b53dc9c6c7d1b87183fe5 GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa4)6(aRbXHcHDplmV$hH0u_#h@ zZI(!Gt3e3veDNJsEn~B$S;_|;n|HeAjinl#W95AdUC=7#)QHKqZzXmrwBLi zWb8=1v?M``A&FzRre%|>gzuE2a}IV*acSX|lwj!8Wmy^d*kvbBH-o3EpUXO@geCyk C%q)Qb literal 0 HcmV?d00001 diff --git a/textures/farming_pumpkin_2.png b/textures/farming_pumpkin_2.png new file mode 100644 index 0000000000000000000000000000000000000000..d977e8c22021375b2d19f1e0fdba16ba159bfbe7 GIT binary patch literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa3-AeXWe{W#HDplmV$cs`(vRn{ zC{lK9mPl^o&+OvsUZxymd_xnclCdPnFPOpM*^M+H$Ia8lF@)oKa>4?;gu^%3F>n9? literal 0 HcmV?d00001 diff --git a/textures/farming_pumpkin_3.png b/textures/farming_pumpkin_3.png new file mode 100644 index 0000000000000000000000000000000000000000..83f81905173ce0e5c5e113435a0e758b0280416b GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa3-AeXWl&@gHDplmV$cs`(vRn{ zC{lK9mPl^o&+OvsUZ%_>?U@c#$ygHP7tG-B>_!@p6YlBa7{YNqIbi{Vfn@Uu0d}^t z0&LS5u1RY81ba)wEYHx|xpFtV;SLuq!yPM^SQ+ftCAPDLa}~qYc9v8%BU8q&7Mjym rb!jw}tmZasTW!f8spY5>Eb7hBlgzKH?>b=~&Ea`*IyjKSvyt?&7$Sjt1 zg`J9q^~6lUfd0uzt5d2D~Dc#Ol8eSv1V+QytvmaO}ND_6-XPCE2J@X^C3w=|Y9 ZFf3jx5kBXP&J>`n44$rjF6*2UngA7SP2B(h literal 0 HcmV?d00001 diff --git a/textures/farming_pumpkin_5.png b/textures/farming_pumpkin_5.png new file mode 100644 index 0000000000000000000000000000000000000000..59fa78eb0ebc9e5d8dc3b6989e3eeb22cb31eaec GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDUZEWQfHDplmV$cs`(vRn{ zC{lK9mbje2l-$UFDw`p*i|>CiWA`%Ux6>K^Z(;aEpoGJUMCgst%iBYSoiThlDXj%CUQ)lD;i+8IlN{DK)Ap4~_T za+*9{977~7_x1&fF$HosU6o9GvGnP`aOr(f4*woDa;N>j|1fRGy7^H{?AM%@4FZlj*U%tHD7ss+=p9Sqg-4sN=MbFGNbZ3n@HQCr> zqVb&@-sfVYXD=6YjJ$I8?Bu>9TMW$jFSee&a_r$k235P@Tdc})w{qqHUBlq%>gTe~ HDWM4fdKz5H literal 0 HcmV?d00001 diff --git a/textures/farming_pumpkin_7.png b/textures/farming_pumpkin_7.png new file mode 100644 index 0000000000000000000000000000000000000000..79190e09ec135158eee1ff6ccff404b3c09eed69 GIT binary patch literal 271 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!aez;Vs|5oCwkx;TbNTrTaqEyS$I;T)T^NHpy4|Mj|Mzpu>vbYQ|^)hVCM&(t~iHbw0(RbML= zmah3Gt@h`Gi|4L%M=-F@xfeKtWy7R~$2Swo1IjP6&g=HLl(*IF>4wKnd!{A5+gUm{ zeO2c63q7``KVG~!Hj}e9$8>Ya&pUN)FS=&PPvAV>%2j@Hzg29TicRNJ-V9yVJMnV@ RI)ScY@O1TaS?83{1OR`rVs`)l literal 0 HcmV?d00001 diff --git a/textures/farming_pumpkin_8.png b/textures/farming_pumpkin_8.png new file mode 100644 index 0000000000000000000000000000000000000000..b941442cc236ebf2b29362ba98433dd05c6f9a0e GIT binary patch literal 275 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!aez;Vs|5oCn*+_C z`i?bO?9oT2zJA@Z_tzc=+bvnTM?Hg^x>{FESN3CEJB^3;d&QSkaX!YTv5T@7-nA%Y VQ{5#yV>i%c44$rjF6*2UngHtQU9$iH literal 0 HcmV?d00001 diff --git a/textures/farming_pumpkin_bread.png b/textures/farming_pumpkin_bread.png new file mode 100644 index 0000000000000000000000000000000000000000..0dfae08fd83a2c6ee7a88c67adaceb5f2882215f GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFv4DbnY1=5pT85V>v?8;?1-@tu$ zisZX(_P0(nyg8fu>ewF_r}R1v5B2yO9RugnGI-hHzX@PHam-GLS`c)I$ztaD0e0stQ@K=%Lu literal 0 HcmV?d00001 diff --git a/textures/farming_pumpkin_dough.png b/textures/farming_pumpkin_dough.png new file mode 100644 index 0000000000000000000000000000000000000000..62ea7a65ffadc1aac24e9c9fde35a25130509537 GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa4)6(aRbXIvzcu3H!Gcd`y1!gn z{PpUluQ&F6yM6lm{R_f6o7#cO7)yfuf*Bm1-ADs+LOfj@LpZJ{Cmdj(5gW^UprpcM z7iWjyyn7QbzB_Q>fK*^$T%6pq0|`O5xKg$*Gn%o?ZHxPs>1@U`mbC3!w%c0TNMiSn p9ZRgNcN-XJNJ?upt zSecodDm-G9dCc&sLW*P8$K|^|vZx;B)p5&rIM643&|^cT=HE-lU3U7d+N8Qo$gA|H zSY+K|r~8&C8lHFdC)`~uTT$6DEzw7rGke+e$Nzk67JE&qcKy=Pbo7tZqv^5tx92-X zyg1_Ay8ag1O#d+oNvf3iChV#LI+4NC)z4*} HQ$iB}bbn|M literal 0 HcmV?d00001 diff --git a/textures/farming_pumpkin_face_on.png b/textures/farming_pumpkin_face_on.png new file mode 100644 index 0000000000000000000000000000000000000000..fa71c9d474c140e8b123c3da04fe468ad6d2846f GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHF4e$wZZ3$?r(G2H0m{6C-J(F)E-+c>|UVfcU7{{PEnvHLM=ff{Ffx;Tb#TxXoXkpG{7 zFZ;nkr+4;FRNM&)qp<%wXz! z_TGcLcbpl_&c2n)cnD+&$;vUOEe=y;U`|#uOKLU(`c2TtSXo$*VNJ5p$41TVzktqU N@O1TaS?83{1OVymUPS-^ literal 0 HcmV?d00001 diff --git a/textures/farming_pumpkin_side.png b/textures/farming_pumpkin_side.png new file mode 100644 index 0000000000000000000000000000000000000000..2d30f203570c434bdb20c0deaa49834c4a2ff3a4 GIT binary patch literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa4)6(aZ3$KDxKFNRRa>P%mRikY6x^!?PP{ zK#rHEi(?4K_2h&D+!4(p3R^BsQZP`y6MLFlXUV1~=R4UZ_;}Vnd&B9#Hu>_&+U<@! z$7WUP8#{VQ*yi1Dkx<@f&Uh$c9 A`Tzg` literal 0 HcmV?d00001 diff --git a/textures/farming_pumpkin_top.png b/textures/farming_pumpkin_top.png new file mode 100644 index 0000000000000000000000000000000000000000..79283454ef1f0d5ab418e9c6366b49a5783c1579 GIT binary patch literal 272 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU`;dA-N*M-pFDn@;q;uFcjnxzz0I)a=A7GmZ~ooGP&xPHHo@vWL{YYc}}S{MaAoXQ!pi&F 0 then + if not minetest.is_protected(pos, player_name) then + minetest.set_node(pos, {name = "flowers:waterlily", + param2 = math.random(0, 3)}) + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + else + minetest.chat_send_player(player_name, "Node is protected") + minetest.record_protection_violation(pos, player_name) + end + end + + return itemstack + end +}) + +--flowers +local function add_simple_flower(name, desc, box, f_groups) + -- Common flowers' groups + f_groups.snappy = 3 + f_groups.flower = 1 + f_groups.flora = 1 + f_groups.attached_node = 1 + + minetest.override_item("flowers:" .. name, { + description = desc, + drawtype = "plantlike", + waving = 1, + tiles = {"flowers_" .. name .. ".png^[colorize:white:140"}, + inventory_image = "flowers_" .. name .. ".png^[colorize:white:140", + wield_image = "flowers_" .. name .. ".png^[colorize:white:140", + sunlight_propagates = true, + paramtype = "light", + walkable = false, + buildable_to = true, + stack_max = 99, + groups = f_groups, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = box + } + }) +end + +flowers.datas = { + {"rose", "Rose", {-0.15, -0.5, -0.15, 0.15, 0.3, 0.15}, {color_red = 1, flammable = 1}}, + {"tulip", "Orange Tulip", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_orange = 1, flammable = 1}}, + {"dandelion_yellow", "Yellow Dandelion", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_yellow = 1, flammable = 1}}, + {"geranium", "Blue Geranium", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_blue = 1, flammable = 1}}, + {"viola", "Viola", {-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}, {color_violet = 1, flammable = 1}}, + {"dandelion_white", "White dandelion", {-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}, {color_white = 1, flammable = 1}} +} + +for _,item in pairs(flowers.datas) do + add_simple_flower(unpack(item)) +end + + +-- +-- Liquids +-- + +minetest.override_item("default:water_source", { + description = "Water Source", + drawtype = "liquid", + --drawtype = "solid", + tiles = { + { + name = "default_ice.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + }, + special_tiles = { + -- New-style water source material (mostly unused) + { + name = "default_water_source_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + backface_culling = false, + }, + }, + --alpha = 160, + alpha = 210, + paramtype = "light", + walkable = false, + climbable = true, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "source", + liquid_alternative_flowing = "default:water_flowing", + liquid_alternative_source = "default:water_source", + liquid_viscosity = 4, + post_effect_color = {a = 213, r = 30, g = 60, b = 90}, + groups = {water = 3, liquid = 3, puts_out_fire = 1}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.override_item("default:water_flowing", { + description = "Flowing Water", + drawtype = "flowingliquid", + tiles = {"default_water.png"}, + special_tiles = { + { + name = "default_ice.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + { + name = "default_water_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + }, + alpha = 210, + paramtype = "light", + paramtype2 = "flowingliquid", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "flowing", + liquid_alternative_flowing = "default:water_flowing", + liquid_alternative_source = "default:water_source", + liquid_viscosity = 2, + post_effect_color = {a = 203, r = 30, g = 60, b = 90}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, + not_in_creative_inventory = 1}, + sounds = default.node_sound_glass_defaults(), +}) + + +--WINTER CRAFTS + +minetest.register_craft({ + output = "mt_seasons:gift_box_".. clrs[i][1] .. " 1", + recipe = { + {'default:paper', 'default:apple', 'default:paper'}, + {'default:paper', 'default:diamond', 'default:paper'}, + { "dye:" .. clrs[i][1], 'group:wool' , "dye:" .. clrs[i][1]}, + + } +})