Compare commits

...

6 Commits

Author SHA1 Message Date
MeseCraft 0e5af25afe Merge branch 'craftguide-clear_craft' of dekunuts/MeseCraft into unstable 2022-08-14 13:25:07 +00:00
MeseCraft 3e65fba4a8 Merge branch 'deprecations_fixes' of MisterE123/MeseCraft into unstable 2022-08-14 13:23:36 +00:00
Matthew Nestor 00d73edb0c only handle clear_craft if it makes sense to do so 2022-08-13 22:34:35 -04:00
MisterE 54b9cd4a77 fix some bugs with cleaner and xpanes 2022-08-13 21:43:06 -04:00
MisterE b7a24aec2a add underline to tabs in inventory 2022-08-13 14:05:51 -04:00
Matthew Nestor 944674df05 handle basic table 2022-08-12 09:58:23 -04:00
19 changed files with 86 additions and 25 deletions

View File

@ -1351,15 +1351,30 @@ end
local old_clear_craft = core.clear_craft
core.clear_craft = function(def)
old_clear_craft(def)
local craft_removed = old_clear_craft(def)
if true_str(def) then
def = match(def, "%S*")
recipes_cache[def] = nil
fuel_cache[def] = nil
if craft_removed then
if true_str(def) then
def = match(def, "%S*")
recipes_cache[def] = nil
fuel_cache[def] = nil
elseif is_table(def) then
return -- TODO
elseif is_table(def) then
if def.type == "toolrepair" then
return
end
for item_name, item_recipes in pairs(recipes_cache) do
for recipe_index, recipe in pairs(item_recipes) do
for ingredient_index, ingredient in pairs(recipe.items) do
if (recipe.type == def.type) and (ingredient == def.recipe) then
table.remove(recipes_cache[item_name], recipe_index)
return
end
end
end
end
end
end
end

View File

@ -116,7 +116,7 @@ function xpanes.register_pane(name, def)
groups = flatgroups,
drop = "xpanes:" .. name .. "_flat",
sounds = def.sounds,
use_texture_alpha = def.use_texture_alpha or "opaque",
use_texture_alpha = def.use_texture_alpha and "blend" or "clip",
node_box = {
type = "fixed",
fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}},
@ -145,7 +145,7 @@ function xpanes.register_pane(name, def)
groups = groups,
drop = "xpanes:" .. name .. "_flat",
sounds = def.sounds,
use_texture_alpha = def.use_texture_alpha or "clip",
use_texture_alpha = def.use_texture_alpha and "blend" or "clip",
node_box = {
type = "connected",
fixed = {{-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}},
@ -168,7 +168,6 @@ xpanes.register_pane("pane", {
textures = {"default_glass.png", "", "xpanes_edge.png"},
inventory_image = "default_glass.png",
wield_image = "default_glass.png",
use_texture_alpha = "clip",
sounds = default.node_sound_glass_defaults(),
groups = {snappy=2, cracky=3, oddly_breakable_by_hand=3},
recipe = {
@ -228,6 +227,8 @@ if minetest.get_modpath("doors") then
sounds = default.node_sound_metal_defaults(),
sound_open = "xpanes_steel_bar_door_open",
sound_close = "xpanes_steel_bar_door_close",
gain_open = 0.15,
gain_close = 0.13,
recipe = {
{"xpanes:bar_flat", "xpanes:bar_flat"},
{"xpanes:bar_flat", "xpanes:bar_flat"},
@ -246,6 +247,8 @@ if minetest.get_modpath("doors") then
sounds = default.node_sound_metal_defaults(),
sound_open = "xpanes_steel_bar_door_open",
sound_close = "xpanes_steel_bar_door_close",
gain_open = 0.15,
gain_close = 0.13,
})
minetest.register_craft({

View File

@ -0,0 +1,6 @@
# textdomain: xpanes
Glass Pane=Vitra Vitraĵo
Obsidian Glass Pane=Obsidiana Vitra Vitraĵo
Steel Bars=Ŝtalaj Baraĵoj
Steel Bar Door=Ŝtala Baraĵa Pordo
Steel Bar Trapdoor=Ŝtala Baraĵa Plankpordo

View File

@ -1,6 +1,6 @@
# textdomain: xpanes
Glass Pane=Pannello di vetro
Obsidian Glass Pane=Pannello di vetro d'ossidiana
Steel Bars=Sbarre d'acciaio
Steel Bar Door=Porta con sbarre d'acciaio
Steel Bar Trapdoor=Botola con sbarre d'acciaio
# textdomain: xpanes
Glass Pane=Pannello di vetro
Obsidian Glass Pane=Pannello di vetro d'ossidiana
Steel Bars=Sbarre d'acciaio
Steel Bar Door=Porta con sbarre d'acciaio
Steel Bar Trapdoor=Botola con sbarre d'acciaio

View File

@ -0,0 +1,6 @@
# textdomain: xpanes
Glass Pane=板ガラス
Obsidian Glass Pane=黒曜石の板ガラス
Steel Bars=鉄棒の柵
Steel Bar Door=鉄棒のドア
Steel Bar Trapdoor=鉄棒のトラップドア

View File

@ -0,0 +1,6 @@
# textdomain: xpanes
Glass Pane=lo blaci plita
Obsidian Glass Pane=lo je'erma'ablaci blaci plita
Steel Bars=lo gasta garna
Steel Bar Door=lo gasta garna vrogai
Steel Bar Trapdoor=lo gasta garna lolvrogai

View File

@ -0,0 +1,6 @@
# textdomain: xpanes
Glass Pane=Szyba
Obsidian Glass Pane=Obsydianowa szyba
Steel Bars=Stalowe kraty
Steel Bar Door=Drzwi ze stalowych krat
Steel Bar Trapdoor=Właz ze stalowych krat

View File

@ -0,0 +1,6 @@
# textdomain: xpanes
Glass Pane=Painel de Vidro
Obsidian Glass Pane=Painel de Vidro de Obsidiana
Steel Bars=Barras de Aço
Steel Bar Door=Porta de Barras de Aço
Steel Bar Trapdoor=Alçapão de Barras de Aço

View File

@ -1,6 +0,0 @@
# textdomain: xpanes
Glass Pane=Glasruta
Obsidian Glass Pane=Obsidian Glasruta
Steel Bars=Stålgaller
Steel Bar Door=Stålgallers Dörr
Steel Bar Trapdoor=Stålgallers Fallucka

View File

@ -0,0 +1,6 @@
# textdomain: xpanes
Glass Pane=Tabuľa skla
Obsidian Glass Pane=Tabuľa obsidiánového skla
Steel Bars=Oceľové mreže
Steel Bar Door=Dvere z oceľových mreží
Steel Bar Trapdoor=Padajúce dvere z oceľových mreží

View File

@ -0,0 +1,6 @@
# textdomain: xpanes
Glass Pane=Glasruta
Obsidian Glass Pane=Obsidianglasruta
Steel Bars=Stålgaller
Steel Bar Door=Stålgallerdörr
Steel Bar Trapdoor=Stålgallerfallucka

View File

@ -0,0 +1,6 @@
# textdomain: xpanes
Glass Pane=Скляна Панель
Obsidian Glass Pane=Скляна Панель З Обсидіану
Steel Bars=Сталева Решітка
Steel Bar Door=Сталеві Двері З Решіткою
Steel Bar Trapdoor=Сталевий Люк З Решіткою

Binary file not shown.

Before

Width:  |  Height:  |  Size: 605 B

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 208 B

View File

@ -30,7 +30,8 @@ function sfinv.get_nav_fs(player, context, nav, current_idx)
-- Only show tabs if there is more than one page
if #nav > 1 then
return "tabheader[0,0;sfinv_nav_tabs;" .. table.concat(nav, ",") ..
";" .. current_idx .. ";true;false]"
";" .. current_idx .. ";true;false]"..
"image[-.5,-.3;11,.1;sfinv_underline.png]"
else
return ""
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

View File

@ -53,8 +53,8 @@ local function clean()
for j = 1, #objs do
local obj = objs[j]
if not obj:is_player() then
local entname = obj:get_luaentity().name
if not minetest.registered_entities[entname] then
local ent = obj:get_luaentity()
if not (ent) or not ( minetest.registered_entities[ent.name] ) then
obj:remove()
end
end