From 523c58558064d3291be2e93369be2632c4349040 Mon Sep 17 00:00:00 2001 From: Petter Jennison Date: Sat, 28 Oct 2023 19:08:04 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Myk --- gui/pregnancy.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/pregnancy.lua b/gui/pregnancy.lua index 6590f5e85a..b3fc94eebb 100644 --- a/gui/pregnancy.lua +++ b/gui/pregnancy.lua @@ -147,7 +147,7 @@ function PregnancyGui:init() end function PregnancyGui:selectmother() - local unit = dfhack.gui.getSelectedUnit() + local unit = dfhack.gui.getSelectedUnit(true) if unit then if unit.sex==0 and dfhack.units.isAdult(unit) then self.mother = unit @@ -157,7 +157,7 @@ function PregnancyGui:selectmother() end function PregnancyGui:selectfather() - local unit = dfhack.gui.getSelectedUnit() + local unit = dfhack.gui.getSelectedUnit(true) if unit and dfhack.units.isAdult(unit) then self.father = unit self.father_historical = false @@ -175,7 +175,7 @@ function PregnancyGui:spouseFather() self.father_historical = father self.father = false end - self:updateLayout() + self:updateLayout() end end @@ -196,7 +196,7 @@ function PregnancyGui:getMotherLabel() NEWLINE ) end - else return ('No mother selected - Must be a adult female') + else return ('No mother selected - Must be an adult female') end end