Skip to content

Commit

Permalink
0.1.4
Browse files Browse the repository at this point in the history
- Fixed flipping of storage tanks
  • Loading branch information
Roktaal committed Apr 10, 2016
1 parent cad88a2 commit 5aa9b36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ local function flip_v(player_index)
local dir = ents[i].direction or 0
if ents[i].name == "curved-rail" then
ents[i].direction = (13 - dir)%8
elseif ents[i].name == "storage-tank" then
if ents[i].direction == 2 or ents[i].direction == 6 then
ents[i].direction = 4
else
ents[i].direction = 2
end
else
ents[i].direction = (12 - dir)%8
end
Expand Down Expand Up @@ -43,6 +49,12 @@ local function flip_h(player_index)
local dir = ents[i].direction or 0
if ents[i].name == "curved-rail" then
ents[i].direction = (9 - dir)%8
elseif ents[i].name == "storage-tank" then
if ents[i].direction == 2 or ents[i].direction == 6 then
ents[i].direction = 4
else
ents[i].direction = 2
end
else
ents[i].direction = (16 - dir)%8
end
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blueprint_flipper",
"version": "0.1.3",
"version": "0.1.4",
"title": "Blueprint Flipper",
"author": "GopherAtl, Roktaal",
"homepage": "https://github.com/Roktaal/blueprint_flipper",
Expand Down

0 comments on commit 5aa9b36

Please sign in to comment.