Nullability fixes.
This commit is contained in:
@@ -33,7 +33,7 @@ namespace Content.Client.GameObjects.Components.Body
|
|||||||
|
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
if (!Owner.TryGetComponent(out ISpriteComponent sprite))
|
if (!Owner.TryGetComponent(out ISpriteComponent? sprite))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -50,7 +50,7 @@ namespace Content.Client.GameObjects.Components.Body
|
|||||||
|
|
||||||
if (!partRemoved.Dropped.HasValue ||
|
if (!partRemoved.Dropped.HasValue ||
|
||||||
!_entityManager.TryGetEntity(partRemoved.Dropped.Value, out var entity) ||
|
!_entityManager.TryGetEntity(partRemoved.Dropped.Value, out var entity) ||
|
||||||
!entity.TryGetComponent(out ISpriteComponent droppedSprite))
|
!entity.TryGetComponent(out ISpriteComponent? droppedSprite))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace Content.Client.GameObjects.Components
|
|||||||
/// <returns>True if the click worked, false otherwise.</returns>
|
/// <returns>True if the click worked, false otherwise.</returns>
|
||||||
public bool CheckClick(Vector2 worldPos, out int drawDepth, out uint renderOrder)
|
public bool CheckClick(Vector2 worldPos, out int drawDepth, out uint renderOrder)
|
||||||
{
|
{
|
||||||
if (!Owner.TryGetComponent(out ISpriteComponent sprite) || !sprite.Visible)
|
if (!Owner.TryGetComponent(out ISpriteComponent? sprite) || !sprite.Visible)
|
||||||
{
|
{
|
||||||
drawDepth = default;
|
drawDepth = default;
|
||||||
renderOrder = default;
|
renderOrder = default;
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ namespace Content.Client.GameObjects.Components.Items
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!entity.TryGetComponent(out ItemComponent item)) return;
|
if (!entity.TryGetComponent(out ItemComponent? item)) return;
|
||||||
|
|
||||||
var maybeInHands = item.GetInHandStateInfo(hand.Location);
|
var maybeInHands = item.GetInHandStateInfo(hand.Location);
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace Content.Client.GameObjects.Components.Mobs
|
|||||||
WalkModifierOverride = state.WalkModifierOverride;
|
WalkModifierOverride = state.WalkModifierOverride;
|
||||||
RunModifierOverride = state.RunModifierOverride;
|
RunModifierOverride = state.RunModifierOverride;
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out MovementSpeedModifierComponent movement))
|
if (Owner.TryGetComponent(out MovementSpeedModifierComponent? movement))
|
||||||
{
|
{
|
||||||
movement.RefreshMovementSpeedModifiers();
|
movement.RefreshMovementSpeedModifiers();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Content.Client.GameObjects.Components.Nutrition
|
|||||||
|
|
||||||
_currentHungerThreshold = hunger.CurrentThreshold;
|
_currentHungerThreshold = hunger.CurrentThreshold;
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out MovementSpeedModifierComponent movement))
|
if (Owner.TryGetComponent(out MovementSpeedModifierComponent? movement))
|
||||||
{
|
{
|
||||||
movement.RefreshMovementSpeedModifiers();
|
movement.RefreshMovementSpeedModifiers();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Content.Client.GameObjects.Components.Nutrition
|
|||||||
|
|
||||||
_currentThirstThreshold = thirst.CurrentThreshold;
|
_currentThirstThreshold = thirst.CurrentThreshold;
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out MovementSpeedModifierComponent movement))
|
if (Owner.TryGetComponent(out MovementSpeedModifierComponent? movement))
|
||||||
{
|
{
|
||||||
movement.RefreshMovementSpeedModifiers();
|
movement.RefreshMovementSpeedModifiers();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ namespace Content.Client.GameObjects.EntitySystems.DoAfter
|
|||||||
{
|
{
|
||||||
base.FrameUpdate(args);
|
base.FrameUpdate(args);
|
||||||
|
|
||||||
if (AttachedEntity?.IsValid() != true || !AttachedEntity.TryGetComponent(out DoAfterComponent doAfterComponent))
|
if (AttachedEntity?.IsValid() != true || !AttachedEntity.TryGetComponent(out DoAfterComponent? doAfterComponent))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace Content.Client.GameObjects.EntitySystems.DoAfter
|
|||||||
Gui ??= new DoAfterGui();
|
Gui ??= new DoAfterGui();
|
||||||
Gui.AttachedEntity = entity;
|
Gui.AttachedEntity = entity;
|
||||||
|
|
||||||
if (entity.TryGetComponent(out DoAfterComponent doAfterComponent))
|
if (entity.TryGetComponent(out DoAfterComponent? doAfterComponent))
|
||||||
{
|
{
|
||||||
foreach (var (_, doAfter) in doAfterComponent.DoAfters)
|
foreach (var (_, doAfter) in doAfterComponent.DoAfters)
|
||||||
{
|
{
|
||||||
@@ -87,7 +87,7 @@ namespace Content.Client.GameObjects.EntitySystems.DoAfter
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_player.TryGetComponent(out DoAfterComponent doAfterComponent))
|
if (!_player.TryGetComponent(out DoAfterComponent? doAfterComponent))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
{
|
{
|
||||||
var playerEnt = _playerManager.LocalPlayer?.ControlledEntity;
|
var playerEnt = _playerManager.LocalPlayer?.ControlledEntity;
|
||||||
|
|
||||||
if (playerEnt == null || !playerEnt.TryGetComponent(out IMoverComponent mover))
|
if (playerEnt == null || !playerEnt.TryGetComponent(out IMoverComponent? mover))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ namespace Content.Client.UserInterface
|
|||||||
|
|
||||||
protected override void Draw(DrawingHandleScreen handle)
|
protected override void Draw(DrawingHandleScreen handle)
|
||||||
{
|
{
|
||||||
|
Span<float> x = stackalloc float[10];
|
||||||
Color color;
|
Color color;
|
||||||
|
|
||||||
var lerp = 1f - MathF.Abs(Progress); // for future bikeshedding purposes
|
var lerp = 1f - MathF.Abs(Progress); // for future bikeshedding purposes
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ namespace Content.IntegrationTests.Tests.Disposal
|
|||||||
var disposalTrunk = entityManager.SpawnEntity("DisposalTrunk", disposalUnit.Transform.MapPosition);
|
var disposalTrunk = entityManager.SpawnEntity("DisposalTrunk", disposalUnit.Transform.MapPosition);
|
||||||
|
|
||||||
// Test for components existing
|
// Test for components existing
|
||||||
Assert.True(disposalUnit.TryGetComponent(out unit));
|
Assert.True(disposalUnit.TryGetComponent(out unit!));
|
||||||
Assert.True(disposalTrunk.TryGetComponent(out entry));
|
Assert.True(disposalTrunk.TryGetComponent(out entry!));
|
||||||
|
|
||||||
// Can't insert, unanchored and unpowered
|
// Can't insert, unanchored and unpowered
|
||||||
var disposalUnitAnchorable = disposalUnit.GetComponent<AnchorableComponent>();
|
var disposalUnitAnchorable = disposalUnit.GetComponent<AnchorableComponent>();
|
||||||
@@ -92,8 +92,8 @@ namespace Content.IntegrationTests.Tests.Disposal
|
|||||||
|
|
||||||
// Anchor the disposal unit
|
// Anchor the disposal unit
|
||||||
await disposalUnitAnchorable.TryAnchor(human, null, true);
|
await disposalUnitAnchorable.TryAnchor(human, null, true);
|
||||||
Assert.True(disposalUnit.TryGetComponent(out AnchorableComponent anchorableUnit));
|
Assert.True(disposalUnit.TryGetComponent(out AnchorableComponent? anchorableUnit));
|
||||||
Assert.True(await anchorableUnit.TryAnchor(human, wrench));
|
Assert.True(await anchorableUnit!.TryAnchor(human, wrench));
|
||||||
Assert.True(unit.Anchored);
|
Assert.True(unit.Anchored);
|
||||||
|
|
||||||
// No power
|
// No power
|
||||||
@@ -118,8 +118,8 @@ namespace Content.IntegrationTests.Tests.Disposal
|
|||||||
Flush(unit, false, entry, human, wrench);
|
Flush(unit, false, entry, human, wrench);
|
||||||
|
|
||||||
// Remove power need
|
// Remove power need
|
||||||
Assert.True(disposalUnit.TryGetComponent(out PowerReceiverComponent power));
|
Assert.True(disposalUnit.TryGetComponent(out PowerReceiverComponent? power));
|
||||||
power.NeedsPower = false;
|
power!.NeedsPower = false;
|
||||||
Assert.True(unit.Powered);
|
Assert.True(unit.Powered);
|
||||||
|
|
||||||
// Flush with a mob and an item
|
// Flush with a mob and an item
|
||||||
|
|||||||
@@ -41,13 +41,13 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Movement
|
|||||||
|
|
||||||
// Test for climb components existing
|
// Test for climb components existing
|
||||||
// Players and tables should have these in their prototypes.
|
// Players and tables should have these in their prototypes.
|
||||||
Assert.True(human.TryGetComponent(out climbing), "Human has no climbing");
|
Assert.True(human.TryGetComponent(out climbing!), "Human has no climbing");
|
||||||
Assert.True(table.TryGetComponent(out climbable), "Table has no climbable");
|
Assert.True(table.TryGetComponent(out climbable!), "Table has no climbable");
|
||||||
|
|
||||||
// Now let's make the player enter a climbing transitioning state.
|
// Now let's make the player enter a climbing transitioning state.
|
||||||
climbing.IsClimbing = true;
|
climbing.IsClimbing = true;
|
||||||
climbing.TryMoveTo(human.Transform.WorldPosition, table.Transform.WorldPosition);
|
climbing.TryMoveTo(human.Transform.WorldPosition, table.Transform.WorldPosition);
|
||||||
human.TryGetComponent(out ICollidableComponent body);
|
var body = human.GetComponent<ICollidableComponent>();
|
||||||
|
|
||||||
Assert.True(body.HasController<ClimbController>(), "Player has no ClimbController");
|
Assert.True(body.HasController<ClimbController>(), "Player has no ClimbController");
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace Content.Server.Body
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player.AttachedEntity.TryGetComponent(out BodyManagerComponent body))
|
if (!player.AttachedEntity.TryGetComponent(out BodyManagerComponent? body))
|
||||||
{
|
{
|
||||||
var random = IoCManager.Resolve<IRobustRandom>();
|
var random = IoCManager.Resolve<IRobustRandom>();
|
||||||
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";
|
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";
|
||||||
@@ -72,7 +72,7 @@ namespace Content.Server.Body
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player.AttachedEntity.TryGetComponent(out BodyManagerComponent body))
|
if (!player.AttachedEntity.TryGetComponent(out BodyManagerComponent? body))
|
||||||
{
|
{
|
||||||
var random = IoCManager.Resolve<IRobustRandom>();
|
var random = IoCManager.Resolve<IRobustRandom>();
|
||||||
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";
|
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";
|
||||||
@@ -119,7 +119,7 @@ namespace Content.Server.Body
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player.AttachedEntity.TryGetComponent(out BodyManagerComponent body))
|
if (!player.AttachedEntity.TryGetComponent(out BodyManagerComponent? body))
|
||||||
{
|
{
|
||||||
var random = IoCManager.Resolve<IRobustRandom>();
|
var random = IoCManager.Resolve<IRobustRandom>();
|
||||||
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";
|
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace Content.Server.Body.Mechanisms.Behaviors
|
|||||||
base.PreMetabolism(frameTime);
|
base.PreMetabolism(frameTime);
|
||||||
|
|
||||||
if (Mechanism.Body == null ||
|
if (Mechanism.Body == null ||
|
||||||
!Mechanism.Body.Owner.TryGetComponent(out BloodstreamComponent bloodstream))
|
!Mechanism.Body.Owner.TryGetComponent(out BloodstreamComponent? bloodstream))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace Content.Server.Body.Mechanisms.Behaviors
|
|||||||
base.PreMetabolism(frameTime);
|
base.PreMetabolism(frameTime);
|
||||||
|
|
||||||
if (Mechanism.Body == null ||
|
if (Mechanism.Body == null ||
|
||||||
!Mechanism.Body.Owner.TryGetComponent(out LungComponent lung))
|
!Mechanism.Body.Owner.TryGetComponent(out LungComponent? lung))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Content.Server.Body.Mechanisms.Behaviors
|
|||||||
base.PreMetabolism(frameTime);
|
base.PreMetabolism(frameTime);
|
||||||
|
|
||||||
if (Mechanism.Body == null ||
|
if (Mechanism.Body == null ||
|
||||||
!Mechanism.Body.Owner.TryGetComponent(out StomachComponent stomach))
|
!Mechanism.Body.Owner.TryGetComponent(out StomachComponent? stomach))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,16 +71,16 @@ namespace Content.Server.GameObjects.Components.Access
|
|||||||
|
|
||||||
public static ICollection<string> FindAccessTags(IEntity entity)
|
public static ICollection<string> FindAccessTags(IEntity entity)
|
||||||
{
|
{
|
||||||
if (entity.TryGetComponent(out IAccess accessComponent))
|
if (entity.TryGetComponent(out IAccess? accessComponent))
|
||||||
{
|
{
|
||||||
return accessComponent.Tags;
|
return accessComponent.Tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.TryGetComponent(out IHandsComponent handsComponent))
|
if (entity.TryGetComponent(out IHandsComponent? handsComponent))
|
||||||
{
|
{
|
||||||
var activeHandEntity = handsComponent.GetActiveHand?.Owner;
|
var activeHandEntity = handsComponent.GetActiveHand?.Owner;
|
||||||
if (activeHandEntity != null &&
|
if (activeHandEntity != null &&
|
||||||
activeHandEntity.TryGetComponent(out IAccess handAccessComponent))
|
activeHandEntity.TryGetComponent(out IAccess? handAccessComponent))
|
||||||
{
|
{
|
||||||
return handAccessComponent.Tags;
|
return handAccessComponent.Tags;
|
||||||
}
|
}
|
||||||
@@ -90,11 +90,11 @@ namespace Content.Server.GameObjects.Components.Access
|
|||||||
return Array.Empty<string>();
|
return Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.TryGetComponent(out InventoryComponent inventoryComponent))
|
if (entity.TryGetComponent(out InventoryComponent? inventoryComponent))
|
||||||
{
|
{
|
||||||
if (inventoryComponent.HasSlot(EquipmentSlotDefines.Slots.IDCARD) &&
|
if (inventoryComponent.HasSlot(EquipmentSlotDefines.Slots.IDCARD) &&
|
||||||
inventoryComponent.TryGetSlotItem(EquipmentSlotDefines.Slots.IDCARD, out ItemComponent item) &&
|
inventoryComponent.TryGetSlotItem(EquipmentSlotDefines.Slots.IDCARD, out ItemComponent item) &&
|
||||||
item.Owner.TryGetComponent(out IAccess idAccessComponent)
|
item.Owner.TryGetComponent(out IAccess? idAccessComponent)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return idAccessComponent.Tags;
|
return idAccessComponent.Tags;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace Content.Server.GameObjects.Components
|
|||||||
if (!force)
|
if (!force)
|
||||||
{
|
{
|
||||||
if (utilizing == null ||
|
if (utilizing == null ||
|
||||||
!utilizing.TryGetComponent(out ToolComponent tool) ||
|
!utilizing.TryGetComponent(out ToolComponent? tool) ||
|
||||||
!(await tool.UseTool(user, Owner, 0.5f, ToolQuality.Anchoring)))
|
!(await tool.UseTool(user, Owner, 0.5f, ToolQuality.Anchoring)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -93,7 +93,7 @@ namespace Content.Server.GameObjects.Components
|
|||||||
/// <returns>true if toggled, false otherwise</returns>
|
/// <returns>true if toggled, false otherwise</returns>
|
||||||
private async Task<bool> TryToggleAnchor(IEntity user, IEntity? utilizing = null, bool force = false)
|
private async Task<bool> TryToggleAnchor(IEntity user, IEntity? utilizing = null, bool force = false)
|
||||||
{
|
{
|
||||||
if (!Owner.TryGetComponent(out ICollidableComponent collidable))
|
if (!Owner.TryGetComponent(out ICollidableComponent? collidable))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,11 +131,11 @@ namespace Content.Server.GameObjects.Components.Atmos
|
|||||||
if (session.AttachedEntity == null)
|
if (session.AttachedEntity == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!session.AttachedEntity.TryGetComponent(out IHandsComponent handsComponent))
|
if (!session.AttachedEntity.TryGetComponent(out IHandsComponent? handsComponent))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var activeHandEntity = handsComponent?.GetActiveHand?.Owner;
|
var activeHandEntity = handsComponent?.GetActiveHand?.Owner;
|
||||||
if (activeHandEntity == null || !activeHandEntity.TryGetComponent(out GasAnalyzerComponent gasAnalyzer))
|
if (activeHandEntity == null || !activeHandEntity.TryGetComponent(out GasAnalyzerComponent? gasAnalyzer))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -195,7 +195,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player.TryGetComponent(out IHandsComponent handsComponent))
|
if (!player.TryGetComponent(out IHandsComponent? handsComponent))
|
||||||
{
|
{
|
||||||
_notifyManager.PopupMessage(Owner.Transform.GridPosition, player,
|
_notifyManager.PopupMessage(Owner.Transform.GridPosition, player,
|
||||||
Loc.GetString("You have no hands."));
|
Loc.GetString("You have no hands."));
|
||||||
@@ -203,7 +203,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
|||||||
}
|
}
|
||||||
|
|
||||||
var activeHandEntity = handsComponent.GetActiveHand?.Owner;
|
var activeHandEntity = handsComponent.GetActiveHand?.Owner;
|
||||||
if (activeHandEntity == null || !activeHandEntity.TryGetComponent(out GasAnalyzerComponent gasAnalyzer))
|
if (activeHandEntity == null || !activeHandEntity.TryGetComponent(out GasAnalyzerComponent? gasAnalyzer))
|
||||||
{
|
{
|
||||||
_notifyManager.PopupMessage(serverMsg.Session.AttachedEntity,
|
_notifyManager.PopupMessage(serverMsg.Session.AttachedEntity,
|
||||||
serverMsg.Session.AttachedEntity,
|
serverMsg.Session.AttachedEntity,
|
||||||
@@ -225,7 +225,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eventArgs.User.TryGetComponent(out IActorComponent actor))
|
if (eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||||
{
|
{
|
||||||
OpenInterface(actor.playerSession, eventArgs.ClickLocation);
|
OpenInterface(actor.playerSession, eventArgs.ClickLocation);
|
||||||
//TODO: show other sprite when ui open?
|
//TODO: show other sprite when ui open?
|
||||||
@@ -236,7 +236,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
|||||||
|
|
||||||
void IDropped.Dropped(DroppedEventArgs eventArgs)
|
void IDropped.Dropped(DroppedEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
if (eventArgs.User.TryGetComponent(out IActorComponent actor))
|
if (eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||||
{
|
{
|
||||||
CloseInterface(actor.playerSession);
|
CloseInterface(actor.playerSession);
|
||||||
//TODO: if other sprite is shown, change again
|
//TODO: if other sprite is shown, change again
|
||||||
@@ -245,7 +245,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
|||||||
|
|
||||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
if (eventArgs.User.TryGetComponent(out IActorComponent actor))
|
if (eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||||
{
|
{
|
||||||
OpenInterface(actor.playerSession);
|
OpenInterface(actor.playerSession);
|
||||||
//TODO: show other sprite when ui open?
|
//TODO: show other sprite when ui open?
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ namespace Content.Server.GameObjects.Components.Body
|
|||||||
|
|
||||||
private void CalculateSpeed()
|
private void CalculateSpeed()
|
||||||
{
|
{
|
||||||
if (!Owner.TryGetComponent(out MovementSpeedModifierComponent playerMover))
|
if (!Owner.TryGetComponent(out MovementSpeedModifierComponent? playerMover))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ namespace Content.Server.GameObjects.Components.Buckle
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void BuckleStatus()
|
private void BuckleStatus()
|
||||||
{
|
{
|
||||||
if (Owner.TryGetComponent(out ServerStatusEffectsComponent status))
|
if (Owner.TryGetComponent(out ServerStatusEffectsComponent? status))
|
||||||
{
|
{
|
||||||
status.ChangeStatusEffectIcon(StatusEffect.Buckled,
|
status.ChangeStatusEffectIcon(StatusEffect.Buckled,
|
||||||
Buckled
|
Buckled
|
||||||
@@ -291,7 +291,7 @@ namespace Content.Server.GameObjects.Components.Buckle
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out AppearanceComponent appearance))
|
if (Owner.TryGetComponent(out AppearanceComponent? appearance))
|
||||||
{
|
{
|
||||||
appearance.SetData(BuckleVisuals.Buckled, true);
|
appearance.SetData(BuckleVisuals.Buckled, true);
|
||||||
}
|
}
|
||||||
@@ -359,12 +359,12 @@ namespace Content.Server.GameObjects.Components.Buckle
|
|||||||
Owner.Transform.WorldRotation = oldBuckledTo.Owner.Transform.WorldRotation;
|
Owner.Transform.WorldRotation = oldBuckledTo.Owner.Transform.WorldRotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out AppearanceComponent appearance))
|
if (Owner.TryGetComponent(out AppearanceComponent? appearance))
|
||||||
{
|
{
|
||||||
appearance.SetData(BuckleVisuals.Buckled, false);
|
appearance.SetData(BuckleVisuals.Buckled, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out StunnableComponent stunnable) && stunnable.KnockedDown)
|
if (Owner.TryGetComponent(out StunnableComponent? stunnable) && stunnable.KnockedDown)
|
||||||
{
|
{
|
||||||
StandingStateHelper.Down(Owner);
|
StandingStateHelper.Down(Owner);
|
||||||
}
|
}
|
||||||
@@ -373,14 +373,14 @@ namespace Content.Server.GameObjects.Components.Buckle
|
|||||||
StandingStateHelper.Standing(Owner);
|
StandingStateHelper.Standing(Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out MobStateManagerComponent stateManager))
|
if (Owner.TryGetComponent(out MobStateManagerComponent? stateManager))
|
||||||
{
|
{
|
||||||
stateManager.CurrentMobState.EnterState(Owner);
|
stateManager.CurrentMobState.EnterState(Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
BuckleStatus();
|
BuckleStatus();
|
||||||
|
|
||||||
if (oldBuckledTo.Owner.TryGetComponent(out StrapComponent strap))
|
if (oldBuckledTo.Owner.TryGetComponent(out StrapComponent? strap))
|
||||||
{
|
{
|
||||||
strap.Remove(this);
|
strap.Remove(this);
|
||||||
_entitySystem.GetEntitySystem<AudioSystem>()
|
_entitySystem.GetEntitySystem<AudioSystem>()
|
||||||
@@ -535,7 +535,7 @@ namespace Content.Server.GameObjects.Components.Buckle
|
|||||||
_entityManager.EventBus.UnsubscribeEvents(this);
|
_entityManager.EventBus.UnsubscribeEvents(this);
|
||||||
|
|
||||||
if (BuckledTo != null &&
|
if (BuckledTo != null &&
|
||||||
BuckledTo.Owner.TryGetComponent(out StrapComponent strap))
|
BuckledTo.Owner.TryGetComponent(out StrapComponent? strap))
|
||||||
{
|
{
|
||||||
strap.Remove(this);
|
strap.Remove(this);
|
||||||
}
|
}
|
||||||
@@ -552,7 +552,7 @@ namespace Content.Server.GameObjects.Components.Buckle
|
|||||||
|
|
||||||
if (BuckledTo != null &&
|
if (BuckledTo != null &&
|
||||||
Owner.Transform.WorldRotation.GetCardinalDir() == Direction.North &&
|
Owner.Transform.WorldRotation.GetCardinalDir() == Direction.North &&
|
||||||
BuckledTo.Owner.TryGetComponent(out SpriteComponent strapSprite))
|
BuckledTo.Owner.TryGetComponent(out SpriteComponent? strapSprite))
|
||||||
{
|
{
|
||||||
drawDepth = strapSprite.DrawDepth - 1;
|
drawDepth = strapSprite.DrawDepth - 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ namespace Content.Server.GameObjects.Components.Cargo
|
|||||||
|
|
||||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
if (!eventArgs.User.TryGetComponent(out IActorComponent actor))
|
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace Content.Server.GameObjects.Components.Conveyor
|
|||||||
{
|
{
|
||||||
_state = value;
|
_state = value;
|
||||||
|
|
||||||
if (!Owner.TryGetComponent(out AppearanceComponent appearance))
|
if (!Owner.TryGetComponent(out AppearanceComponent? appearance))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ namespace Content.Server.GameObjects.Components.Conveyor
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out PowerReceiverComponent receiver) &&
|
if (Owner.TryGetComponent(out PowerReceiverComponent? receiver) &&
|
||||||
!receiver.Powered)
|
!receiver.Powered)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -114,7 +114,7 @@ namespace Content.Server.GameObjects.Components.Conveyor
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!entity.TryGetComponent(out ICollidableComponent collidable) ||
|
if (!entity.TryGetComponent(out ICollidableComponent? collidable) ||
|
||||||
collidable.Anchored)
|
collidable.Anchored)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -155,7 +155,7 @@ namespace Content.Server.GameObjects.Components.Conveyor
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.TryGetComponent(out ICollidableComponent collidable))
|
if (entity.TryGetComponent(out ICollidableComponent? collidable))
|
||||||
{
|
{
|
||||||
var controller = collidable.EnsureController<ConveyedController>();
|
var controller = collidable.EnsureController<ConveyedController>();
|
||||||
controller.Move(direction, _speed * frameTime);
|
controller.Move(direction, _speed * frameTime);
|
||||||
@@ -225,7 +225,7 @@ namespace Content.Server.GameObjects.Components.Conveyor
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!@switch.TryGetComponent(out ConveyorSwitchComponent component))
|
if (!@switch.TryGetComponent(out ConveyorSwitchComponent? component))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -247,13 +247,13 @@ namespace Content.Server.GameObjects.Components.Conveyor
|
|||||||
|
|
||||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
if (eventArgs.Using.TryGetComponent(out ConveyorSwitchComponent conveyorSwitch))
|
if (eventArgs.Using.TryGetComponent(out ConveyorSwitchComponent? conveyorSwitch))
|
||||||
{
|
{
|
||||||
conveyorSwitch.Connect(this, eventArgs.User);
|
conveyorSwitch.Connect(this, eventArgs.User);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eventArgs.Using.TryGetComponent(out ToolComponent tool))
|
if (eventArgs.Using.TryGetComponent(out ToolComponent? tool))
|
||||||
{
|
{
|
||||||
return await ToolUsed(eventArgs.User, tool);
|
return await ToolUsed(eventArgs.User, tool);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Conveyor
|
|||||||
{
|
{
|
||||||
_state = value;
|
_state = value;
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out AppearanceComponent appearance))
|
if (Owner.TryGetComponent(out AppearanceComponent? appearance))
|
||||||
{
|
{
|
||||||
appearance.SetData(ConveyorVisuals.State, value);
|
appearance.SetData(ConveyorVisuals.State, value);
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ namespace Content.Server.GameObjects.Components.Conveyor
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!conveyor.TryGetComponent(out ConveyorComponent component))
|
if (!conveyor.TryGetComponent(out ConveyorComponent? component))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -172,7 +172,7 @@ namespace Content.Server.GameObjects.Components.Conveyor
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!@switch.TryGetComponent(out ConveyorSwitchComponent component))
|
if (!@switch.TryGetComponent(out ConveyorSwitchComponent? component))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -196,13 +196,13 @@ namespace Content.Server.GameObjects.Components.Conveyor
|
|||||||
|
|
||||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
if (eventArgs.Using.TryGetComponent(out ConveyorComponent conveyor))
|
if (eventArgs.Using.TryGetComponent(out ConveyorComponent? conveyor))
|
||||||
{
|
{
|
||||||
Connect(conveyor, eventArgs.User);
|
Connect(conveyor, eventArgs.User);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eventArgs.Using.TryGetComponent(out ConveyorSwitchComponent otherSwitch))
|
if (eventArgs.Using.TryGetComponent(out ConveyorSwitchComponent? otherSwitch))
|
||||||
{
|
{
|
||||||
SyncWith(otherSwitch, eventArgs.User);
|
SyncWith(otherSwitch, eventArgs.User);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!entity.TryGetComponent(out IDisposalTubeComponent tube))
|
if (!entity.TryGetComponent(out IDisposalTubeComponent? tube))
|
||||||
{
|
{
|
||||||
shell.SendText(player, Loc.GetString("Entity with uid {0} doesn't have a {1} component", id, nameof(IDisposalTubeComponent)));
|
shell.SendText(player, Loc.GetString("Entity with uid {0} doesn't have a {1} component", id, nameof(IDisposalTubeComponent)));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!entity.TryGetComponent(out ICollidableComponent collidable) ||
|
if (!entity.TryGetComponent(out ICollidableComponent? collidable) ||
|
||||||
!collidable.CanCollide)
|
!collidable.CanCollide)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -73,7 +73,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.TryGetComponent(out ICollidableComponent collidable))
|
if (entity.TryGetComponent(out ICollidableComponent? collidable))
|
||||||
{
|
{
|
||||||
collidable.CanCollide = false;
|
collidable.CanCollide = false;
|
||||||
}
|
}
|
||||||
@@ -105,7 +105,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
|
|
||||||
foreach (var entity in _contents.ContainedEntities.ToArray())
|
foreach (var entity in _contents.ContainedEntities.ToArray())
|
||||||
{
|
{
|
||||||
if (entity.TryGetComponent(out ICollidableComponent collidable))
|
if (entity.TryGetComponent(out ICollidableComponent? collidable))
|
||||||
{
|
{
|
||||||
collidable.CanCollide = true;
|
collidable.CanCollide = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
private bool Anchored =>
|
private bool Anchored =>
|
||||||
!Owner.TryGetComponent(out CollidableComponent collidable) ||
|
!Owner.TryGetComponent(out CollidableComponent? collidable) ||
|
||||||
collidable.Anchored;
|
collidable.Anchored;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -71,7 +71,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
var snapGrid = Owner.GetComponent<SnapGridComponent>();
|
var snapGrid = Owner.GetComponent<SnapGridComponent>();
|
||||||
var tube = snapGrid
|
var tube = snapGrid
|
||||||
.GetInDir(nextDirection)
|
.GetInDir(nextDirection)
|
||||||
.Select(x => x.TryGetComponent(out IDisposalTubeComponent c) ? c : null)
|
.Select(x => x.TryGetComponent(out IDisposalTubeComponent? c) ? c : null)
|
||||||
.FirstOrDefault(x => x != null && x != this);
|
.FirstOrDefault(x => x != null && x != this);
|
||||||
|
|
||||||
if (tube == null)
|
if (tube == null)
|
||||||
@@ -153,7 +153,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
|
|
||||||
foreach (var entity in Contents.ContainedEntities.ToArray())
|
foreach (var entity in Contents.ContainedEntities.ToArray())
|
||||||
{
|
{
|
||||||
if (!entity.TryGetComponent(out DisposalHolderComponent holder))
|
if (!entity.TryGetComponent(out DisposalHolderComponent? holder))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -171,7 +171,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
|
|
||||||
private void UpdateVisualState()
|
private void UpdateVisualState()
|
||||||
{
|
{
|
||||||
if (!Owner.TryGetComponent(out AppearanceComponent appearance))
|
if (!Owner.TryGetComponent(out AppearanceComponent? appearance))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -187,7 +187,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
|
|
||||||
private void AnchoredChanged()
|
private void AnchoredChanged()
|
||||||
{
|
{
|
||||||
if (!Owner.TryGetComponent(out CollidableComponent collidable))
|
if (!Owner.TryGetComponent(out CollidableComponent? collidable))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,12 +86,12 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
public bool Powered =>
|
public bool Powered =>
|
||||||
!Owner.TryGetComponent(out PowerReceiverComponent receiver) ||
|
!Owner.TryGetComponent(out PowerReceiverComponent? receiver) ||
|
||||||
receiver.Powered;
|
receiver.Powered;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
public bool Anchored =>
|
public bool Anchored =>
|
||||||
!Owner.TryGetComponent(out CollidableComponent collidable) ||
|
!Owner.TryGetComponent(out CollidableComponent? collidable) ||
|
||||||
collidable.Anchored;
|
collidable.Anchored;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
@@ -122,7 +122,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!entity.TryGetComponent(out ICollidableComponent collidable) ||
|
if (!entity.TryGetComponent(out ICollidableComponent? collidable) ||
|
||||||
!collidable.CanCollide)
|
!collidable.CanCollide)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -159,7 +159,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
{
|
{
|
||||||
TryQueueEngage();
|
TryQueueEngage();
|
||||||
|
|
||||||
if (entity.TryGetComponent(out IActorComponent actor))
|
if (entity.TryGetComponent(out IActorComponent? actor))
|
||||||
{
|
{
|
||||||
_userInterface.Close(actor.playerSession);
|
_userInterface.Close(actor.playerSession);
|
||||||
}
|
}
|
||||||
@@ -181,7 +181,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
|
|
||||||
private bool TryDrop(IEntity user, IEntity entity)
|
private bool TryDrop(IEntity user, IEntity entity)
|
||||||
{
|
{
|
||||||
if (!user.TryGetComponent(out HandsComponent hands))
|
if (!user.TryGetComponent(out HandsComponent? hands))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -273,7 +273,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
|
|
||||||
private void TogglePower()
|
private void TogglePower()
|
||||||
{
|
{
|
||||||
if (!Owner.TryGetComponent(out PowerReceiverComponent receiver))
|
if (!Owner.TryGetComponent(out PowerReceiverComponent? receiver))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -352,7 +352,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
|
|
||||||
private void UpdateVisualState(bool flush)
|
private void UpdateVisualState(bool flush)
|
||||||
{
|
{
|
||||||
if (!Owner.TryGetComponent(out AppearanceComponent appearance))
|
if (!Owner.TryGetComponent(out AppearanceComponent? appearance))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -488,7 +488,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
var collidable = Owner.EnsureComponent<CollidableComponent>();
|
var collidable = Owner.EnsureComponent<CollidableComponent>();
|
||||||
collidable.AnchoredChanged += UpdateVisualState;
|
collidable.AnchoredChanged += UpdateVisualState;
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out PowerReceiverComponent receiver))
|
if (Owner.TryGetComponent(out PowerReceiverComponent? receiver))
|
||||||
{
|
{
|
||||||
receiver.OnPowerStateChanged += PowerStateChanged;
|
receiver.OnPowerStateChanged += PowerStateChanged;
|
||||||
}
|
}
|
||||||
@@ -498,12 +498,12 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
|
|
||||||
public override void OnRemove()
|
public override void OnRemove()
|
||||||
{
|
{
|
||||||
if (Owner.TryGetComponent(out ICollidableComponent collidable))
|
if (Owner.TryGetComponent(out ICollidableComponent? collidable))
|
||||||
{
|
{
|
||||||
collidable.AnchoredChanged -= UpdateVisualState;
|
collidable.AnchoredChanged -= UpdateVisualState;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out PowerReceiverComponent receiver))
|
if (Owner.TryGetComponent(out PowerReceiverComponent? receiver))
|
||||||
{
|
{
|
||||||
receiver.OnPowerStateChanged -= PowerStateChanged;
|
receiver.OnPowerStateChanged -= PowerStateChanged;
|
||||||
}
|
}
|
||||||
@@ -530,7 +530,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case RelayMovementEntityMessage msg:
|
case RelayMovementEntityMessage msg:
|
||||||
if (!msg.Entity.TryGetComponent(out HandsComponent hands) ||
|
if (!msg.Entity.TryGetComponent(out HandsComponent? hands) ||
|
||||||
hands.Count == 0 ||
|
hands.Count == 0 ||
|
||||||
_gameTiming.CurTime < _lastExitAttempt + ExitAttemptDelay)
|
_gameTiming.CurTime < _lastExitAttempt + ExitAttemptDelay)
|
||||||
{
|
{
|
||||||
@@ -559,7 +559,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!eventArgs.User.TryGetComponent(out IActorComponent actor))
|
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace Content.Server.GameObjects.Components
|
|||||||
{
|
{
|
||||||
connectedClient = null;
|
connectedClient = null;
|
||||||
|
|
||||||
if (!Owner.TryGetComponent(out IActorComponent actorComponent))
|
if (!Owner.TryGetComponent(out IActorComponent? actorComponent))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ namespace Content.Server.GameObjects.Components.Fluids
|
|||||||
|
|
||||||
foreach (var spillEntity in entityManager.GetEntitiesAt(spillTileMapGrid.ParentMapId, spillGridCoords.Position))
|
foreach (var spillEntity in entityManager.GetEntitiesAt(spillTileMapGrid.ParentMapId, spillGridCoords.Position))
|
||||||
{
|
{
|
||||||
if (!spillEntity.TryGetComponent(out PuddleComponent puddleComponent))
|
if (!spillEntity.TryGetComponent(out PuddleComponent? puddleComponent))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -711,7 +711,7 @@ namespace Content.Server.GameObjects.Components.GUI
|
|||||||
|
|
||||||
Dirty();
|
Dirty();
|
||||||
|
|
||||||
if (!message.Entity.TryGetComponent(out ICollidableComponent collidable))
|
if (!message.Entity.TryGetComponent(out ICollidableComponent? collidable))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -724,13 +724,13 @@ namespace Content.Server.GameObjects.Components.GUI
|
|||||||
|
|
||||||
private void AddPullingStatuses(IEntity pulled)
|
private void AddPullingStatuses(IEntity pulled)
|
||||||
{
|
{
|
||||||
if (pulled.TryGetComponent(out ServerStatusEffectsComponent pulledStatus))
|
if (pulled.TryGetComponent(out ServerStatusEffectsComponent? pulledStatus))
|
||||||
{
|
{
|
||||||
pulledStatus.ChangeStatusEffectIcon(StatusEffect.Pulled,
|
pulledStatus.ChangeStatusEffectIcon(StatusEffect.Pulled,
|
||||||
"/Textures/Interface/StatusEffects/Pull/pulled.png");
|
"/Textures/Interface/StatusEffects/Pull/pulled.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out ServerStatusEffectsComponent ownerStatus))
|
if (Owner.TryGetComponent(out ServerStatusEffectsComponent? ownerStatus))
|
||||||
{
|
{
|
||||||
ownerStatus.ChangeStatusEffectIcon(StatusEffect.Pulling,
|
ownerStatus.ChangeStatusEffectIcon(StatusEffect.Pulling,
|
||||||
"/Textures/Interface/StatusEffects/Pull/pulling.png");
|
"/Textures/Interface/StatusEffects/Pull/pulling.png");
|
||||||
@@ -739,12 +739,12 @@ namespace Content.Server.GameObjects.Components.GUI
|
|||||||
|
|
||||||
private void RemovePullingStatuses(IEntity pulled)
|
private void RemovePullingStatuses(IEntity pulled)
|
||||||
{
|
{
|
||||||
if (pulled.TryGetComponent(out ServerStatusEffectsComponent pulledStatus))
|
if (pulled.TryGetComponent(out ServerStatusEffectsComponent? pulledStatus))
|
||||||
{
|
{
|
||||||
pulledStatus.RemoveStatusEffect(StatusEffect.Pulled);
|
pulledStatus.RemoveStatusEffect(StatusEffect.Pulled);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out ServerStatusEffectsComponent ownerStatus))
|
if (Owner.TryGetComponent(out ServerStatusEffectsComponent? ownerStatus))
|
||||||
{
|
{
|
||||||
ownerStatus.RemoveStatusEffect(StatusEffect.Pulling);
|
ownerStatus.RemoveStatusEffect(StatusEffect.Pulling);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
|
|
||||||
foreach (var entity in entities)
|
foreach (var entity in entities)
|
||||||
{
|
{
|
||||||
if (entity.TryGetComponent(out AnchorableComponent anchorable))
|
if (entity.TryGetComponent(out AnchorableComponent? anchorable))
|
||||||
{
|
{
|
||||||
anchorable.TryAnchor(player.AttachedEntity, force: true);
|
anchorable.TryAnchor(player.AttachedEntity, force: true);
|
||||||
}
|
}
|
||||||
@@ -151,7 +151,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
|
|
||||||
foreach (var entity in entities)
|
foreach (var entity in entities)
|
||||||
{
|
{
|
||||||
if (entity.TryGetComponent(out AnchorableComponent anchorable))
|
if (entity.TryGetComponent(out AnchorableComponent? anchorable))
|
||||||
{
|
{
|
||||||
anchorable.TryUnAnchor(player.AttachedEntity, force: true);
|
anchorable.TryUnAnchor(player.AttachedEntity, force: true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,13 +101,13 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
{
|
{
|
||||||
EnsureInitialCalculated();
|
EnsureInitialCalculated();
|
||||||
|
|
||||||
if (entity.TryGetComponent(out ServerStorageComponent storage) &&
|
if (entity.TryGetComponent(out ServerStorageComponent? storage) &&
|
||||||
storage._storageCapacityMax >= _storageCapacityMax)
|
storage._storageCapacityMax >= _storageCapacityMax)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.TryGetComponent(out StorableComponent store) &&
|
if (entity.TryGetComponent(out StorableComponent? store) &&
|
||||||
store.ObjectSize > _storageCapacityMax - _storageUsed)
|
store.ObjectSize > _storageCapacityMax - _storageUsed)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -164,7 +164,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
|
|
||||||
Logger.DebugS(LoggerName, $"Storage (UID {Owner.Uid}) had entity (UID {message.Entity.Uid}) removed from it.");
|
Logger.DebugS(LoggerName, $"Storage (UID {Owner.Uid}) had entity (UID {message.Entity.Uid}) removed from it.");
|
||||||
|
|
||||||
if (!message.Entity.TryGetComponent(out StorableComponent storable))
|
if (!message.Entity.TryGetComponent(out StorableComponent? storable))
|
||||||
{
|
{
|
||||||
Logger.WarningS(LoggerName, $"Removed entity {message.Entity.Uid} without a StorableComponent from storage {Owner.Uid} at {Owner.Transform.MapPosition}");
|
Logger.WarningS(LoggerName, $"Removed entity {message.Entity.Uid} without a StorableComponent from storage {Owner.Uid} at {Owner.Transform.MapPosition}");
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
{
|
{
|
||||||
EnsureInitialCalculated();
|
EnsureInitialCalculated();
|
||||||
|
|
||||||
if (!player.TryGetComponent(out IHandsComponent hands) ||
|
if (!player.TryGetComponent(out IHandsComponent? hands) ||
|
||||||
hands.GetActiveHand == null)
|
hands.GetActiveHand == null)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -317,7 +317,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
|
|
||||||
private void UpdateDoorState()
|
private void UpdateDoorState()
|
||||||
{
|
{
|
||||||
if (Owner.TryGetComponent(out AppearanceComponent appearance))
|
if (Owner.TryGetComponent(out AppearanceComponent? appearance))
|
||||||
{
|
{
|
||||||
appearance.SetData(StorageVisuals.Open, SubscribedSessions.Count != 0);
|
appearance.SetData(StorageVisuals.Open, SubscribedSessions.Count != 0);
|
||||||
}
|
}
|
||||||
@@ -382,7 +382,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
|
|
||||||
var item = entity.GetComponent<ItemComponent>();
|
var item = entity.GetComponent<ItemComponent>();
|
||||||
if (item == null ||
|
if (item == null ||
|
||||||
!player.TryGetComponent(out HandsComponent hands))
|
!player.TryGetComponent(out HandsComponent? hands))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -506,7 +506,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
|
|
||||||
bool IDragDrop.CanDragDrop(DragDropEventArgs eventArgs)
|
bool IDragDrop.CanDragDrop(DragDropEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
return eventArgs.Target.TryGetComponent(out PlaceableSurfaceComponent placeable) &&
|
return eventArgs.Target.TryGetComponent(out PlaceableSurfaceComponent? placeable) &&
|
||||||
placeable.IsPlaceable;
|
placeable.IsPlaceable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace Content.Server.GameObjects.Components.Mobs
|
|||||||
var visiting = Mind?.VisitingEntity;
|
var visiting = Mind?.VisitingEntity;
|
||||||
if (visiting != null)
|
if (visiting != null)
|
||||||
{
|
{
|
||||||
if (visiting.TryGetComponent(out GhostComponent ghost))
|
if (visiting.TryGetComponent(out GhostComponent? ghost))
|
||||||
{
|
{
|
||||||
ghost.CanReturnToBody = false;
|
ghost.CanReturnToBody = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace Content.Server.GameObjects.Components.Movement
|
|||||||
_entityManager.TryGetEntity(grid.GridEntityId, out var gridEntity))
|
_entityManager.TryGetEntity(grid.GridEntityId, out var gridEntity))
|
||||||
{
|
{
|
||||||
//TODO: Switch to shuttle component
|
//TODO: Switch to shuttle component
|
||||||
if (!gridEntity.TryGetComponent(out ICollidableComponent collidable))
|
if (!gridEntity.TryGetComponent(out ICollidableComponent? collidable))
|
||||||
{
|
{
|
||||||
collidable = gridEntity.AddComponent<CollidableComponent>();
|
collidable = gridEntity.AddComponent<CollidableComponent>();
|
||||||
collidable.Mass = 1;
|
collidable.Mass = 1;
|
||||||
@@ -137,9 +137,9 @@ namespace Content.Server.GameObjects.Components.Movement
|
|||||||
private void SetController(IEntity entity)
|
private void SetController(IEntity entity)
|
||||||
{
|
{
|
||||||
if (_controller != null ||
|
if (_controller != null ||
|
||||||
!entity.TryGetComponent(out MindComponent mind) ||
|
!entity.TryGetComponent(out MindComponent? mind) ||
|
||||||
mind.Mind == null ||
|
mind.Mind == null ||
|
||||||
!Owner.TryGetComponent(out ServerStatusEffectsComponent status))
|
!Owner.TryGetComponent(out ServerStatusEffectsComponent? status))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -179,17 +179,17 @@ namespace Content.Server.GameObjects.Components.Movement
|
|||||||
/// <param name="entity">The entity to update</param>
|
/// <param name="entity">The entity to update</param>
|
||||||
private void UpdateRemovedEntity(IEntity entity)
|
private void UpdateRemovedEntity(IEntity entity)
|
||||||
{
|
{
|
||||||
if (Owner.TryGetComponent(out ServerStatusEffectsComponent status))
|
if (Owner.TryGetComponent(out ServerStatusEffectsComponent? status))
|
||||||
{
|
{
|
||||||
status.RemoveStatusEffect(StatusEffect.Piloting);
|
status.RemoveStatusEffect(StatusEffect.Piloting);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.TryGetComponent(out MindComponent mind))
|
if (entity.TryGetComponent(out MindComponent? mind))
|
||||||
{
|
{
|
||||||
mind.Mind?.UnVisit();
|
mind.Mind?.UnVisit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.TryGetComponent(out BuckleComponent buckle))
|
if (entity.TryGetComponent(out BuckleComponent? buckle))
|
||||||
{
|
{
|
||||||
buckle.TryUnbuckle(entity, true);
|
buckle.TryUnbuckle(entity, true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ namespace Content.Server.GameObjects.Components.PDA
|
|||||||
|
|
||||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
if (!eventArgs.User.TryGetComponent(out IActorComponent actor))
|
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -175,7 +175,7 @@ namespace Content.Server.GameObjects.Components.PDA
|
|||||||
|
|
||||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
if (!eventArgs.User.TryGetComponent(out IActorComponent actor))
|
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace Content.Server.GameObjects.Components.Pointing
|
|||||||
{
|
{
|
||||||
base.Startup();
|
base.Startup();
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out SpriteComponent sprite))
|
if (Owner.TryGetComponent(out SpriteComponent? sprite))
|
||||||
{
|
{
|
||||||
sprite.DrawDepth = (int) DrawDepth.Overlays;
|
sprite.DrawDepth = (int) DrawDepth.Overlays;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace Content.Server.GameObjects.Components.Pointing
|
|||||||
private void UpdateAppearance()
|
private void UpdateAppearance()
|
||||||
{
|
{
|
||||||
if (_chasing == null ||
|
if (_chasing == null ||
|
||||||
!Owner.TryGetComponent(out AppearanceComponent appearance))
|
!Owner.TryGetComponent(out AppearanceComponent? appearance))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,7 @@ namespace Content.Server.GameObjects.Components.Pointing
|
|||||||
{
|
{
|
||||||
base.Startup();
|
base.Startup();
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out SpriteComponent sprite))
|
if (Owner.TryGetComponent(out SpriteComponent? sprite))
|
||||||
{
|
{
|
||||||
sprite.DrawDepth = (int) DrawDepth.Overlays;
|
sprite.DrawDepth = (int) DrawDepth.Overlays;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace Content.Server.GameObjects.Components.Rotatable
|
|||||||
|
|
||||||
private void TryFlip(IEntity user)
|
private void TryFlip(IEntity user)
|
||||||
{
|
{
|
||||||
if (Owner.TryGetComponent(out ICollidableComponent collidable) &&
|
if (Owner.TryGetComponent(out ICollidableComponent? collidable) &&
|
||||||
collidable.Anchored)
|
collidable.Anchored)
|
||||||
{
|
{
|
||||||
_notifyManager.PopupMessage(Owner.Transform.GridPosition, user, Loc.GetString("It's stuck."));
|
_notifyManager.PopupMessage(Owner.Transform.GridPosition, user, Loc.GetString("It's stuck."));
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ namespace Content.Server.GameObjects.Components
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player.TryGetComponent(out IHandsComponent handsComponent))
|
if (!player.TryGetComponent(out IHandsComponent? handsComponent))
|
||||||
{
|
{
|
||||||
_notifyManager.PopupMessage(Owner.Transform.GridPosition, player,
|
_notifyManager.PopupMessage(Owner.Transform.GridPosition, player,
|
||||||
Loc.GetString("You have no hands."));
|
Loc.GetString("You have no hands."));
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ namespace Content.Server.GameObjects.EntitySystems.Atmos
|
|||||||
{
|
{
|
||||||
var gridEntityId = _mapManager.GetGrid(gridId).GridEntityId;
|
var gridEntityId = _mapManager.GetGrid(gridId).GridEntityId;
|
||||||
|
|
||||||
if (!EntityManager.GetEntity(gridEntityId).TryGetComponent(out GridAtmosphereComponent gam))
|
if (!EntityManager.GetEntity(gridEntityId).TryGetComponent(out GridAtmosphereComponent? gam))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
|
|
||||||
if (!EntityManager.TryGetEntity(grid.GridEntityId, out var gridEnt)) return null;
|
if (!EntityManager.TryGetEntity(grid.GridEntityId, out var gridEnt)) return null;
|
||||||
|
|
||||||
return gridEnt.TryGetComponent(out IGridAtmosphereComponent atmos) ? atmos : null;
|
return gridEnt.TryGetComponent(out IGridAtmosphereComponent? atmos) ? atmos : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(float frameTime)
|
public override void Update(float frameTime)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace Content.Server.GameObjects.EntitySystems.DoAfter
|
|||||||
|
|
||||||
// For this we need to stay on the same hand slot and need the same item in that hand slot
|
// For this we need to stay on the same hand slot and need the same item in that hand slot
|
||||||
// (or if there is no item there we need to keep it free).
|
// (or if there is no item there we need to keep it free).
|
||||||
if (eventArgs.NeedHand && eventArgs.User.TryGetComponent(out HandsComponent handsComponent))
|
if (eventArgs.NeedHand && eventArgs.User.TryGetComponent(out HandsComponent? handsComponent))
|
||||||
{
|
{
|
||||||
_activeHand = handsComponent.ActiveHand;
|
_activeHand = handsComponent.ActiveHand;
|
||||||
_activeItem = handsComponent.GetActiveHand;
|
_activeItem = handsComponent.GetActiveHand;
|
||||||
@@ -126,7 +126,7 @@ namespace Content.Server.GameObjects.EntitySystems.DoAfter
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (EventArgs.BreakOnStun &&
|
if (EventArgs.BreakOnStun &&
|
||||||
EventArgs.User.TryGetComponent(out StunnableComponent stunnableComponent) &&
|
EventArgs.User.TryGetComponent(out StunnableComponent? stunnableComponent) &&
|
||||||
stunnableComponent.Stunned)
|
stunnableComponent.Stunned)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@@ -134,7 +134,7 @@ namespace Content.Server.GameObjects.EntitySystems.DoAfter
|
|||||||
|
|
||||||
if (EventArgs.NeedHand)
|
if (EventArgs.NeedHand)
|
||||||
{
|
{
|
||||||
if (!EventArgs.User.TryGetComponent(out HandsComponent handsComponent))
|
if (!EventArgs.User.TryGetComponent(out HandsComponent? handsComponent))
|
||||||
{
|
{
|
||||||
// If we had a hand but no longer have it that's still a paddlin'
|
// If we had a hand but no longer have it that's still a paddlin'
|
||||||
if (_activeHand != null)
|
if (_activeHand != null)
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
ev.Entity.RemoveComponent<PlayerInputMoverComponent>();
|
ev.Entity.RemoveComponent<PlayerInputMoverComponent>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ev.Entity.TryGetComponent(out ICollidableComponent physics) &&
|
if (ev.Entity.TryGetComponent(out ICollidableComponent? physics) &&
|
||||||
physics.TryGetController(out MoverController controller))
|
physics.TryGetController(out MoverController controller))
|
||||||
{
|
{
|
||||||
controller.StopMoving();
|
controller.StopMoving();
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
|
|
||||||
var arrow = EntityManager.SpawnEntity("pointingarrow", coords);
|
var arrow = EntityManager.SpawnEntity("pointingarrow", coords);
|
||||||
|
|
||||||
if (player.TryGetComponent(out VisibilityComponent playerVisibility))
|
if (player.TryGetComponent(out VisibilityComponent? playerVisibility))
|
||||||
{
|
{
|
||||||
var arrowVisibility = arrow.EnsureComponent<VisibilityComponent>();
|
var arrowVisibility = arrow.EnsureComponent<VisibilityComponent>();
|
||||||
arrowVisibility.Layer = playerVisibility.Layer;
|
arrowVisibility.Layer = playerVisibility.Layer;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ namespace Content.Shared.GameObjects.Components.Movement
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (Owner.TryGetComponent(out MovementSpeedModifierComponent component))
|
if (Owner.TryGetComponent(out MovementSpeedModifierComponent? component))
|
||||||
{
|
{
|
||||||
return component.CurrentWalkSpeed;
|
return component.CurrentWalkSpeed;
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,7 @@ namespace Content.Shared.GameObjects.Components.Movement
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (Owner.TryGetComponent(out MovementSpeedModifierComponent component))
|
if (Owner.TryGetComponent(out MovementSpeedModifierComponent? component))
|
||||||
{
|
{
|
||||||
return component.CurrentSprintSpeed;
|
return component.CurrentSprintSpeed;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ namespace Content.Shared.GameObjects.EntitySystems
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static bool TryGetAttachedComponent<T>(ICommonSession? session, [MaybeNullWhen(false)] out T component)
|
private static bool TryGetAttachedComponent<T>(ICommonSession? session, [MaybeNullWhen(false)] out T component)
|
||||||
where T : IComponent
|
where T : class, IComponent
|
||||||
{
|
{
|
||||||
component = default;
|
component = default;
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ namespace Content.Shared.GameObjects.EntitySystems
|
|||||||
if (ent == null || !ent.IsValid())
|
if (ent == null || !ent.IsValid())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!ent.TryGetComponent(out T comp))
|
if (!ent.TryGetComponent(out T? comp))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
component = comp;
|
component = comp;
|
||||||
|
|||||||
Reference in New Issue
Block a user