Fix assert when arming the nuke (#18891)

Apparently trying to anchor an entity twice throws an assert!
This commit is contained in:
Pieter-Jan Briers
2023-08-09 07:16:41 +02:00
committed by GitHub
parent e3f491cdb8
commit 9124c60db2

View File

@@ -455,7 +455,12 @@ public sealed class NukeSystem : EntitySystem
_sound.PlayGlobalOnStation(uid, _audio.GetSound(component.ArmSound)); _sound.PlayGlobalOnStation(uid, _audio.GetSound(component.ArmSound));
_itemSlots.SetLock(uid, component.DiskSlot, true); _itemSlots.SetLock(uid, component.DiskSlot, true);
if (!nukeXform.Anchored)
{
// Admin command shenanigans, just make sure.
_transform.AnchorEntity(uid, nukeXform); _transform.AnchorEntity(uid, nukeXform);
}
component.Status = NukeStatus.ARMED; component.Status = NukeStatus.ARMED;
UpdateUserInterface(uid, component); UpdateUserInterface(uid, component);
} }