CustomSpawns icon indicating copy to clipboard operation
CustomSpawns copied to clipboard

Sanity check not acted upon

Open VitaliiAndreev opened this issue 3 years ago • 2 comments

Oi oi. Check out Diplomacy.ForcedWarPeaceBehaviour.GetDiplomacyFromValidClans(). You seem to be still trying to look for a clan when you know it's not there. Is that an oversight or intended behavior? C:

image

VitaliiAndreev avatar Feb 06 '22 00:02 VitaliiAndreev

Hello, it is indeed an unintented behaviour. Good catch ! Adding the continue statement will be good enough.

JoeFwd avatar Feb 06 '22 12:02 JoeFwd

Ye, that's what I ended up doing in my manual hotfix. C: Can't push a new branch to this repo though.

In relation to this, I've also opted to remove exception throwing in SetWarIfPossible() because it looks like that case shouldn't be fatal. I haven't been digging into the code to determine if it has consequences further down, but it looks like it could just be logged as a warning and ignored instead of crashing the whole thing. C:

VitaliiAndreev avatar Feb 06 '22 14:02 VitaliiAndreev