Skip to content

Commit 1522c2d

Browse files
Move the selected item to the ground as well (allows you to take only a specific item out of the container)
1 parent ddddffd commit 1522c2d

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

empty-bin.lua

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@
33
-- https://gist.github.com/stonetoad/11129025
44
-- http://dwarffortresswiki.org/index.php/DF2014_Talk:Bin
55

6-
--[====[
7-
8-
empty-bin
9-
=========
10-
11-
Empties the contents of the selected bin onto the floor.
12-
13-
]====]
14-
156
local function moveItem(item, to_pos)
167
print(' ' .. dfhack.items.getDescription(item, 0))
178
dfhack.items.moveToGround(item, to_pos)
@@ -48,6 +39,7 @@ if stockpile then
4839
emptyContainer(container)
4940
end
5041
elseif selectedItem then
42+
moveItem(selectedItem, xyz2pos(dfhack.items.getPosition(selectedItem)))
5143
emptyContainer(selectedItem)
5244
elseif selectedBuilding then
5345
if not df.building_actual:is_instance(selectedBuilding) then

0 commit comments

Comments
 (0)