почти важно (#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:
@@ -348,7 +348,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
||||
|
||||
public bool AttemptLightAttack(EntityUid user, EntityUid weaponUid, MeleeWeaponComponent weapon, EntityUid target)
|
||||
{
|
||||
if (!TryComp<TransformComponent>(target, out var targetXform))
|
||||
if (!TryComp(target, out TransformComponent? targetXform))
|
||||
return false;
|
||||
|
||||
return AttemptAttack(user, weaponUid, weapon, new LightAttackEvent(GetNetEntity(target), GetNetEntity(weaponUid), GetNetCoordinates(targetXform.Coordinates)), null);
|
||||
@@ -356,7 +356,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
||||
|
||||
public bool AttemptDisarmAttack(EntityUid user, EntityUid weaponUid, MeleeWeaponComponent weapon, EntityUid target)
|
||||
{
|
||||
if (!TryComp<TransformComponent>(target, out var targetXform))
|
||||
if (!TryComp(target, out TransformComponent? targetXform))
|
||||
return false;
|
||||
|
||||
return AttemptAttack(user, weaponUid, weapon, new DisarmAttackEvent(GetNetEntity(target), GetNetCoordinates(targetXform.Coordinates)), null);
|
||||
@@ -552,7 +552,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
||||
// For consistency with wide attacks stuff needs damageable.
|
||||
if (Deleted(target) ||
|
||||
!HasComp<DamageableComponent>(target) ||
|
||||
!TryComp<TransformComponent>(target, out var targetXform) ||
|
||||
!TryComp(target, out TransformComponent? targetXform) ||
|
||||
// Not in LOS.
|
||||
!InRange(user, target.Value, component.Range, session))
|
||||
{
|
||||
@@ -641,7 +641,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
||||
private bool DoHeavyAttack(EntityUid user, HeavyAttackEvent ev, EntityUid meleeUid, MeleeWeaponComponent component, ICommonSession? session)
|
||||
{
|
||||
// TODO: This is copy-paste as fuck with DoPreciseAttack
|
||||
if (!TryComp<TransformComponent>(user, out var userXform))
|
||||
if (!TryComp(user, out TransformComponent? userXform))
|
||||
return false;
|
||||
|
||||
var targetMap = GetCoordinates(ev.Coordinates).ToMap(EntityManager, TransformSystem);
|
||||
@@ -860,7 +860,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
||||
private void DoLungeAnimation(EntityUid user, EntityUid weapon, Angle angle, MapCoordinates coordinates, float length, string? animation)
|
||||
{
|
||||
// TODO: Assert that offset eyes are still okay.
|
||||
if (!TryComp<TransformComponent>(user, out var userXform))
|
||||
if (!TryComp(user, out TransformComponent? userXform))
|
||||
return;
|
||||
|
||||
var invMatrix = TransformSystem.GetInvWorldMatrix(userXform);
|
||||
|
||||
Reference in New Issue
Block a user