Use null propagation

This commit is contained in:
Gustas
2023-02-19 15:29:08 +02:00
committed by Pavel Penev
parent b06cbd7a95
commit 157d1b32dc
12 changed files with 30 additions and 36 deletions

View File

@@ -74,8 +74,8 @@ namespace OpenRA.Mods.Common.Activities
if (enterLegacyHut != null)
enterLegacyHut.Repair(self);
else if (enterHut != null)
enterHut.Repair(self);
else
enterHut?.Repair(self);
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", speechNotification, self.Owner.Faction.InternalName);
TextNotificationsManager.AddTransientLine(textNotification, self.Owner);