From eabd05d3b633fee70bb7a33df294f2a66430bb90 Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:06:00 +0000 Subject: [PATCH 1/2] add AI defense turret + let AI unlock buttons (#2665) * change locking to use ComplexInteraction * add AI defense turret * :trollface: --------- Co-authored-by: deltanedas <@deltanedas:kde.org> --- Content.Shared/Lock/LockSystem.cs | 5 +++-- .../Entities/Objects/Weapons/Guns/turrets.yml | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 Resources/Prototypes/_DV/Entities/Objects/Weapons/Guns/turrets.yml diff --git a/Content.Shared/Lock/LockSystem.cs b/Content.Shared/Lock/LockSystem.cs index 411766d8c1f..10652800953 100644 --- a/Content.Shared/Lock/LockSystem.cs +++ b/Content.Shared/Lock/LockSystem.cs @@ -1,10 +1,10 @@ using Content.Shared.Access.Components; using Content.Shared.Access.Systems; +using Content.Shared.ActionBlocker; using Content.Shared.Construction.Components; using Content.Shared.DoAfter; using Content.Shared.Emag.Systems; using Content.Shared.Examine; -using Content.Shared.Hands.Components; using Content.Shared.IdentityManagement; using Content.Shared.Interaction; using Content.Shared.Popups; @@ -26,6 +26,7 @@ namespace Content.Shared.Lock; public sealed class LockSystem : EntitySystem { [Dependency] private readonly AccessReaderSystem _accessReader = default!; + [Dependency] private readonly ActionBlockerSystem _actionBlocker = default!; [Dependency] private readonly ActivatableUISystem _activatableUI = default!; [Dependency] private readonly SharedAppearanceSystem _appearanceSystem = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; @@ -246,7 +247,7 @@ public bool IsLocked(Entity ent) /// public bool CanToggleLock(EntityUid uid, EntityUid user, bool quiet = true) { - if (!HasComp(user)) + if (!_actionBlocker.CanComplexInteract(user)) return false; var ev = new LockToggleAttemptEvent(user, quiet); diff --git a/Resources/Prototypes/_DV/Entities/Objects/Weapons/Guns/turrets.yml b/Resources/Prototypes/_DV/Entities/Objects/Weapons/Guns/turrets.yml new file mode 100644 index 00000000000..dcd65e7c66d --- /dev/null +++ b/Resources/Prototypes/_DV/Entities/Objects/Weapons/Guns/turrets.yml @@ -0,0 +1,17 @@ +# Shoots anything and lets doors close over it, letting it be used in AI cores "under" blast doors. +- type: entity + parent: WeaponTurretAllHostile + id: WeaponTurretAI + name: AI defense turret + description: A ballistic turret that retracts into the floor. Deployable by the station AI to defend its core against urgent threats. + components: + - type: Fixtures + fixtures: + fix1: + shape: !type:PhysShapeCircle + radius: 0.45 + density: 60 + mask: + - SmallMobMask # same as mouse, lets it go under doors but not phase through walls + layer: + - SmallMobLayer From c5a008cb81db2844d83453ab8ecd042f2e4adf9d Mon Sep 17 00:00:00 2001 From: Delta-V bot <135767721+DeltaV-Bot@users.noreply.github.com> Date: Thu, 9 Jan 2025 18:06:19 +0100 Subject: [PATCH 2/2] Automatic changelog update --- Resources/Changelog/DeltaVChangelog.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/DeltaVChangelog.yml b/Resources/Changelog/DeltaVChangelog.yml index f2476fa1017..24c748ebe9a 100644 --- a/Resources/Changelog/DeltaVChangelog.yml +++ b/Resources/Changelog/DeltaVChangelog.yml @@ -1,11 +1,4 @@ Entries: -- author: rosieposieeee - changes: - - message: Submarine Station has been removed from rotation. - type: Remove - id: 385 - time: '2024-06-07T14:37:29.0000000+00:00' - url: https://github.com/DeltaV-Station/Delta-v/pull/1307 - author: Lyndomen changes: - message: Burning bodies no longer ash @@ -3845,3 +3838,11 @@ id: 884 time: '2025-01-09T12:39:39.0000000+00:00' url: https://github.com/DeltaV-Station/Delta-v/pull/2667 +- author: deltanedas + changes: + - message: AI cores will soon have defense turrets that the AI can deploy to shoot + intruders. + type: Add + id: 885 + time: '2025-01-09T17:06:00.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2665