Skip to content

Commit

Permalink
removed trailing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkow committed Sep 7, 2024
1 parent b1e55d2 commit 251d154
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions eggwatch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ local function is_valid_animal(unit)
end
local function count_live_animals(race_creature_id)
local count_adults = count_adults_for_race(race_creature_id)
if count_adults then print_detalis(('we are counting adults for %s'):format(race_creature_id)) end
if count_adults then print_detalis(('we are counting adults for %s'):format(race_creature_id)) end
local count_children = count_children_for_race(race_creature_id)
if count_children then print_detalis(('we are counting children and babies for %s'):format(race_creature_id)) end
if count_children then print_detalis(('we are counting children and babies for %s'):format(race_creature_id)) end

local count = 0
if not count_adults and not count_children then
return count
Expand All @@ -192,15 +192,15 @@ local function count_live_animals(race_creature_id)
for _,unit in ipairs(df.global.world.units.active) do
if race_creature_id == df.creature_raw.find(unit.race).creature_id
and is_valid_animal(unit)
and ( (count_adults and dfhack.units.isAdult(unit))
and ( (count_adults and dfhack.units.isAdult(unit))
or (count_children and ( dfhack.units.isChild(unit) or dfhack.units.isBaby(unit)))
) then
count = count + 1
end
end
print_detalis(('found %s life animals'):format(count))
return count
end
end


local function handle_eggs(eggs)
Expand Down Expand Up @@ -248,7 +248,7 @@ local function handle_eggs(eggs)
)
)
end

print_detalis(("end handle_eggs"))
end

Expand Down Expand Up @@ -357,7 +357,7 @@ target_eggs_count_per_race = default_table
elseif not command or command == "status" then
print_status()
print_local(dump(target_eggs_count_per_race))
else
else
handle_error(('Command "%s" is not recognized'):format(command))
end
persist_state()

0 comments on commit 251d154

Please sign in to comment.