1v1 me first to 31 no powerups [Deathmatch Gamemode] (#19467)

Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
Nemanja
2023-08-30 21:06:15 -04:00
committed by GitHub
parent 3f678104e3
commit 4d677f0685
44 changed files with 2821 additions and 155 deletions

View File

@@ -84,10 +84,18 @@ public sealed class HealingSystem : EntitySystem
var total = healed?.Total ?? FixedPoint2.Zero;
// Re-verify that we can heal the damage.
_stacks.Use(args.Used.Value, 1);
if (_stacks.GetCount(args.Used.Value) <= 0)
dontRepeat = true;
if (TryComp<StackComponent>(args.Used.Value, out var stackComp))
{
_stacks.Use(args.Used.Value, 1, stackComp);
if (_stacks.GetCount(args.Used.Value, stackComp) <= 0)
dontRepeat = true;
}
else
{
QueueDel(args.Used.Value);
}
if (uid != args.User)
{
@@ -157,7 +165,7 @@ public sealed class HealingSystem : EntitySystem
if (user != target && !_interactionSystem.InRangeUnobstructed(user, target, popup: true))
return false;
if (!TryComp<StackComponent>(uid, out var stack) || stack.Count < 1)
if (TryComp<StackComponent>(uid, out var stack) && stack.Count < 1)
return false;
if (!TryComp<BloodstreamComponent>(target, out var bloodstream))