Skip to content

Instantly share code, notes, and snippets.

@warmist
Created April 11, 2012 17:55
Show Gist options
  • Save warmist/2360931 to your computer and use it in GitHub Desktop.
Save warmist/2360931 to your computer and use it in GitHub Desktop.
Pot A Creature
function putInItem(item,unit)
local u_ref=df.general_ref_contains_unitst:new()
u_ref.unit_id=unit.id
item.itemrefs:insert(#item.itemrefs,u_ref)
local u_cr_ref=df.general_ref_contained_in_itemst:new()
unit.flags1.caged=true
u_cr_ref.item_id=item.id
unit.refs:insert(#unit.refs,u_cr_ref)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment