コード例 #1
0
 private void OnComponentRemove(EntityUid uid, SharedIdCardConsoleComponent component, ComponentRemove args)
 {
     _itemSlotsSystem.RemoveItemSlot(uid, component.PrivilegedIdSlot);
     _itemSlotsSystem.RemoveItemSlot(uid, component.TargetIdSlot);
 }
コード例 #2
0
 private void OnComponentInit(EntityUid uid, SharedIdCardConsoleComponent component, ComponentInit args)
 {
     _itemSlotsSystem.AddItemSlot(uid, $"{component.Name}-privilegedId", component.PrivilegedIdSlot);
     _itemSlotsSystem.AddItemSlot(uid, $"{component.Name}-targetId", component.TargetIdSlot);
 }