12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- class TripodBase : ItemBase
- {
- override bool HasProxyParts()
- {
- return true;
- }
-
- override bool CanDetachAttachment( EntityAI parent )
- {
- FireplaceBase fireplace = FireplaceBase.Cast(parent);
- if(fireplace)
- {
- if ( fireplace.GetCookingEquipment() != null )
- {
- return false;
- }
- }
- return true;
- }
- override bool CanSwapEntities(EntityAI otherItem, InventoryLocation otherDestination, InventoryLocation destination)
- {
- if (GetHierarchyParent() && GetHierarchyParent().IsFireplace() && otherItem)
- {
- if (otherItem.IsInherited(Pot) || otherItem.IsInherited(Cauldron))
- {
- return false;
- }
- }
- return true;
- }
-
-
- override void OnDebugSpawn()
- {
- HideAllSelections();
- ShowSelection( "Deployed" );
- }
-
- override void SetActions()
- {
- super.SetActions();
- AddAction(ActionAttach);
- AddAction(ActionDetach);
- }
-
- override void OnWasAttached( EntityAI parent, int slot_id )
- {
- super.OnWasAttached(parent, slot_id);
- if (parent.IsFireplace())
- {
- HideAllSelections();
- ShowSelection( "Deployed" );
- }
- }
-
- override void OnWasDetached( EntityAI parent, int slot_id )
- {
- super.OnWasDetached(parent, slot_id);
- if (parent.IsFireplace())
- {
- HideAllSelections();
- ShowSelection( "Collapsed" );
- }
- }
- }
- class Tripod : TripodBase
- {
-
- }
|