Advertisement
SydneyMakers

Untitled

Oct 9th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getPartById(partId) {
  2.     for (var i in user.data.characters[0].constructions.shield.parts) {
  3.         var otherPart = user.data.characters[0].constructions.shield.parts[i].part;
  4.  
  5.         if (otherPart.id === partId) {
  6.             return otherPart;
  7.         }
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement