4 string m_NewItemTypeName =
"Fireplace";
10 m_Text =
"#take_fireplace";
15 Object target_object = target.GetObject();
18 if ( target_object && target_object.IsFireplace() )
20 OvenIndoor fireplace_indoor = OvenIndoor.Cast( target_object );
22 if ( fireplace_indoor && !fireplace_indoor.HasAshes() && !fireplace_indoor.IsBurning() && fireplace_indoor.IsCargoEmpty() && !fireplace_indoor.DirectCookingSlotsInUse() )
25 bool found = player.GetInventory().FindFirstFreeLocationForNewEntity( m_NewItemTypeName,
FindInventoryLocationType.ANY, targetIL );
33 override void OnExecuteServer( ActionData action_data )
35 Object target_object = action_data.m_Target.GetObject();
36 OvenIndoor fireplace_indoor = OvenIndoor.Cast( target_object );
40 bool found = action_data.m_Player.GetInventory().FindFirstFreeLocationForNewEntity( m_NewItemTypeName,
FindInventoryLocationType.ANY, targetIL );
44 lambda.OverrideNewLocation( targetIL );
45 action_data.m_Player.ServerReplaceItemWithNew( lambda );