diff --git a/Content.Server/ADT/NPC/Queries/Considerations/TargetTagNotPresentCon.cs b/Content.Server/ADT/NPC/Queries/Considerations/TargetTagNotPresentCon.cs
new file mode 100644
index 00000000000..69ce135b9f5
--- /dev/null
+++ b/Content.Server/ADT/NPC/Queries/Considerations/TargetTagNotPresentCon.cs
@@ -0,0 +1,13 @@
+using Content.Shared.Tag;
+using Robust.Shared.Prototypes;
+
+namespace Content.Server.NPC.Queries.Considerations;
+
+///
+/// Returns 1f if the target is alive or 0f if not.
+///
+public sealed partial class TargetTagNotPresentCon : UtilityConsideration
+{
+ [DataField(required: true)]
+ public ProtoId Tag;
+}
diff --git a/Content.Server/NPC/Systems/NPCUtilitySystem.cs b/Content.Server/NPC/Systems/NPCUtilitySystem.cs
index 60bc5cdfd8b..ca748853844 100644
--- a/Content.Server/NPC/Systems/NPCUtilitySystem.cs
+++ b/Content.Server/NPC/Systems/NPCUtilitySystem.cs
@@ -19,6 +19,7 @@
using Content.Shared.NPC.Systems;
using Content.Shared.Nutrition.Components;
using Content.Shared.Nutrition.EntitySystems;
+using Content.Shared.Tag;
using Content.Shared.Tools.Systems;
using Content.Shared.Weapons.Melee;
using Content.Shared.Weapons.Ranged.Components;
@@ -53,6 +54,7 @@ public sealed class NPCUtilitySystem : EntitySystem
[Dependency] private readonly ExamineSystemShared _examine = default!;
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
[Dependency] private readonly MobThresholdSystem _thresholdSystem = default!;
+ [Dependency] private readonly TagSystem _tag = default!;
private EntityQuery _puddleQuery;
private EntityQuery _xformQuery;
@@ -358,6 +360,13 @@ private float GetScore(NPCBlackboard blackboard, EntityUid targetUid, UtilityCon
return 1f;
return 0f;
}
+ // ADT tweak start
+ case TargetTagNotPresentCon tag:
+ {
+ return !_tag.HasTag(targetUid, tag.Tag) ? 1f : 0f;
+ }
+ // ADT tweak end
+
default:
throw new NotImplementedException();
}
diff --git a/Resources/Prototypes/ADT/Entities/Mobs/Species/Ursus.yml b/Resources/Prototypes/ADT/Entities/Mobs/Species/Ursus.yml
index 6b8c91e8172..3e1faa99906 100644
--- a/Resources/Prototypes/ADT/Entities/Mobs/Species/Ursus.yml
+++ b/Resources/Prototypes/ADT/Entities/Mobs/Species/Ursus.yml
@@ -6,9 +6,6 @@
components:
- type: HumanoidAppearance
species: UrsusSpecies
- - type: NpcFactionMember
- factions:
- - Ursus
- type: MobThresholds
thresholds:
0: Alive
@@ -129,6 +126,13 @@
short: true
shortscale: 0.98
shortDensity: 0.7
+ - type: Tag
+ tags:
+ - CanPilot
+ - FootstepSound
+ - DoorBumpOpener
+ - AnomalyHost
+ - ADTSpaceMobIgnored
- type: entity
save: false
diff --git a/Resources/Prototypes/ADT/Entities/Mobs/Species/ipc.yml b/Resources/Prototypes/ADT/Entities/Mobs/Species/ipc.yml
index 5a1b672fec6..edceb593d15 100644
--- a/Resources/Prototypes/ADT/Entities/Mobs/Species/ipc.yml
+++ b/Resources/Prototypes/ADT/Entities/Mobs/Species/ipc.yml
@@ -30,9 +30,6 @@
Critical: BorgCrit
Dead: BorgDead
allowRevives: true # Для воскрешения достаточно починить урон. - ss220.
- - type: NpcFactionMember
- factions:
- - NanoTrasen
- type: TypingIndicator
proto: robot
- type: Destructible
diff --git a/Resources/Prototypes/ADT/NPCs/Combat/melee.yml b/Resources/Prototypes/ADT/NPCs/Combat/melee.yml
new file mode 100644
index 00000000000..15f93714731
--- /dev/null
+++ b/Resources/Prototypes/ADT/NPCs/Combat/melee.yml
@@ -0,0 +1,9 @@
+- type: htnCompound
+ id: SpaceMobMeleeCombatCompound
+ branches:
+ - tasks:
+ - !type:HTNPrimitiveTask
+ operator: !type:UtilityOperator
+ proto: SpaceMobNearbyMeleeTargets
+ - !type:HTNCompoundTask
+ task: BeforeMeleeAttackTargetCompound
diff --git a/Resources/Prototypes/ADT/NPCs/mob.yml b/Resources/Prototypes/ADT/NPCs/mob.yml
new file mode 100644
index 00000000000..2eca4d20047
--- /dev/null
+++ b/Resources/Prototypes/ADT/NPCs/mob.yml
@@ -0,0 +1,9 @@
+- type: htnCompound
+ id: SpaceMobHostileCompound
+ branches:
+ - tasks:
+ - !type:HTNCompoundTask
+ task: SpaceMobMeleeCombatCompound
+ - tasks:
+ - !type:HTNCompoundTask
+ task: IdleCompound
diff --git a/Resources/Prototypes/ADT/NPCs/utility_queries.yml b/Resources/Prototypes/ADT/NPCs/utility_queries.yml
new file mode 100644
index 00000000000..7f46d8b8573
--- /dev/null
+++ b/Resources/Prototypes/ADT/NPCs/utility_queries.yml
@@ -0,0 +1,20 @@
+- type: utilityQuery
+ id: SpaceMobNearbyMeleeTargets
+ query:
+ - !type:NearbyHostilesQuery
+ considerations:
+ - !type:TargetIsAliveCon
+ curve: !type:BoolCurve
+ - !type:TargetDistanceCon
+ curve: !type:PresetCurve
+ preset: TargetDistance
+ - !type:TargetHealthCon
+ curve: !type:PresetCurve
+ preset: TargetHealth
+ - !type:TargetAccessibleCon
+ curve: !type:BoolCurve
+ - !type:TargetInLOSOrCurrentCon
+ curve: !type:BoolCurve
+ - !type:TargetTagNotPresentCon
+ curve: !type:BoolCurve
+ tag: ADTSpaceMobIgnored
diff --git a/Resources/Prototypes/ADT/ai_factions.yml b/Resources/Prototypes/ADT/ai_factions.yml
index a48441fe1d1..8d0c242ceb8 100644
--- a/Resources/Prototypes/ADT/ai_factions.yml
+++ b/Resources/Prototypes/ADT/ai_factions.yml
@@ -1,13 +1,3 @@
-- type: npcFaction
- id: Ursus
- hostile:
- - SimpleHostile
- - Syndicate
- - Xeno
- - Zombie
- - Revolutionary
- - DroneAntag
-
- type: npcFaction
id: ADTSpaceMobs
hostile:
diff --git a/Resources/Prototypes/ADT/tags.yml b/Resources/Prototypes/ADT/tags.yml
index f1c3b7bddd9..555a81e7197 100644
--- a/Resources/Prototypes/ADT/tags.yml
+++ b/Resources/Prototypes/ADT/tags.yml
@@ -390,3 +390,9 @@
- type: Tag
id: ADTChemistryAmbience
+
+- type: Tag
+ id: ADTBeerCan
+
+- type: Tag
+ id: ADTSpaceMobIgnored
diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml b/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml
index 7140758c21e..9c045216448 100644
--- a/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml
+++ b/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml
@@ -9,7 +9,7 @@
- type: MobMover
- type: HTN
rootTask:
- task: SimpleHostileCompound
+ task: SpaceMobHostileCompound # ADT tweak
blackboard:
NavSmash: !type:Bool
true
diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/space.yml b/Resources/Prototypes/Entities/Mobs/NPCs/space.yml
index 4f5e02b9723..212274eb65a 100644
--- a/Resources/Prototypes/Entities/Mobs/NPCs/space.yml
+++ b/Resources/Prototypes/Entities/Mobs/NPCs/space.yml
@@ -7,7 +7,7 @@
components:
- type: HTN
rootTask:
- task: SimpleHostileCompound
+ task: SpaceMobHostileCompound # ADT tweak
- type: NpcFactionMember
factions:
- SimpleHostile
diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml b/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml
index 95447e59d94..71ddad8ae8f 100644
--- a/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml
+++ b/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml
@@ -8,7 +8,7 @@
- type: MobMover
- type: HTN
rootTask:
- task: SimpleHostileCompound
+ task: SpaceMobHostileCompound # ADT tweak
- type: NpcFactionMember
factions:
- SimpleHostile