mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-26 11:17:30 +01:00
Fix formating
This commit is contained in:
parent
2b46dd60c5
commit
c49f000894
@ -9,8 +9,7 @@ end
|
|||||||
|
|
||||||
--[[ BEGIN OF NODE DEFINITIONS ]]
|
--[[ BEGIN OF NODE DEFINITIONS ]]
|
||||||
|
|
||||||
local mcl_hoppers_formspec =
|
local mcl_hoppers_formspec = "size[9,7]" ..
|
||||||
"size[9,7]"..
|
|
||||||
"label[2,0;" .. minetest.formspec_escape(minetest.colorize("#313131", S("Hopper"))) .. "]" ..
|
"label[2,0;" .. minetest.formspec_escape(minetest.colorize("#313131", S("Hopper"))) .. "]" ..
|
||||||
"list[context;main;2,0.5;5,1;]" ..
|
"list[context;main;2,0.5;5,1;]" ..
|
||||||
mcl_formspec.get_itemslot_bg(2, 0.5, 5, 1) ..
|
mcl_formspec.get_itemslot_bg(2, 0.5, 5, 1) ..
|
||||||
@ -31,7 +30,9 @@ local def_hopper = {
|
|||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
-- FIXME: mcl_hoppers_hopper_inside.png is unused by hoppers.
|
-- FIXME: mcl_hoppers_hopper_inside.png is unused by hoppers.
|
||||||
tiles = {"mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png"},
|
tiles = { "mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", "mcl_hoppers_hopper_outside.png",
|
||||||
|
"mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png",
|
||||||
|
"mcl_hoppers_hopper_outside.png" },
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -131,11 +132,15 @@ local def_hopper = {
|
|||||||
-- Enabled downwards hopper
|
-- Enabled downwards hopper
|
||||||
local def_hopper_enabled = table.copy(def_hopper)
|
local def_hopper_enabled = table.copy(def_hopper)
|
||||||
def_hopper_enabled.description = S("Hopper")
|
def_hopper_enabled.description = S("Hopper")
|
||||||
def_hopper_enabled._tt_help = S("5 inventory slots").."\n"..S("Collects items from above, moves items to container below").."\n"..S("Can be disabled with redstone power")
|
def_hopper_enabled._tt_help = S("5 inventory slots") ..
|
||||||
def_hopper_enabled._doc_items_longdesc = S("Hoppers are containers with 5 inventory slots. They collect dropped items from above, take items from a container above and attempt to put its items it into an adjacent container. Hoppers can go either downwards or sideways. Hoppers interact with chests, droppers, dispensers, shulker boxes, furnaces and hoppers.").."\n\n"..
|
"\n" .. S("Collects items from above, moves items to container below") .. "\n" ..
|
||||||
|
S("Can be disabled with redstone power")
|
||||||
|
def_hopper_enabled._doc_items_longdesc = S("Hoppers are containers with 5 inventory slots. They collect dropped items from above, take items from a container above and attempt to put its items it into an adjacent container. Hoppers can go either downwards or sideways. Hoppers interact with chests, droppers, dispensers, shulker boxes, furnaces and hoppers.")
|
||||||
|
.. "\n\n" ..
|
||||||
|
|
||||||
S("Hoppers interact with containers the following way:") .. "\n" ..
|
S("Hoppers interact with containers the following way:") .. "\n" ..
|
||||||
S("• Furnaces: Hoppers from above will put items into the source slot. Hoppers from below take items from the output slot. They also take items from the fuel slot when they can't be used as a fuel. Sideway hoppers that point to the furnace put items into the fuel slot").."\n"..
|
S("• Furnaces: Hoppers from above will put items into the source slot. Hoppers from below take items from the output slot. They also take items from the fuel slot when they can't be used as a fuel. Sideway hoppers that point to the furnace put items into the fuel slot")
|
||||||
|
.. "\n" ..
|
||||||
S("• Ender chests: No interaction.") .. "\n" ..
|
S("• Ender chests: No interaction.") .. "\n" ..
|
||||||
S("• Other containers: Normal interaction.") .. "\n\n" ..
|
S("• Other containers: Normal interaction.") .. "\n\n" ..
|
||||||
|
|
||||||
@ -219,7 +224,9 @@ local def_hopper_side = {
|
|||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
tiles = {"mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png"},
|
tiles = { "mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", "mcl_hoppers_hopper_outside.png",
|
||||||
|
"mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png",
|
||||||
|
"mcl_hoppers_hopper_outside.png" },
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -382,7 +389,7 @@ end
|
|||||||
--[[ BEGIN OF ABM DEFINITONS ]]
|
--[[ BEGIN OF ABM DEFINITONS ]]
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
label = "Hoppers pull from minecart",
|
label = "Hoppers pull from minecart hoppers",
|
||||||
nodenames = { "mcl_hoppers:hopper", "mcl_hoppers:hopper_side" },
|
nodenames = { "mcl_hoppers:hopper", "mcl_hoppers:hopper_side" },
|
||||||
interval = 0.5,
|
interval = 0.5,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
@ -443,7 +450,8 @@ minetest.register_abm({
|
|||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
|
|
||||||
for _, object in pairs(minetest.get_objects_inside_radius(pos, 2)) do
|
for _, object in pairs(minetest.get_objects_inside_radius(pos, 2)) do
|
||||||
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and not object:get_luaentity()._removed then
|
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and
|
||||||
|
not object:get_luaentity()._removed then
|
||||||
if inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
|
if inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
|
||||||
-- Item must get sucked in when the item just TOUCHES the block above the hopper
|
-- Item must get sucked in when the item just TOUCHES the block above the hopper
|
||||||
-- This is the reason for the Y calculation.
|
-- This is the reason for the Y calculation.
|
||||||
|
Loading…
Reference in New Issue
Block a user