* - tweak: Rev tweaks.

* - tweak: Item drop and lying tweaks.

* - tweak: No ebow stamina damage.

* - tweak: Fun tweaks.
This commit is contained in:
Aviu00
2024-06-29 20:03:28 +00:00
committed by GitHub
parent 8922181b84
commit 93943aaf95
16 changed files with 54 additions and 39 deletions

View File

@@ -31,6 +31,7 @@ using Content.Shared.Zombies;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using System.Linq;
using Robust.Server.Player;
namespace Content.Server.GameTicking.Rules;
@@ -39,6 +40,7 @@ namespace Content.Server.GameTicking.Rules;
/// </summary>
public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleComponent>
{
[Dependency] private readonly IPlayerManager _playerManager = default!; // WD
[Dependency] private readonly IAdminLogManager _adminLogManager = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly AntagSelectionSystem _antagSelection = default!;
@@ -180,7 +182,7 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
continue;
var headRevCount =
_antagSelection.CalculateAntagCount(ev.Players.Length, comp.PlayersPerHeadRev, comp.MaxHeadRevs);
_antagSelection.CalculateAntagCount(_playerManager.PlayerCount, comp.PlayersPerHeadRev, comp.MaxHeadRevs); // WD EDIT
var headRevs = _antagSelection.ChooseAntags(headRevCount, eligiblePlayers);
@@ -356,6 +358,13 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
_euiMan.OpenEui(new DeconvertedEui(), session);
}
// WD EDIT START
// Check for all at once gamemode
if (!_gameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
_roundEnd.EndRound();
// WD EDIT END
return true;
}