- fix: Fix ling transform & closet skeleton. (#160)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Linq;
|
||||
using Content.Server._White.Cult;
|
||||
using Content.Server._White.Cult.GameRule;
|
||||
using Content.Server.Administration.Systems;
|
||||
using Content.Server.Bible.Components;
|
||||
@@ -12,13 +11,14 @@ using Content.Server.GameTicking.Rules;
|
||||
using Content.Server.Humanoid;
|
||||
using Content.Server.IdentityManagement;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.NPC.Components;
|
||||
using Content.Server.NPC.Systems;
|
||||
using Content.Server.Polymorph.Systems;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Store.Components;
|
||||
using Content.Server.Temperature.Components;
|
||||
using Content.Server.Temperature.Systems;
|
||||
using Content.Shared._White.Chaplain;
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Changeling;
|
||||
using Content.Shared.Chemistry.EntitySystems;
|
||||
@@ -36,10 +36,12 @@ using Content.Shared.Inventory;
|
||||
using Content.Shared.Miracle.UI;
|
||||
using Content.Shared.Mobs;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Ninja.Components;
|
||||
using Content.Shared.Pulling;
|
||||
using Content.Shared.Pulling.Components;
|
||||
using Content.Shared.Standing;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects.Components.Localization;
|
||||
using Robust.Shared.Player;
|
||||
@@ -74,6 +76,8 @@ public sealed partial class ChangelingSystem
|
||||
[Dependency] private readonly CuffableSystem _cuffable = default!;
|
||||
[Dependency] private readonly NukeopsRuleSystem _nukeOps = default!;
|
||||
[Dependency] private readonly CultRuleSystem _cult = default!;
|
||||
[Dependency] private readonly NpcFactionSystem _faction = default!;
|
||||
[Dependency] private readonly TagSystem _tag = default!;
|
||||
|
||||
private void InitializeAbilities()
|
||||
{
|
||||
@@ -143,7 +147,8 @@ public sealed partial class ChangelingSystem
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TryComp<DnaComponent>(args.Target, out _))
|
||||
if (!TryComp<DnaComponent>(args.Target, out _) ||
|
||||
_tag.HasTag(args.Target, "Unimplantable")) // Terminator check
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("changeling-popup-absorb-unknown"), uid, uid);
|
||||
return;
|
||||
@@ -295,7 +300,8 @@ public sealed partial class ChangelingSystem
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TryComp<DnaComponent>(args.Target, out var dnaComponent))
|
||||
if (!TryComp<DnaComponent>(args.Target, out var dnaComponent) ||
|
||||
_tag.HasTag(args.Target, "Unimplantable")) // Terminator check
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("changeling-popup-absorb-unknown"), uid, uid);
|
||||
return;
|
||||
@@ -363,7 +369,8 @@ public sealed partial class ChangelingSystem
|
||||
if (!_ui.TryGetUi(user, TransformStingSelectorUiKey.Key, out var bui))
|
||||
return;
|
||||
|
||||
if (HasComp<ChangelingComponent>(target))
|
||||
if (HasComp<ChangelingComponent>(target) || HasComp<SpaceNinjaComponent>(target) ||
|
||||
_tag.HasTag(target, "Unimplantable")) // Terminator check
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("changeling-popup-transform-not-effective"), user, user);
|
||||
return;
|
||||
@@ -843,6 +850,15 @@ public sealed partial class ChangelingSystem
|
||||
_chemicalsSystem.UpdateAlert(polymorphEntity.Value, toAdd);
|
||||
}
|
||||
|
||||
if (TryComp(target, out NpcFactionMemberComponent? factionMember))
|
||||
{
|
||||
_faction.ClearFactions(polymorphEntity.Value);
|
||||
foreach (var faction in factionMember.Factions)
|
||||
{
|
||||
_faction.AddFaction(polymorphEntity.Value, faction);
|
||||
}
|
||||
}
|
||||
|
||||
_nukeOps.TransferRole(target, polymorphEntity.Value);
|
||||
|
||||
_cult.TransferRole(target, polymorphEntity.Value);
|
||||
|
||||
@@ -208,6 +208,7 @@ namespace Content.Shared.Preferences
|
||||
var bodyType = SharedHumanoidAppearanceSystem.DefaultBodyType;
|
||||
if (prototypeManager.TryIndex<SpeciesPrototype>(species, out var speciesPrototype))
|
||||
{
|
||||
bodyType = speciesPrototype.BodyTypes[0];
|
||||
sex = random.Pick(speciesPrototype.Sexes);
|
||||
age = random.Next(speciesPrototype.MinAge,
|
||||
speciesPrototype
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
- type: polymorph
|
||||
id: MobHumanSyndicateAgent
|
||||
configuration:
|
||||
entity: MobHumanSyndicateAgent
|
||||
entity: MobHuman
|
||||
forced: true
|
||||
revertOnCrit: false
|
||||
revertOnDeath: false
|
||||
@@ -299,7 +299,7 @@
|
||||
- type: polymorph
|
||||
id: MobHumanSyndicateAgentNukeops
|
||||
configuration:
|
||||
entity: MobHumanSyndicateAgentNukeops
|
||||
entity: MobHuman
|
||||
forced: true
|
||||
revertOnCrit: false
|
||||
revertOnDeath: false
|
||||
@@ -310,7 +310,7 @@
|
||||
- type: polymorph
|
||||
id: MobHumanNukeOp
|
||||
configuration:
|
||||
entity: MobHumanNukeOp
|
||||
entity: MobHuman
|
||||
forced: true
|
||||
revertOnCrit: false
|
||||
revertOnDeath: false
|
||||
@@ -321,7 +321,7 @@
|
||||
- type: polymorph
|
||||
id: MobHumanLoneNuclearOperative
|
||||
configuration:
|
||||
entity: MobHumanLoneNuclearOperative
|
||||
entity: MobHuman
|
||||
forced: true
|
||||
revertOnCrit: false
|
||||
revertOnDeath: false
|
||||
@@ -332,7 +332,7 @@
|
||||
- type: polymorph
|
||||
id: MobHumanSpaceNinja
|
||||
configuration:
|
||||
entity: MobHumanSpaceNinja
|
||||
entity: MobHuman
|
||||
forced: true
|
||||
revertOnCrit: false
|
||||
revertOnDeath: false
|
||||
@@ -354,7 +354,7 @@
|
||||
- type: polymorph
|
||||
id: MobHumanTerminator
|
||||
configuration:
|
||||
entity: MobHumanTerminator
|
||||
entity: MobHuman
|
||||
forced: true
|
||||
revertOnCrit: false
|
||||
revertOnDeath: false
|
||||
@@ -365,7 +365,51 @@
|
||||
- type: polymorph
|
||||
id: MobTerminatorEndoskeleton
|
||||
configuration:
|
||||
entity: MobTerminatorEndoskeleton
|
||||
entity: MobHuman
|
||||
forced: true
|
||||
revertOnCrit: false
|
||||
revertOnDeath: false
|
||||
transferDamage: true
|
||||
allowRepeatedMorphs: true
|
||||
inventory: Transfer
|
||||
|
||||
- type: polymorph
|
||||
id: MobSkeletonPerson
|
||||
configuration:
|
||||
entity: MobSkeletonPerson
|
||||
forced: true
|
||||
revertOnCrit: false
|
||||
revertOnDeath: false
|
||||
transferDamage: true
|
||||
allowRepeatedMorphs: true
|
||||
inventory: Transfer
|
||||
|
||||
- type: polymorph
|
||||
id: MobSkeletonPirate
|
||||
configuration:
|
||||
entity: MobSkeletonPerson
|
||||
forced: true
|
||||
revertOnCrit: false
|
||||
revertOnDeath: false
|
||||
transferDamage: true
|
||||
allowRepeatedMorphs: true
|
||||
inventory: Transfer
|
||||
|
||||
- type: polymorph
|
||||
id: MobSkeletonBiker
|
||||
configuration:
|
||||
entity: MobSkeletonPerson
|
||||
forced: true
|
||||
revertOnCrit: false
|
||||
revertOnDeath: false
|
||||
transferDamage: true
|
||||
allowRepeatedMorphs: true
|
||||
inventory: Transfer
|
||||
|
||||
- type: polymorph
|
||||
id: MobSkeletonCloset
|
||||
configuration:
|
||||
entity: MobSkeletonPerson
|
||||
forced: true
|
||||
revertOnCrit: false
|
||||
revertOnDeath: false
|
||||
|
||||
Reference in New Issue
Block a user