public RepairBridge(Actor self, Actor target, EnterBehaviour enterBehaviour, string notification) : base(self, target, enterBehaviour) { this.target = target; legacyHut = target.TraitOrDefault <LegacyBridgeHut>(); hut = target.TraitOrDefault <BridgeHut>(); this.notification = notification; }
protected override bool TryStartEnter(Actor self, Actor targetActor) { enterActor = targetActor; enterLegacyHut = enterActor.TraitOrDefault <LegacyBridgeHut>(); enterHut = enterActor.TraitOrDefault <BridgeHut>(); // Make sure we can still repair the target before entering // (but not before, because this may stop the actor in the middle of nowhere) if (!CanEnterHut()) { Cancel(self, true); return(false); } return(true); }
public RepairBridge(Actor self, Actor target) : base(self, target) { hut = target.Trait <BridgeHut>(); }
public RepairBridge(Actor self, Actor target, EnterBehaviour enterBehaviour, string notification) : base(self, target, enterBehaviour) { hut = target.Trait <BridgeHut>(); this.notification = notification; }
public RepairBridge(Actor self, Actor target, EnterBehaviour enterBehaviour) : base(self, target, enterBehaviour) { hut = target.Trait <BridgeHut>(); }
public RepairBridge(Actor self, Actor target) : base(self, target) { hut = target.Trait<BridgeHut>(); }