public static TradingItemPayload FromTradingItemDat(TradingItemDat dat) { var payload = new TradingItemPayload { tradeValue = dat.TradeValue, maxQuantity = dat.MaxQuantity, itemSerialNumber = dat.ItemSerialNumber, quantity = dat.Quantity, prefabHash = dat.PrefabHash, quantityToPurchase = dat.QuantityToPurchase, damageStateRatio = dat.DamageStateRatio, numberOfItemsStocked = dat.NumberOfItemsStocked, type = dat.type, // TODO: Send gas mixture }; return(payload); }
public static StationContactPayload FromStationContact(StationContact contact) { var payload = new StationContactPayload { angle = Vector3Payload.FromVector3(contact.Angle), contactName = contact.ContactName, contactType = contact.ContactType, lifetime = contact.Lifetime, endLifetime = contact.EndLifetime, initialLifeTime = contact.InitialLifeTime, contactID = contact.ContactID, humanTradingSteamID = contact.HumanTradingSteamID, currentlyTrading = contact.CurrentlyTrading, connectedPadReferenceId = contact.ConnectedPad?.ReferenceId.ToString(), tradeInventory = contact.TraderInventoryDict.Select( item => new { Key = item.Key, Value = TradingItemPayload.FromTradingItemDat(item.Value) } ).ToDictionary(item => item.Key, item => item.Value) }; return(payload); }