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

Update ALS for Factorio 0.0.13 #12

Closed
wants to merge 3 commits into from

Conversation

jakimfett
Copy link

Remove deprecated 'defines', refactor game.get_surface(), and set item/loot distances.

@Mijago
Copy link

Mijago commented Jul 7, 2016

I guess there is more stuff missing, because opening the GUI results in this:
http://prntscr.com/bpuf37

@jakimfett
Copy link
Author

@Mijago can I get you to upload your world and the mods you're using so I can test this?

@Radje
Copy link

Radje commented Jul 9, 2016

@jakimfett I get the same error as @Mijago.
Save file and mods folder

Thanks for the help!

Edit. I actually just realized that that save point does not have ALS researched yet. But when selected it should be done within a minute or so. I will see if I can get a "better" save later today

@Mijago
Copy link

Mijago commented Jul 9, 2016

Sorry, I changed my mod-setting since then and did not have a backup.

Next time i'll do one :) I hope you get the fix, I just do not enough time currently.

I send this via the mail-reply as a test. I hope it works ;)

@DarkHelmet433
Copy link

I've had the same problem too. For me the problem was the GUI was malfunctioning.. eg: open the search and it wouldn't ever update. In order to try and reset things, I saved, uninstalled the modified mod, loaded, saved again, reinstalled the mod.

When I reloaded I'd see the research item for ALS. On researching it the gui button appears. If I press the button, I see the exact error reported above.

The patched mod was already malfunctioning before I tried this though - search wasn't working.

@anoutsider
Copy link
Owner

Hey,
Sorry guys for the delayed updates and thanks @jakimfett for stepping up.

Recently moved to a new job and a new city so been busy setteling in, i'll work on updating the mod and fixing all these issues this week.

@jakimfett
Copy link
Author

@anoutsider no worries, glad to do a bit to contribute!

I'll have a bit of time tomorrow to poke the problems @DarkHelmet433 and @Radje and @Mijago are having, and will update the PR with whatever fixes end up happening.

@DarkHelmet433
Copy link

DarkHelmet433 commented Jul 10, 2016

Hey. I found the remaining gui bug.

change all
ipairs(game.players)
to
pairs(game.players)

because of
0.13.0 release notes wrote:
Changed game.players, game.surfaces, game.entity_prototypes, game.item_prototypes, game.fluid_prototypes, force.recipes, force,technologies to use custom access + iterator objects for improved performance.

Without this, the player iterations are coming up empty. With this the search interface works again and the remaining nil errors that I was having went away.

To be clear, I reverted my other changes and am running with the pull request from @jakimfett plus s/ipairs(game.players)/pairs(game.players)/ and no other tweaks.

@Mijago
Copy link

Mijago commented Jul 11, 2016

Nice! I'll try  later. Thank you!

@jakimfett
Copy link
Author

...yeah, sorry, I did approximately zero development this weekend because I totally wasn't playing Pokemon Go.

@jakimfett
Copy link
Author

Also, @DarkHelmet433 thanks for posting the info. That's probably why #14 is happening.

@AndrisBorbas
Copy link

I get an error message on clicking normal items: Error while running the event handler: advanced-logistics-system/control.lua:1237: bad argument #1 to 'match' (string expected, got nil)
And the 1237 line is this: local left,num,right = string.match(n,'^([^%d]%d)(%d)(.-)$')

@Diedel72
Copy link

I got the same error in line 1237, but i am not sure why the function gets a nil number.

A quick fix that seems to work for now is just returning an empty string on a nil number.

--- Format numbers
function number_format(n) -- credit http://richard.warburton.it
if n == nil then
return ""
else
local left,num,right = string.match(n,'^([^%d]%d)(%d)(.-)$')
return left..(num:reverse():gsub('(%d%d%d)','%1,'):reverse())..right
end
end

@smickles
Copy link

I'm getting a
Error while running the event handler: __advanced-logistics-system__/gui/main.lua:60: attempt to index field '?' (a nil value)
when I click the button to open the interface after researching the tech. Anyone know what's going on there?

@HammerPiano
Copy link

Hi everyone
I added the factorio version in the info.json file, because of 0.13 and whenever I launch factorio, while loading the prototypes I get:
Error while loading entity prototype "Is-controller" (player): No suck node(item_pickup_distance)
Modifications: advanced-logistics-system
I am a beginner modder, know almost nothing about modding.

@Danielv123
Copy link

@HammerPiano when fixing things, consider submitting a pull request/forking the project if you got it to work. I am sure someone would be very interested :)

@HammerPiano
Copy link

@Danielv123, I forked this project and changed info.json according to the factorio team(added factorio version). Here is the link to my fork with the change:
https://github.com/HammerPiano/advanced-logistics-system/blob/master/info.json

@anoutsider
Copy link
Owner

Thank you all for the help, due to conflicts and other updates to the code i'll be closing this pull request as it's no longer required.

@anoutsider anoutsider closed this Sep 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants