@@ -884,13 +884,13 @@ local function get_tooltip(item, info, lang_code)
884
884
end
885
885
886
886
if info .replace then
887
- for i = 1 , # info .replace do
888
- local rpl = match (info .replace [i ], " %S+" )
887
+ for i = 1 , # info .replace . items do
888
+ local rpl = match (info .replace . items [i ], " %S+" )
889
889
local desc = clr (" #ff0" , get_desc (rpl , lang_code ))
890
890
891
- if info .cooktime then
891
+ if info .replace . type == " cooking " then
892
892
tooltip = add (S (" Replaced by @1 on smelting" , desc ))
893
- elseif info .burntime then
893
+ elseif info .replace . type == " fuel " then
894
894
tooltip = add (S (" Replaced by @1 on burning" , desc ))
895
895
else
896
896
tooltip = add (S (" Replaced by @1 on crafting" , desc ))
@@ -1073,11 +1073,11 @@ local function get_grid_fs(lang_code, fs, rcp, spacing)
1073
1073
for j = 1 , # (rcp .replacements or {}) do
1074
1074
local replacement = rcp .replacements [j ]
1075
1075
if replacement [1 ] == name then
1076
- replace = replace or {}
1076
+ replace = replace or {type = rcp . type , items = {} }
1077
1077
1078
1078
local added
1079
1079
1080
- for _ , v in ipairs (replace ) do
1080
+ for _ , v in ipairs (replace . items ) do
1081
1081
if replacement [2 ] == v then
1082
1082
added = true
1083
1083
break
@@ -1086,7 +1086,7 @@ local function get_grid_fs(lang_code, fs, rcp, spacing)
1086
1086
1087
1087
if not added then
1088
1088
label = fmt (" %s%s\n R" , label ~= " " and " \n " or " " , label )
1089
- replace [# replace + 1 ] = replacement [2 ]
1089
+ replace . items [# replace . items + 1 ] = replacement [2 ]
1090
1090
end
1091
1091
end
1092
1092
end
0 commit comments