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:
@@ -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 ----
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user