Misc fixes
parent
1693f1792f
commit
30d2e9e59a
|
@ -408,7 +408,7 @@ minetest.register_on_joinplayer(function(player)
|
|||
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||
return 0
|
||||
end,
|
||||
})
|
||||
}, name)
|
||||
--[[if inventory_plus then
|
||||
inventory_plus.register_button(player,"armor", "Armor")
|
||||
end]]
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
return {
|
||||
"potionspack:antigravity",
|
||||
"potionspack:speed",
|
||||
"potionspack:speedii",
|
||||
"potionspack:whatwillthisdo",
|
||||
"potionspack:harmingii",
|
||||
"potionspack:regenii",
|
||||
"potionspack:regen",
|
||||
"potionspack:instanthealthii",
|
||||
"potionspack:instanthealth",
|
||||
"potionspack:confusion",
|
||||
"potionspack:inversion",
|
||||
"potionspack:harming",
|
||||
"vessels:glass_bottle",
|
||||
"potions:glass_bottle",
|
||||
"potionspack:antigravityii",
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
return {
|
||||
"default:redsandstonecarved",
|
||||
"default:gravel",
|
||||
"default:glowstone",
|
||||
"default:glass_pink",
|
||||
"default:wood",
|
||||
"default:slimeblock",
|
||||
"default:ice",
|
||||
"default:glass_lime",
|
||||
"default:obsidian",
|
||||
"default:sand",
|
||||
"default:redsandstonesmooth",
|
||||
"default:dirt_with_snow",
|
||||
"default:packedice",
|
||||
"default:glass_blue",
|
||||
"default:glass_silver",
|
||||
"default:stone_with_diamond",
|
||||
"default:cobble",
|
||||
"default:bedrock",
|
||||
"default:quartz_chiseled",
|
||||
"default:redsandstone",
|
||||
"default:brick",
|
||||
"default:stone_with_emerald",
|
||||
"default:dirt_with_dry_grass",
|
||||
"default:stone_with_lapis",
|
||||
"default:glass_green",
|
||||
"default:glass_orange",
|
||||
"default:emeraldblock",
|
||||
"wallet:wallmossy",
|
||||
"default:lapisblock",
|
||||
"default:stonebrick",
|
||||
"default:stone_with_gold",
|
||||
"default:goldblock",
|
||||
"default:quartz_ore",
|
||||
"default:sponge",
|
||||
"default:glass_white",
|
||||
"default:glass_purple",
|
||||
"default:glass_gray",
|
||||
"default:glass",
|
||||
"default:glass_red",
|
||||
"default:glass_magenta",
|
||||
"default:stonebrickmossy",
|
||||
"default:stone_with_iron",
|
||||
"default:bookshelf",
|
||||
"default:dirt",
|
||||
"default:diamondblock",
|
||||
"default:steelblock",
|
||||
"default:dirt_with_grass",
|
||||
"default:stonebrickcarved",
|
||||
"default:stone_with_bluestone",
|
||||
"default:glass_brown",
|
||||
"default:snowblock",
|
||||
"default:glass_black",
|
||||
"wallet:wall",
|
||||
"default:quartz_pillar",
|
||||
"default:redsand",
|
||||
"default:glass_light_blue",
|
||||
"default:stone",
|
||||
"default:sandstone",
|
||||
"default:glass_yellow",
|
||||
"default:sandstonesmooth",
|
||||
"default:clay",
|
||||
"default:stonebrickcracked",
|
||||
"default:quartz_block",
|
||||
"default:mossycobble",
|
||||
"default:stone_with_coal",
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
return {
|
||||
"3d_armor:boots_leather",
|
||||
"throwing:bow",
|
||||
"3d_armor:helmet_diamond",
|
||||
"3d_armor:helmet_leather",
|
||||
"3d_armor:boots_chain",
|
||||
"3d_armor:chestplate_chain",
|
||||
"3d_armor:leggings_gold",
|
||||
"3d_armor:helmet_steel",
|
||||
"default:sword_diamond",
|
||||
"default:sword_wood",
|
||||
"default:sword_steel",
|
||||
"3d_armor:leggings_steel",
|
||||
"3d_armor:leggings_diamond",
|
||||
"3d_armor:boots_gold",
|
||||
"default:sword_stone",
|
||||
"3d_armor:chestplate_diamond",
|
||||
"3d_armor:leggings_leather",
|
||||
"default:sword_gold",
|
||||
"3d_armor:chestplate_gold",
|
||||
"3d_armor:boots_steel",
|
||||
"3d_armor:helmet_chain",
|
||||
"3d_armor:helmet_gold",
|
||||
"throwing:arrow",
|
||||
"3d_armor:chestplate_steel",
|
||||
"3d_armor:leggings_chain",
|
||||
"3d_armor:boots_diamond",
|
||||
"3d_armor:chestplate_leather",
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
return {
|
||||
"xpanes:pane_glass_black",
|
||||
"xpanes:pane_glass_gray",
|
||||
"xpanes:pane_glass_purple",
|
||||
"xpanes:pane_glass_pink",
|
||||
"default:dry_shrub",
|
||||
"xpanes:pane_glass_lime",
|
||||
"default:chest",
|
||||
"xpanes:pane_glass_red",
|
||||
"default:cobble",
|
||||
"xpanes:pane_glass_green",
|
||||
"default:grass",
|
||||
"itemframes:frame",
|
||||
"xpanes:pane_glass_white",
|
||||
"xpanes:pane_glass_blue",
|
||||
"xpanes:pane_glass_brown",
|
||||
"xpanes:pane_glass_magenta",
|
||||
"default:cactus",
|
||||
"default:ladder",
|
||||
"default:stonebrick",
|
||||
"default:vine",
|
||||
"default:dry_grass",
|
||||
"fences:fence_wood",
|
||||
"xpanes:pane_iron",
|
||||
"default:stonebrickmossy",
|
||||
"xpanes:pane_glass_light_blue",
|
||||
"default:stonebrickcarved",
|
||||
"xpanes:pane_glass_natural",
|
||||
"xpanes:pane_glass_silver",
|
||||
"xpanes:pane_glass_yellow",
|
||||
"xpanes:pane_glass_orange",
|
||||
"default:stone",
|
||||
"default:stonebrickcracked",
|
||||
"default:mossycobble",
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
"default:fish_raw",
|
||||
"default:apple_gold",
|
||||
"default:fish",
|
||||
"default:apple",
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
return {
|
||||
"default:charcoal_lump",
|
||||
"default:glowstone_dust",
|
||||
"default:clay_lump",
|
||||
"default:steel_ingot",
|
||||
"default:gold_ingot",
|
||||
"default:coal_lump",
|
||||
"default:diamond",
|
||||
"farming:string",
|
||||
"default:bone",
|
||||
"default:clay_brick",
|
||||
"default:emerald",
|
||||
"default:quartz_crystal",
|
||||
"default:sugar",
|
||||
"default:reeds",
|
||||
"default:stick",
|
||||
"default:gunpowder",
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
return {
|
||||
"mesecons_lightstone:lightstone_off",
|
||||
"mesecons_solarpanel:solar_panel_inverted_off",
|
||||
"mesecons_button:button_wood_off",
|
||||
"mesecons_solarpanel:solar_panel_off",
|
||||
"mesecons_walllever:wall_lever_off",
|
||||
"mesecons_torch:bluestoneblock",
|
||||
"fences:fencegate",
|
||||
"mesecons_pressureplates:pressure_plate_stone_off",
|
||||
"mesecons_pistons:piston_normal_off",
|
||||
"mesecons_pressureplates:pressure_plate_wood_off",
|
||||
"doors:trapdoor",
|
||||
"mesecons_button:button_stone_off",
|
||||
"mesecons_pistons:piston_sticky_off",
|
||||
"mesecons_noteblock:noteblock",
|
||||
"mesecons_torch:mesecon_torch_on",
|
||||
"tnt:tnt",
|
||||
"mesecons:wire_00000000_off",
|
||||
"doors:iron_trapdoor",
|
||||
"mesecons_delayer:delayer_off_1",
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
"default:snow",
|
||||
"default:book",
|
||||
"mesecons_materials:glue",
|
||||
"default:paper",
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
"boats:boat",
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
return {
|
||||
"default:axe_diamond",
|
||||
"default:shovel_diamond",
|
||||
"default:shovel_wood",
|
||||
"default:pick_wood",
|
||||
"default:axe_stone",
|
||||
"default:pick_gold",
|
||||
"default:shovel_gold",
|
||||
"default:axe_steel",
|
||||
"default:pole",
|
||||
"default:shovel_steel",
|
||||
"default:pick_diamond",
|
||||
"default:pick_stone",
|
||||
"default:axe_gold",
|
||||
"default:shovel_stone",
|
||||
"default:axe_wood",
|
||||
"default:pick_steel",
|
||||
}
|
|
@ -1,22 +1,22 @@
|
|||
local player_inventory = {}
|
||||
local inventory_cache = {}
|
||||
|
||||
local offset = {}
|
||||
local ofs = {}
|
||||
local hoch = {}
|
||||
local bg = {}
|
||||
|
||||
offset["blocks"] = "-0.29,-0.25"
|
||||
offset["deco"] = "0.98,-0.25"
|
||||
offset["mese"] = "2.23,-0.25"
|
||||
offset["rail"] = "3.495,-0.25"
|
||||
offset["misc"] = "4.75,-0.25"
|
||||
offset["all"] = "8.99,-0.25"
|
||||
offset["food"] = "-0.29,8.12"
|
||||
offset["tools"] = "0.98,8.12"
|
||||
offset["combat"] = "2.23,8.12"
|
||||
offset["brew"] = "4.78,8.12"
|
||||
offset["matr"] = "3.495,8.12"
|
||||
offset["inv"] = "8.99,8.12"
|
||||
ofs["blocks"] = {x=-0.29, y=-0.25}
|
||||
ofs["deco"] = {x=0.98, y=-0.25}
|
||||
ofs["mese"] = {x=2.23, y=-0.25}
|
||||
ofs["rail"] = {x=3.495, y=-0.25}
|
||||
ofs["misc"] = {x=4.75, y=-0.25}
|
||||
ofs["all"] = {x=8.99, y=-0.25}
|
||||
ofs["food"] = {x=-0.29, y=8.12}
|
||||
ofs["tools"] = {x=0.98, y=8.12}
|
||||
ofs["combat"] = {x=2.23, y=8.12}
|
||||
ofs["brew"] = {x=4.78, y=8.12}
|
||||
ofs["matr"] = {x=3.495, y=8.12}
|
||||
ofs["inv"] = {x=8.99, y=8.12}
|
||||
|
||||
hoch["blocks"] = ""
|
||||
hoch["deco"] = ""
|
||||
|
@ -46,14 +46,18 @@ bg["inv"] = "creative_inv.png"
|
|||
|
||||
local function get_item_list(group)
|
||||
local item_list = {}
|
||||
for name, def in pairs(minetest.registered_items) do
|
||||
if (not def.groups.not_in_creative_inventory or
|
||||
def.groups.not_in_creative_inventory == 0) and
|
||||
def.description and def.description ~= "" then
|
||||
if minetest.get_item_group(name, group) > 0 then
|
||||
local input = io.open(minetest.get_modpath("creative")..
|
||||
"/categories/"..group..".lua", "r")
|
||||
if input then
|
||||
local data = input:read('*all')
|
||||
local list = data and minetest.deserialize(data) or {}
|
||||
for _, name in pairs(list) do
|
||||
local def = minetest.registered_items[name]
|
||||
if def then
|
||||
item_list[name] = def
|
||||
end
|
||||
end
|
||||
end
|
||||
io.close(input)
|
||||
end
|
||||
return item_list
|
||||
end
|
||||
|
@ -170,8 +174,6 @@ local function get_creative_formspec(player_name, start_i, pagenum, page, pagema
|
|||
"bgcolor[#080808BB;true]"..
|
||||
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
||||
"label[-5,-5;"..name.."]"..
|
||||
"image[" .. offset[name] .. ";1.5,1.44;creative_active.png"..hoch[name]..
|
||||
"^[combine:107x98:21,17="..bg[name].."]"..
|
||||
"image_button[-0.1,0;1,1;"..bg["blocks"]..";build;;;false]".. --build blocks
|
||||
"image_button[1.15,0;1,1;"..bg["deco"]..";deco;;;false]".. --decoration blocks
|
||||
"image_button[2.415,0;1,1;"..bg["mese"]..";mese;;;false]".. --bluestone
|
||||
|
@ -190,6 +192,8 @@ local function get_creative_formspec(player_name, start_i, pagenum, page, pagema
|
|||
"image_button[4.93,8.28;1,1;"..bg["brew"]..";brew;;;false]".. --materials
|
||||
"image_button[9.19,8.28;1,1;"..bg["inv"]..";inv;;;false]".. --inventory
|
||||
"list[detached:creative_trash;main;9.02,7.02;1,1;]"..
|
||||
"image["..ofs[name].x..", "..ofs[name].y..";1.5,1.44;creative_active.png"..hoch[name].."]"..
|
||||
"image["..(ofs[name].x + 0.17)..", "..(ofs[name].y + 0.14)..";1,1;"..bg[name].."]"..
|
||||
"image[9.04," .. tostring(slider_pos) .. ";0.78,"..tostring(slider_height) .. ";creative_slider.png]"
|
||||
|
||||
if name == "all" then
|
||||
|
|
|
@ -1036,6 +1036,45 @@ minetest.register_node("default:lava_flowing", {
|
|||
not_in_creative_inventory = 1},
|
||||
})
|
||||
|
||||
|
||||
local function get_chest_neighborpos(pos, param2, side)
|
||||
if side == "right" then
|
||||
if param2 == 0 then
|
||||
return {x=pos.x-1, y=pos.y, z=pos.z}
|
||||
elseif param2 == 1 then
|
||||
return {x=pos.x, y=pos.y, z=pos.z+1}
|
||||
elseif param2 == 2 then
|
||||
return {x=pos.x+1, y=pos.y, z=pos.z}
|
||||
elseif param2 == 3 then
|
||||
return {x=pos.x, y=pos.y, z=pos.z-1}
|
||||
end
|
||||
else
|
||||
if param2 == 0 then
|
||||
return {x=pos.x+1, y=pos.y, z=pos.z}
|
||||
elseif param2 == 1 then
|
||||
return {x=pos.x, y=pos.y, z=pos.z-1}
|
||||
elseif param2 == 2 then
|
||||
return {x=pos.x-1, y=pos.y, z=pos.z}
|
||||
elseif param2 == 3 then
|
||||
return {x=pos.x, y=pos.y, z=pos.z+1}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function hacky_swap_node(pos,name, param2)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
if node.name == name then
|
||||
return
|
||||
end
|
||||
node.name = name
|
||||
node.param2 = param2 or node.param2
|
||||
local meta0 = meta:to_table()
|
||||
minetest.env:set_node(pos,node)
|
||||
meta = minetest.env:get_meta(pos)
|
||||
meta:from_table(meta0)
|
||||
end
|
||||
|
||||
minetest.register_node("default:chest", {
|
||||
description = "Chest",
|
||||
tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
|
||||
|
|
|
@ -35,42 +35,3 @@ minetest.register_node("default:torch", {
|
|||
wall_side = {-0.5, -0.3, -0.1, -0.5 + 0.3, 0.3, 0.1},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
local function get_chest_neighborpos(pos, param2, side)
|
||||
if side == "right" then
|
||||
if param2 == 0 then
|
||||
return {x=pos.x-1, y=pos.y, z=pos.z}
|
||||
elseif param2 == 1 then
|
||||
return {x=pos.x, y=pos.y, z=pos.z+1}
|
||||
elseif param2 == 2 then
|
||||
return {x=pos.x+1, y=pos.y, z=pos.z}
|
||||
elseif param2 == 3 then
|
||||
return {x=pos.x, y=pos.y, z=pos.z-1}
|
||||
end
|
||||
else
|
||||
if param2 == 0 then
|
||||
return {x=pos.x+1, y=pos.y, z=pos.z}
|
||||
elseif param2 == 1 then
|
||||
return {x=pos.x, y=pos.y, z=pos.z-1}
|
||||
elseif param2 == 2 then
|
||||
return {x=pos.x-1, y=pos.y, z=pos.z}
|
||||
elseif param2 == 3 then
|
||||
return {x=pos.x, y=pos.y, z=pos.z+1}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function hacky_swap_node(pos,name, param2)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
if node.name == name then
|
||||
return
|
||||
end
|
||||
node.name = name
|
||||
node.param2 = param2 or node.param2
|
||||
local meta0 = meta:to_table()
|
||||
minetest.env:set_node(pos,node)
|
||||
meta = minetest.env:get_meta(pos)
|
||||
meta:from_table(meta0)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue