eott / preciouspreciouscaffeine

[Done] A mod for the game Factorio, adding coffee products and technology to the game
2 stars 3 forks source link

Crash with Trainsaver mod #7

Open ADDSynth opened 1 month ago

ADDSynth commented 1 month ago

hehe, I found another crash. 😅 This time it's because of the Trainsaver mod. Screenshot 2024-10-22 140230

Trainsaver is a mod where, if you're idle/afk, after about a minute, the screen transitions to follow one of your trains as it goes around the factory. It's when this happens that clicking on the Coffee button causes the crash. And I have actually confirmed this myself.

I'm guessing the mod is using a 'fake player' or something, which doesn't have an inventory. How I would fix it is just by adding a check if the entity has an inventory first, then continuing with the rest of the code. But again, I defer to you. You know more about this than I do, and it's your code, you know it better than anyone.

(by the way, the reason why we clicked the coffee button during the trainsaver was to make our crafting queue faster.)

You said you may not want to work on this again until 2.0 drops, well it did just a few days ago, so I understand if you want to focus on updating your mod to work with the new version and not add this fix at the moment. I've already told the person I'm playing with to avoid clicking the Coffee button while trainsaver is going. Though trainsaver is beginning to be more and more of a nuisance, so I may want to remove it from our game in the future.

Since the update dropped, mods will start to update to be compatible with the new version. Well we're in the middle of a game right now, and I need everything to stay stable. I can't update mods unless they are compatible with Factorio 1.1, and I need to keep Factorio at 1.1 too. To do that you go to the Betas tab in Steam and select the 1.1.110 Outdated Stable version.

eott commented 1 month ago

Thanks for reporting the crash. You're right in that I will be focusing on updating the mod for 2.0 and SA, and in addition I'm currently playing the game, not working on an update. So unfortunately I can't offer a quick bugfix for Factorio 1.1.x. But I will keep the case in mind for when I do get around to updating the mod.