Telecrystals (and a bit more ECS) (#4775)

This commit is contained in:
Alex Evgrashin
2021-10-08 13:26:42 +03:00
committed by GitHub
parent cf8ec622fd
commit df3b766139
27 changed files with 426 additions and 262 deletions

View File

@@ -2,11 +2,13 @@ using System.Threading.Tasks;
using Content.Server.Inventory.Components;
using Content.Server.Mind.Components;
using Content.Server.PDA;
using Content.Server.Traitor.Uplink.Account;
using Content.Server.Traitor.Uplink.Components;
using Content.Shared.Interaction;
using Content.Shared.Inventory;
using Content.Shared.Popups;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
namespace Content.Server.TraitorDeathMatch.Components
@@ -104,9 +106,10 @@ namespace Content.Server.TraitorDeathMatch.Components
}
// 4 is the per-PDA bonus amount.
var accounts = Owner.EntityManager.EntitySysManager.GetEntitySystem<UplinkAccountsSystem>();
var transferAmount = victimAccount.Balance + 4;
victimAccount.ModifyAccountBalance(0);
userAccount.ModifyAccountBalance(userAccount.Balance + transferAmount);
accounts.SetBalance(victimAccount, 0);
accounts.AddToBalance(userAccount, transferAmount);
victimUplink.Owner.Delete();