diff --git a/Content.Client/MobState/DamageStateVisualizer.cs b/Content.Client/MobState/DamageStateVisualizer.cs
index afcc822cd1..db672bb857 100644
--- a/Content.Client/MobState/DamageStateVisualizer.cs
+++ b/Content.Client/MobState/DamageStateVisualizer.cs
@@ -18,34 +18,42 @@ namespace Content.Client.MobState
private int? _originalDrawDepth;
[DataField("normal")]
- private string? normal;
+ private string? _normal;
+
[DataField("crit")]
- private string? crit;
+ private string? _crit;
+
[DataField("dead")]
- private string? dead;
+ private string? _dead;
+
+ ///
+ /// Should noRot be turned off when crit / dead.
+ ///
+ [DataField("rotate")]
+ private bool _rotate;
void ISerializationHooks.BeforeSerialization()
{
- _stateMap.TryGetValue(DamageState.Alive, out normal);
- _stateMap.TryGetValue(DamageState.Critical, out crit);
- _stateMap.TryGetValue(DamageState.Dead, out dead);
+ _stateMap.TryGetValue(DamageState.Alive, out _normal);
+ _stateMap.TryGetValue(DamageState.Critical, out _crit);
+ _stateMap.TryGetValue(DamageState.Dead, out _dead);
}
void ISerializationHooks.AfterDeserialization()
{
- if (normal != null)
+ if (_normal != null)
{
- _stateMap.Add(DamageState.Alive, normal);
+ _stateMap.Add(DamageState.Alive, _normal);
}
- if (crit != null)
+ if (_crit != null)
{
- _stateMap.Add(DamageState.Critical, crit);
+ _stateMap.Add(DamageState.Critical, _crit);
}
- if (dead != null)
+ if (_dead != null)
{
- _stateMap.Add(DamageState.Dead, dead);
+ _stateMap.Add(DamageState.Dead, _dead);
}
}
@@ -65,6 +73,16 @@ namespace Content.Client.MobState
_data = data;
+ if (_rotate)
+ {
+ sprite.NoRotation = data switch
+ {
+ DamageState.Critical => false,
+ DamageState.Dead => false,
+ _ => true
+ };
+ }
+
if (_stateMap.TryGetValue(_data, out var state))
{
sprite.LayerSetState(DamageStateVisualLayers.Base, state);
diff --git a/Content.Server/AI/Utility/AiLogic/UtilityAI.cs b/Content.Server/AI/Utility/AiLogic/UtilityAI.cs
index 565c402294..f4629108f6 100644
--- a/Content.Server/AI/Utility/AiLogic/UtilityAI.cs
+++ b/Content.Server/AI/Utility/AiLogic/UtilityAI.cs
@@ -10,13 +10,13 @@ using Content.Server.AI.Utility.Actions;
using Content.Server.AI.WorldState;
using Content.Server.AI.WorldState.States.Utility;
using Content.Server.CPUJob.JobQueues;
-using Content.Shared.MobState;
using Content.Shared.Movement.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
+using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
namespace Content.Server.AI.Utility.AiLogic
{
@@ -36,7 +36,7 @@ namespace Content.Server.AI.Utility.AiLogic
///
/// The sum of all BehaviorSets gives us what actions the AI can take
///
- [DataField("behaviorSets")]
+ [DataField("behaviorSets", customTypeSerializer:typeof(PrototypeIdHashSetSerializer))]
public HashSet BehaviorSets { get; } = new();
public List AvailableActions { get; set; } = new();
diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Conditional/timed.yml b/Resources/Prototypes/Entities/Markers/Spawners/Conditional/timed.yml
index d5f19680f3..fc99c4f4d3 100644
--- a/Resources/Prototypes/Entities/Markers/Spawners/Conditional/timed.yml
+++ b/Resources/Prototypes/Entities/Markers/Spawners/Conditional/timed.yml
@@ -24,12 +24,12 @@
components:
- type: Sprite
layers:
- - state: blue
- - texture: Mobs/Aliens/Xenos/xeno.rsi/crit.png
- - state: ai
+ - state: blue
+ - texture: Mobs/Aliens/Xenos/burrower.rsi/crit.png
+ - state: ai
- type: TimedSpawner
prototypes:
- - MobXeno
+ - MobXeno
chance: 0.85
intervalSeconds: 30
minimumEntitiesSpawned: 2
diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml
index ffe9f189eb..4392f9ae4a 100644
--- a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml
+++ b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml
@@ -15,18 +15,18 @@
- type: Hands
- type: Sprite
drawdepth: Mobs
+ sprite: Mobs/Aliens/Xenos/burrower.rsi
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
state: running
- sprite: Mobs/Aliens/Xenos/xeno.rsi
- type: Physics
bodyType: Dynamic
- type: Fixtures
fixtures:
- shape:
- !type:PhysShapeAabb
- bounds: "-0.4,-1,0.4,-0.2"
- mass: 85
+ !type:PhysShapeCircle
+ radius: 0.35
+ mass: 120
mask:
- Impassable
- MobImpassable
@@ -56,6 +56,7 @@
- type: Appearance
visuals:
- type: DamageStateVisualizer
+ rotate: true
normal: running
crit: crit
dead: dead
diff --git a/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/crit.png b/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/crit.png
similarity index 100%
rename from Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/crit.png
rename to Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/crit.png
diff --git a/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/dead.png b/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/dead.png
similarity index 100%
rename from Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/dead.png
rename to Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/dead.png
diff --git a/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/meta.json b/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/meta.json
similarity index 89%
rename from Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/meta.json
rename to Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/meta.json
index 433132a72e..b70a4bd750 100644
--- a/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/meta.json
+++ b/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/meta.json
@@ -1,7 +1,7 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
- "copyright": "Taken from Colonial Marines at commit https://gitlab.com/cmdevs/colonial-warfare/-/commit/f6b3c61fcbfe73a3f0f92edd5fc441ef845017e5",
+ "copyright": "Taken from Colonial Marines at commit https://gitlab.com/cmdevs/colonial-warfare/-/commit/f6b3c61fcbfe73a3f0f92edd5fc441ef845017e5 Sprites centered by metalgearsloth",
"size": {
"x": 64,
"y": 64
diff --git a/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/running.png b/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/running.png
new file mode 100644
index 0000000000..5ed3368b2f
Binary files /dev/null and b/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/running.png differ
diff --git a/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/sleeping.png b/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/sleeping.png
new file mode 100644
index 0000000000..3a0ae4b384
Binary files /dev/null and b/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/sleeping.png differ
diff --git a/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/walking.png b/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/walking.png
new file mode 100644
index 0000000000..e35e1efdc4
Binary files /dev/null and b/Resources/Textures/Mobs/Aliens/Xenos/burrower.rsi/walking.png differ
diff --git a/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/running.png b/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/running.png
deleted file mode 100644
index 475d45aeba..0000000000
Binary files a/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/running.png and /dev/null differ
diff --git a/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/sleeping.png b/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/sleeping.png
deleted file mode 100644
index 26ce1d8b82..0000000000
Binary files a/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/sleeping.png and /dev/null differ
diff --git a/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/walking.png b/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/walking.png
deleted file mode 100644
index 475d45aeba..0000000000
Binary files a/Resources/Textures/Mobs/Aliens/Xenos/xeno.rsi/walking.png and /dev/null differ