Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
Update set-orientation.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
kane-t committed Jul 19, 2015
1 parent f17f46d commit 35211d5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions set-orientation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ local unit = nil

if args.unit and tonumber(args.unit) then -- Check for unit declaration !REQUIRED
unit = df.unit.find(tonumber(args.unit))
if unit == nil then
print('Bad unit ID')
return
end
else
unit = dfhack.gui.getSelectedUnit()
end
Expand All @@ -19,11 +23,6 @@ if unit == nil then
return
end

if unit == nil then
print('Bad unit ID')
return
end

if args.men and tonumber(args.men) then
men = tonumber(args.men)
if men < 0 or men > 2 then
Expand Down

0 comments on commit 35211d5

Please sign in to comment.