Skip to content

Commit

Permalink
Merge branch 'master' into shadowkin-rework
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxxoTrystan authored Nov 12, 2024
2 parents 83243c0 + 04cdc14 commit 60d7e74
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
4 changes: 4 additions & 0 deletions Content.Server/Communications/CommunicationsConsoleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ private bool CanCallOrRecall(CommunicationsConsoleComponent comp)
|| !comp.CanShuttle)
return false;

// Calling shuttle checks
if (_roundEndSystem.ExpectedCountdownEnd is null)
return comp.CanShuttle;

// Recalling shuttle checks
var recallThreshold = _cfg.GetCVar(CCVars.EmergencyRecallTurningPoint);

Expand Down
20 changes: 10 additions & 10 deletions Content.Server/Traits/TraitSystem.Functions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@ public override void OnPlayerSpawn(EntityUid uid,
IEntityManager entityManager,
ISerializationManager serializationManager)
{
foreach (var (name, data) in Components)
foreach (var (_, data) in Components)
{
var component = (Component) factory.GetComponent(name);

var temp = (object) component;
serializationManager.CopyTo(data.Component, ref temp);
entityManager.RemoveComponent(uid, temp!.GetType());
entityManager.AddComponent(uid, (Component) temp, true);
var comp = (Component) serializationManager.CreateCopy(data.Component, notNullableOverride: true);
comp.Owner = uid;
entityManager.AddComponent(uid, comp, true);
}
}
}
Expand All @@ -52,11 +49,14 @@ public override void OnPlayerSpawn(EntityUid uid,
IEntityManager entityManager,
ISerializationManager serializationManager)
{
foreach (var (name, _) in Components)
foreach (var entry in Components.Values)
{
var component = (Component) factory.GetComponent(name);
if (entityManager.HasComponent(uid, entry.Component.GetType()))
continue;

entityManager.AddComponent(uid, component, true);
var comp = (Component) serializationManager.CreateCopy(entry.Component, notNullableOverride: true);
comp.Owner = uid;
entityManager.AddComponent(uid, comp);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Interaction/SharedInteractionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ private void OnBoundInterfaceInteractAttempt(BoundUserInterfaceMessageAttempt ev
if (uiComp == null)
return;

if (uiComp.SingleUser && uiComp.CurrentSingleUser != ev.Actor)
if (uiComp.SingleUser && uiComp.CurrentSingleUser != null && uiComp.CurrentSingleUser != ev.Actor)
{
ev.Cancel();
return;
Expand Down
9 changes: 9 additions & 0 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7844,3 +7844,12 @@ Entries:
id: 6513
time: '2024-11-09T02:05:47.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1190
- author: VMSolidus
changes:
- type: Fix
message: >-
Fixed AddTrait and ReplaceTrait functions giving players an unmodified,
completely default component.
id: 6514
time: '2024-11-10T15:22:47.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1195
Loading

0 comments on commit 60d7e74

Please sign in to comment.