diff --git a/mods/ITEMS/hamburger.png b/mods/ITEMS/hamburger.png new file mode 100644 index 000000000..e69df027c Binary files /dev/null and b/mods/ITEMS/hamburger.png differ diff --git a/mods/ITEMS/hamburger_alt.png b/mods/ITEMS/hamburger_alt.png new file mode 100644 index 000000000..1ba0a04b7 Binary files /dev/null and b/mods/ITEMS/hamburger_alt.png differ diff --git a/mods/ITEMS/init.lua b/mods/ITEMS/init.lua new file mode 100644 index 000000000..50d9e2fcc --- /dev/null +++ b/mods/ITEMS/init.lua @@ -0,0 +1,85 @@ +--- +--- Generated by EmmyLua(https://github.com/EmmyLua) +--- Created by michieal. +--- DateTime: 10/23/22 4:50 AM +--- +-- LOCALIZATION +local S = minetest.get_translator("hamburger_mod") + +local modname = minetest.get_current_modname() +local modpath = minetest.get_modpath(modname) + +local table = table +local DEBUG = false +hamburger_mod = {} + +-- quick api for hamburgers. call to register your hamburger. +function hamburger_mod.register_burger_craft( hamburger_item, cooked_meat, use_alt) + + if use_alt == nil or use_alt == "" then + use_alt = false + end + + minetest.register_craft({ + type = "fuel", + recipe = "hamburger_mod:hamburger" .. hamburger_item, + burntime = 2, + }) + + -- register crafts (actual recipe) + if minetest.get_modpath(modname) then + + local itemstring = "hamburger_mod:hamburger" + + minetest.register_craft({ + output = itemstring .. hamburger_item, + recipe = { + { "mcl_farming:bread"}, + { cooked_meat }, -- "mcl_mobitems:cooked_beef" for a reg hamburger. grind up clowns for a McDonald's hambeurger + { "mcl_farming:bread" }, + }, + }) + end + + if use_alt == false then + minetest.register_craftitem("hamburger_mod:hamburger" .. hamburger_item, { + description = S("Hamburger"), + _doc_items_longdesc = S("A tasty hamburger that is sure to lure villagers around like a LEASH. Can be eaten."), + _doc_items_usagehelp = S("wield this item to pull villagers to you."), + _tt_help = S("A tasty hamburger that is sure to lure villagers"), + inventory_image = "hamburger.png", + wield_image = "hamburger.png", + on_place = minetest.item_eat(8), + on_secondary_use = minetest.item_eat(8), + groups = { food = 2, eatable = 8 }, + _mcl_saturation = 12.8, + stack_max = 64, + }) + else + minetest.register_craftitem("hamburger_mod:hamburger" .. hamburger_item, { + description = S("Hamburger"), + _doc_items_longdesc = S("A tasty hamburger that is sure to lure villagers around like a LEASH. Can be eaten."), + _doc_items_usagehelp = S("wield this item to pull villagers to you."), + _tt_help = S("A tasty hamburger that is sure to lure villagers"), + inventory_image = "hamburger_alt.png", + wield_image = "hamburger_alt.png", + on_place = minetest.item_eat(8), + on_secondary_use = minetest.item_eat(8), + groups = { food = 2, eatable = 8 }, + _mcl_saturation = 12.8, + stack_max = 64, + }) + end + + +end + +-- make the villagers follow the hamburger item +minetest.registered_entities["mobs_mc:villager"].nofollow = nil + +hamburger_mod.register_burger_craft( "", "mcl_mobitems:cooked_beef") +table.insert(minetest.registered_entities["mobs_mc:villager"].follow,"hamburger_mod:hamburger") + +if DEBUG then + minetest.log (dump(minetest.registered_entities["mobs_mc:villager"].follow)) +end \ No newline at end of file diff --git a/mods/ITEMS/mod.conf b/mods/ITEMS/mod.conf new file mode 100644 index 000000000..8eb71d200 --- /dev/null +++ b/mods/ITEMS/mod.conf @@ -0,0 +1,4 @@ +name = hamburger_mod +description = A cute (and easy to use) replacement for not having leashes in MC2 +depends = mcl_core, mcl_sounds, mobs_mc, mcl_mobitems +optional_depends = doc diff --git a/mods/ITEMS/readme.txt b/mods/ITEMS/readme.txt new file mode 100644 index 000000000..6ab18ef56 --- /dev/null +++ b/mods/ITEMS/readme.txt @@ -0,0 +1,36 @@ +Tags: Hamburger +Icon set: Fugue 16px Additional Icons +Author: Yusuke Kamiyamane +License: CC Attribution 3.0 Unported +Readme file +Commercial usage: Allowed +Posted: November 22, 2011 +Icon Readme file: + +Fugue Icons + +(C) 2011 Yusuke Kamiyamane. All rights reserved. +These icons are licensed under a Creative Commons +Attribution 3.0 License. + + +If you can't or don't want to provide attribution, please +purchase a royalty-free license. + + +I'm unavailable for custom icon design work. But your +suggestions are always welcome! + + +------------------------------------------------------------ + + +Note: there's an alt image that is licensed as "Only for personal use" as it is the original BurgerTime arcade game's +burger image. And it is copyright Data East, 1982 and Bally Midway. + +From https://thepinballgameroom.com/product/burgertime-arcade-machine/ on the original game: +BurgerTime Arcade Machine, originally released as Hamburger in Japan, is a 1982 arcade game developed by Data East +initially for its DECO Cassette System. In the United States, Data East USA licensed BurgerTime Arcade Machine for +distribution by Bally Midway as a standard dedicated arcade game. Data East also released its own version of BurgerTime +in the United States through its DECO Cassette System. The Data East and Midway versions are distinguished by the +manufacturer’s name on the title screen and by the marquee and cabinet artworks, as the game itself is identical.