diff --git a/Content.Server/Geras/GerasSystem.cs b/Content.Server/Geras/GerasSystem.cs index e25ea8f028..e7999d64d8 100644 --- a/Content.Server/Geras/GerasSystem.cs +++ b/Content.Server/Geras/GerasSystem.cs @@ -1,7 +1,7 @@ -using Content.Server.Actions; using Content.Server.Polymorph.Systems; +using Content.Shared.Zombies; +using Content.Server.Actions; using Content.Server.Popups; -using Content.Shared.Actions; using Content.Shared.Geras; using Robust.Shared.Player; @@ -10,8 +10,9 @@ namespace Content.Server.Geras; /// public sealed class GerasSystem : SharedGerasSystem { - [Dependency] private readonly ActionsSystem _actionsSystem = default!; [Dependency] private readonly PolymorphSystem _polymorphSystem = default!; + [Dependency] private readonly MetaDataSystem _metaDataSystem = default!; + [Dependency] private readonly ActionsSystem _actionsSystem = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; /// @@ -19,6 +20,12 @@ public sealed class GerasSystem : SharedGerasSystem { SubscribeLocalEvent(OnMorphIntoGeras); SubscribeLocalEvent(OnMapInit); + SubscribeLocalEvent(OnZombification); + } + + private void OnZombification(EntityUid uid, GerasComponent component, EntityZombifiedEvent args) + { + _actionsSystem.RemoveAction(uid, component.GerasActionEntity); } private void OnMapInit(EntityUid uid, GerasComponent component, MapInitEvent args) @@ -29,6 +36,9 @@ public sealed class GerasSystem : SharedGerasSystem private void OnMorphIntoGeras(EntityUid uid, GerasComponent component, MorphIntoGeras args) { + if (HasComp(uid)) + return; // i hate zomber. + var ent = _polymorphSystem.PolymorphEntity(uid, component.GerasPolymorphId); if (!ent.HasValue) @@ -36,6 +46,7 @@ public sealed class GerasSystem : SharedGerasSystem _popupSystem.PopupEntity(Loc.GetString("geras-popup-morph-message-others", ("entity", ent.Value)), ent.Value, Filter.PvsExcept(ent.Value), true); _popupSystem.PopupEntity(Loc.GetString("geras-popup-morph-message-user"), ent.Value, ent.Value); + args.Handled = true; } } diff --git a/Content.Shared/Geras/SharedGerasSystem.cs b/Content.Shared/Geras/SharedGerasSystem.cs index f5dea466a2..8c998371b6 100644 --- a/Content.Shared/Geras/SharedGerasSystem.cs +++ b/Content.Shared/Geras/SharedGerasSystem.cs @@ -3,7 +3,7 @@ using Content.Shared.Actions; namespace Content.Shared.Geras; /// -/// A Geras is the small morph of a slime. This system handles exactly that. +/// Geras is the god of old age, and A geras is the small morph of a slime. This system allows the slimes to have the morphing action. /// public abstract class SharedGerasSystem : EntitySystem { diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml b/Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml index 00de018025..b3a80f90c7 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/slimes.yml @@ -147,6 +147,16 @@ noSpawn: true components: # they portable... + - type: MovementSpeedModifier + baseWalkSpeed: 3 + baseSprintSpeed: 5 # +.5 from normal movement speed + - type: MobThresholds + thresholds: + 0: Alive + 80: Dead # weak af tho + - type: NpcFactionMember + factions: + - NanoTrasen - type: MultiHandedItem - type: Item size: Huge diff --git a/Resources/Prototypes/Polymorphs/polymorph.yml b/Resources/Prototypes/Polymorphs/polymorph.yml index ce89f41d37..582f69b744 100644 --- a/Resources/Prototypes/Polymorphs/polymorph.yml +++ b/Resources/Prototypes/Polymorphs/polymorph.yml @@ -79,7 +79,7 @@ id: SlimeMorphGeras configuration: entity: MobSlimesGeras - transferName: false + transferName: true transferHumanoidAppearance: false inventory: Drop transferDamage: true