- Timestamp:
- Oct 28, 2015, 7:51:20 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs
r250 r251 72 72 item = new InvItem (name, _count); 73 73 } 74 75 // Figure out the icon's name 76 string icon_name = ""; 77 78 ItemClass item_class = ItemClass.list [_itemValue.type]; 79 80 if (!PetesUtils.ValidText (icon_name)) { 81 try { 82 icon_name = item_class.GetIconName (); 83 } 84 catch { } 85 } 86 87 if (!PetesUtils.ValidText (icon_name)) { 88 try { 89 icon_name = item_class.MeshFile; 90 } 91 catch { } 92 } 93 94 if (!PetesUtils.ValidText (icon_name)) { 95 try { 96 icon_name = item_class.DropMeshFile; 97 } 98 catch { } 99 } 100 101 if (!PetesUtils.ValidText (icon_name)) 102 icon_name = item_class.GetItemName (); 103 104 if (icon_name.Contains ("\\")) 105 icon_name = icon_name.Substring (icon_name.LastIndexOf ("\"") + 1); 106 107 item.icon = icon_name; 108 109 try { 110 item.iconcolor = item_class.CustomIconTint.ToHexStringRGB (); 111 } 112 catch { 113 item.iconcolor = "FFFFFF"; 114 } 115 74 116 return item; 75 117 } else { … … 77 119 } 78 120 } 79 80 81 121 } 82 122 } 83
Note:
See TracChangeset
for help on using the changeset viewer.