From df62a3aac188e48e998ceea72e487f6998386ffd Mon Sep 17 00:00:00 2001 From: Michieal Date: Sun, 13 Nov 2022 00:07:28 +0000 Subject: [PATCH] Initial code comit --- mods/ITEMS/hamburger.png | Bin 0 -> 1804 bytes mods/ITEMS/hamburger_alt.png | Bin 0 -> 4885 bytes mods/ITEMS/init.lua | 85 +++++++++++++++++++++++++++++++++++ mods/ITEMS/mod.conf | 4 ++ mods/ITEMS/readme.txt | 36 +++++++++++++++ 5 files changed, 125 insertions(+) create mode 100644 mods/ITEMS/hamburger.png create mode 100644 mods/ITEMS/hamburger_alt.png create mode 100644 mods/ITEMS/init.lua create mode 100644 mods/ITEMS/mod.conf create mode 100644 mods/ITEMS/readme.txt diff --git a/mods/ITEMS/hamburger.png b/mods/ITEMS/hamburger.png new file mode 100644 index 0000000000000000000000000000000000000000..e69df027c6ab703726d8122c58ee2614d1681bb1 GIT binary patch literal 1804 zcmaJ?c~BE)91RwcDoCw2Qd|SIdwB8p5l|vE4JIduq711hq6a)no4_XzvK~VqbxHG%o_1^oP-|Xt3KtJc@LnW=5bddrjEE}*z zu7uQRf-njgjKsu5dLl%}O;HSx&*$4TSS%WepqY~}0`R~2*F@f>Z76w^G9*aJdi9hZ43)yWPo%g!_<$l#W%=OD89@v7(SxSgcAMa z{Qv5kRY^vap+wDif=NqOG1B8RQ(rb@0}jL>P#~sQl&qo*i8G`92MUD%#s7m5+=ll*isObGWjA9;_+Y(TMA2AEU9Ra8-SS!1k<8}T>U35>x*20 z#DpRQZc^cR++Z^VMdJi+j>e6EBp3oh^q3A$G~4P#dS&wyHR+e4I++PK0R1Tw=s&Zb zkU*LiNkAD(%7Y-5mk5@DphzU)uwiu!g5Otr0+)tG7VaSWm;dqH42@Hdv zn8_1~#bSv}269;-n?q%gZZK^9@maqNZjnuBn||zma`Ey0pct8M6L~w*wmEMgFC9Ms z7O5;vYjbYnqy5HQtPC$GDAX1_Z9MD@dQRI=?>RR9?1h*;2gR%E_t(s|oA2*9-v{Wm z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--- +--- 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.