Traitor Deathmatch (#2719)

* Traitor Deathmatch: Add the preset [Rebase onto factors line]

* Traitor Deathmatch: Being a human head or other not-quite-fully-animate object counts as dead. [ROFL]

* Traitor Deathmatch: Add redemption machine (but it doesn't work) [ROFL]

* Traitor Deathmatch: Map in redemption machines [ROFL]

* Traitor Deathmatch: Make the rounds end properly [ROFL]

* Traitor Deathmatch: PDA redemption works [ROFL]

* Traitor Deathmatch: New redemption machine sprite ( @Tomeno )

* Traitor Deathmatch: Get rid of redundant using

* Traitor Deathmatch: Change scoring, prevent redeeming your own PDA, fix bug where PDAs are not tagged with their owner names

* Traitor Deathmatch: Better messages, change cvar name, don't count ghosts for spawnpoint selection
This commit is contained in:
20kdc
2020-12-13 15:00:49 +00:00
committed by GitHub
parent 4ea18f2449
commit fd0df9a00a
15 changed files with 514 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.UserInterface;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
namespace Content.Shared.GameObjects.Components.PDA
{
@@ -129,12 +130,14 @@ namespace Content.Shared.GameObjects.Components.PDA
{
public event Action<UplinkAccount> BalanceChanged;
public EntityUid AccountHolder;
public int Balance { get; private set; }
private int _balance;
[ViewVariables]
public int Balance => _balance;
public UplinkAccount(EntityUid uid, int startingBalance)
{
AccountHolder = uid;
Balance = startingBalance;
_balance = startingBalance;
}
public bool ModifyAccountBalance(int newBalance)
@@ -143,7 +146,7 @@ namespace Content.Shared.GameObjects.Components.PDA
{
return false;
}
Balance = newBalance;
_balance = newBalance;
BalanceChanged?.Invoke(this);
return true;