Bugfixes (#123)
* - fix: Fix summon rune pulling. * - fix: Gulagged antag fix. * - fix: Fix thieves failing objectives on round end. * - fix: Crossbow fix.
This commit is contained in:
@@ -11,6 +11,7 @@ using Robust.Shared.Random;
|
||||
using Robust.Shared.Map;
|
||||
using System.Numerics;
|
||||
using Content.Server._Miracle.Components;
|
||||
using Content.Server._Miracle.GulagSystem;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Server.Storage.EntitySystems;
|
||||
using Robust.Shared.Audio;
|
||||
@@ -48,6 +49,7 @@ public sealed class AntagSelectionSystem : GameRuleSystem<GameRuleComponent>
|
||||
[Dependency] private readonly EmergencyShuttleSystem _emergencyShuttle = default!;
|
||||
[Dependency] private readonly RoleSystem _roles = default!; // WD
|
||||
[Dependency] private readonly SharedPlayerSystem _sharedPlayerSystem = default!; // WD
|
||||
[Dependency] private readonly GulagSystem _gulag = default!; // WD
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to start the game rule by checking if there are enough players in lobby and readied.
|
||||
@@ -102,12 +104,14 @@ public sealed class AntagSelectionSystem : GameRuleSystem<GameRuleComponent>
|
||||
chosen = new List<EntityUid>();
|
||||
foreach (var player in allPlayers)
|
||||
{
|
||||
if (_gulag.IsUserGulaged(player.UserId, out _)) // WD
|
||||
continue;
|
||||
|
||||
if (includeHeads == false)
|
||||
{
|
||||
// WD START
|
||||
if (!_mindSystem.TryGetMind(player, out _, out var mind) ||
|
||||
mind.OwnedEntity is not { } ownedEntity || HasComp<CommandStaffComponent>(ownedEntity) ||
|
||||
HasComp<GulagBoundComponent>(ownedEntity))
|
||||
mind.OwnedEntity is not { } ownedEntity || HasComp<CommandStaffComponent>(ownedEntity))
|
||||
continue;
|
||||
// WD END
|
||||
|
||||
@@ -175,6 +179,9 @@ public sealed class AntagSelectionSystem : GameRuleSystem<GameRuleComponent>
|
||||
|
||||
foreach (var player in candidates.Keys)
|
||||
{
|
||||
if (_gulag.IsUserGulaged(player.UserId, out _)) // WD
|
||||
continue;
|
||||
|
||||
if (_sharedPlayerSystem.ContentData(player) is not {Mind: { } mindId} || _roles.MindIsAntagonist(mindId))
|
||||
continue;
|
||||
|
||||
@@ -182,11 +189,6 @@ public sealed class AntagSelectionSystem : GameRuleSystem<GameRuleComponent>
|
||||
if (!_jobs.CanBeAntag(player))
|
||||
continue;
|
||||
|
||||
// Gulag
|
||||
if (!_mindSystem.TryGetMind(player, out _, out var mind) ||
|
||||
mind.OwnedEntity is not { } ownedEntity || HasComp<GulagBoundComponent>(ownedEntity))
|
||||
continue;
|
||||
|
||||
// Latejoin
|
||||
if (player.AttachedEntity != null && pendingQuery.HasComponent(player.AttachedEntity.Value))
|
||||
continue;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Server._Miracle.GulagSystem;
|
||||
using Content.Server.Administration.Commands;
|
||||
using Content.Server.Administration.Managers;
|
||||
using Content.Server.Chat.Managers;
|
||||
@@ -91,6 +92,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
|
||||
[Dependency] private readonly WarDeclaratorSystem _warDeclarator = default!;
|
||||
//WD EDIT
|
||||
[Dependency] private readonly ReputationManager _reputationManager = default!;
|
||||
[Dependency] private readonly GulagSystem _gulag = default!;
|
||||
//WD EDIT
|
||||
|
||||
|
||||
@@ -632,6 +634,9 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
|
||||
// ReSharper disable once ForeachCanBeConvertedToQueryUsingAnotherGetEnumerator
|
||||
foreach (var player in everyone)
|
||||
{
|
||||
if (_gulag.IsUserGulaged(player.UserId, out _)) // WD
|
||||
continue;
|
||||
|
||||
if (!ev.Profiles.ContainsKey(player.UserId))
|
||||
{
|
||||
continue;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Content.Server._Miracle.Components;
|
||||
using Content.Server._Miracle.GulagSystem;
|
||||
using Content.Server.Actions;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.Chat.Systems;
|
||||
@@ -50,6 +51,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem<ZombieRuleComponent>
|
||||
[Dependency] private readonly SharedRoleSystem _roles = default!;
|
||||
[Dependency] private readonly StationSystem _station = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly GulagSystem _gulag = default!; // WD
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -272,10 +274,10 @@ public sealed class ZombieRuleSystem : GameRuleSystem<ZombieRuleComponent>
|
||||
var prefList = new List<ICommonSession>();
|
||||
foreach (var player in allPlayers)
|
||||
{
|
||||
if (player.AttachedEntity == null || !HasComp<HumanoidAppearanceComponent>(player.AttachedEntity) || HasComp<ZombieImmuneComponent>(player.AttachedEntity))
|
||||
if (_gulag.IsUserGulaged(player.UserId, out _)) // WD
|
||||
continue;
|
||||
|
||||
if (HasComp<GulagBoundComponent>(player.AttachedEntity)) // WD
|
||||
if (player.AttachedEntity == null || !HasComp<HumanoidAppearanceComponent>(player.AttachedEntity) || HasComp<ZombieImmuneComponent>(player.AttachedEntity))
|
||||
continue;
|
||||
|
||||
if (HasComp<InitialInfectedExemptComponent>(player.AttachedEntity))
|
||||
|
||||
@@ -5,6 +5,7 @@ using Content.Server.Resist;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Contests;
|
||||
using Content.Server.Inventory;
|
||||
using Content.Shared._White.Crossbow;
|
||||
using Content.Shared.Mobs;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.Buckle.Components;
|
||||
@@ -42,6 +43,7 @@ namespace Content.Server.Carrying
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly ContestsSystem _contests = default!;
|
||||
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!;
|
||||
[Dependency] private readonly PenetratedSystem _penetrated = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -241,6 +243,8 @@ namespace Content.Server.Carrying
|
||||
if (TryComp<SharedPullableComponent>(carried, out var pullable))
|
||||
_pullingSystem.TryStopPull(pullable);
|
||||
|
||||
_penetrated.FreePenetrated(carried);
|
||||
|
||||
Transform(carrier).AttachToGridOrMap();
|
||||
Transform(carried).AttachToGridOrMap();
|
||||
Transform(carried).Coordinates = Transform(carrier).Coordinates;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using Content.Server._Miracle.Components;
|
||||
using Content.Server._Miracle.GulagSystem;
|
||||
using Content.Server.Actions;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.GameTicking;
|
||||
@@ -45,6 +46,7 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
|
||||
[Dependency] private readonly JobSystem _jobSystem = default!;
|
||||
[Dependency] private readonly SharedMindSystem _mindSystem = default!;
|
||||
[Dependency] private readonly ActionsSystem _actions = default!;
|
||||
[Dependency] private readonly GulagSystem _gulag = default!;
|
||||
|
||||
private ISawmill _sawmill = default!;
|
||||
|
||||
@@ -324,14 +326,17 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
|
||||
|
||||
foreach (var player in candidates.Keys)
|
||||
{
|
||||
// Gulag
|
||||
if (_gulag.IsUserGulaged(player.UserId, out _))
|
||||
continue;
|
||||
|
||||
// Role prevents antag.
|
||||
if (!_jobSystem.CanBeAntag(player))
|
||||
continue;
|
||||
|
||||
// Gulag & chaplain
|
||||
// Chaplain
|
||||
if (!_mindSystem.TryGetMind(player, out _, out var mind) ||
|
||||
mind.OwnedEntity is not { } ownedEntity || HasComp<GulagBoundComponent>(ownedEntity) ||
|
||||
HasComp<HolyComponent>(ownedEntity))
|
||||
mind.OwnedEntity is not { } ownedEntity || HasComp<HolyComponent>(ownedEntity))
|
||||
continue;
|
||||
|
||||
// Latejoin
|
||||
|
||||
@@ -668,17 +668,7 @@ public sealed partial class CultSystem : EntitySystem
|
||||
|
||||
foreach (var target in targets)
|
||||
{
|
||||
// break pulls before portal enter so we dont break shit
|
||||
if (TryComp<SharedPullableComponent>(target, out var pullable) && pullable.BeingPulled)
|
||||
{
|
||||
_pulling.TryStopPull(pullable);
|
||||
}
|
||||
|
||||
if (TryComp<SharedPullerComponent>(target, out var pulling)
|
||||
&& pulling.Pulling != null && TryComp<SharedPullableComponent>(pulling.Pulling.Value, out var subjectPulling))
|
||||
{
|
||||
_pulling.TryStopPull(subjectPulling);
|
||||
}
|
||||
StopPulling(target);
|
||||
|
||||
_xform.SetCoordinates(target, xFormSelected.Coordinates);
|
||||
}
|
||||
@@ -978,6 +968,8 @@ public sealed partial class CultSystem : EntitySystem
|
||||
return;
|
||||
}
|
||||
|
||||
StopPulling(target, false);
|
||||
|
||||
_xform.SetCoordinates(target, xFormBase.Coordinates);
|
||||
|
||||
_audio.PlayPvs(_teleportInSound, xFormBase.Coordinates);
|
||||
@@ -1319,6 +1311,22 @@ public sealed partial class CultSystem : EntitySystem
|
||||
_damageableSystem.TryChangeDamage(player, new DamageSpecifier(damageSpecifier2, -40));
|
||||
}
|
||||
|
||||
private void StopPulling(EntityUid target, bool checkPullable = true)
|
||||
{
|
||||
// break pulls before portal enter so we dont break shit
|
||||
if (checkPullable && TryComp<SharedPullableComponent>(target, out var pullable) && pullable.BeingPulled)
|
||||
{
|
||||
_pulling.TryStopPull(pullable);
|
||||
}
|
||||
|
||||
if (TryComp<SharedPullerComponent>(target, out var pulling)
|
||||
&& pulling.Pulling != null &&
|
||||
TryComp<SharedPullableComponent>(pulling.Pulling.Value, out var subjectPulling))
|
||||
{
|
||||
_pulling.TryStopPull(subjectPulling);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Helpers End ----
|
||||
*/
|
||||
|
||||
@@ -88,7 +88,7 @@ public sealed class NonPeacefulRoundEndSystem : EntitySystem
|
||||
|
||||
var weaponEntity = _entityManager.SpawnEntity(item, transform.Coordinates);
|
||||
|
||||
_handsSystem.TryDrop(player);
|
||||
// _handsSystem.TryDrop(player);
|
||||
_handsSystem.PickupOrDrop(player, weaponEntity);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user