v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

DF2014 Talk:Bin

From Dwarf Fortress Wiki
Jump to navigation Jump to search

Quick script to empty bins when they are causing issues. From StoneToad

-- Empty a bin onto the floor

print('Finding selected item...')
a = dfhack.gui.getSelectedItem()
print('Found ', dfhack.items.getDescription(a,0))

if not a then dfhack.printerr("No item selected!")
end

loc = a.pos
-- dfhack.items.moveToGround(a,loc)

for _,k in pairs(dfhack.items.getContainedItems(a)) do
	print ('  ', dfhack.items.getDescription(k,0))
	r = dfhack.items.moveToGround(k,loc)
end

print('Done.')

--Altaree (talk) 14:46, 5 May 2017 (UTC)