protected override void OnEnterComplete(Actor self, Actor targetActor) { // Make sure the target hasn't changed while entering // OnEnterComplete is only called if targetActor is alive if (targetActor != enterActor) { return; } if (!CanEnterHut()) { return; } if (enterLegacyHut != null) { enterLegacyHut.Repair(self); } else if (enterHut != null) { enterHut.Repair(enterActor, self); } Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", notification, self.Owner.Faction.InternalName); if (enterBehaviour == EnterBehaviour.Dispose) { self.Dispose(); } else if (enterBehaviour == EnterBehaviour.Suicide) { self.Kill(self); } }
protected override void OnInside(Actor self) { if (legacyHut != null) { if (legacyHut.BridgeDamageState == DamageState.Undamaged || legacyHut.Repairing || legacyHut.Bridge.GetHut(0) == null || legacyHut.Bridge.GetHut(1) == null) { return; } legacyHut.Repair(self); } else if (hut != null) { if (hut.BridgeDamageState == DamageState.Undamaged || hut.Repairing) { return; } hut.Repair(target, self); } Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", notification, self.Owner.Faction.InternalName); }