disallow stacking polymorphs by default (#9845)
Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
using Content.Server.Actions;
|
using Content.Server.Actions;
|
||||||
using Content.Server.Body.Components;
|
|
||||||
using Content.Server.Buckle.Components;
|
using Content.Server.Buckle.Components;
|
||||||
using Content.Server.Inventory;
|
using Content.Server.Inventory;
|
||||||
using Content.Server.Mind.Commands;
|
using Content.Server.Mind.Commands;
|
||||||
@@ -13,11 +12,8 @@ using Content.Shared.Damage;
|
|||||||
using Content.Shared.Hands.EntitySystems;
|
using Content.Shared.Hands.EntitySystems;
|
||||||
using Content.Shared.Polymorph;
|
using Content.Shared.Polymorph;
|
||||||
using Robust.Server.Containers;
|
using Robust.Server.Containers;
|
||||||
using Robust.Shared.Audio;
|
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
|
||||||
using Robust.Shared.Player;
|
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
@@ -90,6 +86,10 @@ namespace Content.Server.Polymorph.Systems
|
|||||||
/// logic and conditions specified in the prototype, and everything else that may be needed.
|
/// logic and conditions specified in the prototype, and everything else that may be needed.
|
||||||
/// I am clinically insane - emo
|
/// I am clinically insane - emo
|
||||||
|
|
||||||
|
// if it's already morphed, don't allow it again with this condition active.
|
||||||
|
if (!proto.AllowRepeatedMorphs && HasComp<PolymorphedEntityComponent>(target))
|
||||||
|
return null;
|
||||||
|
|
||||||
// mostly just for vehicles
|
// mostly just for vehicles
|
||||||
if (TryComp<BuckleComponent>(target, out var buckle))
|
if (TryComp<BuckleComponent>(target, out var buckle))
|
||||||
buckle.TryUnbuckle(target, true);
|
buckle.TryUnbuckle(target, true);
|
||||||
|
|||||||
@@ -88,6 +88,9 @@ namespace Content.Shared.Polymorph
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("revertOnDeath", serverOnly: true)]
|
[DataField("revertOnDeath", serverOnly: true)]
|
||||||
public bool RevertOnDeath = true;
|
public bool RevertOnDeath = true;
|
||||||
|
|
||||||
|
[DataField("allowRepeatedMorphs", serverOnly: true)]
|
||||||
|
public bool AllowRepeatedMorphs = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum PolymorphInventoryChange : byte
|
public enum PolymorphInventoryChange : byte
|
||||||
|
|||||||
@@ -5,33 +5,39 @@
|
|||||||
transferName: true
|
transferName: true
|
||||||
transferHumanoidAppearance: true
|
transferHumanoidAppearance: true
|
||||||
inventory: Transfer
|
inventory: Transfer
|
||||||
|
allowRepeatedMorphs: true
|
||||||
|
|
||||||
- type: polymorph
|
- type: polymorph
|
||||||
id: AdminMonkeySmite
|
id: AdminMonkeySmite
|
||||||
entity: MobMonkey
|
entity: MobMonkey
|
||||||
forced: true
|
forced: true
|
||||||
inventory: Drop
|
inventory: Drop
|
||||||
|
allowRepeatedMorphs: true
|
||||||
|
|
||||||
- type: polymorph
|
- type: polymorph
|
||||||
id: AdminBreadSmite
|
id: AdminBreadSmite
|
||||||
entity: FoodBreadPlain
|
entity: FoodBreadPlain
|
||||||
forced: true
|
forced: true
|
||||||
inventory: Drop
|
inventory: Drop
|
||||||
|
allowRepeatedMorphs: true
|
||||||
|
|
||||||
- type: polymorph
|
- type: polymorph
|
||||||
id: AdminInstrumentSmite
|
id: AdminInstrumentSmite
|
||||||
entity: SuperSynthesizerInstrument
|
entity: SuperSynthesizerInstrument
|
||||||
forced: true
|
forced: true
|
||||||
inventory: Drop
|
inventory: Drop
|
||||||
|
allowRepeatedMorphs: true
|
||||||
|
|
||||||
- type: polymorph
|
- type: polymorph
|
||||||
id: AdminMouseSmite
|
id: AdminMouseSmite
|
||||||
entity: MobMouse
|
entity: MobMouse
|
||||||
forced: true
|
forced: true
|
||||||
inventory: Drop
|
inventory: Drop
|
||||||
|
allowRepeatedMorphs: true
|
||||||
|
|
||||||
- type: polymorph
|
- type: polymorph
|
||||||
id: AdminDisposalsSmite
|
id: AdminDisposalsSmite
|
||||||
entity: DisposalUnit
|
entity: DisposalUnit
|
||||||
forced: true
|
forced: true
|
||||||
inventory: Drop
|
inventory: Drop
|
||||||
|
allowRepeatedMorphs: true
|
||||||
|
|||||||
Reference in New Issue
Block a user