Sentry turrets - Part 4: The sentry turret and its primary systems (#35123)

* Initial commit

* Removed mention of StationAiTurretComponent (for now)

* Prep for moving out of draft

* Fixing merge conflict

* Re-added new net frequencies to AI turrets

* Removed turret control content

* Removed unintended change

* Final tweaks

* Fixed incorrect file name

* Improvement to fire mode handling

* Addressed review comments

* Updated how turret wire panel auto-closing is handled

* Ranged NPCs no longer waste shots on stunned targets

* Fixed bug in tracking broken state

* Addressed review comments

* Bug fix

* Removed unnecessary event call
This commit is contained in:
chromiumboy
2025-03-29 12:55:58 -05:00
committed by GitHub
parent 587afe7598
commit dfd3e36a0a
24 changed files with 1005 additions and 30 deletions

View File

@@ -19,6 +19,7 @@ using Content.Shared.Mobs.Systems;
using Content.Shared.NPC.Systems;
using Content.Shared.Nutrition.Components;
using Content.Shared.Nutrition.EntitySystems;
using Content.Shared.Stunnable;
using Content.Shared.Tools.Systems;
using Content.Shared.Turrets;
using Content.Shared.Weapons.Melee;
@@ -360,6 +361,10 @@ public sealed class NPCUtilitySystem : EntitySystem
return 1f;
return 0f;
}
case TargetIsStunnedCon:
{
return HasComp<StunnedComponent>(targetUid) ? 1f : 0f;
}
case TurretTargetingCon:
{
if (!TryComp<TurretTargetSettingsComponent>(owner, out var turretTargetSettings) ||