Content ecs containers (#22484)
This commit is contained in:
@@ -201,7 +201,7 @@ public sealed partial class BorgSystem
|
||||
continue;
|
||||
}
|
||||
|
||||
component.ProvidedContainer.Remove(item, EntityManager, force: true);
|
||||
_container.Remove(item, component.ProvidedContainer, force: true);
|
||||
}
|
||||
|
||||
if (!item.IsValid())
|
||||
@@ -245,7 +245,7 @@ public sealed partial class BorgSystem
|
||||
if (LifeStage(item) <= EntityLifeStage.MapInitialized)
|
||||
{
|
||||
RemComp<UnremoveableComponent>(item);
|
||||
component.ProvidedContainer.Insert(item, EntityManager);
|
||||
_container.Insert(item, component.ProvidedContainer);
|
||||
}
|
||||
_hands.RemoveHand(chassis, handId, hands);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public sealed partial class BorgSystem
|
||||
|
||||
_adminLog.Add(LogType.Action, LogImpact.Medium,
|
||||
$"{ToPrettyString(attachedEntity):player} removed brain {ToPrettyString(brain)} from borg {ToPrettyString(uid)}");
|
||||
component.BrainContainer.Remove(brain, EntityManager);
|
||||
_container.Remove(brain, component.BrainContainer);
|
||||
_hands.TryPickupAnyHand(attachedEntity, brain);
|
||||
UpdateUI(uid, component);
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public sealed partial class BorgSystem
|
||||
|
||||
_adminLog.Add(LogType.Action, LogImpact.Medium,
|
||||
$"{ToPrettyString(attachedEntity):player} removed module {ToPrettyString(module)} from borg {ToPrettyString(uid)}");
|
||||
component.ModuleContainer.Remove(module);
|
||||
_container.Remove(module, component.ModuleContainer);
|
||||
_hands.TryPickupAnyHand(attachedEntity, module);
|
||||
|
||||
UpdateUI(uid, component);
|
||||
|
||||
@@ -46,6 +46,7 @@ public sealed partial class BorgSystem : SharedBorgSystem
|
||||
[Dependency] private readonly PowerCellSystem _powerCell = default!;
|
||||
[Dependency] private readonly ThrowingSystem _throwing = default!;
|
||||
[Dependency] private readonly UserInterfaceSystem _ui = default!;
|
||||
[Dependency] private readonly SharedContainerSystem _container = default!;
|
||||
|
||||
[ValidatePrototypeId<JobPrototype>]
|
||||
public const string BorgJobId = "Borg";
|
||||
@@ -109,7 +110,7 @@ public sealed partial class BorgSystem : SharedBorgSystem
|
||||
}
|
||||
}
|
||||
|
||||
component.BrainContainer.Insert(used);
|
||||
_container.Insert(used, component.BrainContainer);
|
||||
_adminLog.Add(LogType.Action, LogImpact.Medium,
|
||||
$"{ToPrettyString(args.User):player} installed brain {ToPrettyString(used)} into borg {ToPrettyString(uid)}");
|
||||
args.Handled = true;
|
||||
@@ -118,7 +119,7 @@ public sealed partial class BorgSystem : SharedBorgSystem
|
||||
|
||||
if (module != null && CanInsertModule(uid, used, component, module, args.User))
|
||||
{
|
||||
component.ModuleContainer.Insert(used);
|
||||
_container.Insert(used, component.ModuleContainer);
|
||||
_adminLog.Add(LogType.Action, LogImpact.Low,
|
||||
$"{ToPrettyString(args.User):player} installed module {ToPrettyString(used)} into borg {ToPrettyString(uid)}");
|
||||
args.Handled = true;
|
||||
|
||||
Reference in New Issue
Block a user