가끔씩 묻는 사람 나와서 모드 없이도 볼 수 있도록 짜와봤음


if game.player.gui.top.recycling_frame then game.player.gui.top.recycling_frame.destroy() end

local self_recipe=false

local frame=game.player.gui.top.add{type='frame',name='recycling_frame'}

local scroll=frame.add{type='scroll-pane',name='recipe_scroll',direction='vertical'}

local flow = scroll.add{type='flow', name='recipe_flow', caption='Recipe List',style='vertical_flow',direction="vertical"}

flow.style.vertical_spacing=0


local groups={}

local subgroups={}


for _,group in pairs(prototypes.item_group) do

groups[group.name]={}

end


for _,subgroup in pairs(prototypes.item_subgroup) do

table.insert(groups[subgroup.group.name],subgroup)

subgroups[subgroup.name]={}

end


for _,recipe in pairs(prototypes.recipe) do

if recipe.category=="recycling" then

local item = prototypes.item[recipe.ingredients[1].name]

local subgroup = item.subgroup.name

local recipe_custom={ name = recipe.name, order = item.order, self_recipe=self_recipe and(recipe.ingredients[1].name==recipe.products[1].name) }

table.insert(subgroups[subgroup],recipe_custom)

end

end


for subgroup_name,subgroup in pairs(subgroups) do

table.sort(subgroup, function(a,b) if a.order==b.order then return a.name<b.name else return a.order<b.order end end)

end


for group_name,group in pairs(groups) do

table.sort(group, function(a,b) return a.order<b.order end)

end


for group_name,group in pairs(groups) do

for _,subgroup in pairs(group) do

local target = subgroups[subgroup.name]

if #target>0 then

local subgroup_table = flow.add{type="table", name=subgroup.name,style='filter_slot_table',column_count=20}

for _,recipe in pairs(target) do

local style = recipe.self_recipe and "yellow_slot_button" or nil

local recipe_button=subgroup_table.add{type='choose-elem-button',elem_type="recipe",recipe=recipe.name,style=style}

recipe_button.locked=true

end

end

end

end




위의 커맨드를 콘솔창에 /c 쓰고 뒤에 붙여 넣기하면






이렇게 재활용 레시피가 뜨도록 했다

다시 없애고 싶다면 가장 첫 줄인

if game.player.gui.top.recycling_frame then game.player.gui.top.recycling_frame.destroy() end


만 콘솔창에 입력하면 사라짐



만약 2번쨰 줄에 있는

local self_recipe=false

local self_recipe=true

로 바꿔주면


자기 자신을 25% 반환하는 재활용 레시피들은 노란색으로 강조됨





재활용 레시피를 띄우는 것 자체는 그렇게 어렵지 않은데 정렬하는 작업이 상당히 귀찮았음

그래도 정렬하고 나니 보기는 좋다


보고싶다면 새 맵 하나 판 다음에 거기서 커맨드 쓰고 확인하면 될 것 같음


정렬하는건 나중에 팩토리피디아에도 따로 적용해야지