From 6746a151c1a0e35e0c2ac113aefff56f8f14f6c1 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Thu, 12 May 2016 17:00:48 +0100 Subject: [PATCH] Added Apple Cider --- README.md | 11 +++++------ init.lua | 34 ++++++++++++++++++++++++++++++++-- textures/wine_cider_glass.png | Bin 0 -> 325 bytes 3 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 textures/wine_cider_glass.png diff --git a/README.md b/README.md index 4aab13c..46d07cb 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,8 @@ This mod adds a wine barrel used to ferment grapes into glasses of wine, 9 of wh Changelog: -0.1 - Initial release -0.2 - Added protection checks to barrel -0.3 - New barrel model from cottages mod (thanks Napiophelios) - - Wine glass can be placed -0.4 - Added ability to ferment barley from farming redo into beer - and also honey from mobs redo into honey mead \ No newline at end of file +- 0.1 - Initial release +- 0.2 - Added protection checks to barrel +- 0.3 - New barrel model from cottages mod (thanks Napiophelios), also wine glass can be placed +- 0.4 - Added ability to ferment barley from farming redo into beer and also honey from mobs redo into honey mead +- 0.5 - Added apple cider diff --git a/init.lua b/init.lua index 83ce799..a9b0d8f 100644 --- a/init.lua +++ b/init.lua @@ -54,7 +54,7 @@ minetest.register_craft({ -- glass of beer (thanks to RiverKpocc @ deviantart.com for image) minetest.register_node("wine:glass_beer", { - description = "Glass of Beer", + description = "Beer", drawtype = "torchlike", --"plantlike", visual_scale = 0.8, tiles = {"wine_beer_glass.png"}, @@ -75,7 +75,7 @@ minetest.register_node("wine:glass_beer", { -- glass of honey mead minetest.register_node("wine:glass_mead", { - description = "Glass of Honey-Mead", + description = "Honey-Mead", drawtype = "plantlike", visual_scale = 0.8, tiles = {"wine_mead_glass.png"}, @@ -94,6 +94,27 @@ minetest.register_node("wine:glass_mead", { on_use = minetest.item_eat(1), }) +-- glass of apple cider +minetest.register_node("wine:glass_cider", { + description = "Apple Cider", + drawtype = "plantlike", + visual_scale = 0.8, + tiles = {"wine_cider_glass.png"}, + inventory_image = "wine_cider_glass.png", + wield_image = "wine_cider_glass.png", + paramtype = "light", + is_ground_content = false, + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.2, -0.5, -0.2, 0.2, 0.3, 0.2} + }, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_glass_defaults(), + on_use = minetest.item_eat(2), +}) + -- Wine barrel winebarrel_formspec = "size[8,9]" .. default.gui_bg..default.gui_bg_img..default.gui_slots @@ -211,6 +232,7 @@ minetest.register_abm({ -- does it contain grapes or barley? if not inv:contains_item("src", ItemStack("farming:grapes")) and not inv:contains_item("src", ItemStack("farming:barley")) + and not inv:contains_item("src", ItemStack("default:apple")) and not inv:contains_item("src", ItemStack("mobs:honey")) then return end @@ -218,6 +240,7 @@ minetest.register_abm({ -- is barrel full if not inv:room_for_item("dst", "wine:glass_wine") or not inv:room_for_item("dst", "wine:glass_beer") + or not inv:room_for_item("dst", "wine:glass_cider") or not inv:room_for_item("dst", "wine:glass_mead") then meta:set_string("infotext", "Fermenting Barrel (FULL)") return @@ -255,6 +278,13 @@ minetest.register_abm({ inv:remove_item("src", "mobs:honey") inv:add_item("dst", "wine:glass_mead") meta:set_float("status", 0.0) + + elseif inv:contains_item("src", "default:apple") then + + --fermented (take apple and add glass of cider) + inv:remove_item("src", "default:apple") + inv:add_item("dst", "wine:glass_cider") + meta:set_float("status", 0.0) end if inv:is_empty("src") then diff --git a/textures/wine_cider_glass.png b/textures/wine_cider_glass.png new file mode 100644 index 0000000000000000000000000000000000000000..57560c2f3fa9b04a22b8927a04d1405cba4d9a50 GIT binary patch literal 325 zcmV-L0lNN)P)ikq?^@yy?@O{E6Sh~aehn_0rC52p$4O{Rz zUof4`I6m65j0gZ8J1?pi+%OtO)Ebu@mbbONb{fHG5VKQyf>QPu1O|8uKmP84=-2T* zxioW}Aa?JlR1U1Q6aYxaHdD}Qca`&chVMy=?ovS%CxqjK#r`eTld`pz0wWWf!Sk=z z0gA4~_avfUr`7JNRD#X)RLvAjnE#L9JEAzz*2XCSKjr|?rl1|9Am}L9&9mh@E0^gD X-f><29~YY^00000NkvXXu0mjf8po5N literal 0 HcmV?d00001