Geras bug fixes (#27308)
* Geras bug fixes * oops * its as shrimple as that toggled transferName in the polymorph yml instead of using the system to manually change it * its as shrimple as that (2.0) fixed reviews for zombies having a dummy action, instead - properly implemented removal of action * its as shrimple as that (3.0) fixed tests by removing nameidentifier from slime (its already inherited, anyway)
This commit is contained in:
@@ -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;
|
||||
/// <inheritdoc/>
|
||||
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!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
@@ -19,6 +20,12 @@ public sealed class GerasSystem : SharedGerasSystem
|
||||
{
|
||||
SubscribeLocalEvent<GerasComponent, MorphIntoGeras>(OnMorphIntoGeras);
|
||||
SubscribeLocalEvent<GerasComponent, MapInitEvent>(OnMapInit);
|
||||
SubscribeLocalEvent<GerasComponent, EntityZombifiedEvent>(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<ZombieComponent>(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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using Content.Shared.Actions;
|
||||
namespace Content.Shared.Geras;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public abstract class SharedGerasSystem : EntitySystem
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
id: SlimeMorphGeras
|
||||
configuration:
|
||||
entity: MobSlimesGeras
|
||||
transferName: false
|
||||
transferName: true
|
||||
transferHumanoidAppearance: false
|
||||
inventory: Drop
|
||||
transferDamage: true
|
||||
|
||||
Reference in New Issue
Block a user