antoine-fresse / betterradpill

MIT License
0 stars 1 forks source link

Mod broken due to biobot not having a radiation balance #1

Open lnagl opened 7 months ago

lnagl commented 7 months ago

Your wonderful mod broke when Klei added Peggy the biobot. The fix is not to dereference value on the radiation balance when it is null. Should I make a pull request? This is the change:

                AmountInstance amount = consumer.GetAmounts().Get(Db.Get().Amounts.RadiationBalance.Id);
                if (amount != null)
                {
                    if (amount.value < BetterRadPills.Settings.Rads)
                    {
                        __result = false;
                    }
                }
lnagl commented 7 months ago

Since I hadn't heard back from you I uploaded the fixed mod at https://steamcommunity.com/sharedfiles/filedetails/?id=3175775975. I will remove it at your request or when you update the real version. Thanks!