Navigation Menu

Skip to content

Commit

Permalink
Fixed arrows pointing the wrong way
Browse files Browse the repository at this point in the history
  • Loading branch information
MagmaMcFry committed May 10, 2017
1 parent 2b74546 commit 98fcebc
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
9 changes: 9 additions & 0 deletions connections.lua
Expand Up @@ -94,6 +94,15 @@ local function delete_connection_indicator(factory, cid, ctype)
local old_indicator = factory.connection_indicators[cid]
if old_indicator and old_indicator.valid then old_indicator.destroy() end
end

local function refresh_connection_indicator(conn) -- Used in update 5
if conn and conn._valid then
local setting, dir = c_direction[conn._type](conn)
set_connection_indicator(conn._factory, conn._id, conn._type, setting, dir)
end
end

Connections.refresh_connection_indicator = refresh_connection_indicator
-- Connection changes --

local function register_connection(factory, cid, ctype, conn)
Expand Down
2 changes: 1 addition & 1 deletion info.json
Expand Up @@ -5,5 +5,5 @@
"author": "MagmaMcFry",
"description": "The official, improved rewrite of Factorissimo. Place down factory buildings, walk in, build your factories inside!",
"factorio_version": "0.15",
"dependencies": ["base >= 0.15.7"]
"dependencies": ["base >= 0.15.10"]
}
1 change: 1 addition & 0 deletions prototypes/component.lua
Expand Up @@ -178,6 +178,7 @@ local function create_indicator(ctype, suffix, image)
base_area = 1,
pipe_connections = {},
},
two_direction_only = false,
window_bounding_box = {{0,0},{0,0}},
pictures = {
picture = {
Expand Down
12 changes: 10 additions & 2 deletions updates.lua
@@ -1,7 +1,7 @@
Updates = {}

Updates.init = function()
global.update_version = 5
global.update_version = 6
end

Updates.run = function()
Expand Down Expand Up @@ -72,5 +72,13 @@ Updates.run = function()
end
end
end
global.update_version = 5
if global.update_version <= 5 then
-- Refresh all connection markers because they may have been turned around by 0.15.10
for _, factory in pairs(global.factories) do
for _, conn in pairs(factory.connections) do
Connections.refresh_connection_indicator(conn)
end
end
end
global.update_version = 6
end

0 comments on commit 98fcebc

Please sign in to comment.