Applied @LazyWizard's suggestion and made checks for getting sick only roll when NPC or feral with fake_common_cold effect coughs.
Also, while I'm here, I slightly buffed environmental factor when determining player's chance to get sick as I felt that wearing no mouth protection at all and wearing a gas mask has almost the same effect when calculating this chance.
Describe alternatives you've considered
None.
Testing
Built a cage for me and NPC with the effect. Waited for NPC to cough on me.
Summary
None
Purpose of change
Resolve possible performance issues.
Describe the solution
Applied @LazyWizard's suggestion and made checks for getting sick only roll when NPC or feral with
fake_common_cold
effect coughs.Also, while I'm here, I slightly buffed environmental factor when determining player's chance to get sick as I felt that wearing no mouth protection at all and wearing a gas mask has almost the same effect when calculating this chance.
Describe alternatives you've considered
None.
Testing
Built a cage for me and NPC with the effect. Waited for NPC to cough on me.
Additional context
None.