local cfg1 = require("config.config-1")
data:extend
{
{
-- This allows loading the selection-tool type item when mods are removed
type = "selection-tool",
name = cfg1.AC_sel_tool_name,
-- icon = "__base__/graphics/icons/blueprint.png",
-- icon_size = 64, icon_mipmaps = 4,
icons = {
{ icon = "__base__/graphics/icons/upgrade-planner.png", icon_size = 64, icon_mipmaps = 4 },
{ icon = "__base__/graphics/icons/linked-chest-icon.png", icon_size = 64, icon_mipmaps = 4 },
},
flags = {"hidden", "not-stackable", "only-in-cursor", "spawnable"},
subgroup = "other",
order = "x[info]-l[linked-chest]",
stack_size = 1,
selection_color = { r = 0, g = 1, b = 0 },
alt_selection_color = { r = 1, g = 1, b = 0 },
selection_mode = {"buildable-type", "same-force"},
alt_selection_mode = {"buildable-type", "same-force"},
selection_cursor_box_type = "entity",
alt_selection_cursor_box_type = "entity",
entity_filters = cfg1.AC_name_table(),
-- entity_type_filters = {cfg1.AC_type},
--tile_filters = {"concrete", "stone-path"},
--entity_filter_mode = "whitelist",
--tile_filter_mode = "whitelist",
alt_entity_filters = cfg1.AC_name_table(),
-- alt_entity_type_filters = {cfg1.AC_type},
--alt_tile_filters = {"concrete", "stone-path"},
--alt_entity_filter_mode = "whitelist",
--alt_tile_filter_mode = "whitelist",
show_in_library = false
},
}
Error while loading item prototype "Schall-AC-inserter-selection-tool" (selection-tool): Unknown flag "hidden" Modifications
17번 줄에
flags = {"true", "not-stackable", "only-in-cursor", "spawnable"}, 이걸 flags = {"not-stackable", "only-in-cursor", "spawnable"}, hidden = true, 이렇게 바꿔볼래
Error while loading item prototype "Schall-AC-inserter-selection-tool" (selection-tool): Key "select" not found in property tree at ROOT.selection-tool.Schall-AC-inserter-selection-tool Modifications 이런 오류뜸
https://lua-api.factorio.com/latest/prototypes/SelectionToolPrototype.html#select
selection-tool
타입이 갱신됐네.
hidden 추가한거처럼 select, alt_select 프로퍼티 추가해야할듯
갑자기 너무 복잡해지네 그럼 어떻게 해야함?
stack_size =1, 밑줄 부터 entity_filters = ... 윗줄 까지 다 지우고 밑에걸로 바꿔봐select = { border_color = { r = 0, g = 1, b = 0 }, cursor_box_type = "entity", mode = {"buildable-type", "same-force"}, }, alt_select = { border_color = { r = 1, g = 1, b = 0 }, cursor_box_type = "entity", mode = {"buildable-type", "same-force"}, },
너가 작성한 select_... 이런것들이 다 프로퍼티 하나로 압축됐다고 생각하면 될듯
이거 고치니까 다른 파일에서 오류 튀어나오네 Schall-AC-link" (shortcut): Value must be a string in property tree at ROOT.shortcut.Schall-AC-link.icon Modifications 이라는데 이런오류 뜨면 어떻게 해결법을 찾아야함? Rood어쩌고 보니깐 이것도 프로퍼티 추가해야함?
일단 에러 읽고 뭐가 잘못됐는지 원인 아는거지 아까 너가올린건 selection-tool 이라는 타입에서 select 라는 프로퍼티가 없다고 적혀있었고 이번엔 shortcut 이라는 타입에서ROOT.shortcut.어쩌구 값이 string 타입으로 와야 한다는 거네
그럼이제 원인이 된 타입을 알았으니깐 공식 API를 보러가면됨
이번엔 shortcut이라는 타입이였고
그걸 구성하는 prototype 문서(
https://lua-api.factorio.com/latest/prototypes/ShortcutPrototype.html)를
보러감
그리고 icon 타입이 스프라이트에서 파일 명 받는걸로 바뀌었는게 확인되네
일단 shortcut의 icon에 들어간 sprite를 이미지 파일 경로로 바꾸면 될듯
https://gall.dcinside.com/mgallery/board/view/?id=factorio&no=70913&page=1
https://lua-api.factorio.com/latest/types/FileName.html에
들어가서 예시코드 봐도 머가 바뀐건지 모르겠음
스프라이트에서 파일 명 받는걸로 바뀌었다는게 무슨말인지..
저기 오타 있다
수정함
헐 그냥 해본말인데