Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shouldn't crash on 0.16 anymore #23

Merged
merged 3 commits into from
Dec 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ script.on_event(defines.events.on_robot_pre_mined, function(event)
entities_pre_mined(event)
end)

script.on_event(defines.events.on_preplayer_mined_item, function(event)
script.on_event(defines.events.on_pre_player_mined_item, function(event)
entities_pre_mined(event)
end)

Expand Down
6 changes: 3 additions & 3 deletions source/control/belt-sorter-gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ beltSorterGui.open = function(player,entity)
local frame = player.gui.left.add{type="frame",name="beltSorterGui",direction="vertical",caption={"belt-sorter-title"}}
frame.add{type="label",name="description",caption={"belt-sorter-advanced-description"}}
local colspans = {3,7,13}
frame.add{type="table",name="table",colspan=colspans[lvl]}
frame.add{type="table",name="table",colspan=colspans[lvl], column_count=3}

local labels={"up","left","right","down"}
for i,label in pairs(labels) do
frame.table.add{type="label",name="title"..i,caption={"",{label},":"}}
for j=1,beltSorterGui.slotsAvailable[lvl] do
frame.table.add{type="choose-elem-button",name="beltSorter.slot."..i.."."..j,elem_type="item"}
if lvl>1 then
local sides = frame.table.add{type="table",name="sides."..i.."."..j,colspan=1}
local sides = frame.table.add{type="table",name="sides."..i.."."..j,colspan=1, column_count=3}
local caption = {"left","right"}
for side = 1,2 do
sides.add{type="checkbox",name="beltSorter.side."..i.."."..j.."."..side,caption={caption[side]},state=false}
Expand All @@ -42,7 +42,7 @@ beltSorterGui.open = function(player,entity)
end
end
end
frame.add{type="table",name="settings",colspan=2}
frame.add{type="table",name="settings",colspan=2, column_count=3}
frame.settings.add{type="button",name="beltSorter.copy",caption={"copy"}}
frame.settings.add{type="button",name="beltSorter.paste",caption={"paste"}}
beltSorterGui.refreshGui(player,entity)
Expand Down
4 changes: 2 additions & 2 deletions source/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "Belt sorter",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above the title there is a version field. Can you update this to 0.5.0 (the next major)?

"author": "judos",
"description": "Adds a new sorting entity which allows to sort items from belts to belts - recommended for the hardCrafting mod.",
"dependencies": ["base >= 0.15.0"],
"dependencies": ["base >= 0.16.0"],
"homepage": "https://github.com/judos/beltSorter",
"factorio_version": "0.15"
"factorio_version": "0.16"
}
10 changes: 5 additions & 5 deletions source/migrations/beltSorter_0.3.7.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"item": [
["belt-sorter", "belt-sorter1" ],
["belt-sorter-advanced", "belt-sorter2" ],
["belt-sorter-advanced", "belt-sorter2" ]
],
"entity": [
["belt-sorter-v2", "belt-sorter1" ],
["belt-sorter-advanced", "belt-sorter2" ],
["belt-sorter-lamp", "belt-sorter-lamp1"],
["belt-sorter-advanced-lamp", "belt-sorter-lamp2"],
["belt-sorter-advanced-lamp", "belt-sorter-lamp2"]
],
"technology": [
["belt-sorter", "belt-sorter1"],
["belt-sorter-2", "belt-sorter2"],
["belt-sorter-2", "belt-sorter2"]
],
"recipe": [
["belt-sorter", "belt-sorter1"],
["belt-sorter-advanced", "belt-sorter2"],
],
["belt-sorter-advanced", "belt-sorter2"]
]
}
6 changes: 3 additions & 3 deletions source/prototypes/belt-sorter-config-combinator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local entity = deepcopy(data.raw["constant-combinator"]["constant-combinator"])
overwriteContent(entity,{
name = "belt-sorter-config-combinator",
item_slot_count = 20,
icon = "__beltSorter__/graphics/icons/belt-sorter-config.png",
icon = "__beltSorter__/graphics/icons/belt-sorter-config.png",
minable = {hardness = 10, mining_time = 10, results={}},
order = "zzz",
collision_box = {{0,0},{0,0}},
Expand All @@ -25,7 +25,7 @@ data:extend({entity})
local item = deepcopy(data.raw["item"]["constant-combinator"])
overwriteContent(item,{
name = "belt-sorter-config-combinator",
icon = "__beltSorter__/graphics/icons/belt-sorter-config.png",
icon = "__beltSorter__/graphics/icons/belt-sorter-config.png",
flags = {"goes-to-main-inventory", "hidden"},
place_result = "belt-sorter-config-combinator"
})
Expand Down Expand Up @@ -194,4 +194,4 @@ data:extend({item})

circuit_wire_max_distance = 7.5
},
]]--
]]--