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

If a recipe listed for a factory doesn't exist in the recipes list, entire game hard crashes... #56

Open
GavJenks opened this issue Oct 28, 2018 · 2 comments

Comments

@GavJenks
Copy link

something as simple as recipe: stone, instead of recipe: Stone, for example, can crash the whole game at RUN-time, no less. It happens when you're in the menu and you try to click on the recipe that has no recipe entry for it.

The plugin should simply skip any recipes in the factory's list that cannot be found. Failing that, it could skip the whole factory. Failing that, the whole plugin should sacrifice itself and not run.

@ProgrammerDan
Copy link

ProgrammerDan commented Oct 28, 2018 via email

@GavJenks
Copy link
Author

This is on factorymod 2.4.2. It seems like there's some sort of insufficient initial validity check, but then actual runtime has details that the initial check didn't cover and it isn't itself in a try{} block, so it crashes.

Because the menu DOES show the correct output. For example, I had a crash with make_tnt vs. make_TNT, and the factory menu showed a TNT block as the recipe icon, so it had read some of the details. But it is as if an initial check said "Oh yeah that looks formatted correctly, carry on" and that check was case insensitive, whereas at runtime, it needs case sensitivity. Or something like that.

Another example was I used Material.NETHER_WART, instead of Material.NETHER_STALK, which caused again the recipe's correct output to show up but a crash when you tried to use it. As if it initially checked formatting but not valid materials, or something.

Ideally, the actual runtime execution should just be in a try block so that no matter what happens it's fine. Cancel the inventory event, do nothing else, move on.

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

No branches or pull requests

2 participants