ItemToggle + slots stuff (#31312)

* ItemToggle + slots stuff

- Add component for itemslot locks to match LockComponent (surprised this didn't exist).
- Add thing for pointlight to match itemtoggle. In future should be used for PDAs and stuff but need to fix some other stuff first.

* Also this

* grill
This commit is contained in:
metalgearsloth
2024-08-25 22:30:28 +10:00
committed by GitHub
parent a89d4c750b
commit c0a07614c0
10 changed files with 163 additions and 17 deletions

View File

@@ -24,7 +24,7 @@ namespace Content.Shared.Containers.ItemSlots
/// Note when using popups on entities with many slots with InsertOnInteract, EjectOnInteract or EjectOnUse:
/// A single use will try to insert to/eject from every slot and generate a popup for each that fails.
/// </remarks>
public sealed class ItemSlotsSystem : EntitySystem
public sealed partial class ItemSlotsSystem : EntitySystem
{
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
@@ -38,6 +38,8 @@ namespace Content.Shared.Containers.ItemSlots
{
base.Initialize();
InitializeLock();
SubscribeLocalEvent<ItemSlotsComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<ItemSlotsComponent, ComponentInit>(Oninitialize);