Фикс Взвода мин, детонации взрыв-штуна, снятие С4 со стены (#3767)

This commit is contained in:
KaiserMaus 2026-01-21 21:33:03 +00:00 committed by GitHub
parent 0e5f604a0e
commit 266c9c48fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View file

@ -84,7 +84,7 @@ public sealed class ItemToggleSystem : EntitySystem
return;
// Sunrise-Start
if (TryComp<HandsComponent>(args.User, out var handsComp))
if (HasComp<ItemComponent>(ent.Owner) && TryComp<HandsComponent>(args.User, out var handsComp))
{
if (!_handsSystem.TryGetActiveItem((args.User, handsComp), out var itemInHand))
return;
@ -114,7 +114,7 @@ public sealed class ItemToggleSystem : EntitySystem
if (!ent.Comp.CanActivateInhand) // Верб позволяет активировать в руке ПНВ и термалы, а нам это не нужно
return;
if (TryComp<HandsComponent>(args.User, out var handsComp))
if (HasComp<ItemComponent>(ent.Owner) && TryComp<HandsComponent>(args.User, out var handsComp))
{
if (!_handsSystem.TryGetActiveItem((args.User, handsComp), out var itemInHand))
return;

View file

@ -141,7 +141,8 @@ public sealed class StickySystem : EntitySystem
}
// start unsticking object
_doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, comp.UnstickDelay, new StickyDoAfterEvent(), uid, target: uid)
// Use the surface we are stuck to as the target for range/access checks; the sticky item itself is in a container and fails accessibility checks.
_doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, comp.UnstickDelay, new StickyDoAfterEvent(), uid, target: stuckTo) // Sunrise-Add
{
BreakOnMove = true,
NeedHand = true,

View file

@ -248,7 +248,7 @@
- trigger:
!type:DamageTypeTrigger
damageType: Structural #this is as close as we can get to only letting explosives set it off.
damage: 120
damage: 55 # Sunrise-Edit
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]