public override void onTaskStop() { base.onTaskStop(); this.washTimer = 0f; if (this.sink != null) { this.sink.setOccupant(null); this.sink.setFilled(false); } this.sink = null; }
public override bool shouldExecute() { if (this.cookData.plateState == CellBehaviorTable.EnumPlateState.DIRTY) { this.sink = this.calculateAndSetPathToClosest <CellBehaviorSink>( false, behavior => !behavior.isOccupied(), Rotation.UP, Position.down); if (this.navPath != null) { this.sink.setOccupant(this.owner); return(true); } else { // Can't find sink, but one is needed. this.owner.emote.startEmote(new Emote("exclamation", 0.1f).setTooltip("Needs a sink to wash dishes")); } } return(false); }