Initial code comit

This commit is contained in:
Michieal 2022-11-13 00:07:28 +00:00 committed by cora
parent 7cc25c4670
commit df62a3aac1
5 changed files with 125 additions and 0 deletions

BIN
mods/ITEMS/hamburger.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

85
mods/ITEMS/init.lua Normal file
View File

@ -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

4
mods/ITEMS/mod.conf Normal file
View File

@ -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

36
mods/ITEMS/readme.txt Normal file
View File

@ -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.
<http://creativecommons.org/licenses/by/3.0/>
If you can't or don't want to provide attribution, please
purchase a royalty-free license.
<http://p.yusukekamiyamane.com/>
I'm unavailable for custom icon design work. But your
suggestions are always welcome!
<mailto:p@yusukekamiyamane.com>
------------------------------------------------------------
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
manufacturers name on the title screen and by the marquee and cabinet artworks, as the game itself is identical.