1
0
mirror of https://github.com/tacigar/maidroid.git synced 2025-06-28 13:56:05 +02:00

Modify various

This commit is contained in:
tacigar
2017-01-03 10:43:56 +09:00
parent 4fa83404d5
commit 4b32c4c5cd
6 changed files with 10 additions and 8 deletions

View File

@ -3,9 +3,11 @@
-- https://github.com/tacigar/maidroid
------------------------------------------------------------
maidroid_tool._aux = {}
-- maidroid_tool.shared.generate_writer is a shared
-- function called for registering egg writer and core writer.
function maidroid_tool.register_writer(nodename, options)
function maidroid_tool._aux.register_writer(nodename, options)
local description = options.description
local formspec = options.formspec
local tiles = options.tiles
@ -16,7 +18,6 @@ function maidroid_tool.register_writer(nodename, options)
local on_deactivate = options.on_deactivate
local empty_itemname = options.empty_itemname
local dye_item_map = options.dye_item_map
--~ local is_mainitem = options.is_mainitem
local on_metadata_inventory_put_to_main = options.on_metadata_inventory_put_to_main
local on_metadata_inventory_take_from_main = options.on_metadata_inventory_take_from_main
@ -156,7 +157,7 @@ function maidroid_tool.register_writer(nodename, options)
end
end
local function allow_metadata_inventory_take(_,_,_, stack)
local function allow_metadata_inventory_take(_, _, _, stack)
return stack:get_count() -- maybe add more.
end

View File

@ -148,7 +148,7 @@ do -- register core writer
core_entity.object:remove()
end
maidroid_tool.register_writer("maidroid_tool:core_writer", {
maidroid_tool._aux.register_writer("maidroid_tool:core_writer", {
description = "maidroid tool : core writer",
formspec = formspec,
tiles = tiles,

View File

@ -165,7 +165,7 @@ do -- register egg writer
egg_entity.object:remove()
end
maidroid_tool.register_writer("maidroid_tool:egg_writer", {
maidroid_tool._aux.register_writer("maidroid_tool:egg_writer", {
description = "maidroid tool : egg writer",
formspec = formspec,
tiles = tiles,

View File

@ -8,7 +8,7 @@ maidroid_tool = {}
maidroid_tool.modname = "maidroid_tool"
maidroid_tool.modpath = minetest.get_modpath(maidroid_tool.modname)
dofile(maidroid_tool.modpath .. "/api.lua")
dofile(maidroid_tool.modpath .. "/_aux.lua")
dofile(maidroid_tool.modpath .. "/core_writer.lua")
dofile(maidroid_tool.modpath .. "/egg_writer.lua")
dofile(maidroid_tool.modpath .. "/crafting.lua")