Prereview code, but with the spaces converted to tabs.
* Cleaned up all of the code, checked to make sure that there were no erraneous debug logging. * To enable debugging, turn it on in the api by changing the following line in item_frames_api.lua: mcl_itemframes.DEBUG = false -- set to true to see debug output. * Made the standard Item Frame and the new Glow Frame use the frames API. Added in backwards compatibility mode. * Made frames pop out items into the world on the old frames' entities when they are a hidden / broken entity. (Part of the backwards compatibility.) * Tested locally. * *Converted the spaces to tabs!* Should be fully functional and ready for review.
This commit is contained in:
parent
76991fcba9
commit
3409c5a220
|
@ -10,53 +10,53 @@ dofile(modpath .. "/item_frames_API.lua")
|
|||
mcl_itemframes.create_base_definitions()
|
||||
|
||||
-- necessary to maintain compatibility amongst older versions.
|
||||
mcl_itemframes.backwards_compatibility ()
|
||||
mcl_itemframes.backwards_compatibility()
|
||||
|
||||
-- test for the create custom frame
|
||||
mcl_itemframes.create_custom_frame("false", "item_frame", false,
|
||||
"mcl_itemframes_item_frame.png", mcl_colors.WHITE, "Item Frame",
|
||||
"Can hold an item.")
|
||||
"mcl_itemframes_item_frame.png", mcl_colors.WHITE, "Item Frame",
|
||||
"Can hold an item.")
|
||||
mcl_itemframes.create_custom_frame("false", "glow_item_frame", true,
|
||||
"mcl_itemframes_glow_item_frame.png", mcl_colors.WHITE, "Glowing Item Frame",
|
||||
"Can hold an item and glows.")
|
||||
"mcl_itemframes_glow_item_frame.png", mcl_colors.WHITE, "Glowing Item Frame",
|
||||
"Can hold an item and glows.")
|
||||
|
||||
-- Register the base frame's recipes.
|
||||
-- was going to make it a specialized function, but minetest refuses to play nice.
|
||||
minetest.register_craft({
|
||||
output = "mcl_itemframes:item_frame",
|
||||
recipe = {
|
||||
{ "mcl_core:stick", "mcl_core:stick", "mcl_core:stick" },
|
||||
{ "mcl_core:stick", "mcl_mobitems:leather", "mcl_core:stick" },
|
||||
{ "mcl_core:stick", "mcl_core:stick", "mcl_core:stick" },
|
||||
}
|
||||
output = "mcl_itemframes:item_frame",
|
||||
recipe = {
|
||||
{ "mcl_core:stick", "mcl_core:stick", "mcl_core:stick" },
|
||||
{ "mcl_core:stick", "mcl_mobitems:leather", "mcl_core:stick" },
|
||||
{ "mcl_core:stick", "mcl_core:stick", "mcl_core:stick" },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'mcl_itemframes:glow_item_frame',
|
||||
recipe = { 'mcl_mobitems:glow_ink_sac', 'mcl_itemframes:item_frame' },
|
||||
type = "shapeless",
|
||||
output = 'mcl_itemframes:glow_item_frame',
|
||||
recipe = { 'mcl_mobitems:glow_ink_sac', 'mcl_itemframes:item_frame' },
|
||||
})
|
||||
|
||||
--[[ green frames just for testing
|
||||
mcl_itemframes.create_custom_frame("false", "my_regular_frame", false,
|
||||
"mcl_itemframes_item_frame.png", mcl_colors.DARK_GREEN, "A Green frame",
|
||||
"My Green Frame")
|
||||
"mcl_itemframes_item_frame.png", mcl_colors.DARK_GREEN, "A Green frame",
|
||||
"My Green Frame")
|
||||
mcl_itemframes.create_custom_frame("false", "my_glowing_frame", true,
|
||||
"mcl_itemframes_glow_item_frame.png", mcl_colors.DARK_GREEN, "A Green glowing frame",
|
||||
"My Green glowing Frame")
|
||||
"mcl_itemframes_glow_item_frame.png", mcl_colors.DARK_GREEN, "A Green glowing frame",
|
||||
"My Green glowing Frame")
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_itemframes:my_regular_frame",
|
||||
recipe = {
|
||||
{ "", "mcl_core:stick", "" },
|
||||
{ "mcl_core:stick", "", "mcl_core:stick" },
|
||||
{ "", "mcl_core:stick", "" },
|
||||
}
|
||||
output = "mcl_itemframes:my_regular_frame",
|
||||
recipe = {
|
||||
{ "", "mcl_core:stick", "" },
|
||||
{ "mcl_core:stick", "", "mcl_core:stick" },
|
||||
{ "", "mcl_core:stick", "" },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "mcl_itemframes:my_glowing_frame",
|
||||
recipe = { "mcl_mobitems:glow_ink_sac", "mcl_itemframes:my_regular_frame" },
|
||||
type = "shapeless",
|
||||
output = "mcl_itemframes:my_glowing_frame",
|
||||
recipe = { "mcl_mobitems:glow_ink_sac", "mcl_itemframes:my_regular_frame" },
|
||||
})
|
||||
--]]
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user