You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: uniform-unstick.lua
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -163,10 +163,12 @@ local function process(unit, args, need_newline)
163
163
localmissing_ids= {} -- map of item ID to item object
164
164
foru_id, iteminpairs(assigned_items) do
165
165
ifnotworn_items[u_id] then
166
-
need_newline=print_line(unit_name.." is missing an assigned item, object #" ..u_id.." '" ..
167
-
item_description(item) .."'", need_newline)
166
+
ifnotsilentthen
167
+
need_newline=print_line(unit_name.." is missing an assigned item, object #" ..u_id.." '" ..
168
+
item_description(item) .."'", need_newline)
169
+
end
168
170
ifdfhack.items.getGeneralRef(item, df.general_ref_type.UNIT_HOLDER) then
169
-
print(" Another unit has a claim on object #" ..u_id.." '" ..item_description(item) .."'")
171
+
need_newline=print_line(unit_name.." cannot equip item: another unit has a claim on object #" ..u_id.." '" ..item_description(item) .."'", need_newline)
170
172
ifargs.freethen
171
173
print(" Removing from uniform")
172
174
assigned_items[u_id] =nil
@@ -220,8 +222,7 @@ local function process(unit, args, need_newline)
220
222
forw_id, iteminpairs(worn_items) do
221
223
ifassigned_items[w_id] ==nilthen-- don't drop uniform pieces (including shields, weapons for hands)
222
224
ifuncovered[worn_parts[w_id]] then
223
-
need_newline=print_line("Unit " ..
224
-
unit_name..
225
+
need_newline=print_line(unit_name..
225
226
" potentially has object #" ..
226
227
w_id.." '" ..item_description(item) .."' blocking a missing uniform item.", need_newline)
0 commit comments