/// <summary> /// Gets the destination cell for the Duplicant to mingle. /// </summary> /// <returns>The destination where the Duplicant will go when the busy day is done.</returns> public int GetMingleCell() { int cell = mingleCellSensor.GetCell(); GameObject pod; if (!Grid.IsValidCell(cell) && (pod = GameUtil.GetTelepad()) != null) { cell = Grid.PosToCell(pod); } return(cell); }
/// <summary> /// Gets the destination cell for the Duplicant to mingle. /// </summary> /// <returns>The destination where the Duplicant will go when the busy day is done.</returns> public int GetMingleCell() { int cell = mingleCellSensor.GetCell(); if (!Grid.IsValidCell(cell)) { var mingler = sm.mingler.Get(smi); GameObject telepad; if (mingler != null && (telepad = GameUtil.GetTelepad(mingler. GetMyWorldId())) != null) { cell = Grid.PosToCell(telepad); } else { cell = Grid.InvalidCell; } } return(cell); }
public int GetMingleCell() { return(mingleCellSensor.GetCell()); }