@@ -42,9 +42,6 @@ public sealed partial class BorgSystem
|
||||
{
|
||||
var chassis = args.Container.Owner;
|
||||
|
||||
if (Terminating(chassis))
|
||||
return;
|
||||
|
||||
if (!TryComp<BorgChassisComponent>(chassis, out var chassisComp) ||
|
||||
args.Container != chassisComp.ModuleContainer)
|
||||
return;
|
||||
@@ -232,7 +229,11 @@ public sealed partial class BorgSystem
|
||||
return false;
|
||||
|
||||
if (component.ModuleContainer.ContainedEntities.Count >= component.MaxModules)
|
||||
{
|
||||
if (user != null)
|
||||
Popup.PopupEntity(Loc.GetString("borg-module-too-many"), uid, user.Value);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (component.ModuleWhitelist?.IsValid(module, EntityManager) == false)
|
||||
{
|
||||
|
||||
@@ -69,8 +69,14 @@ public sealed partial class BorgSystem
|
||||
if (TryComp<NameIdentifierComponent>(uid, out var identifier))
|
||||
name = $"{name} {identifier.FullIdentifier}";
|
||||
|
||||
_metaData.SetEntityName(uid, name);
|
||||
var metaData = MetaData(uid);
|
||||
|
||||
// don't change the name if the value doesn't actually change
|
||||
if (metaData.EntityName.Equals(name, StringComparison.InvariantCulture))
|
||||
return;
|
||||
|
||||
_adminLog.Add(LogType.Action, LogImpact.High, $"{ToPrettyString(attachedEntity):player} set borg \"{ToPrettyString(uid)}\"'s name to: {name}");
|
||||
_metaData.SetEntityName(uid, name, metaData);
|
||||
}
|
||||
|
||||
private void OnRemoveModuleBuiMessage(EntityUid uid, BorgChassisComponent component, BorgRemoveModuleBuiMessage args)
|
||||
|
||||
Reference in New Issue
Block a user