почти важно (#135)
* Add data field for id card microwave behaviour (#28087) * Move replacement chance from ReplacementAccentComponent to ReplacementAccentPrototype (#28049) Move replacement chance to ReplacementAccentPrototype * Resolves Bible summon message being sent to all users (#28104) * Changed PopupEntity overload used to ensure message is only sent to user * Updated uid for PopupEntity call * Updating _popupSystem.PopupEntity call in AttemptSummon * Random book story generator refactor (#28082) * Randomized book overhaul * Fix prototype names * Improved setting paper content * Praise Ratvar * Fix activatable UI popup message spam (#28123) Fixed activatable UI popup message spam * Modify battery assert to avoid floating point errors (#28007) * Update component query benchmarks (#27967) * Add more component query benchmarks. * Rename benchmark * Use non-generic `TryComp()` for metadata & transform (#28133) * sleeper agent appear later into the round and only once (#28160) --------- Co-authored-by: DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com> Co-authored-by: lzk <124214523+lzk228@users.noreply.github.com> Co-authored-by: double_b <40827162+benjamin-burges@users.noreply.github.com> Co-authored-by: Tayrtahn <tayrtahn@gmail.com> Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Co-authored-by: Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
This commit is contained in:
@@ -316,7 +316,7 @@ public sealed class ArrivalsSystem : EntitySystem
|
||||
|
||||
TryGetArrivals(out var arrivals);
|
||||
|
||||
if (TryComp<TransformComponent>(arrivals, out var arrivalsXform))
|
||||
if (TryComp(arrivals, out TransformComponent? arrivalsXform))
|
||||
{
|
||||
var mapId = arrivalsXform.MapID;
|
||||
|
||||
@@ -413,7 +413,7 @@ public sealed class ArrivalsSystem : EntitySystem
|
||||
var curTime = _timing.CurTime;
|
||||
TryGetArrivals(out var arrivals);
|
||||
|
||||
if (TryComp<TransformComponent>(arrivals, out var arrivalsXform))
|
||||
if (TryComp(arrivals, out TransformComponent? arrivalsXform))
|
||||
{
|
||||
while (query.MoveNext(out var uid, out var comp, out var shuttle, out var xform))
|
||||
{
|
||||
|
||||
@@ -267,7 +267,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
|
||||
if (!Resolve(stationUid, ref stationShuttle))
|
||||
return;
|
||||
|
||||
if (!TryComp<TransformComponent>(stationShuttle.EmergencyShuttle, out var xform) ||
|
||||
if (!TryComp(stationShuttle.EmergencyShuttle, out TransformComponent? xform) ||
|
||||
!TryComp<ShuttleComponent>(stationShuttle.EmergencyShuttle, out var shuttle))
|
||||
{
|
||||
Log.Error($"Attempted to call an emergency shuttle for an uninitialized station? Station: {ToPrettyString(stationUid)}. Shuttle: {ToPrettyString(stationShuttle.EmergencyShuttle)}");
|
||||
@@ -294,7 +294,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
|
||||
|
||||
if (_shuttle.TryFTLDock(stationShuttle.EmergencyShuttle.Value, shuttle, targetGrid.Value, DockTag))
|
||||
{
|
||||
if (TryComp<TransformComponent>(targetGrid.Value, out var targetXform))
|
||||
if (TryComp(targetGrid.Value, out TransformComponent? targetXform))
|
||||
{
|
||||
var angle = _dock.GetAngle(stationShuttle.EmergencyShuttle.Value, xform, targetGrid.Value, targetXform,
|
||||
xformQuery);
|
||||
@@ -350,7 +350,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
|
||||
return;
|
||||
|
||||
// Post mapinit? fancy
|
||||
if (TryComp<TransformComponent>(component.Entity, out var xform))
|
||||
if (TryComp(component.Entity, out TransformComponent? xform))
|
||||
{
|
||||
component.MapEntity = xform.MapUid;
|
||||
return;
|
||||
|
||||
@@ -246,7 +246,7 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem
|
||||
RaiseLocalEvent(entity.Value, ref getShuttleEv);
|
||||
entity = getShuttleEv.Console;
|
||||
|
||||
TryComp<TransformComponent>(entity, out var consoleXform);
|
||||
TryComp(entity, out TransformComponent? consoleXform);
|
||||
var shuttleGridUid = consoleXform?.GridUid;
|
||||
|
||||
NavInterfaceState navState;
|
||||
|
||||
@@ -184,7 +184,7 @@ public sealed partial class ShuttleSystem
|
||||
return;
|
||||
|
||||
if (!TryComp<DockingComponent>(uid, out var dock) ||
|
||||
!TryComp<TransformComponent>(uid, out var xform) ||
|
||||
!TryComp(uid, out TransformComponent? xform) ||
|
||||
xform.GridUid == null)
|
||||
{
|
||||
return;
|
||||
@@ -196,7 +196,7 @@ public sealed partial class ShuttleSystem
|
||||
|
||||
if (_loader.TryLoad(mapId, component.Path.ToString(), out var ent) &&
|
||||
ent.Count == 1 &&
|
||||
TryComp<TransformComponent>(ent[0], out var shuttleXform))
|
||||
TryComp(ent[0], out TransformComponent? shuttleXform))
|
||||
{
|
||||
var escape = GetSingleDock(ent[0]);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public sealed partial class ShuttleSystem
|
||||
|
||||
private void OnIFFShow(EntityUid uid, IFFConsoleComponent component, IFFShowIFFMessage args)
|
||||
{
|
||||
if (!TryComp<TransformComponent>(uid, out var xform) || xform.GridUid == null ||
|
||||
if (!TryComp(uid, out TransformComponent? xform) || xform.GridUid == null ||
|
||||
(component.AllowedFlags & IFFFlags.HideLabel) == 0x0)
|
||||
{
|
||||
return;
|
||||
@@ -34,7 +34,7 @@ public sealed partial class ShuttleSystem
|
||||
|
||||
private void OnIFFShowVessel(EntityUid uid, IFFConsoleComponent component, IFFShowVesselMessage args)
|
||||
{
|
||||
if (!TryComp<TransformComponent>(uid, out var xform) || xform.GridUid == null ||
|
||||
if (!TryComp(uid, out TransformComponent? xform) || xform.GridUid == null ||
|
||||
(component.AllowedFlags & IFFFlags.Hide) == 0x0)
|
||||
{
|
||||
return;
|
||||
@@ -54,7 +54,7 @@ public sealed partial class ShuttleSystem
|
||||
{
|
||||
// If we anchor / re-anchor then make sure flags up to date.
|
||||
if (!args.Anchored ||
|
||||
!TryComp<TransformComponent>(uid, out var xform) ||
|
||||
!TryComp(uid, out TransformComponent? xform) ||
|
||||
!TryComp<IFFComponent>(xform.GridUid, out var iff))
|
||||
{
|
||||
_uiSystem.SetUiState(uid, IFFConsoleUiKey.Key, new IFFConsoleBoundUserInterfaceState()
|
||||
|
||||
Reference in New Issue
Block a user