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.Server.Polymorph.Systems;
|
||||||
|
using Content.Shared.Zombies;
|
||||||
|
using Content.Server.Actions;
|
||||||
using Content.Server.Popups;
|
using Content.Server.Popups;
|
||||||
using Content.Shared.Actions;
|
|
||||||
using Content.Shared.Geras;
|
using Content.Shared.Geras;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
@@ -10,8 +10,9 @@ namespace Content.Server.Geras;
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public sealed class GerasSystem : SharedGerasSystem
|
public sealed class GerasSystem : SharedGerasSystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly ActionsSystem _actionsSystem = default!;
|
|
||||||
[Dependency] private readonly PolymorphSystem _polymorphSystem = 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!;
|
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
@@ -19,6 +20,12 @@ public sealed class GerasSystem : SharedGerasSystem
|
|||||||
{
|
{
|
||||||
SubscribeLocalEvent<GerasComponent, MorphIntoGeras>(OnMorphIntoGeras);
|
SubscribeLocalEvent<GerasComponent, MorphIntoGeras>(OnMorphIntoGeras);
|
||||||
SubscribeLocalEvent<GerasComponent, MapInitEvent>(OnMapInit);
|
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)
|
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)
|
private void OnMorphIntoGeras(EntityUid uid, GerasComponent component, MorphIntoGeras args)
|
||||||
{
|
{
|
||||||
|
if (HasComp<ZombieComponent>(uid))
|
||||||
|
return; // i hate zomber.
|
||||||
|
|
||||||
var ent = _polymorphSystem.PolymorphEntity(uid, component.GerasPolymorphId);
|
var ent = _polymorphSystem.PolymorphEntity(uid, component.GerasPolymorphId);
|
||||||
|
|
||||||
if (!ent.HasValue)
|
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-others", ("entity", ent.Value)), ent.Value, Filter.PvsExcept(ent.Value), true);
|
||||||
_popupSystem.PopupEntity(Loc.GetString("geras-popup-morph-message-user"), ent.Value, ent.Value);
|
_popupSystem.PopupEntity(Loc.GetString("geras-popup-morph-message-user"), ent.Value, ent.Value);
|
||||||
|
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using Content.Shared.Actions;
|
|||||||
namespace Content.Shared.Geras;
|
namespace Content.Shared.Geras;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public abstract class SharedGerasSystem : EntitySystem
|
public abstract class SharedGerasSystem : EntitySystem
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -147,6 +147,16 @@
|
|||||||
noSpawn: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
# they portable...
|
# 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: MultiHandedItem
|
||||||
- type: Item
|
- type: Item
|
||||||
size: Huge
|
size: Huge
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
id: SlimeMorphGeras
|
id: SlimeMorphGeras
|
||||||
configuration:
|
configuration:
|
||||||
entity: MobSlimesGeras
|
entity: MobSlimesGeras
|
||||||
transferName: false
|
transferName: true
|
||||||
transferHumanoidAppearance: false
|
transferHumanoidAppearance: false
|
||||||
inventory: Drop
|
inventory: Drop
|
||||||
transferDamage: true
|
transferDamage: true
|
||||||
|
|||||||
Reference in New Issue
Block a user