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:
@@ -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