Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Myk <[email protected]>
  • Loading branch information
Pebob and myk002 authored Oct 28, 2023
1 parent d0d7106 commit 523c585
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gui/pregnancy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -175,7 +175,7 @@ function PregnancyGui:spouseFather()
self.father_historical = father
self.father = false
end
self:updateLayout()
self:updateLayout()
end
end

Expand All @@ -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

Expand Down

0 comments on commit 523c585

Please sign in to comment.