Fix uplink item spawning.

Actually spawns for the person who USES the uplink, not who owns it. Can't believe that was an actual bug.

Also puts it in your active hand if possible.
This commit is contained in:
Pieter-Jan Briers
2021-02-04 01:24:37 +01:00
parent d45835e863
commit a4563d2e75
4 changed files with 48 additions and 15 deletions

View File

@@ -1,11 +1,15 @@
#nullable enable
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Content.Shared.GameObjects.Components.PDA;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map;
namespace Content.Server.Interfaces.PDA
{
public interface IPDAUplinkManager
{
public IReadOnlyDictionary<string, UplinkListingData> FetchListings => null;
public IReadOnlyDictionary<string, UplinkListingData> FetchListings { get; }
void Initialize();
@@ -13,7 +17,11 @@ namespace Content.Server.Interfaces.PDA
public bool ChangeBalance(UplinkAccount acc, int amt);
public bool TryPurchaseItem(UplinkAccount acc, string itemId);
public bool TryPurchaseItem(
UplinkAccount? acc,
string itemId,
EntityCoordinates spawnCoords,
[NotNullWhen(true)] out IEntity? purchasedItem);
}
}