34 {
35 Object target_object = action_data.m_Target.GetObject();
36 BarrelHoles_ColorBase fireplace_barrel = BarrelHoles_ColorBase.Cast( target_object );
37
38 string newTypeName = "Fireplace";
39 InventoryLocation targetIL = new InventoryLocation;
40 bool found = action_data.m_Player.GetInventory().FindFirstFreeLocationForNewEntity( newTypeName,
FindInventoryLocationType.ANY, targetIL );
41 if ( found )
42 {
43
45 lambda.OverrideNewLocation( targetIL );
46 action_data.m_Player.ServerReplaceItemWithNew( lambda );
47 }
48 }
void TakeFireplaceFromBarrelLambda(EntityAI old_item, string new_item_type, PlayerBase player)
FindInventoryLocationType
flags for searching locations in inventory