public override int GetHashCode() { int hash = 1; if (DefName.Length != 0) { hash ^= DefName.GetHashCode(); } if (StackCount != 0) { hash ^= StackCount.GetHashCode(); } if (StuffDefName.Length != 0) { hash ^= StuffDefName.GetHashCode(); } if (Quality != 0) { hash ^= Quality.GetHashCode(); } if (HitPoints != 0) { hash ^= HitPoints.GetHashCode(); } if (innerProtoThing_ != null) { hash ^= InnerProtoThing.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (DefName.Length != 0) { hash ^= DefName.GetHashCode(); } if (StackCount != 0) { hash ^= StackCount.GetHashCode(); } if (StuffDefName.Length != 0) { hash ^= StuffDefName.GetHashCode(); } if (Quality != global::Trading.Quality.Awful) { hash ^= Quality.GetHashCode(); } if (HitPoints != 0) { hash ^= HitPoints.GetHashCode(); } if (innerProtoThing_ != null) { hash ^= InnerProtoThing.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override XElement ToXml() { var xml = new XElement(_elementType); if (!DefName.NullOrEmpty()) { xml.Add(new XAttribute(DefNameAttribute, DefName)); } var targets = Targets.ToId(); if (!targets.NullOrEmpty()) { xml.Add(new XAttribute(TargetAttribute, targets)); } return(xml); }
public override void Visit(DefName node) { Node namespaceNode = thread.CreateNodeAt(node.NodePath); namespaceNode.Value = thread.Pop().Read(); }