Various upstream merge fixes.

This commit is contained in:
Vanessa 2025-11-20 20:26:03 -06:00
parent 96f9e1fe2d
commit 5b380fe2c1
8 changed files with 19 additions and 13 deletions

View File

@ -136,9 +136,9 @@ public sealed class BodySystem : SharedBodySystem
&& polymorph.Configuration.RevertOnDeath)
{
_polymorph.Revert(bodyId);
if (polymorph.Configuration.TransferDamage)
GibBody(polymorph.Parent, acidify, null, launchGibs: launchGibs, splatDirection: splatDirection,
splatModifier: splatModifier, splatCone:splatCone);
if (polymorph.Configuration.TransferDamage && polymorph.Parent.HasValue)
GibBody(polymorph.Parent.Value, acidify, null, launchGibs: launchGibs, splatDirection: splatDirection,
splatModifier: splatModifier, splatCone: splatCone);
return new HashSet<EntityUid>();
}

View File

@ -289,8 +289,8 @@ public sealed class CosmicCultRuleSystem : GameRuleSystem<CosmicCultRuleComponen
while (cultQuery.MoveNext(out var cult, out _, out var metadata))
{
var playerInfo = metadata.EntityName;
if (TryComp<PolymorphedEntityComponent>(cult, out var polyComp)) // If the cultist is polymorphed, we use the original entity instead and hope that they'll polymorph back eventually
cultists.Add((playerInfo, polyComp.Parent));
if (TryComp<PolymorphedEntityComponent>(cult, out var polyComp) && polyComp.Parent.HasValue) // If the cultist is polymorphed, we use the original entity instead and hope that they'll polymorph back eventually
cultists.Add((playerInfo, polyComp.Parent.Value));
else
cultists.Add((playerInfo, cult));
}

View File

@ -140,7 +140,9 @@ public sealed class DeconversionSystem : EntitySystem
if (TryComp<PolymorphedEntityComponent>(uid, out var polyComp)) // If the cultist is polymorphed, we revert the polymorph and deconvert the original entity too.
{
_polymorph.Revert((uid, polyComp));
RemCompDeferred<CosmicCultComponent>(polyComp.Parent);
if (polyComp.Parent.HasValue) // This surely won't cause any bugs with deconversion, right?
RemCompDeferred<CosmicCultComponent>(polyComp.Parent.Value);
}
}
}

View File

@ -385,7 +385,7 @@ public sealed class MonumentSystem : SharedMonumentSystem
while (leaderQuery.MoveNext(out var leader, out var leaderComp))
{
if (TryComp<PolymorphedEntityComponent>(leader, out var polyComp) && TryComp<CosmicCultLeadComponent>(polyComp.Parent, out var polyLeaderComp))
_actions.AddAction(polyComp.Parent, ref polyLeaderComp.CosmicMonumentMoveActionEntity, polyLeaderComp.CosmicMonumentMoveAction, polyComp.Parent);
_actions.AddAction(polyComp.Parent.Value, ref polyLeaderComp.CosmicMonumentMoveActionEntity, polyLeaderComp.CosmicMonumentMoveAction, polyComp.Parent.Value);
else
_actions.AddAction(leader, ref leaderComp.CosmicMonumentMoveActionEntity, leaderComp.CosmicMonumentMoveAction, leader);
}
@ -433,7 +433,7 @@ public sealed class MonumentSystem : SharedMonumentSystem
{
_actions.RemoveAction(leader, leaderComp.CosmicMonumentMoveActionEntity);
if (TryComp<PolymorphedEntityComponent>(leader, out var polyComp) && TryComp<CosmicCultLeadComponent>(polyComp.Parent, out var polyLeaderComp))
_actions.RemoveAction(polyComp.Parent, polyLeaderComp.CosmicMonumentMoveActionEntity);
_actions.RemoveAction(polyComp.Parent.Value, polyLeaderComp.CosmicMonumentMoveActionEntity);
}
Dirty(uid);

View File

@ -512,8 +512,10 @@ public sealed partial class GrapplingSystem : SharedGrapplingSystem
RemComp<GrappledComponent>(victim);
_actionBlocker.UpdateCanMove(victim); // Must be done AFTER the component is removed.
// Automatically get the grappler back up
if (grappler.Comp.ProneOnGrapple && _standingState.IsDown(grappler))
if (grappler.Comp.ProneOnGrapple && TryComp<StandingStateComponent>(grappler, out var standingState) && _standingState.IsDown((grappler, standingState)))
_standingState.Stand(grappler);
_alerts.ClearAlert(grappler, grappler.Comp.GrappledAlert);

View File

@ -122,7 +122,10 @@ public sealed class CrawlUnderObjectsSystem : EntitySystem
/// </summary>
public bool TrySetEnabled(Entity<CrawlUnderObjectsComponent> ent, bool enabled)
{
if (ent.Comp.Enabled == enabled || IsOnCollidingTile(ent) || _standing.IsDown(ent))
if (!TryComp<StandingStateComponent>(ent, out var standing))
return false;
if (ent.Comp.Enabled == enabled || IsOnCollidingTile(ent) || _standing.IsDown((ent, standing)))
return false;
if (TryComp<ClimbingComponent>(ent, out var climbing) && climbing.IsClimbing)

View File

@ -38,7 +38,7 @@ public sealed class LayingDownCombatSystem : EntitySystem
private void OnGetMeleeDamage(Entity<StandingStateComponent> ent, ref GetMeleeDamageEvent args)
{
if (!_standing.IsDown(ent))
if (!_standing.IsDown((ent, ent.Comp)))
return;
args.Modifiers.Add(_meleeMod);

View File

@ -110,14 +110,13 @@
description: ghost-role-information-loneop-description
rules: ghost-role-information-loneop-rules
mindRoles:
- MindRoleGhostRoleSoloAntagonist
- MindRoleLoneops
requirements: # DeltaV
- !type:OverallPlaytimeRequirement
time: 172800 # 48 hours overall
- !type:DepartmentTimeRequirement
department: Security
time: 36000 # 10 hours of sec
- MindRoleLoneops
- type: Sprite
sprite: Markers/jobs.rsi
layers: