Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymorph Fix (supposedly) #8893

Merged
merged 25 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1c46b73
Merge branch 'space-wizards-master'
EmoGarbage404 Apr 25, 2022
404cb6d
Merge branch 'space-wizards:master' into master
EmoGarbage404 Apr 27, 2022
bc28856
Merge branch 'space-wizards:master' into master
EmoGarbage404 Apr 28, 2022
b78709a
Merge branch 'space-wizards:master' into master
EmoGarbage404 May 1, 2022
c8f849f
Merge branch 'space-wizards:master' into master
EmoGarbage404 May 5, 2022
6ba6110
Merge branch 'space-wizards:master' into master
EmoGarbage404 May 7, 2022
968f756
Merge branch 'space-wizards:master' into master
EmoGarbage404 May 9, 2022
52cca51
Merge branch 'space-wizards:master' into master
EmoGarbage404 May 11, 2022
71d3cb9
Merge branch 'space-wizards:master' into master
EmoGarbage404 May 12, 2022
0a39235
Merge branch 'space-wizards:master' into master
EmoGarbage404 May 13, 2022
f240894
Merge branch 'space-wizards:master' into master
EmoGarbage404 May 13, 2022
df20146
Merge branch 'master' of https://github.com/space-wizards/space-stati…
EmoGarbage404 May 27, 2022
1442766
Merge branch 'space-wizards-master'
EmoGarbage404 May 27, 2022
fa7b5dd
Merge branch 'space-wizards:master' into master
EmoGarbage404 May 29, 2022
9e8e4f8
Merge branch 'space-wizards:master' into master
EmoGarbage404 May 29, 2022
63178a8
Merge branch 'space-wizards:master' into master
EmoGarbage404 May 30, 2022
0188a18
Merge branch 'space-wizards:master' into master
EmoGarbage404 Jun 1, 2022
7afc2d0
Merge branch 'space-wizards:master' into master
EmoGarbage404 Jun 2, 2022
78ec269
Merge branch 'space-wizards:master' into master
EmoGarbage404 Jun 4, 2022
5b6f1b4
Merge branch 'space-wizards:master' into master
EmoGarbage404 Jun 5, 2022
4abc44a
Merge branch 'space-wizards:master' into master
EmoGarbage404 Jun 7, 2022
431e114
Merge branch 'space-wizards:master' into master
EmoGarbage404 Jun 9, 2022
288a562
Merge branch 'space-wizards:master' into master
EmoGarbage404 Jun 12, 2022
06edbd1
Merge branch 'space-wizards:master' into master
EmoGarbage404 Jun 15, 2022
474caef
deleted check
EmoGarbage404 Jun 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Content.Server/Polymorph/Systems/PolymorphableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void OnPolymorphActionEvent(EntityUid uid, PolymorphableComponent compon
/// </summary>
/// <param name="target">The entity that will be transformed</param>
/// <param name="id">The id of the polymorph prototype</param>
public EntityUid? PolymorphEntity(EntityUid target, String id)
public EntityUid? PolymorphEntity(EntityUid target, string id)
{
if (!_proto.TryIndex<PolymorphPrototype>(id, out var proto))
{
Expand Down Expand Up @@ -99,9 +99,8 @@ private void OnPolymorphActionEvent(EntityUid uid, PolymorphableComponent compon
comp.Prototype = proto;
RaiseLocalEvent(child, new PolymorphComponentSetupEvent());

var targetXform = Transform(target);
var childXform = Transform(child);
childXform.LocalRotation = targetXform.LocalRotation;
childXform.LocalRotation = targetTransformComp.LocalRotation;

if (_container.TryGetContainingContainer(target, out var cont))
cont.Insert(child);
Expand Down
3 changes: 3 additions & 0 deletions Content.Server/Polymorph/Systems/PolymorphedEntitySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public void Revert(EntityUid uid)
if (!TryComp<PolymorphedEntityComponent>(uid, out var component))
return;

if (Deleted(component.Parent))
return;

var proto = component.Prototype;

var uidXform = Transform(uid);
Expand Down