@ -49,7 +49,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
||||
* [jukebox][] ([WTFPL / CC0][lic.jukebox]) -- version: [0d871f2 Git][ver.jukebox] *2020-03-11*
|
||||
* [trampoline][] ([GPL][lic.gpl3.0]) -- version: [0.3][ver.trampoline] *2021-04-28*
|
||||
* [trash_can][] ([MIT][lic.trash_can]) -- version: [423b0f2 Git][ver.trash_can] *2020-08-12*
|
||||
* [waffles][] ([MIT][lic.waffles]) -- version: [15bcdce Git][ver.waffles] *2018-05-13* (patched)
|
||||
* [waffles][] ([MIT][lic.waffles]) -- version: [f9ee996 Git][ver.waffles] *2024-01-01*
|
||||
* horticulture/
|
||||
* [farming][] ([MIT][lic.farming]) -- version: [2021-07-18][ver.farming]
|
||||
* inventory/
|
||||
@ -692,7 +692,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
||||
[ver.trash_can]: https://github.com/minetest-mods/trash_can/tree/423b0f2
|
||||
[ver.tree_monster]: https://github.com/AntumMT/mod-mob_tree_monster/tree/f2977ff
|
||||
[ver.unifieddyes]: https://gitlab.com/VanessaE/unifieddyes/tags/2021-03-26-1
|
||||
[ver.waffles]: https://github.com/GreenXenith/waffles/tree/15bcdce
|
||||
[ver.waffles]: https://github.com/GreenXenith/waffles/tree/f9ee9962795a44585a7584af34226acaa8bf9d77
|
||||
[ver.wardrobe]: https://github.com/AntumMT/mod-wardrobe/tree/0500a78
|
||||
[ver.wdata]: https://github.com/AntumMT/mod-wdata/releases/tag/v1.1
|
||||
[ver.whinny]: https://github.com/AntumMT/mod-whinny/tree/32f2d9f
|
||||
|
@ -1,19 +1,18 @@
|
||||
MIT Copyright 2018 GreenDimond
|
||||
MIT Copyright 2021 GreenXenith
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
@ -1,92 +1,53 @@
|
||||
__ __ __ __ _
|
||||
\ \ / /_ _ / _|/ _| | ___ ___
|
||||
\ \ /\ / / _` | |_| |_| |/ _ \/ __|
|
||||
\ V V / (_| | _| _| | __/\__ \
|
||||
\_/\_/ \__,_|_| |_| |_|\___||___/ ~By GreenDimond
|
||||
# Waffles
|
||||
_"And in the mornin', I'm makin' waffles!" - Donkey, Shrek 2001_
|
||||
|
||||

|
||||
|
||||
This mod adds waffles, as well as wafflemakers and batter. The waffle batter
|
||||
is put into the waffles maker, cooked, and turns into a waffle. That waffle
|
||||
can then turn into 4 smaller waffles.
|
||||
### _Waffles for Dummies:_
|
||||
1. Obtain a waffle maker.
|
||||
2. Place the waffle maker.
|
||||
3. Obtain batter.
|
||||
4. Open the waffle maker.
|
||||
5. Place some batter in the waffle maker.
|
||||
6. Close the waffle maker.
|
||||
7. Wait for the waffle maker to open.
|
||||
8. Take the cooked waffle.
|
||||
9. Consume the cooked waffle.
|
||||
10. Repeat from step 5.
|
||||
|
||||
### Recipes
|
||||
_All listed items are configurable. See [Configuration](#configuration)_.
|
||||
|
||||
**Mod Contains:**
|
||||
* Wafflemaker
|
||||
* Toaster (homedecor toaster if homedecor is present)
|
||||
* Package of Toaster Waffles
|
||||
* Toaster Waffle
|
||||
* Slice of Bread
|
||||
* Toast
|
||||
* Large Waffle
|
||||
* Small Waffle
|
||||
* Waffle Batter (in a can)
|
||||
`waffles:waffle_maker`:
|
||||
```
|
||||
C = casing (default:tin_ingot)
|
||||
W = wiring (default:steel_ingot)
|
||||
H = heating (default:copper_ingot)
|
||||
|
||||
**How the Wafflemaker Works:**
|
||||
* Place a wafflemaker
|
||||
* Punch it to open
|
||||
* Hold a can of batter, and punch the wafflemaker
|
||||
* Punch again to close
|
||||
* After 5 seconds, the wafflemaker will open with a cooked waffle
|
||||
* Punch again to retrieve waffle
|
||||
+-+-+-+
|
||||
|C|C|C|
|
||||
+-+-+-+
|
||||
|W| |W|
|
||||
+-+-+-+
|
||||
|C|H|C|
|
||||
+-+-+-+
|
||||
```
|
||||
|
||||
**How the Toaster Works:**
|
||||
* Place a toaster
|
||||
* Hold some bread or a package of toaster waffles
|
||||
* Punch the toaster
|
||||
* Punch again to start toasting
|
||||
* After a few seconds, 2 toaster waffles or pieces of toast will pop up
|
||||
* Punch again to retrieve
|
||||
`waffles:waffle_batter_3`:
|
||||
```
|
||||
(Shapeless)
|
||||
farming:flour, farming:flour, bucket:bucket_water
|
||||
|
||||
**Important stuff:**
|
||||
* A can of waffle batter can only be used 3 times
|
||||
* A package of toaster waffles yeilds 6 toaster waffles (3 uses on toaster)
|
||||
* The wafflemaker has a different recipe if homedecor is enabled
|
||||
* If homedecor is enabled, this mod will not register a toaster. Use the
|
||||
homedecor toaster
|
||||
* The wafflemaker produces a *large* waffle, which gives you 8 hp
|
||||
(four hearts) when eaten
|
||||
* The large waffle can be placed in your crafting grid to produce
|
||||
4 *smaller* waffles
|
||||
* Each small waffle gives you 2 hp (one heart)
|
||||
* Each toaster waffle gives you 4 hp (two hearts)
|
||||
This recipe is completely configurable.
|
||||
```
|
||||
|
||||
**Crafting:**
|
||||
`waffles:waffle_stack`: 8 `waffles:waffle` (Shapeless)
|
||||
|
||||
* Waffle Maker:
|
||||
S = Steel Ingot C = Copper Ingot F = Furnace
|
||||
|S||S||S|
|
||||
|C||F|
|
||||
|S||S||S|
|
||||
(reverse works aswell)
|
||||
`waffles:waffle_stack_short`: 4 `waffles:waffle` (Shapeless)
|
||||
|
||||
* Waffle Maker Alternate (if Homedecor is present)
|
||||
PS = Plastic Sheet PC = Power Crystal C = Copper Strip H = Heating Element
|
||||
|PS||PS||PS|
|
||||
|PC|
|
||||
|C ||H ||PS|
|
||||
(reverse works aswell)
|
||||
### Configuration
|
||||
|
||||
* Toaster:
|
||||
S = Steel Ingot C = Copper Ingot L = Lava Bucket
|
||||
|S||C||S|
|
||||
|S||L||S|
|
||||
(homedecor recipe is different. Check the homdecor mod for it's recipe)
|
||||
|
||||
* Waffle Batter
|
||||
F = Flour B = Bucket with Water
|
||||
|F|
|
||||
|F|
|
||||
|B|
|
||||
(can go anywhere in grid as long as they are above each other and in that order)
|
||||
|
||||
* Package of Toaster Waffles
|
||||
P = Paper B = Waffle Batter
|
||||
| ||P|| |
|
||||
|P||B||P|
|
||||
| ||p|| |
|
||||
|
||||
There are separate models, but only one is obtainable from the creative inventory.
|
||||
**DO NOT** place waffles:wafflemaker_closed_full if you have used /giveme. It is
|
||||
not diggable and can only be removed with worldedit or an admin pick.
|
||||
**Warning:** If you leave the world while a wafflemaker or toaster is cooking, it
|
||||
will be stuck that way when you return (worldedit/adminpick required).
|
||||
* `waffles.craftitem_maker_casing`: Waffle maker casing craftitem.
|
||||
* `waffles.craftitem_maker_wiring`: Waffle maker wiring craftitem.
|
||||
* `waffles.craftitem_maker_heating`: Waffle maker heating craftitem.
|
||||
* `waffles.waffle_batter_recipe`: Waffle batter recipe craftitems. See `settingtypes.txt`.
|
||||
|
@ -1,61 +0,0 @@
|
||||
local S = waffles.intllib
|
||||
|
||||
-- Waffle Batter
|
||||
local batter = {}
|
||||
|
||||
local function remove_empty_can(player)
|
||||
local inv = player:get_inventory()
|
||||
local ret = inv:remove_item("main", ItemStack("waffles:waffle_batter_3"))
|
||||
local itemstack = inv:get_stack("main", player:get_wield_index())
|
||||
local was_success = ret:get_count() == 1
|
||||
return itemstack, was_success
|
||||
end
|
||||
|
||||
|
||||
function batter.register(filled, original_def)
|
||||
local group
|
||||
if filled == 1 then
|
||||
group = 0
|
||||
else
|
||||
group = 1
|
||||
end
|
||||
minetest.register_tool("waffles:waffle_batter_"..filled, {
|
||||
description = S("Waffle Batter"),
|
||||
inventory_image = "waffle_batter_"..filled..".png",
|
||||
wield_image = "waffle_batter_"..filled..".png",
|
||||
stack_max = 1,
|
||||
groups = {not_in_creative_inventory = group},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = pointed_thing.under
|
||||
local pname = user:get_player_name()
|
||||
|
||||
if minetest.is_protected(pos, pname) then
|
||||
minetest.record_protection_violation(pos, pname)
|
||||
return
|
||||
end
|
||||
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
if node.name == "waffles:wafflemaker_open_empty" then
|
||||
|
||||
minetest.set_node(pos, {name = "waffles:wafflemaker_open_full", param2 = node.param2})
|
||||
if filled == 3 then
|
||||
itemstack, was_success = remove_empty_can(user)
|
||||
return itemstack
|
||||
else
|
||||
return ItemStack("waffles:waffle_batter_"..filled + 1)
|
||||
end
|
||||
end
|
||||
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
batter.register(1)
|
||||
batter.register(2)
|
||||
batter.register(3)
|
@ -1,97 +0,0 @@
|
||||
--+--Crafting Recipes--+--
|
||||
|
||||
--Check for Homedecor before craft recipe is defined
|
||||
if minetest.get_modpath("homedecor") then
|
||||
|
||||
--Use alternate recipe if Homedecor is enabled
|
||||
--Waffle Maker (with Homedecor enabled)
|
||||
minetest.register_craft({
|
||||
output = 'waffles:wafflemaker',
|
||||
recipe = {
|
||||
{'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting'},
|
||||
{'', '', 'homedecor:power_crystal'},
|
||||
{'homedecor:plastic_sheeting', 'homedecor:heating_element', 'homedecor:copper_strip'},
|
||||
}
|
||||
})
|
||||
|
||||
--Reverse Recipe for Waffle Maker (with Homedecor enabled)
|
||||
minetest.register_craft({
|
||||
output = 'waffles:wafflemaker',
|
||||
recipe = {
|
||||
{'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting'},
|
||||
{'homedecor:power_crystal', '', ''},
|
||||
{'homedecor:copper_strip', 'homedecor:heating_element', 'homedecor:plastic_sheeting'},
|
||||
}
|
||||
})
|
||||
|
||||
else
|
||||
|
||||
--When Homedecor is not enabled, use these recipes
|
||||
--Waffle Maker
|
||||
minetest.register_craft({
|
||||
output = 'waffles:wafflemaker',
|
||||
recipe = {
|
||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||
{'', 'default:furnace', 'default:copper_ingot'},
|
||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
--Reverse Recipe for Waffle Maker
|
||||
minetest.register_craft({
|
||||
output = 'waffles:wafflemaker',
|
||||
recipe = {
|
||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||
{'default:copper_ingot', 'default:furnace', ''},
|
||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
--Toaster (Only Available if Homedecor is Not Enabled, Uses Homedecor Toaster Craft Instead if Homedecor is Enabled)
|
||||
minetest.register_craft({
|
||||
output = 'waffles:toaster',
|
||||
recipe = {
|
||||
{'default:steel_ingot', 'default:copper_ingot', 'default:steel_ingot'},
|
||||
{'default:steel_ingot', 'bucket:bucket_lava', 'default:steel_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
--Recipes that should appear regardless Homedecor is installed or not goes here
|
||||
--Waffle Batter
|
||||
minetest.register_craft({
|
||||
output = 'waffles:waffle_batter_1',
|
||||
recipe = {
|
||||
{'farming:flour'},
|
||||
{'farming:flour'},
|
||||
{'bucket:bucket_water'},
|
||||
}
|
||||
})
|
||||
|
||||
--Small Waffles
|
||||
minetest.register_craft({
|
||||
output = 'waffles:small_waffle 4',
|
||||
recipe = {
|
||||
{'waffles:large_waffle'},
|
||||
}
|
||||
})
|
||||
|
||||
--Slice of Bread (only if not farming one used)
|
||||
if not minetest.registered_items["farming:bread_slice"] then
|
||||
minetest.register_craft({
|
||||
output = 'waffles:breadslice 2',
|
||||
type = "shapeless",
|
||||
recipe = {"farming:bread"}
|
||||
})
|
||||
end
|
||||
|
||||
--Package of Toaster Waffles
|
||||
minetest.register_craft({
|
||||
output = 'waffles:toaster_waffle_pack',
|
||||
recipe = {
|
||||
{'', 'default:paper', ''},
|
||||
{'default:paper', 'waffles:waffle_batter_1', 'default:paper'},
|
||||
{'', 'default:paper', ''},
|
||||
}
|
||||
})
|
@ -1,4 +0,0 @@
|
||||
default
|
||||
homedecor?
|
||||
intllib?
|
||||
farming?
|
@ -1 +0,0 @@
|
||||
Adds stuff to make waffles (and the waffles themsleves of course). See README.md for details.
|
@ -1,10 +1,20 @@
|
||||
waffles = {}
|
||||
local MODNAME = minetest.get_current_modname()
|
||||
local MODPATH = minetest.get_modpath(MODNAME)
|
||||
local function include(filename, ...) return assert(loadfile(MODPATH .. "/" .. filename))(...) end
|
||||
|
||||
-- Load support for intllib.
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
local waffles = {}
|
||||
|
||||
waffles.intllib = S
|
||||
dofile(minetest.get_modpath("waffles").."/nodes.lua")
|
||||
dofile(minetest.get_modpath("waffles").."/batter.lua")
|
||||
dofile(minetest.get_modpath("waffles").."/crafts.lua")
|
||||
-- Return default sounds if available
|
||||
waffles.default_sounds = function(name)
|
||||
if minetest.global_exists("default") and default[name] then return default[name]() end
|
||||
end
|
||||
|
||||
waffles.setting_or = function(name, default)
|
||||
local set = minetest.settings:get(MODNAME .. "." .. name)
|
||||
return set ~= "" and set or default
|
||||
end
|
||||
|
||||
include("waffle.lua", waffles)
|
||||
include("maker.lua", waffles)
|
||||
|
||||
include("legacy.lua")
|
||||
|
@ -1,45 +0,0 @@
|
||||
|
||||
-- Fallback functions for when `intllib` is not installed.
|
||||
-- Code released under Unlicense <http://unlicense.org>.
|
||||
|
||||
-- Get the latest version of this file at:
|
||||
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
|
||||
|
||||
local function format(str, ...)
|
||||
local args = { ... }
|
||||
local function repl(escape, open, num, close)
|
||||
if escape == "" then
|
||||
local replacement = tostring(args[tonumber(num)])
|
||||
if open == "" then
|
||||
replacement = replacement..close
|
||||
end
|
||||
return replacement
|
||||
else
|
||||
return "@"..open..num..close
|
||||
end
|
||||
end
|
||||
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
|
||||
end
|
||||
|
||||
local gettext, ngettext
|
||||
if minetest.get_modpath("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
gettext, ngettext = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
gettext = intllib.Getter()
|
||||
end
|
||||
end
|
||||
|
||||
-- Fill in missing functions.
|
||||
|
||||
gettext = gettext or function(msgid, ...)
|
||||
return format(msgid, ...)
|
||||
end
|
||||
|
||||
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
|
||||
return format(n==1 and msgid or msgid_plural, ...)
|
||||
end
|
||||
|
||||
return gettext, ngettext
|
28
mods/furniture/waffles/legacy.lua
Normal file
@ -0,0 +1,28 @@
|
||||
local MODNAME = minetest.get_current_modname()
|
||||
|
||||
local aliases = {
|
||||
["wafflemaker"] = "waffle_maker",
|
||||
["wafflemaker_open_empty"] = "waffle_maker_open",
|
||||
["wafflemaker_open_full"] = "waffle_maker_open",
|
||||
["wafflemaker_closed_full"] = "waffle_maker",
|
||||
["wafflemaker_open_done"] = "waffle_maker_open",
|
||||
["large_waffle"] = "waffle",
|
||||
["small_waffle"] = "waffle_quarter",
|
||||
["toaster"] = "waffle_maker",
|
||||
["breadslice"] = "waffle_quarter",
|
||||
["toast"] = "waffle_quarter",
|
||||
["toaster_with_breadslice"] = "waffle_maker",
|
||||
["toaster_toasting_breadslice"] = "waffle_maker",
|
||||
["toaster_with_toast"] = "waffle_maker",
|
||||
["toaster_waffle"] = "waffle_quarter",
|
||||
["toaster_waffle_pack"] = "waffle",
|
||||
["toaster_waffle_pack_4"] = "waffle",
|
||||
["toaster_waffle_pack_2"] = "waffle_quarter",
|
||||
["toaster_with_waffle"] = "waffle_maker",
|
||||
["toaster_toasting_waffle"] = "waffle_maker",
|
||||
["toaster_with_toasted_waffle"] = "waffle_maker",
|
||||
}
|
||||
|
||||
for old, new in pairs(aliases) do
|
||||
minetest.register_alias(MODNAME .. ":" .. old, MODNAME .. ":" .. new)
|
||||
end
|
13
mods/furniture/waffles/locale/de.tr
Normal file
@ -0,0 +1,13 @@
|
||||
# waffles
|
||||
# German Translation
|
||||
|
||||
Waffle Maker=Waffeleisen
|
||||
Waffle Maker (Open)=Waffeleisen (geöffnet)
|
||||
|
||||
Waffle=Waffel
|
||||
Quarter of Waffle=Waffelviertel
|
||||
|
||||
Stack of Waffles=Waffelstapel
|
||||
Short Stack of Waffles=Kleiner Waffelstapel
|
||||
|
||||
Waffle Batter=Waffelteig
|
13
mods/furniture/waffles/locale/es.tr
Normal file
@ -0,0 +1,13 @@
|
||||
# waffles
|
||||
# Spanish Translation
|
||||
|
||||
Waffle Maker=Wafflera
|
||||
Waffle Maker (Open)=Wafflera (Abierta)
|
||||
|
||||
Waffle=Waffle
|
||||
Quarter of Waffle=Cuarto de waffle
|
||||
|
||||
Stack of Waffles=Pila de waffles
|
||||
Short Stack of Waffles=Pila de waffles pequeña
|
||||
|
||||
Waffle Batter=Masa para waffles
|
@ -1,107 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-04-29 21:40+0200\n"
|
||||
"PO-Revision-Date: 2017-04-29 21:56+0200\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.12\n"
|
||||
"Last-Translator: fat115 <fat115@framasoft.org>\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"Language: fr_FR\n"
|
||||
|
||||
#: batter.lua
|
||||
msgid "Waffle Batter"
|
||||
msgstr "Pâte à gaufre"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Waffle Maker"
|
||||
msgstr "Moule à gaufres"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Open Waffle Maker (empty)"
|
||||
msgstr "Moule à gaufres ouvert (vide)"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Open Waffle Maker (full)"
|
||||
msgstr "Moule à gaufres ouvert (plein)"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Closed Waffle Maker (full)"
|
||||
msgstr "Moule à gaufres fermé (plein)"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Open Waffle Maker (done)"
|
||||
msgstr "Moule à gaufres ouvert (cuisson terminée)"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Large Waffle"
|
||||
msgstr "Grande gaufre"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Small Waffle"
|
||||
msgstr "Petite gaufre"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster"
|
||||
msgstr "Grille-pain"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Bread"
|
||||
msgstr "Pain"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Slice of Bread"
|
||||
msgstr "Tranche de pain"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toast"
|
||||
msgstr "Pain grillé"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster with Breadslice"
|
||||
msgstr "Grille-pain avec une tranche de pain"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster Toasting Slice of Bread"
|
||||
msgstr "Grille-pain grillant une tranche de pain"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster with Toast"
|
||||
msgstr "Grille-pain avec une tranche de pain grillée"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster Waffle"
|
||||
msgstr "Gaufre à griller"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Pack of 6 Toaster Waffles"
|
||||
msgstr "Pack de 6 gaufres à griller"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Pack of 4 Toaster Waffles"
|
||||
msgstr "Pack de 4 gaufres à griller"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Pack of 2 Toaster Waffles"
|
||||
msgstr "Pack de 2 gaufres à griller"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster with Waffle"
|
||||
msgstr "Grille-pain avec une gaufre"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster Toasting Waffle"
|
||||
msgstr "Grille-pain grillant une gaufre"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster with Toasted Waffle"
|
||||
msgstr "Grille-pain avec une gaufre grillée"
|
13
mods/furniture/waffles/locale/fr.tr
Normal file
@ -0,0 +1,13 @@
|
||||
# waffles
|
||||
# French Translation
|
||||
|
||||
Waffle Maker=Gaufrier
|
||||
Waffle Maker (Open)=Gaufrier (Ouverte)
|
||||
|
||||
Waffle=Gaufre
|
||||
Quarter of Waffle=Quart de Gaufre
|
||||
|
||||
Stack of Waffles=Pile de Gaufres
|
||||
Short Stack of Waffles=Petite Pile de Gaufres
|
||||
|
||||
Waffle Batter=Pâte à gaufre
|
@ -1,107 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: waffles\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-04-29 20:52+0200\n"
|
||||
"PO-Revision-Date: 2017-11-17 01:16+0800\n"
|
||||
"Language-Team: muhdnurhidayat <mnh48.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.0.4\n"
|
||||
"Last-Translator: \n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"Language: ms\n"
|
||||
|
||||
#: batter.lua
|
||||
msgid "Waffle Batter"
|
||||
msgstr "Bater Wafel"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Waffle Maker"
|
||||
msgstr "Pembakar Wafel"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Open Waffle Maker (empty)"
|
||||
msgstr "Pembakar Wafel Terbuka (kosong)"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Open Waffle Maker (full)"
|
||||
msgstr "Pembakar Wafel Terbuka (berisi bater)"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Closed Waffle Maker (full)"
|
||||
msgstr "Pembakar Wafel Tertutup (berisi bater)"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Open Waffle Maker (done)"
|
||||
msgstr "Pembakar Wafel Terbuka (siap memasak)"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Large Waffle"
|
||||
msgstr "Wafel Besar"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Small Waffle"
|
||||
msgstr "Wafel Kecil"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster"
|
||||
msgstr "Pembakar Roti"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Bread"
|
||||
msgstr "Roti"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Slice of Bread"
|
||||
msgstr "Kepingan Roti"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toast"
|
||||
msgstr "Roti Bakar"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster with Breadslice"
|
||||
msgstr "Pembakar Roti dengan Kepingan Roti"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster Toasting Slice of Bread"
|
||||
msgstr "Pembakar Roti Membakar Kepingan Roti"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster with Toast"
|
||||
msgstr "Pembakar Roti dengan Roti Bakar"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster Waffle"
|
||||
msgstr "Wafel Pembakar Roti"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Pack of 6 Toaster Waffles"
|
||||
msgstr "Pek 6 Wafel Pembakar Roti"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Pack of 4 Toaster Waffles"
|
||||
msgstr "Pek 4 Wafel Pembakar Roti"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Pack of 2 Toaster Waffles"
|
||||
msgstr "Pek 2 Wafel Pembakar Roti"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster with Waffle"
|
||||
msgstr "Pembakar Roti dengan Wafel"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster Toasting Waffle"
|
||||
msgstr "Pembakar Roti membakar Wafel"
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster with Toasted Waffle"
|
||||
msgstr "Pembakar Roti dengan Wafel Bakar"
|
13
mods/furniture/waffles/locale/ms.tr
Normal file
@ -0,0 +1,13 @@
|
||||
# waffles
|
||||
# Malay Translation
|
||||
|
||||
Waffle Maker=Pembakar Wafel
|
||||
Waffle Maker (Open)=Pembakar Wafel (Terbuka)
|
||||
|
||||
Waffle=Wafel
|
||||
Quarter of Waffle=Suku Wafel
|
||||
|
||||
Stack of Waffles=Timbunan Wafel
|
||||
Short Stack of Waffles=Timbunan Wafel Pendek
|
||||
|
||||
Waffle Batter=Bater Wafel
|
@ -1,106 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-04-29 20:52+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: batter.lua
|
||||
msgid "Waffle Batter"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Waffle Maker"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Open Waffle Maker (empty)"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Open Waffle Maker (full)"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Closed Waffle Maker (full)"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Open Waffle Maker (done)"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Large Waffle"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Small Waffle"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Bread"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Slice of Bread"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toast"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster with Breadslice"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster Toasting Slice of Bread"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster with Toast"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster Waffle"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Pack of 6 Toaster Waffles"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Pack of 4 Toaster Waffles"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Pack of 2 Toaster Waffles"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster with Waffle"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster Toasting Waffle"
|
||||
msgstr ""
|
||||
|
||||
#: nodes.lua
|
||||
msgid "Toaster with Toasted Waffle"
|
||||
msgstr ""
|
13
mods/furniture/waffles/locale/template.tr
Normal file
@ -0,0 +1,13 @@
|
||||
# waffles
|
||||
# <Language> Translation
|
||||
|
||||
Waffle Maker=
|
||||
Waffle Maker (Open)=
|
||||
|
||||
Waffle=
|
||||
Quarter of Waffle=
|
||||
|
||||
Stack of Waffles=
|
||||
Short Stack of Waffles=
|
||||
|
||||
Waffle Batter=
|
216
mods/furniture/waffles/maker.lua
Normal file
@ -0,0 +1,216 @@
|
||||
local waffles = ...
|
||||
|
||||
local COOK_TIME = 6
|
||||
local MODNAME = minetest.get_current_modname()
|
||||
local S = minetest.get_translator(MODNAME)
|
||||
|
||||
-- Batter visual
|
||||
local batters = {}
|
||||
minetest.register_entity(MODNAME .. ":batter", {
|
||||
visual = "mesh",
|
||||
mesh = "waffles_waffle.obj",
|
||||
textures = {"waffles_waffle_batter.png"},
|
||||
visual_size = vector.new(10, 10, 10),
|
||||
pointable = false,
|
||||
physical = false,
|
||||
on_activate = function(self, parent)
|
||||
if parent == "" then return self.object:remove() end
|
||||
self._parent = minetest.string_to_pos(parent)
|
||||
|
||||
-- Interpolate between batter and waffle
|
||||
local cooked = minetest.get_meta(self._parent):get_float("cooked")
|
||||
self.object:set_properties({textures = {
|
||||
"waffles_waffle_batter.png^(waffles_waffle.png^[opacity:" .. cooked * 255 .. ")"
|
||||
}})
|
||||
|
||||
self.object:set_pos(vector.add(self._parent, {x = 0, y = 4 / 16, z = 0}))
|
||||
self.object:set_armor_groups({immortal = 1})
|
||||
|
||||
batters[minetest.hash_node_position(self._parent)] = self
|
||||
end,
|
||||
get_staticdata = function(self)
|
||||
return minetest.pos_to_string(self._parent)
|
||||
end,
|
||||
})
|
||||
|
||||
local function remove_batter(pos)
|
||||
local hash = minetest.hash_node_position(pos)
|
||||
if batters[hash] then
|
||||
batters[hash].object:remove()
|
||||
batters[hash] = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- Waffle maker base definition
|
||||
local def_base = {
|
||||
description = S("Waffle Maker"),
|
||||
drawtype = "mesh",
|
||||
tiles = {"waffles_waffle_maker.png"},
|
||||
use_texture_alpha = "clip",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy = 3, oddly_breakable_by_hand = 1},
|
||||
sounds = waffles.default_sounds("node_sound_metal_defaults"),
|
||||
on_construct = function(pos)
|
||||
minetest.get_meta(pos):set_float("cooked", -1)
|
||||
end,
|
||||
on_rightclick = function(pos, node, _, stack)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local cooked = meta:get_float("cooked")
|
||||
|
||||
local open = node.name:sub(-4) == "open"
|
||||
local battering = stack:get_name():match(MODNAME .. ":waffle_batter$")
|
||||
|
||||
-- Add batter if open and empty
|
||||
if open and battering and cooked < 0 then
|
||||
cooked = 0
|
||||
meta:set_float("cooked", cooked)
|
||||
stack:take_item()
|
||||
end
|
||||
|
||||
-- Toggle as long as not placing batter on open maker
|
||||
if not (open and battering) then
|
||||
minetest.swap_node(pos, {
|
||||
name = node.name:sub(1, open and -6 or -1) .. (open and "" or "_open"),
|
||||
param2 = node.param2,
|
||||
})
|
||||
|
||||
open = not open
|
||||
end
|
||||
|
||||
-- Handle batter
|
||||
if open then
|
||||
if cooked > -1 and not batters[minetest.hash_node_position(pos)] then
|
||||
minetest.add_entity(pos, MODNAME .. ":batter", minetest.pos_to_string(pos))
|
||||
end
|
||||
else
|
||||
remove_batter(pos)
|
||||
minetest.get_node_timer(pos):start(0.5)
|
||||
end
|
||||
|
||||
return stack
|
||||
end,
|
||||
on_punch = function(pos, node, puncher, ...)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local cooked = meta:get_float("cooked")
|
||||
|
||||
if cooked > -1 then
|
||||
local inv = puncher:get_inventory()
|
||||
|
||||
if cooked <= 0.2 or cooked >= 0.8 then
|
||||
local stack = ItemStack(MODNAME .. (cooked <= 0.2 and ":waffle_batter" or ":waffle"))
|
||||
|
||||
if inv:room_for_item("main", stack) then
|
||||
inv:add_item("main", stack)
|
||||
cooked = -1
|
||||
end
|
||||
end
|
||||
|
||||
if cooked < 0 then remove_batter(pos) end
|
||||
meta:set_float("cooked", cooked)
|
||||
end
|
||||
|
||||
return minetest.node_punch(pos, node, puncher, ...)
|
||||
end,
|
||||
on_timer = function(pos)
|
||||
if minetest.get_node(pos).name:sub(-4) == "open" then return end
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
local cooked = meta:get_float("cooked")
|
||||
|
||||
if cooked > -1 and cooked < 1 then
|
||||
meta:set_float("cooked", math.min(cooked + 0.5 / COOK_TIME, 1))
|
||||
minetest.get_node_timer(pos):start(0.5)
|
||||
|
||||
if meta:get_float("cooked") == 1 then
|
||||
minetest.add_particlespawner({
|
||||
amount = math.random(6, 10),
|
||||
time = 3,
|
||||
|
||||
minpos = vector.add(pos, {x = -0.5, y = 0, z = -0.5}),
|
||||
maxpos = vector.add(pos, {x = 0.5, y = 0, z = 0.5}),
|
||||
|
||||
minvel = {x = 0, y = 0.5, z = 0},
|
||||
maxvel = {x = 0, y = 0.5, z = 0},
|
||||
|
||||
minacc = {x = 0, y = 0, z = 0},
|
||||
maxacc = {x = 0, y = 0, z = 0},
|
||||
|
||||
minexptime = 2,
|
||||
maxexptime = 2,
|
||||
|
||||
minsize = 2,
|
||||
maxsize = 6,
|
||||
|
||||
texture = "waffles_steam.png",
|
||||
})
|
||||
|
||||
minetest.registered_nodes[MODNAME .. ":waffle_maker"].on_rightclick(pos, minetest.get_node(pos), nil, ItemStack(""))
|
||||
end
|
||||
end
|
||||
end,
|
||||
can_dig = function(pos)
|
||||
return minetest.get_meta(pos):get_float("cooked") == -1
|
||||
end,
|
||||
on_destruct = remove_batter,
|
||||
}
|
||||
|
||||
minetest.register_lbm({
|
||||
label = "Start waffle maker timers",
|
||||
name = MODNAME .. ":waffle_timers",
|
||||
nodnames = {MODNAME .. ":waffle_maker"},
|
||||
run_at_every_load = true,
|
||||
action = function(pos)
|
||||
minetest.get_node_timer(pos):start(0.5)
|
||||
end
|
||||
})
|
||||
|
||||
-- Open and closed defs
|
||||
local def_closed = table.copy(def_base)
|
||||
local box_closed = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
}
|
||||
|
||||
def_closed.selection_box = box_closed
|
||||
def_closed.collision_box = box_closed
|
||||
|
||||
def_closed.mesh = "waffles_waffle_maker_closed.obj"
|
||||
|
||||
local def_open = table.copy(def_base)
|
||||
local box_open = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.0, 0.5},
|
||||
{-0.5, 0.0, 0.0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
}
|
||||
|
||||
def_open.selection_box = box_open
|
||||
def_open.collision_box = box_open
|
||||
|
||||
def_open.mesh = "waffles_waffle_maker_open.obj"
|
||||
|
||||
def_open.description = S("Waffle Maker (Open)")
|
||||
def_open.drop = MODNAME .. ":waffle_maker"
|
||||
def_open.groups.not_in_creative_inventory = 1
|
||||
|
||||
minetest.register_node(MODNAME .. ":waffle_maker", def_closed)
|
||||
minetest.register_node(MODNAME .. ":waffle_maker_open", def_open)
|
||||
|
||||
-- Crafting recipe
|
||||
local craftitems = {
|
||||
casing = waffles.setting_or("crafitem_maker_casing", "default:tin_ingot"),
|
||||
wiring = waffles.setting_or("crafitem_maker_wiring", "default:steel_ingot"),
|
||||
heating = waffles.setting_or("crafitem_maker_heating", "default:copper_ingot"),
|
||||
}
|
||||
|
||||
minetest.register_craft({
|
||||
output = MODNAME .. ":waffle_maker",
|
||||
recipe = {
|
||||
{craftitems.casing, craftitems.casing, craftitems.casing},
|
||||
{craftitems.wiring, "", craftitems.wiring},
|
||||
{craftitems.casing, craftitems.heating, craftitems.casing},
|
||||
}
|
||||
})
|
@ -1 +1,3 @@
|
||||
name = waffles
|
||||
description = Waffles. Thats it.
|
||||
optional_depends = default
|
||||
|
@ -1,12 +0,0 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl lambert0-material
|
||||
Ns 96.078431
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.640000 0.640000 0.640000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 2
|
@ -1,12 +0,0 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl lambert0-material
|
||||
Ns 96.078431
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.640000 0.640000 0.640000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 2
|
@ -1,12 +0,0 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl lambert0-material
|
||||
Ns 96.078431
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.640000 0.640000 0.640000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 2
|
@ -1,12 +0,0 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl lambert0-material
|
||||
Ns 96.078431
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.640000 0.640000 0.640000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 2
|
@ -1,12 +0,0 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl lambert0-material
|
||||
Ns 96.078431
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.640000 0.640000 0.640000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 2
|
BIN
mods/furniture/waffles/models/waffles.blend
Normal file
44
mods/furniture/waffles/models/waffles_waffle.obj
Normal file
@ -0,0 +1,44 @@
|
||||
# Blender v2.93.0 OBJ File: 'waffles.blend'
|
||||
# www.blender.org
|
||||
o waffle_Cube.007
|
||||
v -0.312500 -0.500000 0.312500
|
||||
v -0.312500 -0.437500 0.312500
|
||||
v -0.312500 -0.500000 -0.312500
|
||||
v -0.312500 -0.437500 -0.312500
|
||||
v 0.312500 -0.500000 0.312500
|
||||
v 0.312500 -0.437500 0.312500
|
||||
v 0.312500 -0.500000 -0.312500
|
||||
v 0.312500 -0.437500 -0.312500
|
||||
vt 0.625000 1.000000
|
||||
vt 0.562500 1.000000
|
||||
vt 0.562500 0.375000
|
||||
vt 0.625000 0.375000
|
||||
vt 0.625000 0.437500
|
||||
vt -0.000000 0.437500
|
||||
vt 0.000000 0.375000
|
||||
vt 0.062500 0.375000
|
||||
vt 0.062500 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt -0.000000 0.937500
|
||||
vt 0.625000 0.937500
|
||||
vt 0.625000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.375000
|
||||
vt 0.625000 0.375000
|
||||
vt -0.000000 0.375000
|
||||
vt 0.625000 0.375000
|
||||
vt 0.625000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
s off
|
||||
f 1/1/1 2/2/1 4/3/1 3/4/1
|
||||
f 3/4/2 4/5/2 8/6/2 7/7/2
|
||||
f 7/7/3 8/8/3 6/9/3 5/10/3
|
||||
f 5/10/4 6/11/4 2/12/4 1/1/4
|
||||
f 3/13/5 7/14/5 5/15/5 1/16/5
|
||||
f 8/17/6 4/18/6 2/19/6 6/20/6
|
102
mods/furniture/waffles/models/waffles_waffle_maker_closed.obj
Normal file
@ -0,0 +1,102 @@
|
||||
# Blender v2.93.0 OBJ File: 'waffles.blend'
|
||||
# www.blender.org
|
||||
o waffle_iron_closed_Cube.006
|
||||
v -0.375000 -0.500000 0.375000
|
||||
v -0.375000 -0.250000 0.375000
|
||||
v -0.375000 -0.500000 -0.375000
|
||||
v -0.375000 -0.250000 -0.375000
|
||||
v 0.375000 -0.500000 0.375000
|
||||
v 0.375000 -0.250000 0.375000
|
||||
v 0.375000 -0.500000 -0.375000
|
||||
v 0.375000 -0.250000 -0.375000
|
||||
v -0.375000 -0.437500 0.375000
|
||||
v -0.375000 -0.437500 -0.375000
|
||||
v 0.375000 -0.437500 0.375000
|
||||
v 0.375000 -0.437500 -0.375000
|
||||
v -0.375000 -0.125000 0.375000
|
||||
v -0.375000 -0.125000 -0.375000
|
||||
v -0.375000 -0.250000 0.375000
|
||||
v -0.375000 -0.250000 -0.375000
|
||||
v 0.375000 -0.125000 0.375000
|
||||
v 0.375000 -0.125000 -0.375000
|
||||
v 0.375000 -0.250000 0.375000
|
||||
v 0.375000 -0.250000 -0.375000
|
||||
v -0.062500 -0.437500 -0.375000
|
||||
v -0.062500 -0.312500 -0.375000
|
||||
v -0.062500 -0.437500 -0.437500
|
||||
v -0.062500 -0.312500 -0.437500
|
||||
v 0.062500 -0.437500 -0.375000
|
||||
v 0.062500 -0.312500 -0.375000
|
||||
v 0.062500 -0.437500 -0.437500
|
||||
v 0.062500 -0.312500 -0.437500
|
||||
vt 0.750000 0.000000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.500000 0.250000
|
||||
vt 0.500000 0.000000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.500000 0.250000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 0.250000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.750000 1.000000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.500000 0.250000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.000000 0.125000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.250000 -0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.250000 -0.000000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.000000 0.125000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.250000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.750000 0.250000
|
||||
vt 1.000000 0.250000
|
||||
vt 1.000000 0.375000
|
||||
vt 0.750000 0.375000
|
||||
vt 0.000000 0.125000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.833333 0.812500
|
||||
vt 0.833333 0.937500
|
||||
vt 0.812500 0.937500
|
||||
vt 0.812500 0.812500
|
||||
vt 0.770833 0.937500
|
||||
vt 0.770833 0.812500
|
||||
vt 0.750000 0.937500
|
||||
vt 0.750000 0.812500
|
||||
vt 0.770833 0.750000
|
||||
vt 0.812500 0.750000
|
||||
vt 0.812500 1.000000
|
||||
vt 0.770833 1.000000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
s off
|
||||
f 1/1/1 2/2/1 4/3/1 3/4/1
|
||||
f 3/4/2 4/3/2 8/5/2 7/6/2
|
||||
f 7/7/3 8/8/3 6/9/3 5/10/3
|
||||
f 5/11/4 6/12/4 2/2/4 1/1/4
|
||||
f 8/5/5 4/3/5 2/13/5 6/14/5
|
||||
f 10/15/6 12/16/6 11/17/6 9/18/6
|
||||
f 13/19/1 14/20/1 16/21/1 15/22/1
|
||||
f 19/23/3 20/24/3 18/25/3 17/26/3
|
||||
f 17/27/5 18/28/5 14/29/5 13/30/5
|
||||
f 15/31/4 19/32/4 17/33/4 13/34/4
|
||||
f 20/35/2 16/36/2 14/29/2 18/28/2
|
||||
f 21/37/1 22/38/1 24/39/1 23/40/1
|
||||
f 23/40/2 24/39/2 28/41/2 27/42/2
|
||||
f 27/42/3 28/41/3 26/43/3 25/44/3
|
||||
f 23/40/6 27/42/6 25/45/6 21/46/6
|
||||
f 28/41/5 24/39/5 22/47/5 26/48/5
|
109
mods/furniture/waffles/models/waffles_waffle_maker_open.obj
Normal file
@ -0,0 +1,109 @@
|
||||
# Blender v2.93.0 OBJ File: 'waffles.blend'
|
||||
# www.blender.org
|
||||
o waffle_iron_open_Cube.003
|
||||
v -0.375000 -0.500000 0.375000
|
||||
v -0.375000 -0.250000 0.375000
|
||||
v -0.375000 -0.500000 -0.375000
|
||||
v -0.375000 -0.250000 -0.375000
|
||||
v 0.375000 -0.500000 0.375000
|
||||
v 0.375000 -0.250000 0.375000
|
||||
v 0.375000 -0.500000 -0.375000
|
||||
v 0.375000 -0.250000 -0.375000
|
||||
v -0.375000 -0.437500 0.375000
|
||||
v -0.375000 -0.437500 -0.375000
|
||||
v 0.375000 -0.437500 0.375000
|
||||
v 0.375000 -0.437500 -0.375000
|
||||
v -0.375000 -0.250000 0.500000
|
||||
v -0.375000 0.500000 0.500000
|
||||
v -0.375000 -0.250000 0.375000
|
||||
v -0.375000 0.500000 0.375000
|
||||
v 0.375000 -0.250000 0.500000
|
||||
v 0.375000 0.500000 0.500000
|
||||
v 0.375000 -0.250000 0.375000
|
||||
v 0.375000 0.500000 0.375000
|
||||
v -0.062500 -0.437500 -0.375000
|
||||
v -0.062500 -0.312500 -0.375000
|
||||
v -0.062500 -0.437500 -0.437500
|
||||
v -0.062500 -0.312500 -0.437500
|
||||
v 0.062500 -0.437500 -0.375000
|
||||
v 0.062500 -0.312500 -0.375000
|
||||
v 0.062500 -0.437500 -0.437500
|
||||
v 0.062500 -0.312500 -0.437500
|
||||
vt 0.750000 0.000000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.500000 0.250000
|
||||
vt 0.500000 0.000000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.500000 0.250000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 0.250000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.750000 1.000000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.500000 0.250000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.000000 0.125000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.250000 -0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.500000 0.250000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.250000 -0.000000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.000000 0.125000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.250000
|
||||
vt 0.750000 0.250000
|
||||
vt 1.000000 0.250000
|
||||
vt 1.000000 0.375000
|
||||
vt 0.750000 0.375000
|
||||
vt 0.000000 0.125000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.000000 0.250000
|
||||
vt 0.833333 0.812500
|
||||
vt 0.833333 0.937500
|
||||
vt 0.812500 0.937500
|
||||
vt 0.812500 0.812500
|
||||
vt 0.770833 0.937500
|
||||
vt 0.770833 0.812500
|
||||
vt 0.750000 0.937500
|
||||
vt 0.750000 0.812500
|
||||
vt 0.770833 0.750000
|
||||
vt 0.812500 0.750000
|
||||
vt 0.812500 1.000000
|
||||
vt 0.770833 1.000000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
s off
|
||||
f 1/1/1 2/2/1 4/3/1 3/4/1
|
||||
f 3/4/2 4/3/2 8/5/2 7/6/2
|
||||
f 7/7/3 8/8/3 6/9/3 5/10/3
|
||||
f 5/11/4 6/12/4 2/2/4 1/1/4
|
||||
f 8/5/5 4/3/5 2/13/5 6/14/5
|
||||
f 10/15/6 12/16/6 11/17/6 9/18/6
|
||||
f 13/19/1 14/20/1 16/21/1 15/22/1
|
||||
f 15/23/2 16/24/2 20/25/2 19/26/2
|
||||
f 19/27/3 20/28/3 18/29/3 17/30/3
|
||||
f 17/31/4 18/32/4 14/33/4 13/34/4
|
||||
f 15/35/6 19/36/6 17/37/6 13/38/6
|
||||
f 20/39/5 16/40/5 14/41/5 18/42/5
|
||||
f 21/43/1 22/44/1 24/45/1 23/46/1
|
||||
f 23/46/2 24/45/2 28/47/2 27/48/2
|
||||
f 27/48/3 28/47/3 26/49/3 25/50/3
|
||||
f 23/46/6 27/48/6 25/51/6 21/52/6
|
||||
f 28/47/5 24/45/5 22/53/5 26/54/5
|
@ -1,507 +0,0 @@
|
||||
local S = waffles.intllib
|
||||
|
||||
--Waffle Maker and Waffles--
|
||||
|
||||
minetest.register_node("waffles:wafflemaker", {
|
||||
description = S("Waffle Maker"),
|
||||
drawtype = "mesh",
|
||||
mesh = "wafflemaker.obj",
|
||||
tiles = {"wafflemaker_texture.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
minetest.set_node(pos, {name = "waffles:wafflemaker_open_empty", param2 = node.param2})
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("waffles:wafflemaker_open_empty", {
|
||||
description = S("Open Waffle Maker (empty)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "wafflemaker_open_empty.obj",
|
||||
tiles = {"wafflemaker_open_empty_texture.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
drop = 'waffles:wafflemaker',
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
minetest.set_node(pos, {name = "waffles:wafflemaker", param2 = node.param2})
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("waffles:wafflemaker_open_full", {
|
||||
description = S("Open Waffle Maker (full)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "wafflemaker_open_full.obj",
|
||||
tiles = {"wafflemaker_open_full_texture.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
minetest.set_node(pos, { name = "waffles:wafflemaker_closed_full", param2 = node.param2 })
|
||||
minetest.after(5, minetest.set_node, pos, { name = "waffles:wafflemaker_open_done", param2 = node.param2 })
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("waffles:wafflemaker_closed_full", {
|
||||
description = S("Closed Waffle Maker (full)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "wafflemaker_closed_full.obj",
|
||||
tiles = {"wafflemaker_texture.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
diggable = false,
|
||||
groups = {not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("waffles:wafflemaker_open_done", {
|
||||
description = S("Open Waffle Maker (done)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "wafflemaker_open_done.obj",
|
||||
tiles = {"wafflemaker_open_done_texture.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
on_punch = function (pos, node, player, pointed_thing)
|
||||
player:get_inventory():add_item("main", "waffles:large_waffle")
|
||||
minetest.set_node(pos, {name = "waffles:wafflemaker_open_empty", param2 = node.param2})
|
||||
end
|
||||
})
|
||||
|
||||
--Batter is stored in batter.lua for size reasons
|
||||
|
||||
minetest.register_craftitem("waffles:large_waffle", {
|
||||
description = S("Large Waffle"),
|
||||
inventory_image = "large_waffle.png",
|
||||
on_use = minetest.item_eat(8),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("waffles:small_waffle", {
|
||||
description = S("Small Waffle"),
|
||||
inventory_image = "small_waffle.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
})
|
||||
|
||||
|
||||
--Toaster and Toast--
|
||||
minetest.register_node("waffles:toaster", {
|
||||
description = S("Toaster"),
|
||||
tiles = { "toaster_with_toast_sides.png" },
|
||||
inventory_image = "waffles_toaster_inv.png",
|
||||
walkable = false,
|
||||
groups = { snappy=3 },
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
--Replace homedecor toaster by waffles toaster if detected
|
||||
if minetest.get_modpath("homedecor") then
|
||||
minetest.unregister_item("homedecor:toaster")
|
||||
minetest.register_alias("homedecor:toaster", "waffles:toaster")
|
||||
end
|
||||
|
||||
-- FIXME: need to replace with new bread item
|
||||
if core.registered_items["farming:bread"] then
|
||||
minetest.override_item("farming:bread", {
|
||||
description = S("Bread"),
|
||||
})
|
||||
end
|
||||
|
||||
local function breadslice_on_use(itemstack, user, pointed_thing)
|
||||
local node, pos
|
||||
if pointed_thing.under then
|
||||
pos = pointed_thing.under
|
||||
node = minetest.get_node(pos)
|
||||
end
|
||||
|
||||
local pname = user:get_player_name()
|
||||
|
||||
if node and pos and (node.name == "homedecor:toaster" or
|
||||
node.name == "waffles:toaster") then
|
||||
if minetest.is_protected(pos, pname) then
|
||||
minetest.record_protection_violation(pos, pname)
|
||||
else
|
||||
if itemstack:get_count() >= 2 then
|
||||
itemstack:take_item(2)
|
||||
minetest.set_node(pos, {name = "waffles:toaster_with_breadslice", param2 = node.param2})
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
else
|
||||
return minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
|
||||
end
|
||||
end
|
||||
|
||||
if minetest.registered_items["farming:bread_slice"] then
|
||||
minetest.override_item("farming:bread_slice", {on_use = breadslice_on_use })
|
||||
minetest.register_alias("waffles:breadslice", "farming:bread_slice")
|
||||
else
|
||||
minetest.register_craftitem("waffles:breadslice", {
|
||||
description = S("Slice of Bread"),
|
||||
inventory_image = "breadslice.png",
|
||||
groups = {flammable = 2},
|
||||
on_use = breadslice_on_use,
|
||||
})
|
||||
end
|
||||
|
||||
if minetest.registered_items["farming:toast"] then
|
||||
minetest.register_alias("waffles:toast", "farming:toast")
|
||||
else
|
||||
minetest.register_craftitem("waffles:toast", {
|
||||
description = S("Toast"),
|
||||
inventory_image = "toast.png",
|
||||
on_use = minetest.item_eat(3),
|
||||
groups = {flammable = 2},
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node("waffles:toaster_with_breadslice", {
|
||||
description = S("Toaster with Breadslice"),
|
||||
inventory_image = "waffles_toaster_inv.png",
|
||||
tiles = {
|
||||
"toaster_with_bread_top.png",
|
||||
"toaster_with_toast_sides.png",
|
||||
"toaster_with_toast_sides.png",
|
||||
"toaster_with_toast_sides.png",
|
||||
"toaster_with_toast_sides.png",
|
||||
"toaster_with_toast_sides.png"
|
||||
},
|
||||
walkable = false,
|
||||
groups = {not_in_creative_inventory=1},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
diggable = false,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
{-0.03125, -0.3125, -0.0935, 0, -0.25, 0.0935}, -- NodeBox2
|
||||
{0.0625, -0.3125, -0.0935, 0.0935, -0.25, 0.0935}, -- NodeBox3
|
||||
},
|
||||
},
|
||||
on_punch = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos, { name = "waffles:toaster_toasting_breadslice", param2 = fdir })
|
||||
minetest.after(6, minetest.set_node, pos, { name = "waffles:toaster_with_toast", param2 = fdir })
|
||||
minetest.sound_play("toaster", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 5
|
||||
})
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("waffles:toaster_toasting_breadslice", {
|
||||
description = S("Toaster Toasting Slice of Bread"),
|
||||
tiles = { "toaster_with_toast_toasting_sides.png" },
|
||||
inventory_image = "waffles_toaster_inv.png",
|
||||
walkable = false,
|
||||
groups = {not_in_creative_inventory = 1 },
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
diggable = false,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("waffles:toaster_with_toast", {
|
||||
description = S("Toaster with Toast"),
|
||||
inventory_image = "waffles_toaster_inv.png",
|
||||
tiles = {
|
||||
"toaster_with_toast_top.png",
|
||||
"toaster_with_toast_sides.png",
|
||||
"toaster_with_toast_side_crusts.png",
|
||||
"toaster_with_toast_side_crusts.png",
|
||||
"toaster_with_toast_end_crusts.png",
|
||||
"toaster_with_toast_end_crusts.png"
|
||||
},
|
||||
walkable = false,
|
||||
groups = { snappy=3, not_in_creative_inventory=1 },
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
{-0.03125, -0.3125, -0.0935, 0, -0.25, 0.0935}, -- NodeBox2
|
||||
{0.0625, -0.3125, -0.0935, 0.0935, -0.25, 0.0935}, -- NodeBox3
|
||||
},
|
||||
},
|
||||
on_punch = function (pos, node, player, pointed_thing)
|
||||
local inv = player:get_inventory()
|
||||
local left = inv:add_item("main", "waffles:toast 2")
|
||||
if left:is_empty() then
|
||||
minetest.set_node(pos, {name = "waffles:toaster", param2 = node.param2})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
--Toaster Waffles--
|
||||
minetest.register_craftitem("waffles:toaster_waffle", {
|
||||
description = S("Toaster Waffle"),
|
||||
inventory_image = "toaster_waffle.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("waffles:toaster_waffle_pack", {
|
||||
description = S("Pack of 6 Toaster Waffles"),
|
||||
inventory_image = "toaster_waffle_pack_6.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = pointed_thing.under
|
||||
local pname = user:get_player_name()
|
||||
|
||||
if minetest.is_protected(pos, pname) then
|
||||
minetest.record_protection_violation(pos, pname)
|
||||
return
|
||||
end
|
||||
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
if node.name == "homedecor:toaster"
|
||||
or node.name == "waffles:toaster" then
|
||||
minetest.set_node(pos, {name = "waffles:toaster_with_waffle", param2 = node.param2})
|
||||
return ItemStack("waffles:toaster_waffle_pack_4")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("waffles:toaster_waffle_pack_4", {
|
||||
description = S("Pack of 4 Toaster Waffles"),
|
||||
inventory_image = "toaster_waffle_pack_4.png",
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = pointed_thing.under
|
||||
local pname = user:get_player_name()
|
||||
|
||||
if minetest.is_protected(pos, pname) then
|
||||
minetest.record_protection_violation(pos, pname)
|
||||
return
|
||||
end
|
||||
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
if node.name == "homedecor:toaster"
|
||||
or node.name == "waffles:toaster" then
|
||||
minetest.set_node(pos, {name = "waffles:toaster_with_waffle", param2 = node.param2})
|
||||
return ItemStack("waffles:toaster_waffle_pack_2")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("waffles:toaster_waffle_pack_2", {
|
||||
description = S("Pack of 2 Toaster Waffles"),
|
||||
inventory_image = "toaster_waffle_pack_2.png",
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = pointed_thing.under
|
||||
local pname = user:get_player_name()
|
||||
|
||||
if minetest.is_protected(pos, pname) then
|
||||
minetest.record_protection_violation(pos, pname)
|
||||
return
|
||||
end
|
||||
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
if node.name == "homedecor:toaster"
|
||||
or node.name == "waffles:toaster" then
|
||||
itemstack:take_item()
|
||||
minetest.set_node(pos, {name = "waffles:toaster_with_waffle", param2 = node.param2})
|
||||
return itemstack
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("waffles:toaster_with_waffle", {
|
||||
description = S("Toaster with Waffle"),
|
||||
inventory_image = "waffles_toaster_inv.png",
|
||||
tiles = {
|
||||
"toaster_with_waffle_top.png",
|
||||
"toaster_with_waffle_sides.png",
|
||||
"toaster_with_waffle_side_crusts.png",
|
||||
"toaster_with_waffle_side_crusts.png",
|
||||
"toaster_with_waffle_end_crusts.png",
|
||||
"toaster_with_waffle_end_crusts.png"
|
||||
},
|
||||
walkable = false,
|
||||
groups = {not_in_creative_inventory=1},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
diggable = false,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
{-0.03125, -0.3125, -0.0935, 0, -0.25, 0.0935}, -- NodeBox2
|
||||
{0.0625, -0.3125, -0.0935, 0.0935, -0.25, 0.0935}, -- NodeBox3
|
||||
},
|
||||
},
|
||||
on_punch = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos, { name = "waffles:toaster_toasting_waffle", param2 = fdir })
|
||||
minetest.after(6, minetest.set_node, pos, { name = "waffles:toaster_with_toasted_waffle", param2 = fdir })
|
||||
minetest.sound_play("toaster", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 5
|
||||
})
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("waffles:toaster_toasting_waffle", {
|
||||
description = S("Toaster Toasting Waffle"),
|
||||
tiles = { "toaster_with_waffle_toasting_sides.png" },
|
||||
inventory_image = "waffles_toaster_inv.png",
|
||||
walkable = false,
|
||||
groups = {not_in_creative_inventory = 1 },
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
diggable = false,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("waffles:toaster_with_toasted_waffle", {
|
||||
description = S("Toaster with Toasted Waffle"),
|
||||
inventory_image = "waffles_toaster_inv.png",
|
||||
tiles = {
|
||||
"toaster_with_waffle_toasted_top.png",
|
||||
"toaster_with_waffle_toasted_sides.png",
|
||||
"toaster_with_waffle_toasted_sides.png",
|
||||
"toaster_with_waffle_toasted_sides.png",
|
||||
"toaster_with_waffle_toasted_end_crusts.png",
|
||||
"toaster_with_waffle_toasted_end_crusts.png"
|
||||
},
|
||||
walkable = false,
|
||||
groups = { snappy=3, not_in_creative_inventory=1 },
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||
{-0.03125, -0.3125, -0.0935, 0, -0.25, 0.0935}, -- NodeBox2
|
||||
{0.0625, -0.3125, -0.0935, 0.0935, -0.25, 0.0935}, -- NodeBox3
|
||||
},
|
||||
},
|
||||
on_punch = function (pos, node, player, pointed_thing)
|
||||
local inv = player:get_inventory()
|
||||
local left = inv:add_item("main", "waffles:toaster_waffle 2")
|
||||
if left:is_empty() then
|
||||
minetest.set_node(pos, {name = "waffles:toaster", param2 = node.param2})
|
||||
end
|
||||
end
|
||||
})
|
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 255 KiB |
11
mods/furniture/waffles/settingtypes.txt
Normal file
@ -0,0 +1,11 @@
|
||||
# Crafitem used as waffle maker casing.
|
||||
waffles.craftitem_maker_casing (Waffle maker casing craftitem) string default:tin_ingot
|
||||
|
||||
# Crafitem used as waffle maker wiring.
|
||||
waffles.craftitem_maker_wiring (Waffle maker wiring craftitem) string default:steel_ingot
|
||||
|
||||
# Crafitem used as waffle maker heating.
|
||||
waffles.craftitem_maker_heating (Waffle maker heating craftitem) string default:copper_ingot
|
||||
|
||||
# Space/comma-separated list of craftitems used to make waffle batter. `item=replacement` defines replacements.
|
||||
waffles.waffle_batter_recipe (Waffle batter recipe craftitems) string farming:flour farming:flour bucket:bucket_water=bucket:bucket_empty
|
Before Width: | Height: | Size: 482 B |
Before Width: | Height: | Size: 582 B |
Before Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 619 B |
Before Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 946 B |
Before Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 358 B |
Before Width: | Height: | Size: 420 B |
Before Width: | Height: | Size: 1007 B |
Before Width: | Height: | Size: 384 B |
Before Width: | Height: | Size: 404 B |
Before Width: | Height: | Size: 404 B |
Before Width: | Height: | Size: 385 B |
Before Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 101 B |
Before Width: | Height: | Size: 107 B |
Before Width: | Height: | Size: 110 B |
BIN
mods/furniture/waffles/textures/waffles_steam.png
Normal file
After Width: | Height: | Size: 313 B |
Before Width: | Height: | Size: 4.0 KiB |
BIN
mods/furniture/waffles/textures/waffles_waffle.png
Normal file
After Width: | Height: | Size: 511 B |
BIN
mods/furniture/waffles/textures/waffles_waffle_batter.png
Normal file
After Width: | Height: | Size: 352 B |
BIN
mods/furniture/waffles/textures/waffles_waffle_batter_inv.png
Normal file
After Width: | Height: | Size: 406 B |
BIN
mods/furniture/waffles/textures/waffles_waffle_block_side.png
Normal file
After Width: | Height: | Size: 193 B |
BIN
mods/furniture/waffles/textures/waffles_waffle_block_top.png
Normal file
After Width: | Height: | Size: 683 B |
BIN
mods/furniture/waffles/textures/waffles_waffle_inv.png
Normal file
After Width: | Height: | Size: 835 B |
BIN
mods/furniture/waffles/textures/waffles_waffle_maker.png
Normal file
After Width: | Height: | Size: 290 B |
BIN
mods/furniture/waffles/textures/waffles_waffle_quarter.png
Normal file
After Width: | Height: | Size: 785 B |
115
mods/furniture/waffles/waffle.lua
Normal file
@ -0,0 +1,115 @@
|
||||
local waffles = ...
|
||||
|
||||
local MODNAME = minetest.get_current_modname()
|
||||
local S = minetest.get_translator(MODNAME)
|
||||
|
||||
-- Waffle
|
||||
local box_waffle = {
|
||||
type = "fixed",
|
||||
fixed = {-5 / 16, -8 / 16, -5 / 16, 5 / 16, - 7 / 16, 5 / 16},
|
||||
}
|
||||
|
||||
minetest.register_node(MODNAME .. ":waffle", {
|
||||
description = S("Waffle"),
|
||||
drawtype = "mesh",
|
||||
mesh = "waffles_waffle.obj",
|
||||
tiles = {"waffles_waffle.png"},
|
||||
use_texture_alpha = "clip",
|
||||
inventory_image = "waffles_waffle_inv.png",
|
||||
wield_image = "waffles_waffle_inv.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy = 3, oddly_breakable_by_hand = 1},
|
||||
selection_box = box_waffle,
|
||||
collision_box = box_waffle,
|
||||
on_use = minetest.item_eat(8),
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_craftitem(MODNAME .. ":waffle_quarter", {
|
||||
description = S("Quarter of Waffle"),
|
||||
inventory_image = "waffles_waffle_quarter.png",
|
||||
on_use = minetest.item_eat(2)
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = MODNAME .. ":waffle_quarter 4",
|
||||
type = "shapeless",
|
||||
recipe = {MODNAME .. ":waffle"},
|
||||
})
|
||||
|
||||
-- Waffle stacks
|
||||
minetest.register_node(MODNAME .. ":waffle_stack", {
|
||||
description = S("Stack of Waffles"),
|
||||
tiles = {"waffles_waffle_block_top.png", "waffles_waffle_block_top.png", "waffles_waffle_block_side.png"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy = 3, oddly_breakable_by_hand = 1},
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_node(MODNAME .. ":waffle_stack_short", {
|
||||
description = S("Short Stack of Waffles"),
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
tiles = {"waffles_waffle_block_top.png", "waffles_waffle_block_top.png", "waffles_waffle_block_side.png"},
|
||||
paramtype2 = "facedir",
|
||||
paramtype = "light",
|
||||
groups = {snappy = 3, oddly_breakable_by_hand = 1},
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
local craftitem = MODNAME .. ":waffle"
|
||||
minetest.register_craft({
|
||||
output = MODNAME .. ":waffle_stack",
|
||||
type = "shapeless",
|
||||
recipe = {craftitem, craftitem, craftitem, craftitem, craftitem, craftitem, craftitem, craftitem},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = MODNAME .. ":waffle_stack_short",
|
||||
type = "shapeless",
|
||||
recipe = {craftitem, craftitem, craftitem, craftitem},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = MODNAME .. ":waffle 8",
|
||||
type = "shapeless",
|
||||
recipe = {MODNAME .. ":waffle_stack"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = MODNAME .. ":waffle 4",
|
||||
type = "shapeless",
|
||||
recipe = {MODNAME .. ":waffle_stack_short"}
|
||||
})
|
||||
|
||||
-- Batter
|
||||
minetest.register_craftitem(MODNAME .. ":waffle_batter", {
|
||||
description = S("Waffle Batter"),
|
||||
inventory_image = "waffles_waffle_batter_inv.png",
|
||||
use_texture_alpha = true,
|
||||
})
|
||||
|
||||
local craftitems = waffles.setting_or("waffle_batter_recipe", "farming:flour farming:flour bucket:bucket_water=bucket:bucket_empty")
|
||||
local recipe = {}
|
||||
local replacements = {}
|
||||
|
||||
for _, item in pairs(craftitems:split("[, ]", false, -1, true)) do
|
||||
local set = item:split("=")
|
||||
table.insert(recipe, set[1])
|
||||
|
||||
if set[2] then
|
||||
table.insert(replacements, {set[1], set[2]})
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = MODNAME .. ":waffle_batter 3",
|
||||
type = "shapeless",
|
||||
recipe = recipe,
|
||||
replacements = #replacements > 0 and replacements or nil,
|
||||
})
|