mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
smol fix (#927)
* 1 * Update ClonePowerSystem.cs * Update ClonePowerSystem.cs * Apply suggestion from @coderabbitai[bot] Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Remuchi <72476615+Remuchi@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -96,6 +96,12 @@ public sealed class ClonePowerSystem : EntitySystem
|
||||
return;
|
||||
}
|
||||
|
||||
if (_mind.TryGetMind(clone, out _, out _))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("clone-mind-clone"), uid, uid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_mind.TryGetMind(uid, out var mindId, out var mind))
|
||||
return;
|
||||
|
||||
@@ -116,7 +122,13 @@ public sealed class ClonePowerSystem : EntitySystem
|
||||
_popup.PopupEntity(Loc.GetString("clone-crit-original"), uid, uid);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (_mind.TryGetMind(original, out _, out _))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("clone-mind-original"), uid, uid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_mind.TryGetMind(uid, out var mindId, out var mind))
|
||||
return;
|
||||
|
||||
@@ -174,6 +186,14 @@ public sealed class ClonePowerSystem : EntitySystem
|
||||
if (TryComp<ClonePowerComponent>(component.OriginalUid, out var origComp))
|
||||
origComp.CloneUid = null;
|
||||
|
||||
if (component.OriginalUid != null)
|
||||
{
|
||||
if (_mind.TryGetMind(uid, out var mindId, out var mind) && !_mind.TryGetMind(component.OriginalUid.Value, out _, out _))
|
||||
{
|
||||
_mind.TransferTo(mindId, component.OriginalUid.Value, mind: mind);
|
||||
}
|
||||
}
|
||||
|
||||
StripCloneEquipment(uid);
|
||||
|
||||
var xform = Transform(uid);
|
||||
@@ -184,4 +204,4 @@ public sealed class ClonePowerSystem : EntitySystem
|
||||
_popup.PopupCoordinates(Loc.GetString("psionic-burns-up", ("item", uid)), xform.Coordinates, Filter.Pvs(uid), true, Shared.Popups.PopupType.MediumCaution);
|
||||
_audio.PlayEntity("/Audio/Effects/lightburn.ogg", Filter.Pvs(uid), uid, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ clone-no-clone = You don't have a clone!
|
||||
clone-crit-clone = The connection with your clone is extremely weak!
|
||||
clone-no-original = You don't have an original body!
|
||||
clone-crit-original = The connection with your original body is extremely weak!
|
||||
clone-mind-clone = The clone already possesses consciousness!
|
||||
clone-mind-original = The original body is already occupied!
|
||||
|
||||
action-name-telepathy = Directed Telepathy
|
||||
action-description-telepathy = Thrusts your thought directly into the target's mind, forcing them to hear you.
|
||||
|
||||
@@ -9,6 +9,8 @@ clone-no-clone = У вас нет копии себя!
|
||||
clone-crit-clone = Связь с двойником крайне слаба!
|
||||
clone-no-original = У вас нет оригинального тела!
|
||||
clone-crit-original = Связь с оригинальным телом крайне слаба!
|
||||
clone-mind-clone = Копия уже обладает сознанием!
|
||||
clone-mind-original = Оригинальное тело уже занято!
|
||||
|
||||
action-name-telepathy = Направленная телепатия
|
||||
action-description-telepathy = Вонзает твою мысль прямо в разум цели, заставляя её услышать тебя.
|
||||
|
||||
Reference in New Issue
Block a user