Page 1 of 1

Factorio 0.18.x breaks pollution in Yuoki mods

Posted: Mon Apr 13, 2020 8:12 am
by ChurchOrganist
A couple of Saturdays ago, during my Yuoki Frostworld Twitch stream I noticed that the Yuoki miners on the coal outpost I had just built weren't producing pollution.

After the stream was over i did some investigation, and discovered in the 0.18.0 patch notes the following lines......
Removed EntityPrototype::emissions_per_tick, it is replaced by emissions_per_second.
Removed EnergySourcePrototype::emissions_per_second_per_watt and emissions, they are replaced by emissions_per_minute.
Now I knew that there could be a problem with this because I had contacted Yuoki about a list of warnings which appeared in the log file in 0.17 regarding the use of the emissions EnergySourcePrototype, and on checking the Yuoki 0.8.x code I discovered that it was still using emissions to give pollution values, and consequently the Factorio API was ignoring pollution values for the Yuoki machines.

Using the warnings list from Factorio 0.17.x as a guide I tracked down each one of the emissions uses in the prototypes and replaced them with a suitable value of emissions_per_minute.

I have tested this over the last couple of weeks and it all seems to be working OK.

The following ZIP files contain the code changes to restore normal pollution behaviour to the Yuoki mod suite.
yi_engines.zip
Fixes pllution in Yuoki Industries - Engines (Addon)
(11.69 KiB) Downloaded 139 times
yi_railway.zip
Fixes pollution in Yuoki Industries - Railways
(2.19 KiB) Downloaded 135 times
Yuoki.zip
Fixes pollution in the main Yuoki mod
(20.26 KiB) Downloaded 137 times
Only attempt to change the existing mods if you know what you are doing.

Re: Factorio 0.18.x breaks pollution in Yuoki mods

Posted: Mon Apr 13, 2020 12:18 pm
by YuokiTani
Thanks ChurchOrganist !
I have included into the mod and uploaded with your corrections.