Fix component generic usages where IComponent would not be valid (#19482)
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Content.Server.Alert.Click
|
||||
{
|
||||
var entManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
if (entManager.TryGetComponent<MimePowersComponent?>(player, out var mimePowers))
|
||||
if (entManager.TryGetComponent(player, out MimePowersComponent? mimePowers))
|
||||
{
|
||||
entManager.System<MimePowersSystem>().BreakVow(player, mimePowers);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Content.Server.Alert.Click
|
||||
{
|
||||
var entManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
if (entManager.TryGetComponent<MimePowersComponent?>(player, out var mimePowers))
|
||||
if (entManager.TryGetComponent(player, out MimePowersComponent? mimePowers))
|
||||
{
|
||||
entManager.System<MimePowersSystem>().RetakeVow(player, mimePowers);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Content.Server.Alert.Click
|
||||
if (!entityManager.System<ActionBlockerSystem>().CanInteract(player, null))
|
||||
return;
|
||||
|
||||
if (entityManager.TryGetComponent<SharedPullableComponent?>(player, out var playerPullable))
|
||||
if (entityManager.TryGetComponent(player, out SharedPullableComponent? playerPullable))
|
||||
{
|
||||
entityManager.System<SharedPullingSystem>().TryStopPull(playerPullable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user