Gibbing (via nymphing, artifact crusher, psionic eruption, and anomaly critting) now drops items (#4980)
* nymph * acidify: false * anomaly crit
This commit is contained in:
parent
861075b7a4
commit
259357496e
|
|
@ -139,7 +139,8 @@ public sealed class InnerBodyAnomalySystem : SharedInnerBodyAnomalySystem
|
||||||
if (!TryComp<BodyComponent>(ent, out var body))
|
if (!TryComp<BodyComponent>(ent, out var body))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_body.GibBody(ent, true, body, splatModifier: 5f);
|
// DeltaV acidify: false preserves inventory items when anomaly goes supercritical
|
||||||
|
_body.GibBody(ent, false, body, splatModifier: 5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnSeverityChanged(Entity<InnerBodyAnomalyComponent> ent, ref AnomalySeverityChangedEvent args)
|
private void OnSeverityChanged(Entity<InnerBodyAnomalyComponent> ent, ref AnomalySeverityChangedEvent args)
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,8 @@ public sealed class ArtifactCrusherSystem : SharedArtifactCrusherSystem
|
||||||
if (!TryComp<BodyComponent>(contained, out var body))
|
if (!TryComp<BodyComponent>(contained, out var body))
|
||||||
Del(contained);
|
Del(contained);
|
||||||
|
|
||||||
var gibs = _body.GibBody(contained, body: body, acidify: true);
|
// DeltaV acidify: false preserves inventory items, which get added to the output container
|
||||||
|
var gibs = _body.GibBody(contained, body: body, acidify: false);
|
||||||
foreach (var gib in gibs)
|
foreach (var gib in gibs)
|
||||||
{
|
{
|
||||||
ContainerSystem.Insert((gib, null, null, null), crusher.OutputContainer);
|
ContainerSystem.Insert((gib, null, null, null), crusher.OutputContainer);
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,8 @@ public sealed class PsionicEruptionSystem : EntitySystem
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var pos = _transform.GetMapCoordinates(entity);
|
var pos = _transform.GetMapCoordinates(entity);
|
||||||
_body.GibBody(entity, acidify: true, body, launchGibs: true);
|
// acidify: false preserves inventory items when erupting
|
||||||
|
_body.GibBody(entity, acidify: false, body, launchGibs: true);
|
||||||
int boom = _glimmer.GetGlimmerTier(_glimmer.Glimmer) switch
|
int boom = _glimmer.GetGlimmerTier(_glimmer.Glimmer) switch
|
||||||
{
|
{
|
||||||
GlimmerTier.Minimal => 4,
|
GlimmerTier.Minimal => 4,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public sealed partial class GibActionSystem : EntitySystem
|
||||||
|
|
||||||
private void OnMobStateChanged(EntityUid uid, GibActionComponent comp, MobStateChangedEvent args)
|
private void OnMobStateChanged(EntityUid uid, GibActionComponent comp, MobStateChangedEvent args)
|
||||||
{
|
{
|
||||||
// When the mob changes state, check if they're dead and give them the action if so.
|
// When the mob changes state, check if they're dead and give them the action if so.
|
||||||
if (!TryComp<MobStateComponent>(uid, out var mobState))
|
if (!TryComp<MobStateComponent>(uid, out var mobState))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -47,15 +47,16 @@ public sealed partial class GibActionSystem : EntitySystem
|
||||||
// If they aren't given the action, remove it.
|
// If they aren't given the action, remove it.
|
||||||
_actionsSystem.RemoveAction(uid, comp.ActionEntity);
|
_actionsSystem.RemoveAction(uid, comp.ActionEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnGibAction(EntityUid uid, GibActionComponent comp, GibActionEvent args)
|
private void OnGibAction(EntityUid uid, GibActionComponent comp, GibActionEvent args)
|
||||||
{
|
{
|
||||||
// When they use the action, gib them.
|
// When they use the action, gib them.
|
||||||
_popupSystem.PopupClient(Loc.GetString(comp.PopupText, ("name", uid)), uid, uid);
|
_popupSystem.PopupClient(Loc.GetString(comp.PopupText, ("name", uid)), uid, uid);
|
||||||
_bodySystem.GibBody(uid, true);
|
// DeltaV acidify: false drops inventory items instead of deleting them
|
||||||
|
_bodySystem.GibBody(uid, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public sealed partial class GibActionEvent : InstantActionEvent { }
|
|
||||||
|
public sealed partial class GibActionEvent : InstantActionEvent { }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue