Skip to content

Commit

Permalink
do cheap tests first
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Oct 7, 2024
1 parent a842c42 commit f9a2bbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/lua/dwarfvet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ local function get_new_patients(cur_patients)
local new_patients = {}
for _,unit in ipairs(df.global.world.units.active) do
if unit.job.current_job then goto continue end
if cur_patients[unit.id] or not is_valid_animal(unit) then goto continue end
if not unit.health or not unit.health.flags.needs_healthcare then goto continue end
if cur_patients[unit.id] or not is_valid_animal(unit) then goto continue end
new_patients[unit.id] = unit
::continue::
end
Expand Down

0 comments on commit f9a2bbf

Please sign in to comment.