Skip to content

Commit

Permalink
try to find item name from entity
Browse files Browse the repository at this point in the history
add walls to blueprints
  • Loading branch information
Choumiko committed Feb 27, 2016
1 parent 1628721 commit 03ea4ef
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 6 deletions.
7 changes: 5 additions & 2 deletions FARL.lua
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,17 @@ function get_item_name(some_name)
if game.item_prototypes[some_name] then
return game.item_prototypes[some_name].name
elseif game.entity_prototypes[some_name] then
return game.entity_prototypes[some_name].name
local items = game.entity_prototypes[some_name].items_to_place_this
for n, item in pairs(items) do
return item.name
end
else
--it's a tile?!
if some_name == "stone-path" then
return "stone-brick"
end
end
debugDump("Couldn't find item for:"..item,true)
error("Couldn't find item for:"..some_name,2)
end
--apiCalls = {find={item=0,tree=0,stone=0,other=0},canplace=0,create=0,count={item=0,tree=0,stone=0,other=0}}
local RED = {r = 0.9}
Expand Down
37 changes: 35 additions & 2 deletions Settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,23 @@ defaults_concrete_diag = {
direction = 1,
entity_number = 5,
name = "rail-signal",
position = {x = 1.5,y = 1.5}}
position = {x = 1.5,y = 1.5}},
{
entity_number = 6,
name = "stone-wall",
position = {x = -3.5,y = -3.5}},
{
entity_number = 7,
name = "stone-wall",
position = {x = -2.5,y = -3.5}},
{
entity_number = 8,
name = "stone-wall",
position = {x = 4.5,y = 3.5}},
{
entity_number = 9,
name = "stone-wall",
position = {x = 4.5,y = 4.5}}
},
tiles = {
{ name = "concrete", position = {x = -3,y = -3}},
Expand Down Expand Up @@ -85,7 +101,24 @@ defaults_concrete_vert = {
{
entity_number = 5,
name = "straight-rail",
position = {x = 3,y = 1}}
position = {x = 3,y = 1}},
{
entity_number = 6,
name = "stone-wall",
position = {x = -5.5,y = 1.5}},
{
entity_number = 7,
name = "stone-wall",
position = {x = -5.5,y = 0.5}},
{
entity_number = 8,
name = "stone-wall",
position = {x = 5.5,y = 1.5}},
{
entity_number = 9,
name = "stone-wall",
position = {x = 5.5,y = 0.5}
}
},
tiles = {
{ name = "concrete",
Expand Down
2 changes: 1 addition & 1 deletion control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ local function on_configuration_changed(data)
else
debugDump("FARL version: "..newVersion,true)
end
if oldVersion and oldVersion < "0.5.12" then
if oldVersion and oldVersion < "0.5.13" then
debugDump("Reset settings",true)
global = nil
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": "FARL",
"version": "0.5.12",
"version": "0.5.13",
"title": "Fully Automated Rail Layer",
"author": "Choumiko",
"contact": "www.factorioforums.com",
Expand Down

0 comments on commit 03ea4ef

Please sign in to comment.