743 {
744 string desc = "";
747 {
749 }
750
751 if (tgObject)
752 {
753
755 if (!tgObject.IsAlive())
756 {
757
758 if (!tgParent || tgObject.DisplayNameRuinAttach())
759 desc = tgObject.GetDisplayName();
760 else
761 desc = tgParent.GetDisplayName();
762 return desc;
763 }
764
766
767 if (tgParent && (tgParent.IsItemBase() || tgParent.IsTransport() || tgParent.CanUseConstruction()))
768 {
769 targetEntity =
EntityAI.Cast(tgParent);
770 }
771
772 if (tgObject.IsItemBase() || tgObject.IsTransport() || tgObject.CanUseConstruction())
773 {
774 targetEntity =
EntityAI.Cast(tgObject);
775 }
776
777 if (targetEntity && targetEntity.ShowZonesHealth())
778 {
779 string zone = "";
780
781 array<string> selections = new array<string>();
782
783
784 if (targetEntity.IsInherited(TentBase) && TentBase.Cast(targetEntity).GetState() != TentBase.PACKED)
785 {
786
787 if (DamageSystem.GetDamageZoneFromComponentName(targetEntity, tgObject.GetActionComponentName(
m_Target.GetComponentIndex(), LOD.NAME_FIRE), zone))
788 {
789 desc = DamageSystem.GetDamageDisplayName(targetEntity, zone);
790 }
791 }
792 else
793 {
794 targetEntity.GetActionComponentNameList(
m_Target.GetComponentIndex(), selections, LOD.NAME_VIEW);
795
796
797 for (int s = 0; s < selections.Count(); s++)
798 {
799 if (DamageSystem.GetDamageZoneFromComponentName(targetEntity, selections[s], zone))
800 {
801 desc = DamageSystem.GetDamageDisplayName(targetEntity, zone);
802 }
803 }
804 }
805 }
806
807
808 if (targetEntity && desc == "")
809 desc = targetEntity.GetDisplayName();
810 }
811
812 return desc;
813 }
Object m_DisplayInteractTarget